/* =====================================================================
   JASA — hoja de estilos única (sin frameworks, ~todo el sitio)

   Concepto: materiales de ingeniería electrónica.
     - Fondo negro puro, como el de la referencia de Scale.
     - Verde máscara de soldadura (el color de las placas de circuito) para acciones.
     - Oro de contacto (el baño de oro de los pads de una placa) para datos y estados.
   Tipografía: Archivo variable. Usamos su eje de ANCHO: títulos expandidos,
   texto normal y etiquetas condensadas. Una sola familia, tres voces.
   ===================================================================== */

@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/archivo-2348e0b4.woff2") format("woff2-variations");
}

:root {
  /* Paleta */
  --negro: #000000;
  --grafito: #141619;   /* superficies elevadas */
  --linea: #2E3237;     /* divisores y bordes */
  --hueso: #E8E4DA;     /* texto principal */
  --gris: #8D9198;      /* texto secundario */
  --mascara: #1E4A35;   /* verde máscara de soldadura: botones */
  --mascara-luz: #2A6247;
  --oro: #D4AE5C;       /* oro de contacto: datos, estados, foco */
  --riesgo: #E0745A;
  --alerta: #D4AE5C;
  --bien: #7FB596;

  /* Tipo (escala ~1.25, base 17px) */
  --f: "Archivo Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-xs: 0.8125rem;
  --t-s: 0.9375rem;
  --t-m: 1.0625rem;
  --t-l: 1.375rem;
  --t-xl: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --t-xxl: clamp(2.1rem, 1.3rem + 2.6vw, 3.4rem);
  --t-mega: clamp(2rem, 0.9rem + 4.6vw, 5.25rem);

  /* Espacio */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --radius-s: 6px;
  --radius-m: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--negro);
  color: var(--hueso);
  font-family: var(--f);
  font-size: var(--t-m);
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--oro); text-underline-offset: 0.2em; }
a:hover { color: var(--oro); }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--oro); color: var(--negro); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--oro); color: var(--negro); padding: 0.5rem 1rem; }
.skip:focus { top: 1rem; }

/* --------------------------------------------------------------- Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0 1.4rem;
  font: 500 var(--t-s)/1 var(--f); font-stretch: 95%;
  border-radius: var(--radius-s); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--solid { background: var(--mascara); color: var(--hueso); }
.btn--solid:hover { background: var(--mascara-luz); color: var(--hueso); }
.btn--ghost { background: transparent; color: var(--hueso); border-color: var(--linea); }
.btn--ghost:hover { border-color: var(--hueso); color: var(--hueso); }
.btn--danger { background: transparent; color: var(--riesgo); border-color: var(--riesgo); margin-top: 2rem; }
.link {
  background: none; border: 0; padding: 0; color: var(--gris); font: inherit; font-size: var(--t-s);
  text-decoration: underline; text-decoration-color: var(--linea); text-underline-offset: 0.25em; cursor: pointer;
}
.link:hover { color: var(--hueso); text-decoration-color: var(--oro); }

/* --------------------------------------------------------------- Navegación */
.nav {
  position: sticky; top: 0; z-index: 20;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem var(--gutter);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 50, 55, 0.6);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-weight: 650; font-stretch: 125%; letter-spacing: 0.02em; font-size: 1.05rem;
}
.nav__brand:hover { color: var(--hueso); }
.nav__links { display: flex; gap: 1.75rem; margin-left: auto; font-size: var(--t-s); }
.nav__links a { text-decoration: none; color: var(--gris); }
.nav__links a:hover { color: var(--hueso); }
.nav__cta { min-height: 40px; }
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; padding: 0 1rem; }
}

.flash {
  margin: 1rem var(--gutter) 0; padding: 0.9rem 1.1rem;
  border: 1px solid var(--mascara-luz); border-radius: var(--radius-s);
  background: rgba(30, 74, 53, 0.25); font-size: var(--t-s);
}
.flash--alert { border-color: var(--riesgo); background: rgba(224, 116, 90, 0.1); }

/* --------------------------------------------------------------- Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 5rem);
  min-height: calc(100svh - 70px);
  padding: 2rem var(--gutter) 4rem 0;
}
.hero__figure { margin: 0; position: relative; }
.layers { width: 100%; aspect-ratio: 1.35 / 1; }
.hero__figure figcaption {
  margin: 0.25rem 0 0 var(--gutter);
  font-size: var(--t-xs); font-stretch: 85%; color: var(--gris);
}
.hero__copy { max-width: 34rem; }
.hero__copy h1 {
  font-size: var(--t-xxl);
  font-stretch: 112%;
  font-weight: 450;
  letter-spacing: -0.02em;
}
.lede { margin-top: 1.4rem; color: var(--gris); font-size: var(--t-m); max-width: 32rem; }

/* La caja del analizador: la pieza central del sitio. */
.probe {
  display: flex; align-items: stretch; margin-top: 2rem;
  border: 1px solid var(--linea); border-radius: var(--radius-m);
  background: var(--grafito); padding: 0.35rem;
  transition: border-color 0.15s;
}
.probe:focus-within { border-color: var(--oro); }
.probe__prefix {
  display: flex; align-items: center; padding-left: 0.85rem;
  color: var(--gris); font-size: var(--t-s); font-stretch: 85%;
}
.probe input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--hueso);
  font: 500 var(--t-l)/1 var(--f); font-stretch: 105%; padding: 0.7rem 0.4rem;
}
.probe input::placeholder { color: #565B62; }
.probe input:focus { outline: none; }
.hint { margin-top: 0.9rem; font-size: var(--t-xs); color: var(--gris); }
.hero__copy .link { margin-top: 1.25rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 1rem var(--gutter) 3rem; min-height: auto; }
  .hero__figure { order: 2; margin: 0 calc(var(--gutter) * -1); }
  .hero__figure figcaption { margin-left: var(--gutter); }
  .layers { aspect-ratio: 1.5 / 1; }
}
@media (max-width: 520px) {
  .probe { flex-wrap: wrap; }
  .probe__prefix { display: none; }
  .probe input { flex-basis: 100%; padding: 0.8rem 0.7rem; }
  .probe .btn { width: 100%; }
}

/* --------------------------------------------------------------- Secciones */
.teaser, .model, .log, .engineer, .contact {
  padding: var(--section) var(--gutter);
  border-top: 1px solid var(--linea);
}
.story h2, .model h2, .log h2, .contact h2, .teaser h2, .engineer h2 {
  font-size: var(--t-xl); font-stretch: 112%; font-weight: 450; letter-spacing: -0.01em;
}

/* Declaración a pantalla completa (estilo SpaceX). */
.statement {
  min-height: 80svh; display: flex; flex-direction: column; justify-content: center;
  padding: var(--section) var(--gutter);
  border-top: 1px solid var(--linea);
  background:
    radial-gradient(ellipse 60% 50% at 85% 100%, rgba(30, 74, 53, 0.35), transparent 70%),
    var(--negro);
}
.statement__big {
  font-size: var(--t-mega); font-stretch: 118%; font-weight: 400;
  line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch;
}
.statement__small { margin-top: 2rem; color: var(--gris); max-width: 40ch; font-size: var(--t-l); line-height: 1.4; }

/* Adelanto del constructor. */
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
.teaser__copy p { margin: 1.25rem 0 2rem; color: var(--gris); max-width: 34rem; }
.teaser__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.teaser__chips li {
  padding: 0.55rem 0.9rem; border: 1px solid var(--linea); border-radius: 999px;
  font-size: var(--t-s); font-stretch: 90%;
}
@media (max-width: 900px) { .teaser { grid-template-columns: 1fr; gap: 2.5rem; } }

/* Modelo de negocio: tres hechos, no numerados. */
.model__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; margin-top: 3rem; }
.model__grid h3 { font-size: var(--t-l); margin-bottom: 0.75rem; }
.model__grid p { color: var(--gris); max-width: 32ch; }
@media (max-width: 900px) { .model__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Bitácora: filas, no tarjetas. */
.log__list { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.log__row {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr) 14rem 9rem;
  gap: 1.5rem; align-items: baseline;
  padding: 1.6rem 0; border-bottom: 1px solid var(--linea);
}
.log__period, .log__skill { color: var(--gris); font-size: var(--t-s); font-stretch: 88%; }
.log__main h3 { font-size: var(--t-l); font-stretch: 100%; }
.log__main h3 a { text-decoration: none; }
.log__main p { color: var(--gris); margin-top: 0.4rem; font-size: var(--t-s); max-width: 60ch; }
.status { justify-self: end; font-size: var(--t-xs); font-stretch: 88%; padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid var(--linea); white-space: nowrap; }
.status--en_vivo { border-color: var(--bien); color: var(--bien); }
.status--en_construccion { border-color: var(--oro); color: var(--oro); }
@media (max-width: 900px) {
  .log__row { grid-template-columns: 1fr auto; gap: 0.4rem 1rem; }
  .log__period { grid-column: 1; }
  .status { grid-column: 2; grid-row: 1; }
  .log__main, .log__skill { grid-column: 1 / -1; }
}

/* Quién está detrás. */
.engineer { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.engineer__portrait {
  aspect-ratio: 4 / 5; border: 1px solid var(--linea); border-radius: var(--radius-m);
  display: grid; place-items: center; background: var(--grafito);
  font-size: 3rem; font-stretch: 125%; color: var(--oro); overflow: hidden;
}
.engineer__portrait img { width: 100%; height: 100%; object-fit: cover; }
.engineer__role { margin: 1rem 0 1.5rem; color: var(--oro); font-stretch: 92%; max-width: 60ch; }
.engineer__copy p:not(.engineer__role) { max-width: 60ch; color: var(--gris); }
.engineer__links { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.engineer__links a { color: var(--hueso); }
@media (max-width: 700px) { .engineer { grid-template-columns: 1fr; gap: 2rem; } .engineer__portrait { max-width: 11rem; } }

/* --------------------------------------------------------------- Formularios */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4rem; }
.contact__copy p { margin-top: 1rem; color: var(--gris); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 2rem; } }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.field--wide, .form__legal, .form > .btn, .form > input[type="submit"], .form__actions, .check, .quiz__intro { grid-column: 1 / -1; }
.field label, .field legend { font-size: var(--t-s); font-stretch: 92%; color: var(--gris); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 0.75rem 0.9rem;
  border: 1px solid var(--linea); border-radius: var(--radius-s);
  background: var(--grafito); color: var(--hueso); font: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--oro); }
.form__legal { font-size: var(--t-xs); color: var(--gris); }
.form > .btn, .form > input[type="submit"] { justify-self: start; }
.form__actions { display: flex; gap: 1.5rem; align-items: center; }
.check { display: flex; gap: 0.6rem; align-items: center; font-size: var(--t-s); }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

fieldset.choice { border: 0; padding: 0; margin: 0.5rem 0 0; }
.choice__options { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span {
  display: inline-block; padding: 0.6rem 1rem; border: 1px solid var(--linea);
  border-radius: 999px; font-size: var(--t-s); font-stretch: 92%;
}
.pill input:checked + span { border-color: var(--oro); color: var(--oro); background: rgba(212, 174, 92, 0.08); }
.pill input:focus-visible + span { outline: 2px solid var(--oro); outline-offset: 2px; }

/* --------------------------------------------------------------- Análisis en vivo */
.run {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 4vw, 4rem); padding: 2rem var(--gutter) var(--section) 0;
}
.run__aside { position: sticky; top: 90px; align-self: start; }
.layers--compact { aspect-ratio: 1.15 / 1; }
.run__domain { margin-left: var(--gutter); font-size: var(--t-l); font-stretch: 112%; }
.run__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--linea); }
.run__head h1 { font-size: var(--t-xl); font-stretch: 108%; font-weight: 450; word-break: break-word; }
.score { text-align: right; color: var(--gris); font-size: var(--t-s); white-space: nowrap; }
.score strong { font-size: 3rem; font-stretch: 115%; font-weight: 500; line-height: 1; }
.score--good strong { color: var(--bien); }
.score--mid strong { color: var(--oro); }
.score--low strong { color: var(--riesgo); }

.run__steps { list-style: none; margin: 0; padding: 0; }
.rstep { padding: 1.75rem 0; border-bottom: 1px solid var(--linea); }
.rstep__head { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.rstep__n {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem;
  border: 1px solid var(--linea); border-radius: 50%; font-size: var(--t-xs); color: var(--gris);
}
.rstep h2 { font-size: var(--t-l); font-stretch: 100%; }
.rstep__state { font-size: var(--t-s); color: var(--gris); font-stretch: 90%; }
.rstep--listo .rstep__n { border-color: var(--oro); background: var(--oro); color: var(--negro); }
.rstep--analizando .rstep__n { border-color: var(--oro); color: var(--oro); animation: pulse 1.4s ease-in-out infinite; }
.rstep--analizando .rstep__state { color: var(--oro); }
.rstep--pendiente h2 { color: var(--gris); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(212, 174, 92, 0.15); } }

.findings { list-style: none; margin: 1.25rem 0 0 3.25rem; padding: 0; display: grid; gap: 0.7rem; }
.finding { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 0.5rem; font-size: var(--t-s); color: var(--hueso); line-height: 1.5; }
.finding__tag {
  padding-top: 0.12rem;
  font-size: var(--t-xs); font-stretch: 85%; font-weight: 600;
}
.finding--ok .finding__tag { color: var(--bien); }
.finding--alerta .finding__tag { color: var(--alerta); }
.finding--riesgo .finding__tag { color: var(--riesgo); }
.finding--info .finding__tag { color: var(--gris); }
.rstep__todo { margin: 1.25rem 0 0 3.25rem; padding: 0.9rem 1rem; border-left: 2px solid var(--oro); background: var(--grafito); font-size: var(--t-s); }
#plan > .quiz, #plan > .plan { margin: 1.5rem 0 0 3.25rem; }
.quiz__intro { color: var(--gris); }
.notice-box { margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--riesgo); border-radius: var(--radius-m); display: grid; gap: 1rem; justify-items: start; }

@media (max-width: 900px) {
  .run { grid-template-columns: 1fr; padding: 1rem var(--gutter) var(--section); }
  .run__aside { position: static; margin: 0 calc(var(--gutter) * -1); }
  .layers--compact { aspect-ratio: 1.8 / 1; }
  .findings, .rstep__todo, #plan > .quiz, #plan > .plan { margin-left: 0; }
}

/* Plan y resultado */
.plan h3, .result h3 { font-size: var(--t-l); margin: 2.25rem 0 1rem; }
.plan__summary { font-size: var(--t-l); line-height: 1.45; font-stretch: 98%; max-width: 60ch; }
.plan__actions { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; font-size: var(--t-s); }
.action { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.5rem; }
.action span { font-size: var(--t-xs); font-weight: 600; font-stretch: 85%; padding-top: 0.12rem; }
.action--alta span { color: var(--riesgo); }
.action--media span { color: var(--oro); }

.ask {
  margin-top: 3rem; padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--oro); border-radius: var(--radius-m);
  background: radial-gradient(ellipse at 100% 0%, rgba(212, 174, 92, 0.12), transparent 60%), var(--grafito);
}
.ask__q { font-size: var(--t-xl); font-stretch: 112%; line-height: 1.1; }
.ask__a { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.ask__a form { margin: 0; }

.result { margin-top: 2.5rem; }
.result > h3:first-child { font-size: var(--t-xl); font-stretch: 110%; margin-top: 0; }
.result__note { color: var(--gris); font-size: var(--t-s); }

/* Boceto de la nueva página */
.wire {
  margin-top: 1.5rem; border: 1px solid var(--linea); border-radius: var(--radius-m);
  overflow: hidden; display: grid; gap: 1px; background: var(--linea);
}
.wire__sec { background: var(--negro); padding: 1.4rem 1.5rem; position: relative; }
.wire__sec strong { display: block; font-size: var(--t-l); font-weight: 500; }
.wire__sec p { color: var(--gris); font-size: var(--t-s); margin-top: 0.3rem; max-width: 50ch; }
.wire__label { position: absolute; right: 1rem; top: 1rem; font-size: var(--t-xs); font-stretch: 85%; color: #5B6067; }
.wire__sec--hero { padding: 3.5rem 1.5rem; }
.wire__sec--hero strong { font-size: var(--t-xxl); font-stretch: 115%; line-height: 1; }
.wire--design .wire__sec--hero {
  background:
    linear-gradient(120deg, rgba(30, 74, 53, 0.9), rgba(0, 0, 0, 0.2) 65%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(232, 228, 218, 0.05) 39px 40px),
    var(--negro);
}
.wire--design .wire__sec--hero strong { color: var(--hueso); }
.wire--design .wire__sec:nth-child(even) { background: var(--grafito); }
.wire--design .wire__sec--contacto { background: var(--mascara); }
.wire--design .wire__sec--contacto p { color: var(--hueso); }

.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 1rem 0 0; background: var(--linea); border: 1px solid var(--linea); border-radius: var(--radius-m); overflow: hidden; }
.figures > div { background: var(--negro); padding: 1.4rem 1.5rem; }
.figures dt { font-size: var(--t-s); color: var(--gris); font-stretch: 92%; }
.figures dd { margin: 0.4rem 0 0; font-size: var(--t-l); font-stretch: 105%; color: var(--oro); }
.figures dd.figures__note, .figures dd.figures__text { font-size: var(--t-s); color: var(--gris); font-stretch: 100%; }
.figures dd.figures__text { color: var(--hueso); }
@media (max-width: 700px) { .figures { grid-template-columns: 1fr; } }

.domains { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.domains__item { padding: 0.45rem 0.8rem; border: 1px solid var(--linea); border-radius: var(--radius-s); font-size: var(--t-s); color: var(--gris); }
.domains__item span { color: var(--hueso); margin-right: 0.4rem; }
.domains__item--libre { border-color: var(--bien); }
.domains__item--ocupado { border-color: var(--riesgo); }

.table { width: 100%; border-collapse: collapse; font-size: var(--t-s); margin-top: 1.25rem; }
.table caption { text-align: left; color: var(--gris); padding-bottom: 0.5rem; }
.table th, .table td { text-align: left; padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--linea); vertical-align: top; }
.table thead th { color: var(--gris); font-weight: 500; font-stretch: 90%; }
.table tbody th { font-weight: 450; }
.table td:last-child { white-space: nowrap; }
.result__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

/* --------------------------------------------------------------- Constructor */
.builder { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: calc(100svh - 70px); }
.builder__preview {
  position: sticky; top: 70px; height: calc(100svh - 70px);
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--linea);
}
.layers--builder { aspect-ratio: auto; flex: 1; min-height: 0; width: 100%; }
.builder__total { padding: 1.5rem var(--gutter) 2rem; border-top: 1px solid var(--linea); display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 2rem; align-items: baseline; }
.builder__total p:first-child { color: var(--gris); font-size: var(--t-s); }
.builder__money { grid-column: 1 / -1; font-size: var(--t-xxl); font-stretch: 115%; line-height: 1; }
.builder__money strong { font-weight: 500; }
.builder__setup { grid-column: 1 / -1; color: var(--gris); font-size: var(--t-s); }
.builder__panel { padding: 2.5rem var(--gutter) var(--section); }
.builder__panel h1 { font-size: var(--t-xl); font-stretch: 112%; font-weight: 450; }
.group { border: 0; padding: 0; margin: 2.5rem 0 0; }
.group legend { font-size: var(--t-s); color: var(--gris); font-stretch: 92%; margin-bottom: 0.75rem; }
.mod {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: start;
  padding: 1.1rem 1.1rem; margin-top: -1px; border: 1px solid var(--linea); cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.mod:first-of-type { border-radius: var(--radius-m) var(--radius-m) 0 0; }
.mod:last-of-type { border-radius: 0 0 var(--radius-m) var(--radius-m); }
.mod:only-of-type { border-radius: var(--radius-m); }
.mod input { appearance: none; -webkit-appearance: none; margin: 0.2rem 0 0; width: 1.15rem; height: 1.15rem; border: 1px solid var(--gris); transform: rotate(45deg); cursor: pointer; }
.mod input:checked { background: var(--oro); border-color: var(--oro); }
.mod:has(input:checked) { border-color: var(--oro); background: rgba(212, 174, 92, 0.05); position: relative; z-index: 1; }
.mod__name { display: block; font-weight: 500; }
.mod__desc { display: block; color: var(--gris); font-size: var(--t-s); margin-top: 0.2rem; }
.mod__price { text-align: right; font-stretch: 100%; white-space: nowrap; }
.mod__price small { display: block; color: var(--gris); font-size: var(--t-xs); }
.group--form .form { margin-top: 0.5rem; }
@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .builder__preview { position: sticky; top: 60px; z-index: 5; height: auto; background: var(--negro); border-right: 0; border-bottom: 1px solid var(--linea); }
  .layers--builder { height: 22svh; flex: none; }
  .builder__total { padding: 0.75rem var(--gutter); }
  .builder__money { font-size: var(--t-xl); }
}

/* --------------------------------------------------------------- Asesor */
.advisor__fab {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 52px; padding: 0 1.1rem;
  background: var(--mascara); color: var(--hueso);
  border: 1px solid var(--mascara-luz); border-radius: 999px;
  font: 500 var(--t-s)/1 var(--f); cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.advisor__fab:hover { background: var(--mascara-luz); }
.advisor {
  position: fixed; right: 1.25rem; bottom: 5.25rem; z-index: 30;
  width: min(380px, calc(100vw - 2.5rem)); height: min(540px, calc(100svh - 8rem));
  display: flex; flex-direction: column;
  background: var(--grafito); border: 1px solid var(--linea); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.advisor[hidden] { display: none; }
.advisor__head { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--linea); }
.advisor__head p { color: var(--gris); font-size: var(--t-xs); }
.advisor__close { background: none; border: 0; color: var(--gris); font-size: 1.6rem; line-height: 1; cursor: pointer; width: 2.25rem; height: 2.25rem; }
.advisor__close:hover { color: var(--hueso); }
.advisor__log { list-style: none; margin: 0; padding: 1rem 1.1rem; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; }
.msg { max-width: 86%; padding: 0.65rem 0.85rem; border-radius: 12px; font-size: var(--t-s); line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg--bot { background: var(--negro); border: 1px solid var(--linea); align-self: flex-start; border-bottom-left-radius: 3px; }
.msg--user { background: var(--mascara); align-self: flex-end; border-bottom-right-radius: 3px; }
.msg--typing { color: var(--gris); }
.advisor__form { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--linea); }
.advisor__form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 0.8rem; border: 1px solid var(--linea); border-radius: var(--radius-s); background: var(--negro); color: var(--hueso); font: inherit; font-size: var(--t-s); }
.advisor__form input:focus { outline: none; border-color: var(--oro); }
.advisor__form .btn { min-height: 44px; padding: 0 1rem; }
@media (max-width: 520px) { .advisor__fab span { display: none; } .advisor__fab { padding: 0; width: 52px; justify-content: center; } }

/* --------------------------------------------------------------- Pie y textos largos */
.footer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem;
  padding: 3.5rem var(--gutter) 6rem; border-top: 1px solid var(--linea); color: var(--gris); font-size: var(--t-s);
}
.footer__brand { display: flex; gap: 0.9rem; align-items: flex-start; max-width: 36rem; }
.footer__brand .logo { color: var(--hueso); flex: none; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }
.footer__links a { text-decoration: none; }
.footer__legal { grid-column: 1 / -1; font-size: var(--t-xs); }
@media (max-width: 700px) { .footer { grid-template-columns: 1fr; } }

.prose { max-width: 42rem; padding: var(--section) var(--gutter); }
.prose h1 { font-size: var(--t-xl); font-stretch: 112%; font-weight: 450; margin-bottom: 2rem; }
.prose h2 { font-size: var(--t-l); margin: 2.25rem 0 0.75rem; }
.prose p { color: var(--gris); }
.prose__date { margin-top: 2.5rem; font-size: var(--t-xs); }

.login { max-width: 26rem; margin: 0 auto; padding: var(--section) var(--gutter); }
.login h1 { font-size: var(--t-xl); font-stretch: 110%; margin-bottom: 2rem; font-weight: 450; }

/* --------------------------------------------------------------- Admin */
.admin__bar { display: flex; align-items: center; gap: 2rem; padding: 0.9rem 1.5rem; border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.admin__bar nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: var(--t-s); }
.admin__bar nav a { text-decoration: none; color: var(--gris); }
.admin__bar nav a:hover { color: var(--hueso); }
.admin__bar form { margin-left: auto; }
.admin__bar .btn { min-height: 36px; }
.admin__main { padding: 2rem 1.5rem 5rem; max-width: 1200px; }
.admin__main h1 { font-size: var(--t-xl); font-weight: 450; font-stretch: 108%; margin-bottom: 1.25rem; }
.admin__main h2 { font-size: var(--t-l); margin: 2.5rem 0 0.5rem; }
.admin__main > p { color: var(--gris); margin-bottom: 1rem; }
.admin__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .admin__cols { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--linea); border: 1px solid var(--linea); border-radius: var(--radius-m); overflow: hidden; margin: 0; }
.kpis > div { background: var(--negro); padding: 1.25rem; }
.kpis dt { color: var(--gris); font-size: var(--t-s); }
.kpis dd { margin: 0.3rem 0 0; font-size: 2.25rem; font-stretch: 115%; color: var(--oro); }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
.funnel { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.funnel li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.6rem 1rem; border: 1px solid var(--linea); border-radius: var(--radius-s); }
.funnel span { color: var(--gris); font-size: var(--t-s); }
.tag { font-size: var(--t-xs); padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--linea); }
.tag--nuevo { border-color: var(--oro); color: var(--oro); }
.tag--ganado { border-color: var(--bien); color: var(--bien); }
.tag--perdido { color: var(--gris); }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters a { padding: 0.35rem 0.8rem; border: 1px solid var(--linea); border-radius: 999px; text-decoration: none; font-size: var(--t-s); color: var(--gris); }
.filters a.is-on { border-color: var(--oro); color: var(--oro); }
.details { display: grid; grid-template-columns: 9rem 1fr; gap: 0.6rem 1.5rem; margin: 1.5rem 0 2rem; }
.details dt { color: var(--gris); font-size: var(--t-s); }
.details dd { margin: 0; }
.inline-form { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.inline-form select { min-height: 44px; padding: 0 0.8rem; background: var(--grafito); color: var(--hueso); border: 1px solid var(--linea); border-radius: var(--radius-s); font: inherit; }
.json { background: var(--grafito); border: 1px solid var(--linea); border-radius: var(--radius-s); padding: 1rem; overflow: auto; font-size: 0.8rem; max-height: 28rem; }
.empty { color: var(--gris); padding: 1.5rem 0; }
.action .action__text { font-size: var(--t-s); font-weight: 400; font-stretch: 100%; padding: 0; color: var(--hueso); }
.mod__price small:first-of-type { display: inline; margin-left: 0.1rem; }

/* =====================================================================
   MOVIMIENTO (estilo Scale / SpaceX / Tesla)
   Todo depende de .motion-ready (lo pone JS), así sin JS el contenido se ve igual.
   ===================================================================== */
:root { --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1); }

.nav.is-hidden { transform: translateY(-100%); }

/* Titular palabra por palabra (al cargar) */
.motion-ready [data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.motion-ready [data-split] .w > span { display: inline-block; transform: translateY(105%); animation: rise 0.95s var(--ease-out) forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
@keyframes rise { to { transform: none; } }

/* Piezas del hero que llegan después del titular */
.motion-ready .intro { opacity: 0; transform: translateY(14px); animation: fade-up 0.9s var(--ease-out) forwards; }
.motion-ready .intro--1 { animation-delay: 0.65s; }
.motion-ready .intro--2 { animation-delay: 0.8s; }
.motion-ready .intro--3 { animation-delay: 1s; }
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* Aparición al entrar en pantalla */
.motion-ready [data-reveal] {
  opacity: 0; transform: translateY(28px); filter: blur(6px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.motion-ready [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* Frase que se enciende con el scroll */
[data-scrub] .sw { color: #3A3E44; transition: color 0.35s ease; }
[data-scrub] .sw.on { color: var(--hueso); }

/* Bitácora: la línea inferior se ilumina al pasar el cursor */
.log__row { position: relative; }
.log__row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--oro); transition: width 0.6s var(--ease-out); }
.log__row:hover::after { width: 100%; }

/* Sección fija de los cinco pasos */
.story {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-top: 1px solid var(--linea);
  padding: 0 var(--gutter) 0 0;
}
.story__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.layers--story { aspect-ratio: auto; width: 100%; height: 78svh; }
.story__text { padding: var(--section) 0 30svh; }
.story__steps { list-style: none; margin: 0; padding: 0; }
.story__step {
  min-height: 62svh; display: flex; flex-direction: column; justify-content: center;
  opacity: 0.28; transition: opacity 0.6s var(--ease-out);
}
.story__step.is-current { opacity: 1; }
.story__n {
  position: relative; isolation: isolate;
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; margin-bottom: 1.4rem;
  font-size: var(--t-s); color: var(--gris); transition: color 0.6s;
}
/* El rombo va detrás del número, así el número no gira. */
.story__n::before {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: rotate(45deg) scale(0.86);
  border: 1px solid var(--linea); transition: border-color 0.6s, background-color 0.6s;
}
.story__step.is-current .story__n { color: var(--negro); }
.story__step.is-current .story__n::before { border-color: var(--oro); background: var(--oro); }
.story__step h3 { font-size: var(--t-xl); font-stretch: 112%; font-weight: 450; letter-spacing: -0.01em; }
.story__step p { margin-top: 1rem; color: var(--gris); max-width: 34ch; font-size: var(--t-l); line-height: 1.4; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; padding: 0 var(--gutter); }
  .story__sticky { top: 0; height: 34svh; z-index: 1; background: var(--negro); margin: 0 calc(var(--gutter) * -1); border-bottom: 1px solid var(--linea); }
  .layers--story { height: 32svh; }
  .story__text { padding: 3rem 0 20svh; }
  .story__step { min-height: 46svh; }
}

/* Transición entre páginas */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .motion-ready [data-split] .w > span, .motion-ready .intro { animation: none; transform: none; opacity: 1; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; filter: none; }
  .story__step { opacity: 1; }
}
