/* ==========================================================================
   Sonar de aquí — v3 Sleek Editorial & Pronunciation Audio Studio
   Referentes: Stripe Press × Kinfolk × Modern Audio UX
   ========================================================================== */

:root {
  /* Paleta arquitectónica sobria */
  --obsidian: #0D0C0B;
  --obsidian-2: #161412;
  --obsidian-3: #1F1C19;
  --line-dark: rgba(255, 248, 240, 0.11);
  --line-dark-strong: rgba(255, 248, 240, 0.22);
  --ink-light: #FAF8F5;
  --ink-light-muted: rgba(250, 248, 245, 0.66);

  --paper: #FAF8F4;
  --paper-pure: #FFFFFF;
  --paper-warm: #F3EFE7;
  --line: #E6DFD3;
  --line-strong: #CFC5B5;
  --ink: #141311;
  --ink-2: #4A4640;
  --ink-3: #767066;

  /* Acento único refinado (Terracota arquitectónica + Salvia + Ámbar) */
  --accent: #C54B2E;
  --accent-hover: #DF5A3A;
  --accent-ink: #9E371E;
  --accent-tint: #FBF0EC;

  --sage: #385843;
  --sage-bright: #6AB080;
  --sage-tint: #EDF4EF;

  --amber: #D09248;
  --amber-tint: #FAF3E8;

  /* Tipografías editoriales */
  --font-serif: 'Newsreader', 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-subtle: 0 1px 2px rgba(13, 12, 11, 0.04), 0 8px 24px rgba(13, 12, 11, 0.05);
  --shadow-book: 0 28px 64px -18px rgba(13, 12, 11, 0.22);
  --shadow-deck: 0 28px 70px rgba(0, 0, 0, 0.48);

  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.has-sticky-player { padding-bottom: 158px; }
@media (min-width: 820px) { body.has-sticky-player { padding-bottom: 112px; } }

img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--obsidian); color: #fff; padding: 10px 16px; border-radius: var(--r-xs); z-index: 100;
}
.skip-link:focus { left: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 48px);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ipa, .melody { font-family: 'Inter', 'Segoe UI', 'Noto Sans', sans-serif; font-weight: 600; font-style: normal; }

/* Scroll reveal sutil */
.reveal { opacity: 1; transform: none; transition: opacity 0.65s ease, transform 0.65s ease; }
@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal { opacity: 0; transform: translateY(16px); }
  .js-ready .reveal.in-view { opacity: 1; transform: translateY(0); }
}

/* ---------- HEADER MINIMALISTA DE PRECISIÓN ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 12, 11, 0.80);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink-light);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-hover);
  box-shadow: 0 0 12px rgba(223, 90, 58, 0.7);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.brand-sep { color: rgba(255, 255, 255, 0.25); font-weight: 300; display: none; }
.brand-sub { font-size: 0.8rem; color: var(--ink-light-muted); display: none; }
@media (min-width: 540px) { .brand-sep, .brand-sub { display: inline; } }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: none; align-items: center; gap: 26px; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-light-muted);
  font-size: 0.87rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #FFFFFF; }
@media (min-width: 880px) { .nav-links { display: flex; } }

/* ---------- BUTTONS (Ultra-Crisp) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(197, 75, 46, 0.34);
}

.btn-dark {
  background: var(--obsidian);
  color: #FFFFFF;
}
.btn-dark:hover {
  background: #272421;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--paper-warm);
  border-color: var(--ink);
  color: var(--ink);
}

.btn-nav {
  min-height: 36px;
  padding: 0 16px;
  font-size: 0.82rem;
  background: #FAF8F5;
  color: var(--obsidian);
}
.btn-nav:hover { background: #FFFFFF; color: var(--obsidian); transform: translateY(-1px); }

.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.83rem; }

/* ---------- HERO LUMINOSO DE MADRID + CONSOLA INTERACTIVA ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 840px);
  display: flex;
  align-items: center;
  background: var(--obsidian);
  color: var(--ink-light);
  overflow: hidden;
  padding: clamp(48px, 6vw, 84px) 0 clamp(44px, 5vw, 72px);
}

.hero-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(96deg, rgba(13, 12, 11, 0.92) 0%, rgba(13, 12, 11, 0.78) 42%, rgba(13, 12, 11, 0.28) 74%, rgba(13, 12, 11, 0.44) 100%),
    linear-gradient(180deg, rgba(13, 12, 11, 0.28) 0%, rgba(13, 12, 11, 0.05) 55%, rgba(13, 12, 11, 0.88) 100%),
    url('/assets/img/hero-madrid.webp') center right / cover no-repeat;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; width: 100%; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero .kicker, .section-dark .kicker { color: #F0A382; }

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.65rem, 5.4vw, 4.45rem);
  line-height: 1.01;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: #FFFFFF;
  margin: 0 0 22px 0;
}

.hero h1 em {
  font-style: italic;
  color: #F4C3A3;
}

.hero-lead {
  font-size: clamp(1.02rem, 1.3vw, 1.13rem);
  line-height: 1.65;
  color: rgba(250, 248, 245, 0.82);
  max-width: 50ch;
  margin: 0 0 30px 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 248, 240, 0.14);
  font-size: 0.8rem;
  color: rgba(250, 248, 245, 0.72);
}

@media (min-width: 600px) {
  .hero-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hero-metrics strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.15;
}

/* ---------- CONSOLA A/B DE PRECISIÓN (THE TRINITY + CANVAS WAVE + PHONEME HIGHLIGHTS) ---------- */
.audio-console {
  background: rgba(16, 15, 13, 0.78);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  border: 1px solid rgba(255, 248, 240, 0.16);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.8vw, 28px);
  box-shadow: var(--shadow-deck);
  color: var(--ink-light);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B4E5C3;
}

.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage-bright);
  display: inline-block;
}

.audio-console.is-playing .live-pill i {
  animation: pulseDot 1s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(1.4)} }

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.demo-tab {
  min-height: 34px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 248, 240, 0.16);
  background: transparent;
  color: var(--ink-light-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.demo-tab:hover { color: #FFFFFF; border-color: rgba(255, 248, 240, 0.36); }
.demo-tab[aria-selected="true"] {
  background: #FAF8F5;
  color: var(--obsidian);
  border-color: #FAF8F5;
  font-weight: 600;
}

.wave-stage {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 248, 240, 0.08);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 14px;
}

.wave-canvas {
  width: 100%;
  height: 44px;
  display: block;
  margin-bottom: 12px;
}

.transcript-box {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.48;
  color: #FFFFFF;
  margin: 0 0 10px 0;
}

.phon-word {
  position: relative;
  display: inline-block;
  border-bottom: 1.5px dashed rgba(240, 163, 130, 0.72);
  color: #FFE4D4;
  cursor: pointer;
  padding: 0 1px;
  border-radius: 3px;
  transition: background-color 0.15s ease;
}

.phon-word:hover, .phon-word.is-selected {
  background: rgba(223, 90, 58, 0.26);
  border-bottom-style: solid;
}

.phon-tip {
  font-size: 0.81rem;
  color: rgba(250, 248, 245, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border-left: 2px solid var(--accent-hover);
  padding: 7px 10px;
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  margin: 0;
  line-height: 1.45;
}

/* The Trinity Controls: A | B | Auto A→B */
.trinity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.ab-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 62px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: #FFFFFF;
  transition: all 0.15s ease;
}

.ab-btn-a {
  background: rgba(208, 146, 72, 0.12);
  border: 1px solid rgba(208, 146, 72, 0.42);
}
.ab-btn-a:hover, .ab-btn-a.is-playing { background: rgba(208, 146, 72, 0.24); border-color: var(--amber); }

.ab-btn-b {
  background: rgba(106, 176, 128, 0.13);
  border: 1px solid rgba(106, 176, 128, 0.45);
}
.ab-btn-b:hover, .ab-btn-b.is-playing { background: rgba(106, 176, 128, 0.25); border-color: var(--sage-bright); }

.ab-btn-top {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  font-weight: 600; font-size: 0.87rem;
}

.ab-btn-sub { font-size: 0.76rem; color: var(--ink-light-muted); }

.ab-progress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0%;
  background: var(--amber); transition: width 0.08s linear;
}
.ab-btn-b .ab-progress { background: var(--sage-bright); }

.btn-compare-seq {
  width: 100%;
  min-height: 42px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 248, 240, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #FAF8F5;
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  margin-bottom: 12px;
}

.btn-compare-seq:hover, .btn-compare-seq.is-playing {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.console-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.79rem;
  color: var(--ink-light-muted);
  padding-top: 10px;
  border-top: 1px solid var(--line-dark);
}
.console-foot a { color: #F4C3A3; text-decoration: none; font-weight: 600; }
.console-foot a:hover { color: #FFFFFF; text-decoration: underline; }

/* ---------- SECTIONS & TYPOGRAPHY ---------- */
.section { padding: clamp(68px, 9vw, 120px) 0; }
.section-warm { background: var(--paper-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--obsidian); color: var(--ink-light); }

h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 400;
  margin: 0 0 16px 0;
  color: var(--ink);
}
.section-dark h2, .section-dark h3 { color: #FFFFFF; }

h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.2;
  font-weight: 500;
  margin: 0 0 10px 0;
}

.section-head { max-width: 64ch; margin-bottom: clamp(36px, 5vw, 60px); }
.lead { font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--ink-2); margin: 0; line-height: 1.65; }
.section-dark .lead { color: var(--ink-light-muted); }

/* ---------- STRIPE PRESS ALTERNATING BOOK SPREADS (UNCROPPED CHATGPT PHOTOS!) ---------- */
.spread {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

@media (min-width: 900px) {
  .spread { grid-template-columns: 0.92fr 1.08fr; }
  .spread.is-reverse { grid-template-columns: 1.08fr 0.92fr; }
  .spread.is-reverse .spread-media { order: 2; }
}

.spread + .spread {
  margin-top: clamp(56px, 8vw, 108px);
  padding-top: clamp(56px, 8vw, 108px);
  border-top: 1px solid var(--line);
}

.spread-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-book);
  background: #EAE3D7;
}

.spread-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.spread-media:hover img { transform: scale(1.025); }

.book-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.book-eyebrow.is-olive { color: var(--sage); }

.spread-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;
}

.book-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-3);
  padding: 12px 0;
  margin: 0 0 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: grid;
  gap: 11px;
}

.clean-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.clean-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.toc-drawer {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px 0;
}

.toc-drawer summary {
  padding: 13px 0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
}
.toc-drawer summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 1.15rem; }
.toc-drawer[open] summary::after { content: "−"; }

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 18px;
  padding: 0 0 16px 0;
  font-size: 0.84rem;
  color: var(--ink-2);
}

.spread-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.cta-caption {
  font-size: 0.81rem;
  color: var(--ink-3);
  margin-top: 10px;
}

/* ---------- PEEK INSIDE (MIRADA AL INTERIOR — INTERACTIVE TABS + SVG PITCH CONTOUR) ---------- */
.peek-shell {
  background: var(--paper-pure);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.peek-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}

.peek-tab {
  flex: 1 1 180px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.peek-tab span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.peek-tab[aria-selected="true"] {
  background: var(--paper-pure);
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.peek-panel {
  padding: clamp(24px, 4vw, 44px);
}
.peek-panel[hidden] { display: none; }

.phon-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.phon-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  background: var(--paper);
}

.phon-symbol {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--accent-ink);
  margin-bottom: 10px;
}

.pitch-svg-wrap {
  background: var(--obsidian);
  border-radius: var(--r-md);
  padding: clamp(18px, 3vw, 28px);
  color: var(--ink-light);
  margin-top: 18px;
}

/* ---------- DARK STUDIO: 6 VOICES & 6 MODULES ---------- */
.voices-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 44px;
}

.voice-cell {
  padding: 20px;
  background: var(--obsidian-2);
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.voice-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-bright);
  display: block;
  margin-bottom: 6px;
}
.voice-cell.is-guide .voice-tag { color: #F0A382; }
.voice-cell.is-contrast .voice-tag { color: var(--amber); }

.voice-name {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  color: #FFFFFF;
  display: block;
  margin-bottom: 4px;
}
.voice-note { font-size: 0.81rem; color: var(--ink-light-muted); line-height: 1.45; }

.bento-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 14px;
}

.bento-mod {
  background: var(--obsidian-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md);
  padding: 26px;
  text-decoration: none;
  color: var(--ink-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.bento-mod:hover {
  border-color: rgba(223, 90, 58, 0.55);
  background: var(--obsidian-3);
  transform: translateY(-2px);
}

.bento-mod-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #F0A382;
}

.bento-mod h3 { color: #FFFFFF; margin: 0; font-size: 1.32rem; }
.bento-mod p { margin: 0; font-size: 0.89rem; color: var(--ink-light-muted); }

/* ---------- ROUTES, METHOD, AUTHOR, FAQ ---------- */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.route-card {
  background: var(--paper-pure);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.route-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.route-code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
}
.route-card h3 { font-size: 1.18rem; margin: 0; }
.route-card p { margin: 0; font-size: 0.88rem; color: var(--ink-2); }
.route-cta { margin-top: auto; padding-top: 8px; font-size: 0.82rem; font-weight: 600; color: var(--ink); }

.author-spread {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  background: var(--paper-pure);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4.5vw, 48px);
}
@media (min-width: 760px) { .author-spread { grid-template-columns: 104px 1fr; } }

.monogram {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--obsidian); color: var(--ink-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 2rem; font-style: italic;
}

.faq-list { display: grid; gap: 10px; max-width: 78ch; }
.faq-item { background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 22px; }
.faq-item summary {
  padding: 18px 0; font-weight: 600; font-size: 0.98rem; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.2rem; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 18px 0; color: var(--ink-2); font-size: 0.94rem; }

/* ---------- /recursos/ AUDIO STUDIO ---------- */
.studio-hero {
  position: relative;
  background:
    linear-gradient(110deg, rgba(13, 12, 11, 0.94) 0%, rgba(13, 12, 11, 0.82) 55%, rgba(13, 12, 11, 0.88) 100%),
    url('/assets/img/hero-madrid.webp') center / cover no-repeat;
  color: var(--ink-light);
  padding: clamp(36px, 5vw, 56px) 0 36px;
}
.studio-hero h1 { font-family: var(--font-serif); font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 400; color: #FFFFFF; margin: 0 0 10px 0; }

.progress-card {
  background: rgba(22, 20, 18, 0.84);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin-top: 22px;
}

.progress-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.progress-track { width: 100%; height: 8px; background: rgba(255,255,255,0.12); border-radius: var(--r-pill); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--sage-bright), #9CE0B1); transition: width 0.25s ease; }
.progress-meta { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.84rem; color: var(--ink-light-muted); }

.voices-details summary { cursor: pointer; font-weight: 600; color: #FFFFFF; }
.voices-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 10px; font-size: 0.82rem; }
.voice-chip { background: rgba(255,255,255,0.06); border: 1px solid var(--line-dark); border-radius: var(--r-xs); padding: 7px 10px; color: var(--ink-light); }

.studio-controls { padding: 26px 0 16px; display: grid; gap: 14px; }
.module-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.mod-tab {
  flex: 0 0 auto; min-height: 42px; padding: 7px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--paper-pure); color: var(--ink-2);
  font-family: var(--font-sans); font-size: 0.86rem; font-weight: 600; cursor: pointer;
}
.mod-tab[aria-selected="true"] { background: var(--obsidian); border-color: var(--obsidian); color: #FFFFFF; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-input {
  flex: 1 1 260px; min-height: 44px; padding: 8px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--paper-pure); color: var(--ink);
  font-family: var(--font-sans); font-size: 0.92rem;
}
.route-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.route-chip {
  min-height: 34px; padding: 5px 13px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--paper-warm); color: var(--ink-2);
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.route-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.toggle-hide { display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem; color: var(--ink-2); cursor: pointer; }

.tracks-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
@media (min-width: 780px) { .tracks-grid { grid-template-columns: 1fr 1fr; } }

.track-card {
  background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.track-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-subtle); }
.track-card.is-done { background: var(--sage-tint); border-color: rgba(56, 88, 67, 0.4); }
.track-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 1.5px rgba(197, 75, 46, 0.25); }

.track-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.track-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.t-code { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; color: #FFFFFF; background: var(--obsidian); padding: 3px 9px; border-radius: var(--r-pill); }
.t-kind { font-size: 0.74rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-tint); padding: 3px 10px; border-radius: var(--r-pill); }
.t-status-pending { font-size: 0.73rem; color: var(--ink-3); background: var(--paper-warm); padding: 3px 9px; border-radius: var(--r-pill); }
.done-btn { min-width: 36px; min-height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper-pure); color: var(--ink-3); font-weight: 700; cursor: pointer; }
.done-btn[aria-pressed="true"] { background: var(--sage); border-color: var(--sage); color: #FFFFFF; }
.track-title { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; line-height: 1.35; margin: 0; color: var(--ink); }
.track-summary { margin: 0; font-size: 0.87rem; color: var(--ink-2); }
.track-voices { display: flex; flex-wrap: wrap; gap: 5px; font-size: 0.75rem; color: var(--ink-3); }
.voice-pill { padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--paper); }
.track-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }

/* Sticky Studio Player + Local Voice Mirror */
.studio-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(13, 12, 11, 0.94);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--line-dark-strong);
  box-shadow: 0 -14px 40px rgba(0,0,0,0.4);
  color: var(--ink-light);
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}
.studio-player[hidden] { display: none; }
.player-inner { max-width: var(--container); margin: 0 auto; display: grid; gap: 7px; min-width: 0; }
.player-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.86rem; min-width: 0; }
.player-title { font-weight: 600; color: #FFFFFF; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-time { flex-shrink: 0; font-size: 0.78rem; color: var(--ink-light-muted); }
.player-range { width: 100%; accent-color: var(--accent-hover); height: 20px; margin: 0; cursor: pointer; }
.player-controls { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.player-group { display: flex; align-items: center; gap: 6px; }
.p-btn {
  min-width: 42px; min-height: 40px; padding: 0 11px; border-radius: var(--r-pill);
  border: 1px solid var(--line-dark-strong); background: rgba(255,255,255,0.07);
  color: #FFFFFF; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.p-btn[hidden] { display: none; }
.p-btn:hover { background: rgba(255,255,255,0.16); color: #FFFFFF; }
.p-btn-play { min-width: 46px; min-height: 42px; background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; font-size: 0.96rem; }
.p-btn[aria-pressed="true"] { background: rgba(106, 176, 128, 0.25); border-color: var(--sage-bright); color: #B8EBC7; }
.p-btn.is-recording { background: #C82828; border-color: #FF5555; color: #FFFFFF; animation: pulseDot 1s infinite; }

@media (max-width: 520px) {
  .studio-player { padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  .player-group { gap: 4px; }
  .p-btn { min-width: 34px; min-height: 38px; padding: 0 6px; font-size: 0.72rem; }
  .p-btn-play { min-width: 42px; min-height: 38px; }
  .hide-xs { display: none; }
}

/* PDFs, Directory & Footer */
.pdf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.pdf-card { background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.pdf-meta { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; color: var(--sage); }

.dir-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(295px, 1fr)); gap: 14px; margin-top: 16px; }
.dir-card { background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.dir-card h3 { font-family: var(--font-sans); font-size: 0.98rem; font-weight: 700; margin: 0; }
.dir-speakers { font-size: 0.83rem; color: var(--sage); font-weight: 600; }
.dir-note { font-size: 0.86rem; color: var(--ink-2); margin: 0; }
.dir-warn { font-size: 0.81rem; background: var(--accent-tint); color: var(--ink); border-left: 2.5px solid var(--accent); padding: 8px 11px; border-radius: 0 var(--r-xs) var(--r-xs) 0; margin-top: 4px; }
.legal-box { background: var(--paper-pure); border: 1px solid var(--sage); border-left: 3.5px solid var(--sage); border-radius: var(--r-sm); padding: 18px 20px; margin-top: 24px; font-size: 0.88rem; color: var(--ink-2); }
.avoid-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 10px; margin-top: 14px; }
.avoid-card { background: var(--paper-warm); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; font-size: 0.85rem; }

.prose { max-width: 70ch; margin: 0 auto; }
.prose h2 { margin-top: 32px; font-size: 1.55rem; }
.prose p, .prose li { color: var(--ink-2); }

.site-footer {
  background: var(--obsidian); color: var(--ink-light-muted);
  border-top: 1px solid var(--line-dark); padding: 48px 0; font-size: 0.88rem;
}
.site-footer strong { color: #FFFFFF; }
.site-footer a { color: var(--ink-light-muted); text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.copy-feedback { font-size: 0.83rem; color: var(--sage); font-weight: 600; }
