/* ==========================================================================
   LENTE BINARIA — "INSTRUMENTO ÓPTICO"
   Sistema luxury-brutalista. Metal negro mecanizado, grabados en oro.
   Brief: Empresa/Web Corporativa/DESIGN.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   FUENTES — self-hosted WOFF2 (RGPD + LCP, sin Google CDN)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('../assets/fonts/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Outfit Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../assets/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('../assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../assets/fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url('../assets/fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Material */
  --bg0: #0a0a0f;
  --bg1: #0d0d14;
  --ink: #f5f1e8;
  --ink-2: rgba(245, 241, 232, 0.74);
  --ink-3: rgba(245, 241, 232, 0.52);
  --gold: #d4a03c;
  --gold-bright: #e8c06a;
  --gold-deep: #b8862e;
  --on-gold: #0a0a0f;
  --line: rgba(212, 160, 60, 0.24);
  --line-strong: rgba(212, 160, 60, 0.5);
  --danger: #d06060;

  /* Tipografía */
  --font-display: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Outfit Variable', 'Outfit', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* Escala — saltos brutales (≥1.4x) */
  --t-engrave: 0.75rem;                            /* 12px · grabado mono */
  --t-engrave-lg: 0.875rem;                        /* 14px */
  --t-body: 1.0625rem;                             /* 17px */
  --t-lead: clamp(1.125rem, 1.5vw, 1.375rem);
  --t-whisper: clamp(1.5rem, 3vw, 2.75rem);        /* serif italic */
  --t-h3: clamp(1.5rem, 2.5vw, 2.25rem);
  --t-h2: clamp(2.25rem, 6.5vw, 5.5rem);
  --t-h1: clamp(3rem, 10vw, 9rem);                 /* interiores */
  --t-wall: clamp(4.5rem, 16vw, 17rem);            /* muro tipográfico home */
  --t-price: clamp(2rem, 5vw, 4rem);               /* precios ledger */

  /* Espaciado — base 4px, ritmo variado */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;
  --s-32: 8rem;
  --s-48: 12rem;
  --sec: clamp(6rem, 12vw, 12rem);                 /* respiración entre secciones */
  --sec-tight: clamp(3rem, 6vw, 6rem);

  /* Layout */
  --container: 1440px;
  --narrow: 880px;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --header-h: 72px;
  --header-h-scrolled: 56px;

  /* Movimiento — precisión, no fluidez */
  --snap: 0.12s linear;                            /* inversiones instantáneas */
  --reveal: 0.85s cubic-bezier(0.16, 1, 0.3, 1);   /* expo-out */
  --z-header: 100;
  --z-menu: 200;
  --z-float: 150;
  --z-banner: 300;
}

/* --------------------------------------------------------------------------
   RESET + BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg0);
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

::selection { background: var(--gold); color: var(--on-gold); }
.plate ::selection { background: var(--bg0); color: var(--gold-bright); }

:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.plate :focus-visible { outline-color: var(--on-gold); }

img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; border: none; background: none; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s-4);
  z-index: 1000;
  padding: var(--s-3) var(--s-6);
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.skip-link:focus { top: var(--s-4); }

/* --------------------------------------------------------------------------
   TIPOGRAFÍA
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); font-weight: 800; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.02em; }

p { color: var(--ink-2); max-width: 68ch; }
p + p { margin-top: var(--s-4); }
strong { color: var(--ink); font-weight: 600; }

/* Tokens largos (emails, URLs, nombres de fichero) nunca desbordan */
p, li, dd, td, figcaption { overflow-wrap: break-word; }
code { overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 0.875em; }

em, .whisper-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--gold-bright);
}

/* Muro tipográfico (home) */
.wall {
  font-family: var(--font-display);
  font-size: var(--t-wall);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
/* En pantallas estrechas la palabra más larga ("sorpresas.") debe caber
   sin partirse: se rebaja el mínimo del muro */
@media (max-width: 480px) {
  :root { --t-wall: clamp(2.75rem, 14vw, 4.25rem); }
}

/* Registro grabado — el ADN del sistema */
.engrave {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.engrave--dim { color: var(--ink-3); }
.engrave--bright { color: var(--gold-bright); }

/* Susurro serif — una línea emocional por página */
.whisper {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--t-whisper);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
}

.lead { font-size: var(--t-lead); line-height: 1.65; }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.container--narrow { max-width: var(--narrow); }

.section { position: relative; padding-block: var(--sec); }
.section--tight { padding-block: var(--sec-tight); }

/* Spec-line — apertura de sección: `02 / SERVICIOS — PRECIO CERRADO` */
.spec-line {
  display: flex;
  align-items: baseline;
  gap: var(--s-6);
  padding-block: var(--s-3);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.spec-line__index {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.2em;
  color: var(--gold-bright);
}
.spec-line__label {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.spec-line__meta { margin-left: auto; text-align: right; }

/* Retícula expuesta (--grat la anima motion.js; sin él, valor pleno) */
.graticule { position: relative; --grat: 0.45; }
.graticule::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  opacity: var(--grat);
}
.graticule > * { position: relative; }

/* Marcas de visor (esquinas) */
.frame-marks { position: relative; }
.frame-marks::before,
.frame-marks::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}
.frame-marks::before { top: 0; left: 0; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.frame-marks::after { bottom: 0; right: 0; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }

/* Splits asimétricos */
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); }
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split--75 { grid-template-columns: 7fr 5fr; }
  .split--57 { grid-template-columns: 5fr 7fr; }
  .split--93 { grid-template-columns: 9fr 3fr; }
}

/* --------------------------------------------------------------------------
   BOTONES — rectángulos grabados, inversión instantánea
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: 1.125rem 2.25rem;
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: transparent;
  transition: background var(--snap), color var(--snap), border-color var(--snap);
  cursor: pointer;
  text-align: center;
}
.btn:hover, .btn:active { background: var(--gold); color: var(--on-gold); }

.btn--gold { background: var(--gold); color: var(--on-gold); }
.btn--gold:hover, .btn--gold:active { background: transparent; color: var(--gold-bright); }

.btn--lg { padding: 1.375rem 3rem; font-size: var(--t-engrave-lg); }

/* Sobre placa de oro */
.plate .btn { border-color: var(--on-gold); color: var(--on-gold); }
.plate .btn:hover { background: var(--on-gold); color: var(--gold-bright); }
.plate .btn--ink { background: var(--on-gold); color: var(--gold-bright); }
.plate .btn--ink:hover { background: transparent; color: var(--on-gold); }

/* Enlace grabado con subrayado hairline */
.link-engrave {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color var(--snap), border-color var(--snap);
  overflow-wrap: anywhere;
}
.link-engrave:hover { color: var(--ink); border-color: var(--ink); }

/* Táctil: área mínima 24px para enlaces de listas (WCAG 2.5.8) */
@media (max-width: 768px) {
  .footer__col a, .link-engrave { display: inline-block; padding-block: 0.3rem; }
}

/* --------------------------------------------------------------------------
   HEADER — barra-instrumento
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: rgba(10, 10, 15, 0.92);
  border-bottom: 1px solid var(--line);
  transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar { background: rgba(10, 10, 15, 0.78); backdrop-filter: blur(8px); }
}
.topbar.is-scrolled { height: var(--header-h-scrolled); }
.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}
.topbar__logo { display: flex; align-items: center; gap: var(--s-3); }
.topbar__logo img { height: 30px; width: auto; }
.topbar.is-scrolled .topbar__logo img { height: 26px; }

.topbar__nav { display: none; }
@media (min-width: 900px) {
  .topbar__nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.5rem); }
}
.topbar__link {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: var(--s-2) 0;
  border-bottom: 1px solid transparent;
  transition: color var(--snap), border-color var(--snap);
}
.topbar__link:hover { color: var(--gold-bright); }
.topbar__link[aria-current="page"] { color: var(--gold-bright); border-bottom-color: var(--gold); }
.topbar__cta { margin-left: var(--s-4); padding: 0.75rem 1.5rem; }

.topbar__tools { display: flex; align-items: center; gap: var(--s-4); }
.lang-link {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.18em;
  color: var(--ink-3);
  border: 1px solid var(--line);
  padding: 0.45rem 0.7rem;
  transition: color var(--snap), border-color var(--snap), background var(--snap);
}
.lang-link:hover { color: var(--on-gold); background: var(--gold); border-color: var(--gold); }

/* Hamburguesa */
.burger {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  transition: background var(--snap), border-color var(--snap);
}
.burger:hover { border-color: var(--gold); }
.burger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  position: relative;
}
.burger span::before, .burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: var(--ink);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
@media (min-width: 900px) { .burger { display: none; } }

/* --------------------------------------------------------------------------
   MENÚ MÓVIL — ficha técnica fullscreen
   -------------------------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--bg0);
  display: flex;
  flex-direction: column;
  padding: var(--s-6) var(--pad) var(--s-8);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.4s;
}
.menu.is-open { transform: translateY(0); visibility: visible; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.menu__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-12); }
.menu__close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ink);
}
.menu__close:hover { background: var(--gold); color: var(--on-gold); }
.menu__list { flex: 1; display: flex; flex-direction: column; }
.menu__item { border-top: 1px solid var(--line); }
.menu__item:last-child { border-bottom: 1px solid var(--line); }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: var(--s-6);
  padding: var(--s-6) 0;
  transition: background var(--snap), color var(--snap), padding var(--snap);
}
.menu__link:hover { background: var(--gold); color: var(--on-gold); padding-left: var(--s-4); }
.menu__index { font-family: var(--font-mono); font-size: var(--t-engrave); letter-spacing: 0.2em; color: var(--gold); }
.menu__link:hover .menu__index { color: var(--on-gold); }
.menu__text {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}
.menu__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding-top: var(--s-8); }

/* --------------------------------------------------------------------------
   LEDGER — pricing como libro mayor
   -------------------------------------------------------------------------- */
.ledger { border-top: 1px solid var(--line-strong); }
.ledger__row { border-bottom: 1px solid var(--line); }
.ledger__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: var(--s-6);
  padding-block: clamp(1.75rem, 4vw, 3rem);
}
.ledger__index { font-family: var(--font-mono); font-size: var(--t-engrave); letter-spacing: 0.2em; color: var(--gold); }
.ledger__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.ledger__price {
  font-family: var(--font-mono);
  font-size: var(--t-price);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.ledger__price small {
  display: block;
  font-size: var(--t-engrave);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: var(--s-1);
}
.ledger__body { padding-bottom: clamp(1.75rem, 4vw, 3rem); }

/* Móvil: la fila del libro mayor se apila; el precio (nowrap) reventaba
   la columna auto del grid por debajo de 640px */
@media (max-width: 640px) {
  .ledger__head { display: block; }
  .ledger__index { display: block; margin-bottom: var(--s-2); }
  .ledger__price { text-align: left; white-space: normal; margin-top: var(--s-3); }
}

/* Lista de especificaciones grabada */
.spec-list { display: grid; gap: 0; }
.spec-list li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: baseline;
  padding-block: var(--s-3);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}
.spec-list li::before {
  content: '—';
  font-family: var(--font-mono);
  color: var(--gold);
  flex: none;
}
.spec-list li > * { min-width: 0; }
/* Lista anidada: baja a su propia fila en vez de empujar en horizontal */
.spec-list .spec-list { flex-basis: 100%; width: 100%; padding-left: var(--s-6); margin-top: var(--s-2); }
.spec-list .spec-list li { border-top-color: transparent; padding-block: var(--s-1); }

/* --------------------------------------------------------------------------
   PLACA DE ORO — sección drenched
   -------------------------------------------------------------------------- */
.plate {
  background: var(--gold);
  color: var(--on-gold);
}
.plate h2, .plate h3, .plate .wall { color: var(--on-gold); }
.plate p { color: rgba(10, 10, 15, 0.82); }
/* .75 sobre oro = 5.4:1 (AA texto pequeño; .65 daba 4.27 y fallaba) */
.plate .engrave { color: rgba(10, 10, 15, 0.75); }
.plate .spec-line { border-color: rgba(10, 10, 15, 0.4); }
.plate .spec-line__index { color: var(--on-gold); }
.plate .spec-line__label { color: rgba(10, 10, 15, 0.75); }
.plate em, .plate .whisper { color: var(--on-gold); }

/* Rejilla 2×2 con hairlines sobre placa */
.plate-grid { display: grid; border: 1px solid rgba(10, 10, 15, 0.5); }
@media (min-width: 700px) { .plate-grid { grid-template-columns: 1fr 1fr; } }
.plate-grid__cell { padding: clamp(1.75rem, 4vw, 3.5rem); border-top: 1px solid rgba(10, 10, 15, 0.5); }
.plate-grid__cell:first-child { border-top: none; }
@media (min-width: 700px) {
  .plate-grid__cell { border-top: none; border-left: 1px solid rgba(10, 10, 15, 0.5); }
  .plate-grid__cell:nth-child(odd) { border-left: none; }
  .plate-grid__cell:nth-child(n+3) { border-top: 1px solid rgba(10, 10, 15, 0.5); }
}
.plate-grid__cell h3 { margin-bottom: var(--s-3); text-transform: uppercase; }

/* --------------------------------------------------------------------------
   ANILLO DE TEXTO — bisel de lente girando
   -------------------------------------------------------------------------- */
.ring-text { width: clamp(120px, 14vw, 200px); height: clamp(120px, 14vw, 200px); }
.ring-text svg { width: 100%; height: 100%; overflow: visible; animation: ring-rotate 48s linear infinite; }
.ring-text text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  fill: var(--gold);
}
@keyframes ring-rotate { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   ESCALA DE ENFOQUE — indicador de scroll (desktop)
   -------------------------------------------------------------------------- */
.focus-scale {
  position: fixed;
  right: clamp(0.75rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-float);
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-2);
  pointer-events: none;
}
@media (min-width: 1200px) { .focus-scale { display: flex; } }
.focus-scale__track { position: relative; width: 1px; height: 180px; background: var(--line); }
.focus-scale__needle {
  position: absolute;
  left: -7px;
  top: calc(var(--scroll, 0) * 100%);
  width: 15px;
  height: 1px;
  background: var(--gold-bright);
}
.focus-scale__label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   MEDIA — fotografía a plena potencia
   -------------------------------------------------------------------------- */
/* width:100% evita el "transferred size" de aspect-ratio + min-height
   (la caja crecía a height×ratio y desbordaba el viewport en móvil) */
.media { position: relative; overflow: hidden; background: var(--bg1); width: 100%; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--43 { aspect-ratio: 4 / 3; }
.media--45 { aspect-ratio: 4 / 5; }
.media--32 { aspect-ratio: 3 / 2; }
.media--219 { aspect-ratio: 21 / 9; }
.media__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: var(--s-3) var(--s-4);
  background: rgba(10, 10, 15, 0.85);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

/* --------------------------------------------------------------------------
   FAQ — visibles e indexables (sin acordeón)
   -------------------------------------------------------------------------- */
.faq-list { border-top: 1px solid var(--line-strong); }
.faq-item { padding-block: clamp(1.5rem, 3.5vw, 2.5rem); border-bottom: 1px solid var(--line); }
.faq-item h3 { margin-bottom: var(--s-3); }
@media (min-width: 900px) {
  .faq-item { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); }
  .faq-item h3 { margin-bottom: 0; }
}

/* --------------------------------------------------------------------------
   FORMULARIO — labels grabados, inputs hairline
   -------------------------------------------------------------------------- */
.form-field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-8); }
.form-field label {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.form-field input,
.form-field textarea,
.form-field select {
  background: transparent;
  border: none;
  /* borde ≥3:1 sobre fondo (1.4.11): --line-strong daba 2.82 */
  border-bottom: 1px solid rgba(212, 160, 60, 0.66);
  padding: var(--s-3) 0;
  color: var(--ink);
  font-size: var(--t-body);
  border-radius: 0;
  transition: border-color var(--snap);
}
.form-field select { appearance: none; }
.form-field select option { background: var(--bg0); color: var(--ink); }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { outline: none; border-bottom-color: var(--gold-bright); }
.form-field input.is-invalid,
.form-field textarea.is-invalid,
.form-field select.is-invalid { border-bottom-color: var(--danger); }
.form-field__error {
  display: none;
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.1em;
  color: var(--danger);
}
.is-invalid ~ .form-field__error, .form-field.has-error .form-field__error { display: block; }
.form-check { display: flex; gap: var(--s-3); align-items: flex-start; margin-bottom: var(--s-8); }
.form-check input {
  appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.form-check input:checked { background: var(--gold); }
.form-check input:checked::before { content: ''; width: 10px; height: 10px; background: var(--on-gold); }
.form-check label { color: var(--ink-2); font-size: 0.9375rem; }
.form-check a { color: var(--gold-bright); border-bottom: 1px solid var(--line-strong); }
.form-status { display: none; padding: var(--s-4); border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: var(--t-engrave-lg); letter-spacing: 0.08em; }
.form-status.is-visible { display: block; }
.form-status--ok { border-color: var(--gold); color: var(--gold-bright); }
.form-status--error { border-color: var(--danger); color: var(--danger); }

/* --------------------------------------------------------------------------
   TABLA BRUTAL — comparativa
   -------------------------------------------------------------------------- */
.table-brutal { width: 100%; border-collapse: collapse; border: 1px solid var(--line-strong); }
.table-brutal th, .table-brutal td { padding: clamp(0.875rem, 2vw, 1.5rem); border: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-brutal thead th {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-bright);
  border-bottom: 1px solid var(--line-strong);
}
.table-brutal td { color: var(--ink-2); font-size: 0.9375rem; }
.table-brutal td:last-child { color: var(--ink); }

/* Móvil: la tabla se desliza en horizontal como una ficha técnica,
   en lugar de reventar el viewport */
@media (max-width: 700px) {
  .table-brutal { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* --------------------------------------------------------------------------
   FOOTER — tabla grabada
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line-strong); padding-block: var(--s-16) var(--s-8); }
.footer__grid { display: grid; gap: var(--s-12); margin-bottom: var(--s-16); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 4fr 2fr 2fr 2fr; } }
.footer__brand img { height: 32px; width: auto; margin-bottom: var(--s-4); }
.footer__brand p { font-size: 0.9375rem; color: var(--ink-3); max-width: 36ch; }
.footer__col h2 {
  font-family: var(--font-mono);
  font-size: var(--t-engrave);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-4);
}
.footer__col ul { display: grid; gap: var(--s-2); }
.footer__col a { color: var(--ink-2); font-size: 0.9375rem; transition: color var(--snap); }
.footer__col a:hover { color: var(--gold-bright); }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  align-items: baseline;
}
.footer__fiscal { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   FLOTANTES — WhatsApp chapa + banner cookies
   -------------------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: var(--z-float);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--on-gold);
  border: 1px solid var(--gold);
  transition: background var(--snap), color var(--snap);
}
.wa-float:hover { background: var(--bg0); color: var(--gold-bright); }
.wa-float svg { width: 24px; height: 24px; }

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-banner);
  background: var(--bg0);
  border-top: 1px solid var(--gold);
  padding: var(--s-6) var(--pad);
  display: none;
  gap: var(--s-6);
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { font-size: 0.9375rem; color: var(--ink-2); flex: 1 1 32ch; margin: 0; }
.cookie-banner p a { color: var(--gold-bright); border-bottom: 1px solid var(--line-strong); }
.cookie-banner__actions { display: flex; gap: var(--s-3); }
.cookie-banner .btn { padding: 0.75rem 1.5rem; }

/* --------------------------------------------------------------------------
   REVEALS — patrón no-js: el contenido nunca nace invisible
   -------------------------------------------------------------------------- */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); }
html.js [data-reveal].in { opacity: 1; transform: none; transition: opacity var(--reveal), transform var(--reveal); }
html.js [data-reveal="wipe"] { transform: none; clip-path: inset(0 0 100% 0); }
html.js [data-reveal="wipe"].in { clip-path: inset(0 0 0% 0); transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s linear; }

/* --------------------------------------------------------------------------
   HERO — vídeo + muro tipográfico (estructura compartida)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero__video, .hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* decorativo: si el plano 3D inclinado queda por delante en el hit-test,
     no debe interceptar ni clics ni el estado del cursor */
  pointer-events: none;
}
.hero__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(10,10,15,0.92) 0%, rgba(10,10,15,0.45) 45%, rgba(10,10,15,0.55) 100%); }
.hero__content { position: relative; padding-bottom: clamp(3rem, 8vh, 6rem); }

/* Page-hero interior (sin vídeo) */
.page-hero { padding-top: calc(var(--header-h) + var(--sec-tight)); padding-bottom: var(--sec-tight); }

/* --------------------------------------------------------------------------
   UTILIDADES
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-4 { margin-top: var(--s-4); }
.mt-8 { margin-top: var(--s-8); }
.mt-12 { margin-top: var(--s-12); }
.mt-16 { margin-top: var(--s-16); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-8 { margin-bottom: var(--s-8); }
.mb-12 { margin-bottom: var(--s-12); }
.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; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: var(--gold-deep); }

/* --------------------------------------------------------------------------
   CAPA DE VIDA (motion.js) — cursor de apertura + soporte 3D
   -------------------------------------------------------------------------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { display: block; }
/* El elemento exterior SOLO posiciona (translate3d del JS); el interior
   es el visual y es el que escala. Nunca mezclar la propiedad `scale`
   con el transform de posicionamiento: la escala multiplica también la
   traslación y el anillo se va de su sitio. */
.cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--gold-bright);
  border-radius: 50%; /* iris: motivo circular de la lente, excepción deliberada */
  transition: opacity 0.25s linear;
}
.cursor-ring { width: 0; height: 0; transition: opacity 0.25s linear; }
.cursor-ring__c {
  position: absolute;
  left: -17px;
  top: -17px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: scale 0.18s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--snap);
}
.cursor-ring__c::before, .cursor-ring__c::after {
  content: '';
  position: absolute;
  background: var(--gold);
  transition: opacity var(--snap);
  opacity: 0;
}
.cursor-ring__c::before { top: -4px; left: 50%; width: 1px; height: 7px; margin-left: -0.5px; }
.cursor-ring__c::after { left: -4px; top: 50%; height: 1px; width: 7px; margin-top: -0.5px; }
.cursor-ring.is-active .cursor-ring__c { scale: 1.55; border-color: var(--gold); }
.cursor-ring.is-active .cursor-ring__c::before, .cursor-ring.is-active .cursor-ring__c::after { opacity: 1; }
.cursor-ring.is-down .cursor-ring__c { scale: 0.75; }
html.has-cursor body, html.has-cursor a, html.has-cursor button { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: auto; }

/* Campo ASCII — aire de glifos de medición (lo inyecta motion.js) */
.ascii-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
html.motion-ok .hero__content { z-index: 2; }
html.motion-ok .home-cta > .container { position: relative; z-index: 2; }

/* Microdetalles de interacción */
.form-field:focus-within label {
  color: var(--gold-bright);
  letter-spacing: 0.3em;
  transition: letter-spacing 0.25s cubic-bezier(0.16, 1, 0.3, 1), color var(--snap);
}
.footer__col a { position: relative; transition: color var(--snap), padding-left 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
.footer__col a::before { content: '—'; position: absolute; left: 0; opacity: 0; color: var(--gold); transition: opacity var(--snap); }
.footer__col a:hover { padding-left: 16px; }
.footer__col a:hover::before { opacity: 1; }
.faq-item { transition: border-color var(--snap); }
.faq-item:hover { border-bottom-color: var(--line-strong); }

html.motion-ok .hero { transform-style: preserve-3d; }
html.motion-ok .hero__video, html.motion-ok .hero__bg { will-change: transform; }
html.motion-ok .ledger .media, html.motion-ok .split .media { will-change: transform; }
html.motion-ok .plate { will-change: clip-path; }

/* --------------------------------------------------------------------------
   REDUCED MOTION — precisión instantánea
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ring-text svg { animation: none; }
  html.js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
}

/* --------------------------------------------------------------------------
   PRINT
   -------------------------------------------------------------------------- */
@media print {
  .topbar, .menu, .wa-float, .cookie-banner, .focus-scale, .ring-text { display: none !important; }
  body { background: #fff; color: #000; }
}
