/* =============================================================
   REAL by David Rico — styles.css
   Static premium site · no build step · v1 (2026-09)
   Sections: 1 Tokens · 2 Reset · 3 Utilities · 4 Typography ·
   5 Components · 6 Sections · 7 Effects · 8 Responsive · 9 Motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Brand palette (REAL Brand Guidelines p.11) */
  --vital:   #B2E67B;   /* accent — one word per headline, primary button */
  --ground:  #123329;   /* deep green — surfaces, glows */
  --ink:     #0f0f0f;   /* page background */
  --stone:   #8e8e8c;   /* metadata (5.8:1 on ink) */
  --canvas:  #f4f2ee;   /* text on dark, light sections */

  /* Derived neutrals (slight green bias so greys read intentional) */
  --ink-2:   #141614;
  --ink-3:   #1a1d1a;
  --ink-4:   #232723;
  --canvas-2:#d8d5cd;
  --canvas-3:#b7b4ac;
  --line:    rgba(244, 242, 238, 0.12);
  --line-2:  rgba(244, 242, 238, 0.22);

  /* Semantic (dark theme is the base for this brand) */
  --bg:        var(--ink);
  --bg-2:      var(--ink-2);
  --surface:   var(--ink-3);
  --surface-2: var(--ink-4);
  --text:      var(--canvas);
  --text-2:    var(--canvas-2);
  --muted:     var(--stone);
  --accent:    var(--vital);
  --accent-ink:var(--ink);

  /* Type */
  /* Titulares: Barlow Bold (autoalojada). Texto: Helvetica Neue LT Pro
     de Adobe Fonts, solo Light (300) y Roman (400). No usar otros pesos
     en --sans: el kit no los incluye y el navegador los falsearía. */
  --display: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: helvetica-neue-lt-pro, "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --w-light: 300;
  --w-roman: 400;

  /* Tracking del texto: separación sutil, nunca espaciado amplio */
  --tr-body:  0.01em;   /* cuerpo en Roman */
  --tr-light: 0.02em;   /* entradillas y citas en Light */
  --tr-label: 0.04em;   /* etiquetas, botones */
  --tr-nav:   0.11em;   /* navegación en mayúsculas: necesita más aire que --tr-label */

  /* Scale */
  --fs-hero: clamp(2.9rem, 8.6vw, 7.6rem);
  --fs-h1:   clamp(2.6rem, 6.4vw, 5.4rem);
  --fs-h2:   clamp(2rem, 4.4vw, 3.6rem);
  --fs-h3:   clamp(1.35rem, 2.2vw, 1.85rem);
  --fs-lead: clamp(1.1rem, 1.6vw, 1.35rem);
  --fs-body: 1.0625rem;
  --fs-small:0.9rem;
  --fs-eyebrow: 0.72rem;

  /* Layout: full-width fluido, sin max-width. El margen lateral es
     padding responsive (--gutter), nunca un ancho de contenedor fijo. */
  --gutter: clamp(20px, 5vw, 96px);
  --section: clamp(5.5rem, 11vw, 10rem);
  --section-s: clamp(3.5rem, 7vw, 6rem);
  --nav-h: 76px;
  --radius: 4px;
  --pill: 999px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);

  color-scheme: dark;
}

/* Light (Canvas) sections — invert the semantic tokens locally */
.theme-light {
  --bg: var(--canvas);
  --bg-2: #ecebe5;
  --surface: #e8e6df;
  --surface-2: #dedcd4;
  --text: var(--ink);
  --text-2: #2b2b29;
  --muted: #5c5c59;
  --line: rgba(15, 15, 15, 0.12);
  --line-2: rgba(15, 15, 15, 0.24);
  --accent: var(--ground);
  --accent-ink: var(--canvas);
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scrollbar-gutter: stable;
  background: var(--ink);
}
body {
  font-family: var(--sans);
  font-weight: var(--w-roman);
  letter-spacing: var(--tr-body);
  font-synthesis-weight: none;   /* nunca negritas falsas en Helvetica */
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  min-height: 100svh;
}
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; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--vital); color: var(--ink); }
:focus-visible { outline: 2px solid var(--vital); outline-offset: 3px; border-radius: 3px; }
input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
strong, b { font-weight: var(--w-roman); color: var(--text); }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: 0.7rem 1rem; background: var(--vital); color: var(--ink);
  font-family: var(--sans); font-weight: var(--w-roman); letter-spacing: var(--tr-label); border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; padding-inline: var(--gutter); }
.container-narrow { width: 100%; max-width: 860px; margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.measure { max-width: 62ch; }
.hidden { display: none !important; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-eyebrow);
  font-weight: var(--w-roman);
  letter-spacing: var(--tr-nav);
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.7em;
}

.display { font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.035em; line-height: 0.94; }
.h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.03em; line-height: 0.98; }
.h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; }
.h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.015em; line-height: 1.12; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); font-weight: var(--w-light); letter-spacing: var(--tr-light); }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }

/* Brand device: the highlighted word */
h1 em, h2 em, h3 em, .display em, .h1 em, .h2 em, .h3 em { font-style: normal; color: var(--vital); }
.theme-light h1 em, .theme-light h2 em, .theme-light h3 em { color: var(--ground); }

.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-top: 2.6em; margin-bottom: 0.7em; }
.prose h3 { font-size: 1.2rem; margin-top: 2em; margin-bottom: 0.5em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.prose a:hover { text-decoration-color: var(--vital); }
.prose strong { color: var(--text); font-weight: var(--w-roman); }

/* =============================================================
   5. Components
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 52px; padding: 0.95rem 1.7rem;
  font-family: var(--sans); font-size: 0.92rem; font-weight: var(--w-roman);
  letter-spacing: var(--tr-label); line-height: 1;
  border-radius: var(--pill); border: 1px solid transparent;
  transition: background-color .45s var(--ease-out), color .45s var(--ease-out), border-color .45s var(--ease-out), transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .12s; }
.btn-primary { background: var(--vital); color: var(--ink); }
.btn-primary:hover { background: var(--canvas); box-shadow: 0 18px 40px -18px rgba(178, 230, 123, 0.45); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--canvas); color: var(--ink); border-color: var(--canvas); }
.btn-ink { background: var(--ink); color: var(--vital); }
.btn-ink:hover { background: var(--ground); color: var(--canvas); }
.btn .arrow { display: inline-block; transition: transform .45s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }

.link-more {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--sans); font-size: 0.9rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label);
  color: var(--text); padding-bottom: 0.35em; position: relative;
}
.link-more::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--vital); transform: scaleX(0.35); transform-origin: left; transition: transform .5s var(--ease-out); }
.link-more:hover::after { transform: scaleX(1); }
.theme-light .link-more::after { background: var(--ground); }

/* --- Navigation --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  height: var(--nav-h);
  transition: background-color .5s var(--ease-out), box-shadow .5s var(--ease-out), transform .5s var(--ease-out);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,15,15,0.55), rgba(15,15,15,0));
  opacity: 1; transition: opacity .5s var(--ease-out);
}
.nav.is-scrolled { background: rgba(15, 15, 15, 0.86); box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(12px)) {
  .nav.is-scrolled { background: rgba(15, 15, 15, 0.72); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); }
}
.nav.is-scrolled::before { opacity: 0; }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-logo { display: inline-flex; align-items: center; height: 100%; }
.nav-logo img { height: 20px; width: auto; }
.nav-links { display: none; align-items: center; gap: 2.2rem; }
.nav-link {
  position: relative; font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman);
  letter-spacing: var(--tr-nav); text-transform: uppercase; color: var(--canvas-2); padding: 0.35rem 0;
  transition: color .3s;
}
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--vital); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--canvas); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-cta .btn { min-height: 44px; padding: 0.75rem 1.35rem; font-size: 0.74rem; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; padding: 10px; margin-right: -10px; border-radius: 50%;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--canvas); transition: transform .4s var(--ease-out), opacity .3s; transform-origin: center; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--canvas);
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 2rem) var(--gutter) 3rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease-out);
  visibility: hidden;
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); visibility: visible; }
.nav-mobile-links { display: flex; flex-direction: column; gap: 0.4rem; }
.nav-mobile-links a {
  font-family: var(--sans); font-weight: var(--w-roman); font-size: clamp(1.4rem, 5.5vw, 2rem); letter-spacing: var(--tr-nav); text-transform: uppercase; line-height: 1.15;
  padding: 1.1rem 0; color: var(--canvas-2);
  display: flex; justify-content: space-between; align-items: baseline;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), color .35s var(--ease-out);
}
.nav-mobile-links a:hover, .nav-mobile-links a:focus-visible { color: var(--vital); }
.nav-mobile[aria-hidden="false"] .nav-mobile-links a { opacity: 1; transform: none; }
.nav-mobile-links a:nth-child(1) { transition-delay: .12s; }
.nav-mobile-links a:nth-child(2) { transition-delay: .17s; }
.nav-mobile-links a:nth-child(3) { transition-delay: .22s; }
.nav-mobile-links a:nth-child(4) { transition-delay: .27s; }
.nav-mobile-links a:nth-child(5) { transition-delay: .32s; }
.nav-mobile-foot { margin-top: 2.4rem; display: flex; flex-direction: column; gap: 1.2rem; }
.nav-mobile-foot .btn { align-self: flex-start; }
.nav-mobile-foot p { color: var(--muted); font-size: var(--fs-small); }
body.nav-open { overflow: hidden; }

/* --- Cards / lists --- */
.num {
  font-family: var(--sans); font-weight: var(--w-roman); font-size: 0.85rem; letter-spacing: var(--tr-label); color: var(--muted); font-variant-numeric: tabular-nums;
}
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: border-color .4s var(--ease-out), background-color .4s var(--ease-out), transform .5s var(--ease-out);
}
.card:hover { border-color: var(--line-2); background: var(--surface-2); }
.card .h3 { margin-top: 0.4rem; }
.card p { color: var(--text-2); }
.card-media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; }
.card:hover .card-media img { transform: scale(1.05); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-family: var(--sans); font-size: 0.84rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label);
  padding: 0.55rem 0.9rem; border: 1px solid var(--line-2); border-radius: var(--pill); color: var(--text-2);
}

/* --- Accordion (FAQ) — native details --- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.35rem 0; font-family: var(--sans); font-weight: var(--w-roman); font-size: clamp(1.05rem, 1.5vw, 1.2rem); letter-spacing: var(--tr-body);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex: none; width: 14px; height: 14px; position: relative; top: -1px; }
.faq-item summary .plus::before, .faq-item summary .plus::after { content: ""; position: absolute; left: 0; top: 6.25px; width: 14px; height: 1.5px; background: var(--vital); transition: transform .4s var(--ease-out); }
.faq-item summary .plus::after { transform: rotate(90deg); }
.faq-item[open] summary .plus::after { transform: rotate(0deg); }
.faq-item[open] summary { color: var(--canvas); }
.faq-item p { padding: 0 0 1.5rem; color: var(--text-2); max-width: 66ch; }
.theme-light .faq-item summary .plus::before, .theme-light .faq-item summary .plus::after { background: var(--ground); }

/* --- Forms --- */
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-family: var(--sans); font-size: 0.84rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); }
.field label .req { color: var(--vital); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 0.9rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); transition: border-color .3s, background-color .3s;
  appearance: none; -webkit-appearance: none;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: rgba(216, 213, 205, 0.45); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--vital); background: var(--surface-2); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #e28b7a; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.6rem; }
.field select option { background: var(--ink-3); color: var(--canvas); }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 0.8rem; align-items: start; font-size: 0.92rem; color: var(--text-2); cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin-top: 2px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--surface); display: grid; place-items: center; transition: background-color .25s, border-color .25s; cursor: pointer; }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg) scale(0); transition: transform .25s var(--ease-out); margin-top: -2px; }
.check input:checked { background: var(--vital); border-color: var(--vital); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check a { text-decoration: underline; text-underline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 0.5rem; }
.form-status { font-size: 0.92rem; color: var(--muted); min-height: 1.4em; }
.form-status.is-error { color: #e28b7a; }
.form.is-sending { opacity: .75; pointer-events: none; }
.form-success { display: none; padding: clamp(1.6rem, 3vw, 2.6rem); border: 1px solid var(--line-2); background: var(--surface); }
.form-success.is-visible { display: block; animation: fadeUp .7s var(--ease-out) both; }
.form-success h3 { font-size: var(--fs-h3); margin-bottom: 0.7rem; }
.form-success p { color: var(--text-2); }
.privacy-layer { font-size: 0.8rem; color: var(--muted); line-height: 1.55; border-top: 1px solid var(--line); padding-top: 1rem; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* --- Popup (plazas limitadas, a los 5s) --- */
dialog.popup {
  position: fixed; inset: 0; margin: auto;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  padding: clamp(1.8rem, 4vw, 2.6rem); max-width: 420px; width: calc(100% - 2.5rem);
  height: fit-content;
  border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
dialog.popup::backdrop { background: rgba(15, 15, 15, 0.72); }
@supports (backdrop-filter: blur(4px)) { dialog.popup::backdrop { backdrop-filter: blur(4px); } }
dialog.popup[open] { animation: popupIn .45s var(--ease-out) both; }
@keyframes popupIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.popup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.popup-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 0.9rem; line-height: 1;
  transition: border-color .3s, color .3s;
}
.popup-close:hover { border-color: var(--vital); color: var(--vital); }
.popup h3 { margin-top: 0.9rem; font-size: clamp(1.35rem, 3vw, 1.7rem); }
.popup .lead { margin-top: 0.6rem; font-size: 1rem; }
.popup .btn-row { margin-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { dialog.popup[open] { animation: none; } }

/* --- Tables (comparison) --- */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 1.25rem 1rem; border-bottom: 1px solid var(--line); }
.compare-table th { font-family: var(--sans); font-size: 0.84rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); padding-top: 0; }
.compare-table th:first-child, .compare-table td:first-child { padding-left: 0; width: 22%; }
.compare-table td:first-child { font-family: var(--sans); font-weight: var(--w-roman); font-size: 1rem; color: var(--text); }
.compare-table td:nth-child(2) { color: var(--muted); }
.compare-table td:nth-child(3) { color: var(--text); font-weight: var(--w-roman); }
.compare-table tbody tr { transition: background-color .3s; }
.compare-table tbody tr:hover { background: rgba(15, 15, 15, 0.03); }
.compare-table td:last-child, .compare-table th:last-child { padding-right: 0; }

/* --- Schedule --- */
/* Weekly timetable (programas.html#horario). Fits the container at every width:
   full names ≥ 1100px, 4-letter codes below, single letters + start times on phones. */
.tt-legend { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; margin-bottom: 2rem; font-size: var(--fs-small); color: var(--text-2); }
.tt-legend li { display: inline-flex; align-items: center; gap: 0.7rem; }
.tt-key { display: inline-block; padding: 0.38rem 0.65rem; font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); line-height: 1; }
.tt-key-xs { display: none; font-weight: var(--w-roman); }
.tt-wrap { overflow: hidden; }
.tt { width: calc(100% + 8px); margin: -4px; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.tt th { font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); text-align: left; padding: 0 0.7rem 0.8rem; }
.tt th.tt-time { width: 8.5rem; padding-left: 0; }
.tt tbody th.tt-time { font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: middle; padding: 0.4rem 1rem 0.4rem 0; }
.tt td.tt-cell { height: 3.4rem; padding: 0.55rem 0.6rem; vertical-align: middle; overflow: hidden; font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); line-height: 1.25; }
.p-open { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.p-longevity { background: rgba(178, 230, 123, 0.13); color: var(--text); box-shadow: inset 2px 0 0 var(--vital); }
.p-perform { background: var(--ground); color: var(--vital); }
.p-conditioning { background: var(--vital); color: var(--ink); }
.p-readaptacion { color: var(--text); outline: 1px dashed var(--vital); outline-offset: -1px; }
@media (max-width: 1099px) {
  .tt .tt-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tt [data-s]::after { content: attr(data-s); }
  .tt th.tt-time { width: 7.5rem; }
  .tt td.tt-cell { height: 3rem; padding: 0.4rem 0.45rem; font-size: 0.62rem; }
}
@media (max-width: 599px) {
  .tt [data-xs]::after { content: attr(data-xs); }
  .tt { width: calc(100% + 4px); margin: -2px; border-spacing: 2px; }
  .tt th { padding: 0 0 0.5rem; font-size: 0.75rem; letter-spacing: var(--tr-label); text-align: center; }
  .tt th.tt-time { width: 2.9rem; text-align: left; }
  .tt tbody th.tt-time { font-size: 0.74rem; padding: 0.2rem 0.4rem 0.2rem 0; }
  .tt td.tt-cell { height: 2.35rem; padding: 0.25rem 0.1rem; font-size: 0.62rem; letter-spacing: 0.04em; text-align: center; }
  .tt-legend { gap: 0.6rem 1.2rem; margin-bottom: 1.4rem; }
  .tt-key-xs { display: inline; }
  .tt-key-xs::after { content: " · "; font-weight: var(--w-roman); }
}

/* --- Program rows (signature) --- */
.prog-list { border-top: 1px solid var(--line); }
.prog { border-bottom: 1px solid var(--line); }
.prog-head {
  width: 100%; display: grid; grid-template-columns: 3rem 1fr auto; align-items: baseline; gap: 1rem 1.5rem;
  padding: 1.5rem 0; text-align: left; cursor: pointer; color: inherit;
  transition: padding .5s var(--ease-out);
}
.prog-head .num { align-self: center; }
.prog-name {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4.2vw, 3.4rem); letter-spacing: -0.03em; line-height: 1;
  transition: color .4s var(--ease-out), transform .6s var(--ease-out);
}
.prog-sub { display: block; margin-top: 0.5rem; font-family: var(--sans); font-size: var(--fs-small); color: var(--muted); letter-spacing: 0; font-weight: 400; }
.prog-toggle { flex: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; align-self: center; transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out), transform .5s var(--ease-out); }
.prog-toggle::before, .prog-toggle::after { content: ""; position: absolute; width: 14px; height: 1.5px; background: currentColor; transition: transform .45s var(--ease-out); }
.prog-toggle::after { transform: rotate(90deg); }
.prog-toggle { position: relative; }
.prog-head:hover .prog-name { color: var(--vital); transform: translateX(6px); }
.prog-head:hover .prog-toggle { border-color: var(--vital); }
.prog-head[aria-expanded="true"] .prog-name { color: var(--vital); }
.prog-head[aria-expanded="true"] .prog-toggle { background: var(--vital); color: var(--ink); border-color: var(--vital); transform: rotate(180deg); }
.prog-head[aria-expanded="true"] .prog-toggle::after { transform: rotate(0deg); }
.prog-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .65s var(--ease-out); }
.prog-panel > div { overflow: hidden; }
.prog[data-open="true"] .prog-panel { grid-template-rows: 1fr; }
.prog-body { display: grid; gap: 1.5rem; padding: 0.5rem 0 2.4rem 0; }
.prog-tagline { font-size: var(--fs-lead); color: var(--text); max-width: 34ch; font-family: var(--sans); font-weight: var(--w-light); letter-spacing: var(--tr-light); line-height: 1.4; }
.prog-cols { display: grid; gap: 1.4rem; }
.prog-col h4 { font-family: var(--sans); font-size: 0.84rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); margin-bottom: 0.5rem; }
.prog-col p { color: var(--text-2); font-size: 0.98rem; }
.prog-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; color: var(--muted); font-size: var(--fs-small); }
.prog-meta b { color: var(--text-2); font-weight: var(--w-roman); }
.prog-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-2); }
.prog-media img { width: 100%; height: 100%; object-fit: cover; }
/* No-JS: everything open */
.no-js .prog-panel { grid-template-rows: 1fr; }
.no-js .prog-toggle { display: none; }

/* Compact program index (home) */
.prog-index { border-top: 1px solid var(--line); }
.prog-index a { display: grid; grid-template-columns: 3rem 1fr auto; align-items: baseline; gap: 1rem 1.5rem; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.prog-index a .prog-name { font-size: clamp(1.4rem, 3.4vw, 2.6rem); }
.prog-index a .go { font-family: var(--sans); font-size: 0.84rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); transition: color .3s, transform .5s var(--ease-out); align-self: center; }
.prog-index a:hover .prog-name { color: var(--vital); transform: translateX(6px); }
.prog-index a:hover .go { color: var(--vital); transform: translateX(4px); }

/* =============================================================
   6. Sections
   ============================================================= */
.section { padding-block: var(--section); position: relative; }
.section-s { padding-block: var(--section-s); }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 1.2rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .h2 { max-width: 20ch; }
.section-head .lead { max-width: 58ch; }
.section-head.split { grid-template-columns: 1fr; align-items: end; }
.divider { height: 1px; background: var(--line); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: clip; isolation: isolate; background: var(--ink); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-media img.ambient { animation: ambientZoom 32s ease-in-out infinite; transform-origin: 60% 40%; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(15,15,15,0.35) 0%, rgba(15,15,15,0.05) 30%, rgba(15,15,15,0.55) 68%, rgba(15,15,15,0.96) 100%),
  radial-gradient(70% 60% at 30% 80%, rgba(18,51,41,0.45), transparent 70%); }
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: 0.09; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px; }
.hero-inner { width: 100%; padding-top: calc(var(--nav-h) + 3rem); padding-bottom: clamp(2.5rem, 6vh, 4.5rem); display: grid; gap: 1.6rem; }
.hero .eyebrow { color: var(--canvas-2); }
.hero .display { max-width: 12ch; }
.hero-sub { max-width: 46ch; font-size: var(--fs-lead); color: var(--canvas-2); }
.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; margin-top: 0.6rem; }
.hero-meta { display: flex; align-items: center; gap: 0.8rem; font-family: var(--sans); font-size: 0.84rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--canvas-2); }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vital); box-shadow: 0 0 0 0 rgba(178,230,123,0.5); animation: pulse 2.6s ease-out infinite; }

/* Page hero (interior) */
.page-hero { position: relative; padding-top: calc(var(--nav-h) + clamp(4rem, 10vw, 8rem)); padding-bottom: clamp(3rem, 7vw, 5.5rem); isolation: isolate; overflow: clip; }
.page-hero-inner { display: grid; gap: 1.4rem; }
.page-hero .h1 { max-width: 14ch; }
.page-hero .lead { max-width: 56ch; }
.page-hero-bg { position: absolute; inset: 0; z-index: -1; opacity: 0.35; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,15,15,0.6), rgba(15,15,15,0.85) 60%, var(--ink) 100%); }

/* Intro (what it is) */
.intro-grid { display: grid; gap: 2.5rem; align-items: start; }
.intro-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink-2); }
.intro-media img { width: 100%; height: 100%; object-fit: cover; }
.intro-media .tag { position: absolute; left: 1.2rem; bottom: 1.2rem; font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--canvas); background: rgba(15,15,15,0.6); padding: 0.5rem 0.8rem; }
.intro-text { display: grid; gap: 1.2rem; }
.intro-text p { color: var(--text-2); font-size: 1.1rem; }
.intro-text p:first-of-type { color: var(--text); font-size: var(--fs-lead); font-family: var(--sans); font-weight: var(--w-light); letter-spacing: var(--tr-light); line-height: 1.45; }

/* Band (full-bleed image) */
.band { position: relative; height: clamp(36px, 3.5vw, 72px); overflow: clip; isolation: isolate; }
.band img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.band-caption { position: absolute; left: 0; right: 0; bottom: clamp(1.5rem, 4vw, 3rem); z-index: 1; }
.band-caption p { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; line-height: 1.05; max-width: 22ch; color: var(--canvas); }

/* Comparison (light) */
.compare { padding-block: var(--section); }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { min-width: 640px; }
.compare-cards { display: none; }

/* Space */
.space-grid { display: grid; gap: 1rem; }
.space-card { min-height: 280px; justify-content: flex-end; }
.space-card .h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }

/* Who */
.who-grid { display: grid; gap: 2rem; }
.who-col h3 { font-family: var(--sans); font-size: 0.88rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.who-col li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1.08rem; display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; color: var(--text-2); }
.who-col li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vital); margin-top: 0.55em; }
.who-col.not li::before { background: transparent; border: 1px solid var(--stone); }

/* David */
.david-grid { display: grid; gap: 2.5rem; align-items: center; }
.portrait { position: relative; aspect-ratio: 4 / 5; background: var(--ground); overflow: hidden; display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .mark { width: 28%; opacity: 0.9; }
.portrait .tag { position: absolute; left: 1.2rem; bottom: 1.2rem; font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--canvas-2); }
.portrait.has-photo { background: var(--canvas); }
.portrait.has-photo .tag { color: var(--canvas); background: rgba(15, 15, 15, 0.62); padding: 0.5rem 0.8rem; }
.quote { font-family: var(--sans); font-weight: var(--w-light); font-size: clamp(1.35rem, 2.4vw, 1.95rem); letter-spacing: var(--tr-light); line-height: 1.32; max-width: 26ch; }
.quote::before { content: "“"; color: var(--vital); }
.quote::after { content: "”"; color: var(--vital); }
.quote-by { margin-top: 1rem; color: var(--muted); font-family: var(--sans); font-size: 0.86rem; letter-spacing: var(--tr-label); font-weight: var(--w-roman); }

/* Where */
.where-grid { display: grid; gap: 2rem; align-items: end; }
.where .h2 { font-size: clamp(2.4rem, 6vw, 5rem); max-width: 12ch; }
.where-info { display: grid; gap: 1.2rem; }
.info-row { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.info-row dt { font-family: var(--sans); font-size: 0.82rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); padding-top: 0.25em; }
.info-row dd { color: var(--text-2); }
.info-row dd a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.info-row dd a:hover { text-decoration-color: var(--vital); }

/* Final CTA */
.cta-final { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(6rem, 14vw, 12rem); text-align: center; }
.cta-final-bg { position: absolute; inset: 0; z-index: -1; }
.cta-final-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.cta-final-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 50%, rgba(15,15,15,0.2), rgba(15,15,15,0.92) 100%), linear-gradient(180deg, var(--ink), transparent 25%, transparent 75%, var(--ink)); }
.cta-final-inner { display: grid; justify-items: center; gap: 1.4rem; }
.cta-final .h2 { font-size: clamp(2.4rem, 6.4vw, 5.6rem); max-width: 14ch; }
.cta-final .lead { max-width: 44ch; }
.cta-final .note { font-family: var(--sans); font-size: 0.84rem; letter-spacing: var(--tr-label); color: var(--muted); font-weight: var(--w-roman); }

/* Steps (process) */
.steps { display: grid; gap: 1rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem 0 1.6rem 4.2rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step .num { position: absolute; left: 0; top: 1.75rem; color: var(--vital); }
.step h3 { font-size: clamp(1.25rem, 1.15rem + 0.6vw, 1.7rem); line-height: 1.15; text-wrap: balance; }
.step p { color: var(--text-2); max-width: 52ch; }

/* Includes grid */
.includes { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.includes > div { background: var(--bg); padding: clamp(1.4rem, 2.4vw, 2rem); display: grid; gap: 0.6rem; align-content: start; }
.includes h3 { font-size: 1.2rem; }
.includes p { color: var(--text-2); font-size: 0.98rem; }
.includes .num { color: var(--vital); }

/* Gallery */
.gallery { display: grid; gap: 0.8rem; grid-template-columns: repeat(2, 1fr); }
.gallery figure { position: relative; overflow: hidden; background: var(--ink-2); aspect-ratio: 4 / 5; }
.gallery figure:nth-child(3n+1) { grid-column: span 2; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 1rem; bottom: 1rem; font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--canvas); background: rgba(15,15,15,0.55); padding: 0.45rem 0.7rem; }
.notice { display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1rem; border: 1px dashed var(--line-2); color: var(--muted); font-size: var(--fs-small); }
.notice::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vital); }

/* Apply layout */
.apply-grid { display: grid; gap: 3rem; align-items: start; }
.apply-aside { display: grid; gap: 1.5rem; align-content: start; }
.apply-aside .card { gap: 1.1rem; }
.contact-icons { display: flex; gap: 0.9rem; }
.contact-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2);
  color: var(--canvas); transition: color .3s, border-color .3s;
}
.contact-icons a:hover, .contact-icons a:focus-visible { color: var(--vital); border-color: var(--vital); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: clamp(3.5rem, 7vw, 6rem) 2rem; background: var(--ink); }
.footer-top { display: grid; gap: 3rem; }
.footer-brand { display: grid; gap: 1.2rem; align-content: start; }
.footer-brand img { height: 26px; width: auto; }
.footer-brand .claim { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.015em; }
.footer-brand p { color: var(--muted); max-width: 34ch; font-size: var(--fs-small); }
.footer-cols { display: grid; gap: 2.2rem; grid-template-columns: repeat(2, 1fr); }
.footer-col h4 { font-family: var(--sans); font-size: 0.82rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); margin-bottom: 1rem; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { color: var(--text-2); font-size: 0.98rem; transition: color .3s; }
.footer-col a:hover { color: var(--vital); }
.footer-col .soon { color: var(--muted); font-size: 0.98rem; }
.footer-col .soon small { font-family: var(--sans); font-size: 0.8rem; letter-spacing: var(--tr-label); margin-left: 0.4rem; color: var(--vital); font-weight: var(--w-roman); }
.footer-bottom { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; color: var(--muted); font-size: 0.82rem; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.footer-bottom a:hover { color: var(--text); }

/* Coming soon (bloqueo temporal antes del lanzamiento) */
.soon-split { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: clip; isolation: isolate; background: var(--ink); }
.soon-media { position: absolute; inset: 0; z-index: -2; }
.soon-media img { width: 100%; height: 100%; object-fit: cover; }
.soon-scrim { position: absolute; inset: 0; z-index: -1; background: rgba(15, 15, 15, 0.76); }
.soon-split-inner { display: grid; gap: clamp(2.4rem, 6vw, 4rem); padding-block: clamp(2.5rem, 6vh, 4rem); }
@media (min-width: 860px) {
  .soon-split-inner { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; }
}
.soon-left { display: grid; gap: 1.6rem; justify-items: start; }
.soon-logo { height: 34px; width: auto; }
.soon-note { font-family: var(--sans); font-size: 0.9rem; font-weight: var(--w-roman); letter-spacing: var(--tr-nav); text-transform: uppercase; color: var(--canvas-2); }
.soon-countdown-frame {
  display: inline-flex; padding: clamp(0.9rem, 2vw, 1.3rem) clamp(1.1rem, 2.4vw, 1.7rem);
  border: 1.5px solid var(--vital); border-radius: var(--radius);
  animation: soonPulse 3.2s ease-in-out infinite;
}
.soon-countdown { display: flex; gap: clamp(1rem, 3vw, 1.8rem); }
.soon-countdown div { display: grid; gap: 0.4rem; justify-items: center; }
.soon-countdown span { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; color: var(--canvas); font-variant-numeric: tabular-nums; }
.soon-countdown small { font-family: var(--sans); font-size: 0.68rem; letter-spacing: var(--tr-nav); text-transform: uppercase; color: var(--muted); }
@keyframes soonPulse {
  0%, 100% { border-color: var(--vital); }
  50% { border-color: rgba(178, 230, 123, 0.55); }
}
.soon-right { display: grid; gap: 1.6rem; background: rgba(15, 15, 15, 0.55); border: 1px solid var(--line); padding: clamp(1.6rem, 3vw, 2.4rem); }
.soon-form-head { display: grid; gap: 0.6rem; }
.soon-form-head .h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
@media (prefers-reduced-motion: reduce) { .soon-countdown-frame { animation: none; } }

/* 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 2rem) var(--gutter) 4rem; }
.notfound .display { font-size: clamp(5rem, 22vw, 16rem); line-height: 0.9; color: var(--ink-4); -webkit-text-stroke: 1px var(--line-2); }

/* Credits */
.credits-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 0.95rem; }
.credits-list a { text-decoration: underline; text-underline-offset: 3px; }

/* =============================================================
   7. Effects
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-soft), transform 1s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-soft), transform .9s var(--ease-out); }
[data-reveal-stagger].is-revealed > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: .05s; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: .13s; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: .21s; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: .29s; }
[data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: .37s; }
[data-reveal-stagger].is-revealed > *:nth-child(6) { transition-delay: .45s; }
[data-reveal-stagger].is-revealed > *:nth-child(n+7) { transition-delay: .5s; }
/* No JS: everything visible */
.no-js [data-reveal], .no-js [data-reveal-stagger] > * { opacity: 1; transform: none; }
/* Defensive: split text never hides its parent */
.reveal[data-split] { opacity: 1; transform: none; }

/* Hero entrance (CSS only, plays once) */
.hero-inner > * { animation: fadeUp 1.1s var(--ease-out) both; }
.hero-inner > *:nth-child(1) { animation-delay: .15s; }
.hero-inner > *:nth-child(2) { animation-delay: .28s; }
.hero-inner > *:nth-child(3) { animation-delay: .42s; }
.hero-inner > *:nth-child(4) { animation-delay: .56s; }
.hero-media img { animation: heroIn 2.2s var(--ease-out) both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes heroIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes ambientZoom { 0%, 100% { transform: scale(1.02) translate3d(0, 0, 0); } 50% { transform: scale(1.1) translate3d(-1%, -1.5%, 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(178,230,123,0.55); } 70% { box-shadow: 0 0 0 10px rgba(178,230,123,0); } 100% { box-shadow: 0 0 0 0 rgba(178,230,123,0); } }

/* View transitions between pages (no JS) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .55s; animation-timing-function: var(--ease-out); }
::view-transition-old(root) { animation-name: vtOut; }
::view-transition-new(root) { animation-name: vtIn; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; } }

/* =============================================================
   8. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .space-grid { grid-template-columns: repeat(2, 1fr); }
  .includes { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .who-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .prog-cols { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .prog-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 3rem; align-items: start; }
  .prog-body .prog-cols { grid-column: 2; }
  .prog-body .prog-tagline { grid-column: 1; }
  .prog-body .prog-meta { grid-column: 1 / -1; }
  .prog-body .prog-media { grid-column: 1; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery figure:nth-child(3n+1) { grid-column: span 2; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .section-head.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; }
  .section-head.split .lead { justify-self: end; }
}
@media (min-width: 960px) {
  :root { --nav-h: 84px; }
  .nav-links { display: flex; }
  .nav-cta { display: block; }
  .nav-toggle { display: none; }
  .intro-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5rem; }
  .david-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5rem; }
  .where-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 5rem; }
  .space-grid { grid-template-columns: repeat(3, 1fr); }
  .includes { grid-template-columns: repeat(3, 1fr); }
  .apply-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 5rem; }
  .footer-top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr); gap: 5rem; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 0 3rem; }
  .step:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .compare-table th:first-child, .compare-table td:first-child { width: 20%; }
  .compare-table th, .compare-table td { padding: 1.5rem 1.5rem; }
}
@media (min-width: 1280px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 0 2rem; }
  .apply-grid .steps { grid-template-columns: repeat(2, 1fr); gap: 0 3rem; }
  .step p { font-size: 0.95rem; }
  .step { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-left: 0; padding-top: 4.2rem; }
  .step .num { top: 1.6rem; }
  .hero .display { max-width: 11ch; }
}

/* Comparison on small screens: cards instead of table */
@media (max-width: 719px) {
  .compare-wrap { display: none; }
  .compare-cards { display: grid; gap: 0.8rem; }
  .compare-card { border: 1px solid var(--line); padding: 1.2rem; display: grid; gap: 0.7rem; }
  .compare-card h3 { font-size: 1.05rem; }
  .compare-card .row { display: grid; gap: 0.15rem; }
  .compare-card .row span:first-child { font-family: var(--sans); font-size: 0.8rem; font-weight: var(--w-roman); letter-spacing: var(--tr-label); color: var(--muted); }
  .compare-card .row.real span:last-child { font-weight: var(--w-roman); }
  .compare-card .row.conv span:last-child { color: var(--muted); }
}

/* =============================================================
   9. Motion preferences — only intrusive effects are gated
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img.ambient { animation: none; }
  .hero-meta .dot { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
}

/* Print: keep it readable */
@media print {
  .nav, .nav-mobile, .hero-grain, .cta-final-bg, .band { display: none !important; }
  body { background: #fff; color: #000; }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* Four-item zone grids: 2×2, then 4 across on wide screens */
.space-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 539px) { .space-grid.cols-4 { grid-template-columns: 1fr; } }
@media (min-width: 1280px) { .space-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* Program index on phones: arrow only */
@media (max-width: 539px) {
  .prog-index a { grid-template-columns: 2.4rem 1fr auto; }
  .prog-index a .go { font-size: 0; }
  .prog-index a .go::after { content: "→"; font-size: 1.1rem; }
}

/* Brand map: inline SVG generated from OpenStreetMap data (tools/make_map.py). Approved style "C" (29 Sep 2026). */
.mapa-wrap { margin: clamp(2.5rem, 5vw, 4rem) 0 0; }
.mapa-wrap svg { display: block; width: 100%; height: auto; }
.mapa { font-family: var(--sans); }
.m-bg { fill: #0f0f0f; }
.m-frame, .m-texture, .m-refs, .m-scale, .m-north, .m-tagbg, .m-casing { display: none; }
.m-urban { fill: var(--canvas); fill-opacity: 0.07; }
.m-ind { fill: var(--canvas); fill-opacity: 0.035; }
.m-roads path { fill: none; stroke: var(--canvas); stroke-linecap: round; stroke-linejoin: round; }
.m-sec { stroke-width: 0.7; stroke-opacity: 0.18; }
.m-prim { stroke-width: 1; stroke-opacity: 0.28; }
.m-trunk { stroke-width: 1.3; stroke-opacity: 0.38; }
.m-mw { stroke-width: 1.7; stroke-opacity: 0.46; }
.m-river { fill: none; stroke: #4f8a68; stroke-width: 1.9; stroke-opacity: 0.6; stroke-linecap: round; stroke-linejoin: round; }
.m-label { fill: var(--canvas-3); font-size: 13px; font-weight: var(--w-roman); letter-spacing: var(--tr-label); }
.m-city { font-size: 19px; fill: var(--canvas-2); letter-spacing: var(--tr-label); }
.m-dot { fill: var(--vital); }
.m-ring { fill: none; stroke: var(--vital); stroke-width: 1.5; }
.m-pulse { fill: var(--vital); fill-opacity: 0.18; animation: mapPulse 2.6s ease-out infinite; }
@keyframes mapPulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(2.4); opacity: 0; } }
.m-leader { stroke: var(--vital); stroke-width: 1; }
.m-real { fill: var(--vital); font-size: 14px; font-weight: var(--w-roman); }
.m-tag-m { display: none; }
.map-credit { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; margin-top: 0.9rem; font-size: 0.78rem; color: var(--muted); }
.map-credit a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.map-credit a:hover { color: var(--text); }
@media (max-width: 719px) {
  .m-label { font-size: 34px; letter-spacing: var(--tr-label); }
  .m-city { font-size: 52px; }
  .m-real { font-size: 36px; }
  .m-minor { display: none; }
  .m-tag-d { display: none; }
  .m-tag-m { display: block; }
  .m-marker circle { transform: scale(2.6); }
  .m-marker .m-leader { stroke-width: 2.5; }
  .m-pulse { animation-name: mapPulseM; }
  .m-p-zizur-mayor { transform: translate(30px, 52px); }
  .m-p-baranain { transform: translate(0, -14px); }
}
@keyframes mapPulseM { 0% { transform: scale(1.1); opacity: 0.9; } 100% { transform: scale(5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .m-pulse { animation: none; } }
@media (prefers-reduced-motion: reduce) { .m-pulse { animation: none; } }
