/* Mac AutoLock — sistema de diseño del sitio público.
   Paleta y tipografía heredadas del icono (medianoche + latón) para que
   app, icono y web sean la misma marca.
   Layout: "split stage" — la mitad izquierda es un escenario fijo donde el
   producto se muestra a sí mismo (señal, emparejamiento, bloqueo, alerta);
   la derecha es la columna de lectura. */

:root {
  --bg: #0A0C1A;
  --bg-raised: #12162B;
  --bg-raised-2: #1A2140;
  --line: rgba(245, 238, 221, 0.12);
  --line-strong: rgba(245, 238, 221, 0.22);
  --ink: #F5EEDD;
  --ink-dim: #A79F8C;
  --ink-faint: #6E6858;
  --accent: #CE9A4C;
  --accent-bright: #E4B876;
  --accent-ink: #1B140A;
  --ok: #7DC98F;
  --radius: 18px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ SPLIT STAGE ============ */
.split {
  display: grid;
  grid-template-columns: 46fr 54fr;
  align-items: start;
}

.stage-col { min-height: 100%; }

.stage {
  position: sticky;
  top: 12px;
  height: calc(100svh - 24px);
  margin: 12px;
  border-radius: 20px;
  background: var(--bg-raised);
  overflow: hidden;
  transition: opacity .45s ease, transform .45s ease;
}
/* Salida coreografiada: al llegar el índice el escenario se desvanece
   y se eleva en vez de quedarse congelado contra la sección siguiente. */
.stage.is-away {
  opacity: 0;
  transform: translateY(-28px);
  pointer-events: none;
}

.stage-scene {
  position: absolute;
  inset: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.stage[data-state="field"]  .stage-scene[data-scene="field"],
.stage[data-state="pair"]   .stage-scene[data-scene="pair"],
.stage[data-state="meter"]  .stage-scene[data-scene="meter"],
.stage[data-state="locked"] .stage-scene[data-scene="locked"],
.stage[data-state="alert"]  .stage-scene[data-scene="alert"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* la escena entrante aparece despacio sobre el fondo común;
     la saliente se oculta al instante — nunca hay texto bajo texto */
  transition: opacity 1.3s ease;
}

.stage-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: var(--bg-raised-2);
  font-size: 14px;
  color: var(--ink-dim);
}
.stage-bar .stage-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 13.5px;
}
.stage-bar .stage-brand img { border-radius: 4px; }

/* ---------- Escena: campo de proximidad (la cosa viva) ---------- */
.prox-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 380px;
}
.prox-mac { position: relative; }
.prox-rings {
  position: absolute;
  left: 50%;
  top: 55%;
  pointer-events: none;
}
.prox-rings i {
  position: absolute;
  left: 0; top: 0;
  width: 90px; height: 90px;
  margin: -45px 0 0 -45px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  transform: scale(.55);
  animation: prox-ping 3s ease-out infinite;
}
.prox-rings i:nth-child(2) { animation-delay: 1s; }
.prox-rings i:nth-child(3) { animation-delay: 2s; }
.prox-field.is-locked .prox-rings i { animation-play-state: paused; opacity: 0; }
@keyframes prox-ping {
  0%   { opacity: 0;    transform: scale(.55); }
  18%  { opacity: .5; }
  100% { opacity: 0;    transform: scale(2.6); }
}
.prox-mac-lock {
  position: absolute;
  inset: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  opacity: 0;
  transform: scale(.7);
  transition: opacity .35s ease, transform .35s ease;
}
.prox-field.is-locked .prox-mac-lock { opacity: 1; transform: scale(1); }
.prox-field.is-locked .prox-mac-screen { fill: #06070F; }

.prox-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.prox-endpoint { font-size: 13px; color: var(--ink-dim); white-space: nowrap; }

.prox-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 34px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.prox-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-raised-2);
}
.prox-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 30px;
  margin-top: -13px;
  border-radius: 5px;
  background: var(--accent);
  border: 2px solid var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(206,154,76,.18);
}
.prox-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-raised-2);
}
.prox-range::-moz-range-thumb {
  width: 16px;
  height: 26px;
  border-radius: 5px;
  background: var(--accent);
  border: 2px solid var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(206,154,76,.18);
}
.prox-range:focus-visible { outline-offset: 6px; }

.prox-readout {
  display: flex;
  align-items: center;
  gap: 14px;
}
.prox-meters {
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.prox-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.prox-bars i {
  width: 4px;
  background: var(--bg-raised-2);
  border-radius: 1px;
  transition: background .25s ease;
}
.prox-bars i:nth-child(1) { height: 5px; }
.prox-bars i:nth-child(2) { height: 9px; }
.prox-bars i:nth-child(3) { height: 13px; }
.prox-bars i:nth-child(4) { height: 16px; }
.prox-bars i.on { background: var(--accent); }

.prox-state {
  font-family: "Fraunces", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ok);
  transition: color .3s ease;
}
.prox-field.is-locked .prox-state { color: var(--accent-bright); }
.prox-hint { font-size: 13px; color: var(--ink-dim); }

/* ---------- Escenas: fragmentos de interfaz real ---------- */
[data-ui] .ui-card, .ui-card {
  width: min(400px, 100%);
  background: var(--bg-raised-2);
  border-radius: 16px;
  padding: 28px;
}
.ui-title {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 6px;
}
.ui-sub { font-size: 15px; color: var(--ink-dim); margin-bottom: 16px; }
.ui-note { font-size: 13px; color: var(--ink-dim); margin-top: 14px; }

.ui-code { display: flex; gap: 8px; justify-content: center; margin: 10px 0 4px; }
.ui-code b {
  width: 40px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border-radius: 10px;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ui-code b:nth-child(3) { background: var(--bg-raised); box-shadow: inset 0 0 0 2px var(--accent); }

.ui-meter { display: grid; gap: 8px; margin-top: 4px; }
.ui-meter-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-dim);
}
.ui-meter-row b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ui-meter-track {
  height: 5px;
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}
.ui-meter-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.ui-locked { text-align: center; }
.ui-locked-icon {
  display: inline-flex;
  width: 72px; height: 72px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-raised-2);
  color: var(--accent-bright);
  margin-bottom: 20px;
}
.ui-locked .ui-title { font-size: 21px; }
.ui-locked .ui-sub { margin-top: 6px; }

.ui-notify { border-radius: 18px; }
.ui-notify-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.ui-notify-app { color: var(--ink-dim); }

.ui-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ui-list li { font-size: 15px; color: var(--ink); display: flex; gap: 10px; }
.ui-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
  flex: none;
}
.ui-lang { font-size: 14px; color: var(--ink-dim); line-height: 1.7; }
.ui-lang-dim { color: var(--ink-dim); opacity: .75; }
.ui-mini-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
}

/* Distintivo "Pro" — funciones que solo están en Mac AutoLock Pro */
.pro-chip {
  display: inline-block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 4px;
  padding: 1px 7px;
  vertical-align: middle;
}

/* ============ COLUMNA DE LECTURA ============ */
.read-col {
  padding: 0 clamp(24px, 5vw, 72px) 40px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
}
.brand img { display: block; border-radius: 8px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-dim);
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }

/* Selector de idioma compacto (bandera + chev) */
.lang-dropdown { position: relative; }
.lang-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: none;
  background: var(--bg-raised-2);
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: color .15s ease;
}
.lang-dropdown-trigger:hover { color: var(--ink); }
.lang-dropdown-trigger .chev { font-size: 13px; opacity: 0.7; transition: transform .15s; }
.lang-dropdown.open .lang-dropdown-trigger .chev { transform: rotate(180deg); }
.lang-dropdown-trigger .name { display: none; }

.lang-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-raised-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.6);
  z-index: 50;
}
.lang-dropdown.open .lang-dropdown-panel { display: block; }
.lang-dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-dim);
}
.lang-dropdown-panel a:hover { background: rgba(245,238,221,0.06); color: var(--ink); }
.lang-dropdown-panel a.active { color: var(--accent-bright); }
.lang-dropdown-panel .flag { font-size: 17px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--bg-raised-2);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .15s ease, opacity .15s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - 90px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 80px;
}
.hero h1 {
  font-size: clamp(40px, 3.6vw, 56px);
  max-width: 18ch;
}
.hero .subtitle {
  margin-top: 22px;
  max-width: 42ch;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
}
.hero .actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-bright); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }

/* ---------- Column headings ---------- */
.col-head {
  font-size: clamp(24px, 2.2vw, 30px);
  margin-bottom: 8px;
}

/* ---------- Statements (cómo funciona) ---------- */
.statement {
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.statement h3 {
  font-size: clamp(26px, 2.4vw, 32px);
  color: var(--ink-dim);
  transition: color .35s ease;
  max-width: 16ch;
}
.statement p {
  margin-top: 14px;
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 38ch;
  transition: color .35s ease;
}
.statement.is-active h3 { color: var(--ink); }
.statement.is-active p { color: var(--ink); }

/* ---------- Features: prueba pequeña junto al texto ---------- */
#features { padding-top: 40px; }
#features .col-head { margin-bottom: 64px; }
.feature-mod {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 88px;
}
.feature-mod:last-child { margin-bottom: 12vh; }
.feature-panel {
  flex: none;
  width: 46%;
  min-width: 185px;
  background: var(--bg-raised);
  border-radius: 14px;
  padding: 16px;
  font-size: 13px;
}
.feature-text { padding-top: 2px; }
.feature-text h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-text p { color: var(--ink); font-size: 16px; }

/* ---------- Índice Pro / Lite (sección propia, fuera del split) ---------- */
#pro-lite {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 6fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  padding: clamp(64px, 11vh, 130px) clamp(24px, 5vw, 72px);
}
.index-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.index-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-faint);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  text-align: left;
  transition: color .25s ease;
}
.index-name:hover { color: var(--ink-dim); }
.index-name.is-on { color: var(--ink); }
.index-sub {
  margin-top: 22px;
  color: var(--ink);
  font-size: 16px;
  max-width: 40ch;
}
.index-sheets { min-width: 0; }
.index-sheet { display: none; }
.index-sheet.is-on { display: block; }
.index-sheet .ui-card { width: 100%; max-width: 560px; }

/* ============ PRICING: dos campos ============ */
.price-split {
  display: grid;
  grid-template-columns: 4fr 6fr;
  min-height: 92svh;
}
.price-field {
  padding: clamp(40px, 5vw, 72px) clamp(24px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.price-field-pro { background: var(--bg-raised-2); }
.price-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1;
}
.price-who {
  margin-top: 18px;
  font-size: 16.5px;
  color: var(--ink);
  max-width: 30ch;
  min-height: 3.4em;
}
.price-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.price-list li {
  font-size: 15px;
  color: var(--ink);
  display: flex;
  gap: 10px;
}
.price-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
  flex: none;
}
.price-foot {
  margin-top: auto;
  padding-top: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.price-big {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -0.02em;
}

.price-field-pro .plan-options { margin-top: 32px; }
.plan-options { display: grid; gap: 10px; }
.plan-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  padding: 13px 16px;
  background: rgba(0,0,0,0.22);
}
.plan-option b { display: block; font-size: 15px; font-weight: 500; }
.plan-option span { color: var(--ink-dim); font-size: 13px; }
.plan-option .btn { white-space: nowrap; padding: 9px 18px; font-size: 13.5px; }

.plan-email { margin-top: 18px; }
.plan-email-label {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 7px;
}
.plan-email-input {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: none;
  background: rgba(0,0,0,0.3);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  transition: box-shadow .15s ease;
}
.plan-email-input::placeholder { color: var(--ink-dim); opacity: .7; }
.plan-email-input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.plan-email-input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent-bright); }
.plan-email-hint { color: var(--ink-dim); font-size: 13px; margin-top: 7px; }
.plan-pay-msg { margin-top: 14px; font-size: 14px; color: #ff9d94; }
.plan-pay-msg.ok { color: #7df0ac; }

.price-note {
  padding: 20px 24px 0;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
}

/* ============ Foto del mundo del producto ============ */
.world-band {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: clamp(320px, 58svh, 560px);
  overflow: hidden;
}
.world-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.78) saturate(.92);
}
.world-caption {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  bottom: 30px;
  max-width: 22ch;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  background: rgba(10,12,26,.82);
  border-radius: 12px;
  padding: 10px 16px;
}
.world-credit {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 13px;
  color: var(--ink-dim);
  background: rgba(10,12,26,.82);
  border-radius: 8px;
  padding: 4px 10px;
}

/* ============ CTA final ============ */
.cta-end {
  padding: 30svh 24px 24svh;
  text-align: center;
}
.cta-sentence {
  font-size: 18px;
  max-width: 34ch;
  margin: 0 auto;
}
.cta-row {
  margin-top: 30px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cta-link {
  font-size: 14.5px;
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.32);
  background: rgba(255,255,255,.09);
}
.store-badge .sb-icon { width: 30px; height: 30px; flex: none; }
.store-badge .sb-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
}
.store-badge .sb-text small {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-dim);
}
.store-badge-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.store-badge-primary .sb-text small { color: rgba(0,0,0,.55); }
.store-badge-primary:hover { background: var(--accent-bright); border-color: transparent; }
.store-row {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.store-badge-sm { padding: 7px 14px; border-radius: 10px; }
.store-badge-sm .sb-icon { width: 22px; height: 22px; }
.store-badge-sm .sb-text { font-size: 13.5px; }
.store-badge-sm .sb-text small { font-size: 9px; }

/* ============ Footer: una línea ============ */
.site-footer { padding: 12svh 24px 30px; }
.footer-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 20px;
  font-size: 14px;
  color: var(--ink-faint);
}
.footer-line nav { display: flex; gap: 22px; justify-content: center; }
.footer-line nav a { color: var(--ink); transition: color .15s; }
.footer-line nav a:hover { color: var(--accent-bright); }
.footer-year { text-align: right; }

/* ============ Modal de pago ============ */
.pay-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.pay-modal[hidden] { display: none; }
.pay-modal-veil { position: absolute; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(4px); }
.pay-modal-card {
  position: relative;
  width: min(400px, calc(100vw - 40px));
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 28px 26px;
  text-align: center;
}
.pay-modal-card h3 { font-size: 18px; margin-bottom: 10px; }
.pay-modal-card p { color: var(--ink-dim); font-size: 14px; }
.pay-modal-x {
  position: absolute;
  top: 10px; right: 14px;
  border: none; background: none;
  color: var(--ink-faint); font-size: 24px;
  cursor: pointer; line-height: 1;
}
.pay-modal-x:hover { color: var(--ink); }
.pay-modal-qr {
  margin: 18px auto 6px;
  width: 140px; height: 140px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
}
.pay-modal-qr img, .pay-modal-qr canvas { display: block; }
.pay-modal-qr-cap { font-size: 12px !important; margin-bottom: 16px; }

/* ============ Cookies (banner + modal de preferencias) ============ */
/* Franja de consentimiento en flujo al inicio del documento: visible al
   cargar, hace scroll con la página y nunca se superpone al contenido. */
.cookie-banner {
  display: none;
  background: var(--bg-raised-2);
}
.cookie-banner.is-open { display: block; }
.cookie-card {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 72px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.cookie-text {
  margin: 0;
  flex: 1 1 320px;
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.55;
}
.cookie-text a { color: var(--accent-bright); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 10px 18px; font-size: 13.5px; }

.cookie-modal {
  position: fixed; inset: 0;
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6,7,15,0.6);
  backdrop-filter: blur(3px);
}
.cookie-modal.is-open { display: flex; }
.cookie-modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 28px;
}
.cookie-modal-card h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px;
  margin: 0 0 18px;
}
.cookie-opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.cookie-opt:last-of-type { border-bottom: none; padding-bottom: 20px; }
.cookie-opt.is-disabled { opacity: .6; cursor: default; }
.cookie-opt b { display: block; font-size: 14.5px; font-weight: 600; }
.cookie-opt span { font-size: 12.5px; color: var(--ink-dim); }
.cookie-opt input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.cookie-opt .ck {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(0,0,0,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}
.cookie-opt .ck::after {
  content: "";
  width: 11px; height: 6px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
}
.cookie-opt input:checked + .ck { background: var(--accent); border-color: var(--accent); }
.cookie-opt input:checked + .ck::after { opacity: 1; }
.cookie-opt input:focus-visible + .ck { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.cookie-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.cookie-modal-actions .btn { padding: 10px 18px; font-size: 13.5px; }

/* ============ Páginas de contenido (soporte, legal) ============ */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.page-content h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 28px; }
.page-content h2 { font-size: 20px; margin: 36px 0 12px; font-family: "IBM Plex Sans", sans-serif; font-weight: 600; }
.page-content p, .page-content li { color: var(--ink-dim); font-size: 15.5px; line-height: 1.7; }
.page-content ul { padding-left: 20px; }
.page-content a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }

/* Fragmento inline de cada statement — solo visible en móvil
   (en desktop el escenario fijo enseña el estado equivalente) */
.m-frag { display: none; }

/* ============ Animación de entrada ============ */
.rise {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.rise.in { opacity: 1; transform: none; }

/* ============ Tablet / móvil ============ */
@media (max-width: 1180px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    right: clamp(24px, 5vw, 72px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg-raised-2);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 24px 48px -20px rgba(0,0,0,0.6);
    z-index: 60;
  }
  .nav-links a { padding: 10px 12px; border-radius: 8px; }
  .nav-links a:hover { background: rgba(245,238,221,0.06); }
  .nav-links .lang-dropdown { padding: 4px 8px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: relative; }
  /* El nav no se superpone al contenido en pantallas pequeñas: hace
     scroll con la página en vez de quedar pegado tapando titulares. */
  .nav-shell { position: static; }
}

@media (max-width: 900px) {
  .split { display: block; }
  .stage-col { display: contents; }
  /* El escenario NO se pega en móvil: queda en flujo arriba mostrando el
     campo de proximidad, y cada statement enseña su fragmento inline —
     nada queda cubierto al hacer scroll. */
  .stage {
    position: relative;
    height: 52svh;
    margin: 0;
    border-radius: 0;
  }
  .stage-scene { inset: 0 0 40px; padding: 20px; }
  .stage-bar { height: 40px; font-size: 13px; padding: 0 16px; }
  .prox-field { gap: 14px; max-width: 300px; }
  .prox-meters { font-size: 22px; }
  .prox-state { font-size: 19px; }
  .prox-hint { display: none; }
  .ui-code b { width: 32px; height: 42px; font-size: 19px; }
  .ui-card { padding: 18px; }

  .read-col { padding: 0 20px 30px; }
  .site-nav { padding: 16px 0; }
  .nav-links { top: 62px; right: 20px; left: 20px; min-width: 0; }
  .hero { min-height: 0; padding: 44px 0 60px; }
  .hero h1 { font-size: clamp(27px, 7.4vw, 32px); max-width: none; }
  .hero .subtitle { font-size: 16px; }

  .statement { min-height: 0; padding: 40px 0; }
  .statement .m-frag { margin-top: 22px; }
  .feature-mod { flex-direction: column; margin-bottom: 64px; }
  .feature-mod:last-child { margin-bottom: 8vh; }
  .feature-panel { width: 100%; min-width: 0; }
  #pro-lite { display: block; padding: 56px 20px; }
  .index-names {
    flex-direction: row;
    gap: 26px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -20px;
    padding: 0 20px;
  }
  .index-name { font-size: 26px; white-space: nowrap; scroll-snap-align: start; }
  .m-frag { display: block; }
  .index-sheets { margin-top: 24px; }
  .index-sheet .ui-card { max-width: none; }

  .price-split { grid-template-columns: 1fr; min-height: 0; }
  .price-field { min-height: 62svh; }
  .price-field-pro { order: -1; }
  .cta-end { padding: 18svh 20px 16svh; }
  .cta-sentence { font-size: 18px; }
  .site-footer { padding-top: 8svh; }
  .footer-line { grid-template-columns: 1fr; gap: 10px; }
  .footer-line nav { justify-content: flex-start; flex-wrap: wrap; }
  .footer-year { text-align: left; }
}

/* ============ Movimiento reducido ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage-scene { transition: opacity .2s ease; }
  .rise { opacity: 1; transform: none; transition: none; }
  .prox-rings i { animation: none; opacity: 0; }
  .btn, .index-name, .nav-links a, .prox-mac-lock, .prox-state, .statement h3, .statement p {
    transition: none;
  }
}
