@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  --navy-900: #0a2a4d;
  --navy-800: #0f3d6e;
  --blue: #1580bf;
  --blue-text: #0f6aa6;
  --cyan: #1cb0d5;
  --orange: #f47920;
  --ice: #f3f8fc;
  --white: #ffffff;
  --ink-soft: #3a5f84;
  --line: #cfe1ee;
  --on-dark-soft: #bcd3e8;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 68px;
  /* Un solo margen lateral para cabecera, héroe, secciones y pie */
  --pad: max(clamp(16px, 4vw, 72px), calc((100% - 1296px) / 2));
  scroll-padding-top: calc(var(--header-h) + 12px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--blue) var(--navy-900); }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  color: var(--navy-800);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cyan); color: var(--navy-900); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 0.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: var(--navy-900); padding: 10px 16px; border-radius: 8px; font-weight: 700; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: 100%; padding-inline: var(--pad); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 12px;
  font: 800 1rem/1 "Montserrat", sans-serif; text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-go { background: var(--orange); color: var(--navy-900); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
.btn-wa { background: var(--cyan); color: var(--navy-900); min-height: 42px; padding: 0 20px; }
.btn-ghost { border: 2px solid var(--cyan); color: var(--white); }
.btn:hover { transform: translateY(-2px); }
.btn-go:hover { background: #ff8a38; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); }
.btn-wa:hover { background: #4cc4e4; }
.btn-ghost:hover { background: rgba(28, 176, 213, 0.16); }
.btn:active { transform: translateY(0); }

/* Cabecera */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--pad);
  background: var(--navy-900); border-bottom: 1px solid rgba(188, 211, 232, 0.16);
}
.brand img { width: 128px; height: auto; filter: brightness(0) invert(1); }
.top nav { display: flex; gap: 28px; margin-left: auto; }
.top nav a { color: var(--on-dark-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.top nav a:hover { color: var(--white); }

/* Tablero (héroe) */
.hero { height: 280vh; color: var(--white); background: var(--navy-900); }
.hero-stick {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  padding: calc(var(--header-h) + clamp(16px, 3vh, 36px)) var(--pad) clamp(20px, 3.5vh, 36px);
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
.hero-main { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 0; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
h1 { font-size: clamp(2rem, 4.1vw, 3.8rem); max-width: 18ch; }
h1 span { display: block; }
.readout { text-align: right; flex: none; }
.readout-n { display: block; white-space: nowrap; font-size: clamp(3rem, 6vw, 5rem); font-weight: 800; line-height: 0.9; color: var(--cyan); font-variant-numeric: tabular-nums; }
.readout-l { display: block; margin-top: 10px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-soft); }
.hero-mini { display: none; }

.states { display: flex; gap: 14px; }
.states li { flex: 1 1 0; min-width: 0; display: flex; transition: flex-grow 0.6s var(--ease); }
.states li.on { flex-grow: 1.7; }
.states button {
  all: unset; box-sizing: border-box; cursor: pointer; flex: 1; min-width: 0; min-height: clamp(150px, 27vh, 240px);
  display: flex; flex-direction: column; gap: 8px; padding: 20px;
  border: 2px solid var(--blue); border-radius: 18px; background: var(--navy-800); color: var(--white);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.states button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.n { font-size: clamp(2rem, 3.6vw, 3.4rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--cyan); transition: color 0.4s var(--ease); }
.states strong { font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 800; }
.states .d { font-size: 0.9rem; line-height: 1.4; color: var(--on-dark-soft); transition: color 0.4s var(--ease); }
.states li.done button { border-color: var(--cyan); }
.states li.on button { background: var(--cyan); border-color: var(--cyan); color: var(--navy-900); }
.states li.on .n, .states li.on .d { color: var(--navy-900); }
.states button:hover { border-color: var(--cyan); }

.bar { height: 10px; border-radius: 9px; background: var(--navy-800); overflow: hidden; }
.bar span { display: block; height: 100%; width: calc(var(--p, 0.75) * 100%); background: var(--orange); border-radius: 9px; }

.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-foot p { font-size: clamp(1rem, 1.4vw, 1.2rem); font-weight: 700; max-width: 34ch; }

.hero-render { display: none; margin: 0; }
.cue { position: absolute; left: 0; right: 0; bottom: 10px; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-soft); text-align: center; transition: opacity 0.4s; pointer-events: none; }
.cue.gone { opacity: 0; }

@media (min-width: 1100px) {
  .hero-stick { grid-template-columns: minmax(0, 1fr) clamp(260px, 25vw, 360px); column-gap: clamp(24px, 3vw, 48px); }
  .hero-render {
    display: flex; flex-direction: column; gap: 10px; min-height: 0;
    background: var(--ice); border-radius: 18px; padding: 16px 16px 12px;
  }
  .hero-render img { flex: 1 1 0; min-height: 0; width: 100%; object-fit: contain; }
  .hero-render figcaption { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); text-align: center; }
  .cue { display: none; }
}

/* Secciones claras */
.light { background: var(--white); padding-block: clamp(64px, 10vw, 120px); }
.light.alt { background: var(--ice); }
.light h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); max-width: 20ch; }
.lead { font-size: 1.12rem; max-width: 46ch; }
.note { margin-top: 28px; max-width: 62ch; color: var(--ink-soft); font-weight: 600; }

/* Paneles: mismas tarjetas de estado del tablero */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: clamp(32px, 5vw, 52px); }
.panel { border-radius: 18px; padding: 28px 32px 12px; border: 2px solid var(--blue); }
.panel h3 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; }
.panel li { position: relative; padding: 14px 0 14px 34px; font-size: 1.05rem; border-bottom: 1px solid rgba(188, 211, 232, 0.25); }
.panel li:last-child { border-bottom: 0; }
.panel li::before {
  content: ""; position: absolute; left: 0; top: 17px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%230a2a4d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.panel.navy { background: var(--navy-800); color: var(--white); }
.panel.navy h3 { color: var(--on-dark-soft); }
.panel.cyan { background: var(--cyan); border-color: var(--cyan); color: var(--navy-900); }
.panel.cyan li { border-bottom-color: rgba(10, 42, 77, 0.25); }
.panel.cyan li::before {
  background: var(--navy-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%231cb0d5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* Máquina y ficha técnica como filas de pantalla */
.machine { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.machine-copy .lead { margin-top: 20px; }
.spec { margin: 32px 0 0; padding: 6px 28px; background: var(--navy-800); border: 2px solid var(--blue); border-radius: 18px; color: var(--white); }
.spec div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid rgba(188, 211, 232, 0.25); }
.spec div:last-child { border-bottom: 0; }
.spec dt { font-weight: 600; color: var(--on-dark-soft); }
.spec dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; color: var(--cyan); }
.spec small { display: block; font-weight: 600; font-size: 0.8rem; color: var(--on-dark-soft); }
.renders { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: end; }
.renders figcaption { grid-column: 1 / -1; text-align: center; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }

.para-ti { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.cats li { padding: 9px 16px; border-radius: 8px; background: var(--ice); font-weight: 700; }

/* Cierre: estado 04 completo */
.close { background: linear-gradient(var(--orange) 0 10px, var(--navy-900) 10px); color: var(--white); padding-block: calc(clamp(64px, 10vw, 112px) + 10px) clamp(64px, 10vw, 112px); }
.close-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.close h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 16ch; }
.close p { margin-top: 18px; font-size: 1.12rem; color: var(--on-dark-soft); max-width: 44ch; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.closing { display: flex; flex-direction: column; gap: 8px; padding: 28px; min-height: 240px; border-radius: 18px; background: var(--cyan); color: var(--navy-900); }
.closing .n { color: var(--navy-900); font-size: clamp(2.6rem, 5vw, 4rem); }
.closing strong { font-size: 1.5rem; font-weight: 800; }
.closing .d { font-size: 1rem; line-height: 1.45; max-width: 32ch; }
.soon { min-height: calc(100svh - 90px); display: flex; align-items: center; padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px)); }
.soon h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 18ch; }
.foot { background: var(--navy-900); border-top: 1px solid rgba(188, 211, 232, 0.16); padding: 28px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--on-dark-soft); font-weight: 600; }
.foot img { width: 160px; filter: brightness(0) invert(1); }

/* Móvil */
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .top nav { display: none; }
  .hero { height: 300vh; }
  .hero-head { display: grid; grid-template-columns: minmax(0, 1fr) 92px; grid-template-rows: auto auto; align-items: end; gap: 10px 14px; }
  h1 { font-size: 1.75rem; grid-column: 1; grid-row: 1; }
  .readout { grid-column: 1; grid-row: 2; text-align: left; display: flex; align-items: baseline; gap: 12px; }
  .readout-n { font-size: 2.6rem; }
  .readout-l { margin: 0; }
  .hero-mini { display: block; grid-column: 2; grid-row: 1 / span 2; align-self: stretch; width: 92px; height: 100%; max-height: 190px; object-fit: contain; background: var(--ice); border-radius: 12px; padding: 6px; }
  .states { flex-direction: column; gap: 8px; }
  .states li.on { flex-grow: 1; }
  .states button { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 16px; border-radius: 14px; }
  .states .n { font-size: 1.4rem; }
  .states .d { display: none; flex-basis: 100%; }
  .states li.on .d { display: block; }
  .hero-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-foot p { display: none; }
  .hero-foot .btn { width: 100%; }
  .cue { display: none; }
  .ledger, .machine, .para-ti, .close-grid { grid-template-columns: 1fr; }
  .panel { padding: 24px 22px 8px; }
  .machine { row-gap: 20px; }
  .machine-copy { display: contents; }
  .machine-copy h2 { order: 1; }
  .machine-copy .lead { order: 2; margin-top: 0; }
  .renders { order: 3; }
  .spec { order: 4; margin-top: 0; }
  .machine-copy .note { order: 5; margin-top: 0; }
  .closing { min-height: 0; }
  .foot { flex-direction: column; align-items: flex-start; }
}
@media (max-height: 640px) and (min-width: 861px) { .hero-foot p, .cue { display: none; } }

/* Sin movimiento: el tablero deja de seguir el scroll */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero-stick { position: static; height: auto; min-height: 100svh; }
  .states li, .states button, .btn { transition: none; }
}
