/* ============================================================
   AJMH Blog — Global Styles
   Autor: Antonio José Moreno Heras
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface2:  #1a1a1a;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --text:      #f0ede8;
  --muted:     #888580;
  --muted2:    #b0ada8;
  --accent:    #c8b89a;
  --accent2:   #7a9e8e;
  --danger:    #e06c75;
  --serif:     'DM Serif Display', Georgia, serif;
  --sans:      'DM Sans', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }

.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 2.5rem;
}

/* ── LAYOUT ───────────────────────────────────────────────── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container--wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── NAVIGATION ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--muted);
  transition: all 0.3s;
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(122,158,142,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 70% 40%, rgba(200,184,154,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 680px; }
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease forwards;
}
.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.4s ease forwards;
}
.hero-name em { font-style: italic; color: var(--accent); }
.hero-tagline {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.6s ease forwards;
}
.hero-cta {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(200,184,154,0.35);
  padding: 0.75rem 2rem;
  border-radius: 100px;
  transition: background 0.25s, color 0.25s;
  opacity: 0;
  animation: fadeUp 0.9s 0.8s ease forwards;
}
.hero-cta:hover { background: rgba(200,184,154,0.1); color: var(--text); }
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: fadeUp 1s 1.2s ease forwards;
}
.scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollPulse 2s 1.5s ease-in-out infinite;
}

/* ── SECTION DIVIDER ──────────────────────────────────────── */
.divider {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  border: none;
  border-top: 1px solid var(--border);
}

/* ── SOBRE MÍ ─────────────────────────────────────────────── */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.sobre-heading {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text);
  grid-column: 1 / -1;
  margin-bottom: 0.5rem;
}
.sobre-heading em { font-style: italic; color: var(--accent); }
.sobre-text { font-size: 0.97rem; color: var(--muted); line-height: 1.85; }
.sobre-stats { display: flex; flex-direction: column; gap: 1.5rem; }
.stat-item { padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.stat-item:last-child { border-bottom: none; padding-bottom: 0; }
.stat-num { font-family: var(--serif); font-size: 2.4rem; color: var(--accent); line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }

/* ── CARDS GRID ───────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2.5rem;
}
.card {
  background: var(--surface);
  padding: 2rem 1.75rem;
  transition: background 0.25s;
}
.card:hover { background: var(--surface2); }
.card-icon { font-size: 1.4rem; margin-bottom: 1rem; display: block; }
.card-title { font-family: var(--serif); font-size: 1.3rem; color: var(--text); margin-bottom: 0.6rem; }
.card-body { font-size: 0.88rem; color: var(--muted); line-height: 1.75; }

/* ── BLOG LIST ────────────────────────────────────────────── */
.blog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}
.blog-title { font-size: clamp(1.8rem, 3.5vw, 2.4rem); color: var(--text); }
.blog-all { font-size: 0.8rem; color: var(--accent); letter-spacing: 0.04em; }
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item:hover { opacity: 0.72; }
.post-date { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; padding-top: 0.2rem; }
.post-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.post-tag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent2); }
.post-heading { font-family: var(--serif); font-size: 1.15rem; color: var(--text); line-height: 1.35; }
.post-excerpt { font-size: 0.85rem; color: var(--muted); line-height: 1.7; }

/* ── QUOTE ────────────────────────────────────────────────── */
.quote-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.quote-inner { max-width: 640px; margin: 0 auto; padding: 5rem 2rem; }
blockquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 1.5rem;
}
blockquote::before { content: '\201C'; color: var(--accent); }
blockquote::after  { content: '\201D'; color: var(--accent); }
.quote-author { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

/* ── AFILIADOS ────────────────────────────────────────────── */
.afiliados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}
.book-card:hover { border-color: var(--border2); transform: translateY(-4px); }
.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
  min-height: 220px;
}
.book-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.book-title { font-family: var(--serif); font-size: 1rem; color: var(--text); line-height: 1.3; }
.book-author { font-size: 0.78rem; color: var(--muted); }
.book-desc { font-size: 0.8rem; color: var(--muted2); line-height: 1.6; flex: 1; }
.book-badge {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  padding: 0.2rem 0;
}
.book-btn {
  display: block;
  margin: 0.75rem 1rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid rgba(200,184,154,0.3);
  padding: 0.55rem 1rem;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}
.book-btn:hover { background: rgba(200,184,154,0.1); color: var(--text); }

/* ── CONTACTO ─────────────────────────────────────────────── */
.contact-section { text-align: center; }
.contact-heading { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.1; color: var(--text); margin-bottom: 1rem; }
.contact-heading em { font-style: italic; color: var(--accent); }
.contact-sub { font-size: 0.97rem; color: var(--muted); margin-bottom: 2.5rem; }
.contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.contact-link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  transition: color 0.2s, border-color 0.2s;
}
.contact-link:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}
.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
}
.footer-logo { font-family: var(--serif); font-size: 0.9rem; color: var(--muted); }
.footer-disclaimer { font-size: 0.7rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }

/* ── PAGE HERO (sub-páginas) ──────────────────────────────── */
.page-hero {
  padding: 9rem 2rem 5rem;
  max-width: 720px;
  margin: 0 auto;
}
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); color: var(--text); margin-bottom: 1rem; }
.page-hero h1 em { font-style: italic; color: var(--accent); }
.page-hero p { font-size: 1.05rem; color: var(--muted); max-width: 500px; }

/* ── ARTICLE ──────────────────────────────────────────────── */
.article-header { padding: 9rem 2rem 4rem; max-width: 720px; margin: 0 auto; }
.article-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.25rem;
}
.article-title { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--text); margin-bottom: 1rem; line-height: 1.1; }
.article-meta { font-size: 0.8rem; color: var(--muted); display: flex; gap: 1.5rem; }
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}
.article-body p { font-size: 1rem; color: var(--muted2); line-height: 1.9; margin-bottom: 1.5rem; }
.article-body h2 { font-size: 1.6rem; color: var(--text); margin: 2.5rem 0 1rem; }
.article-body h3 { font-size: 1.25rem; color: var(--text); margin: 2rem 0 0.75rem; }
.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted2);
}
.article-body blockquote::before, .article-body blockquote::after { content: none; }

/* ── BACK LINK ────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* ── UTILITIES ────────────────────────────────────────────── */
.pt-5  { padding-top: 5rem; }
.pt-7  { padding-top: 7rem; }
.pb-5  { padding-bottom: 5rem; }
.pb-7  { padding-bottom: 7rem; }
.mb-1  { margin-bottom: 1rem; }
.affiliate-note {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.affiliate-note strong { color: var(--muted2); font-weight: 500; }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .sobre-grid { grid-template-columns: 1fr; }
  .sobre-heading { grid-column: 1; }
  .cards-grid { grid-template-columns: 1fr; }
  .post-item { grid-template-columns: 70px 1fr; gap: 1rem; }
  .footer-inner { flex-direction: column; gap: 0.5rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .afiliados-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .afiliados-grid { grid-template-columns: 1fr; }
}
