/* =============================================================
   Trayectoria — Archetype: Magazine Multi-Page (adaptado a página única)
   Revista impresa: cubierta + artículo de portada + grid de artículos +
   departamentos, todo en una sola página con topología de revista.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f7f2e7;
  --bg-2: #efe6d3;
  --paper: #fffdf8;
  --ink: #211c15;
  --mute: #5b5346;
  --faint: #8a8171;
  --accent: #a9291f;    /* rojo revista */
  --accent-2: #b8862e;  /* mostaza — departamentos, acentos secundarios */
  --line: #211c15;
  --line-soft: rgba(33, 28, 21, 0.16);

  --display: "Bodoni Moda", "Playfair Display", Georgia, serif;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1080px;
  --gutter: 1.4rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.08; color: var(--ink); }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem;
}
section { padding-block: clamp(2.8rem, 6vw, 5rem); border-bottom: 1px solid var(--line-soft); }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin-bottom: 1rem; max-width: 24ch; }
.section-lede { font-family: var(--serif); color: var(--mute); max-width: 68ch; margin-bottom: 2.2rem; }

/* Generic scroll-reveal — used for grid/card entrances, never on flowing article body */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* Subtle parallax on featured images — max 20px shift, disabled under reduced-motion */
[data-parallax] { will-change: transform; }
@media (prefers-reduced-motion: reduce) { [data-parallax] { transform: none !important; } }

/* =============================================================
   4. Nav — subrayado animado
   ============================================================= */
.nav { position: sticky; top: 0; z-index: 500; background: rgba(247, 242, 231, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 1.8rem; padding: 0.8rem var(--gutter); font-family: var(--sans); }
.nav-brand { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 1.7rem; margin-left: 1rem; }
.nav-link { position: relative; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); padding-block: 0.2rem; }
.nav-link span { position: relative; }
.nav-link span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav-link:hover span::after, .nav-link:focus-visible span::after { transform: scaleX(1); }
.nav-link:hover, .nav-link:focus-visible { color: var(--ink); }
.nav-link--cta { margin-left: auto; color: #fff; background: var(--accent); padding: 0.4rem 0.9rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-link--cta:hover { background: #7f1e16; }
.nav-burger { display: none; flex-direction: column; gap: 4px; padding: 0.5rem; margin-left: auto; }
.nav-burger span { width: 20px; height: 2px; background: var(--ink); }
.nav-mobile { display: none; flex-direction: column; padding: 0.6rem var(--gutter) 1rem; border-bottom: 1px solid var(--line); background: var(--bg); font-family: var(--sans); }
.nav-mobile[data-open="true"] { display: flex; }
.nav-mobile-link { padding: 0.6rem 0; border-top: 1px solid var(--line-soft); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.nav-mobile-link:first-child { border-top: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-link--cta { margin-left: auto; }
  .nav-burger { display: flex; }
}

/* =============================================================
   5. Splash
   ============================================================= */
.splash { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity .4s ease, visibility .4s; }
.splash-mark { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--ink); }
.splash.is-out { opacity: 0; visibility: hidden; pointer-events: none; }

/* =============================================================
   6. Buttons
   ============================================================= */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.6rem; font-family: var(--sans); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #7f1e16; }
.btn-large { padding: 1rem 2rem; font-size: 0.92rem; }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.link-underline { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 0.85rem; color: var(--accent); margin-right: 1.6rem; border-bottom: 1px solid transparent; transition: border-color .25s var(--ease-out); }
.link-underline:hover { border-color: var(--accent); }

/* =============================================================
   7. Masthead + cover story
   ============================================================= */
.cover { border-bottom: none; padding-top: 0; }
.masthead { text-align: center; padding-block: 2.6rem 1.6rem; border-bottom: 1px solid var(--line); }
.masthead-eyebrow { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.5rem; }
.masthead-brand { font-size: clamp(2.2rem, 5.6vw, 3.6rem); letter-spacing: -0.01em; }
.masthead-roles { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.03em; color: var(--mute); margin-top: 0.6rem; }

.cover-story { padding-block: clamp(2.4rem, 6vw, 4rem); max-width: 760px; }
.cover-title { font-size: clamp(2rem, 5vw, 3.2rem); font-style: italic; margin-bottom: 1rem; }
.byline { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.03em; color: var(--faint); margin-bottom: 1.8rem; }
.byline strong { color: var(--ink); font-weight: 600; }

.cover-figure { margin-bottom: 1.8rem; overflow: hidden; }
.cover-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: sepia(0.12) saturate(1.05); }

.cover-body { text-align: justify; hyphens: auto; }
.cover-body p { margin-bottom: 1.2rem; }
.cover-body p.has-dropcap::first-letter {
  font-family: var(--display); font-weight: 800; font-size: 4.4rem; line-height: 0.78;
  float: left; padding: 0.05em 0.1em 0 0; color: var(--accent);
}
.cover-personal { font-style: italic; color: var(--faint); text-align: left; }

.pull-quote { margin-block: 1.8rem; padding-left: 1.6rem; border-left: 3px solid var(--accent); position: relative; text-align: left; }
.pull-quote p { font-family: var(--display); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.6rem); position: relative; padding-left: 1.4rem; }
.pull-quote p::before { content: "“"; position: absolute; left: -0.4rem; top: -0.4rem; font-size: 2.6rem; color: var(--accent-2); font-family: var(--display); }

.cover-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

@media (max-width: 700px) { .cover-body { text-align: left; hyphens: none; } }

/* =============================================================
   8. Stats band
   ============================================================= */
.stats-band { background: var(--bg-2); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.6rem; }
.stat { padding: 1.4rem 1.6rem; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: none; }
.stat-num { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 2.9rem); color: var(--accent); line-height: 1; margin-bottom: 0.4rem; }
.stat-label { font-family: var(--sans); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.2rem; }
.stat-note { font-family: var(--sans); color: var(--faint); font-size: 0.78rem; }

@media (max-width: 700px) { .stat { border-left: none; border-top: 1px solid var(--line-soft); } .stat:first-child { border-top: none; } }

/* =============================================================
   9. Trayectoria
   ============================================================= */
.timeline-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.4rem; margin-top: 1.8rem; align-items: start; }
.timeline { display: flex; flex-direction: column; }
.tl-item { padding-block: 1.5rem; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 160px 1fr; gap: 1.6rem; }
.tl-item:first-child { border-top: none; }
.tl-period { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--accent-2); }
.tl-item--current .tl-period { color: var(--accent); }
.tl-body p { color: var(--mute); margin-top: 0.5rem; }
.tl-tags { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tl-tags li { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--mute); border: 1px solid var(--line-soft); padding: 0.25rem 0.6rem; }

.timeline-figure { overflow: hidden; align-self: start; }
.timeline-figure img { width: 100%; aspect-ratio: 3/4; object-fit: cover; filter: sepia(0.12) saturate(1.05); }

@media (max-width: 860px) {
  .timeline-layout { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* =============================================================
   10. Departamentos — ponencias
   ============================================================= */
.department-section { background: var(--bg-2); }
.departments-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; margin-top: 1.8rem; }
.department-card { background: var(--paper); padding: 1.6rem; border-top: 3px solid var(--accent-2); }
.department-head { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 0.9rem; }
.department-head h3 { font-size: 1.05rem; flex: 1; }
.department-count { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--accent-2); }
.department-examples li { font-family: var(--serif); font-size: 0.9rem; color: var(--mute); padding-block: 0.4rem; border-top: 1px solid var(--line-soft); }
.department-examples li:first-child { border-top: none; }

/* =============================================================
   11. Formación
   ============================================================= */
.education-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 2.4rem; margin-top: 1.8rem; }
.education-heading { font-family: var(--sans); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-2); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line-soft); }
.education-list li { display: grid; grid-template-columns: 100px 1fr; gap: 1rem; padding-block: 0.7rem; border-top: 1px solid var(--line-soft); }
.education-list li:first-child { border-top: none; }
.edu-period { font-family: var(--sans); color: var(--faint); font-size: 0.78rem; font-weight: 700; }
.edu-body { color: var(--mute); font-size: 0.9rem; }
.edu-body strong { color: var(--ink); font-family: var(--serif); }

/* =============================================================
   12. Artículos — grid "en portada"
   ============================================================= */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.8rem; margin-top: 1.8rem; margin-bottom: 1.8rem; }
.article-preview { border-top: 1px solid var(--line); padding-top: 1rem; }
.article-index { font-family: var(--display); font-size: 0.85rem; color: var(--accent-2); font-weight: 700; }
.article-preview h3 { font-size: 1.15rem; margin: 0.5rem 0 0.5rem; }
.article-preview p { color: var(--mute); font-size: 0.94rem; }
.articles-links { margin-top: 1.4rem; }

/* =============================================================
   13. Prensa
   ============================================================= */
.press-section .pull-quote--press { max-width: 74ch; }
.press-source { font-family: var(--sans); color: var(--faint); font-size: 0.8rem; margin-top: 0.6rem; text-transform: uppercase; letter-spacing: 0.03em; }

/* =============================================================
   14. Colaboraciones — créditos
   ============================================================= */
.collab-section { text-align: center; }
.collab-credits { font-family: var(--sans); font-size: 0.92rem; color: var(--mute); font-style: italic; line-height: 2; }
.collab-sep { color: var(--accent-2); font-style: normal; }

/* =============================================================
   15. Suscríbete / contacto
   ============================================================= */
.contact-banner { background: var(--ink); color: var(--bg); padding: clamp(2.2rem, 5vw, 3.6rem); }
.contact-banner .kicker { color: var(--accent-2); }
.contact-banner .section-title { color: var(--bg); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-block: 1.8rem; }
.contact-card { display: block; padding: 1.4rem; border: 1px solid rgba(247, 242, 231, 0.22); }
.contact-card:hover { border-color: var(--accent-2); }
.contact-card h3 { color: var(--bg); font-size: 1.05rem; margin-bottom: 0.4rem; }
.contact-card p { color: rgba(247, 242, 231, 0.72); font-size: 0.9rem; margin-bottom: 0.7rem; font-family: var(--serif); }
.contact-card-cta { font-family: var(--sans); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent-2); }
.contact-direct { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact-direct .btn-ghost { border-color: var(--bg); color: var(--bg); }
.contact-direct .btn-ghost:hover { background: var(--bg); color: var(--ink); }

@media (max-width: 700px) { .contact-cards { grid-template-columns: 1fr; } }

/* =============================================================
   16. Footer
   ============================================================= */
.footer { padding-block: 1.8rem; border-bottom: none; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; font-family: var(--sans); color: var(--faint); font-size: 0.8rem; }
.footer-top { color: var(--accent); font-weight: 700; }
.trayectoria-credit { display: inline-flex; align-items: center; gap: 0.35rem; opacity: 0.8; transition: opacity .2s; }
.trayectoria-credit:hover { opacity: 1; }
.trayectoria-credit img { display: block; border-radius: 2px; }
