/* =========================================================
   ALFACOM — sistema visual "Precisión ascendente"
   Paleta y tipografías según Manual de Marca v1.0
   ========================================================= */

:root {
  --azul: #285EC9;
  --azul-profundo: #123480;
  --cielo: #78A5F5;
  --noche: #1E2E3E;
  --pizarra: #3B4556;
  --gris: #8792A2;
  --niebla: #F4F6FA;
  --blanco: #FFFFFF;
  --naranja: #FC8126;
  --durazno: #FFE3CC;

  --line: rgba(40, 94, 201, .14);
  --line-strong: rgba(40, 94, 201, .32);

  --f-display: "Outfit", system-ui, sans-serif;
  --f-body: "Work Sans", system-ui, sans-serif;
  --f-label: "Barlow Semi Condensed", "Arial Narrow", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --r-sm: 6px;
  --r-md: 12px;

  /* Tokens de movimiento (escala transitions.dev) */
  --duration-micro: 80ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-medium: 350ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: ease-out;
  --dropdown-pre-scale: 0.97;
  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--niebla);
  color: var(--noche);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; font-weight: 700; color: var(--noche); }
h1, h2, h3, .fact-claim, summary { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--azul-profundo);
  outline-offset: 3px;
  border-radius: 4px;
}
.media :focus-visible, .s3 :focus-visible, .site-footer :focus-visible { outline-color: var(--cielo); }

/* Superficies del navegador con la paleta de marca */
::selection { background: var(--azul); color: var(--blanco); }
input, textarea { caret-color: var(--azul); }
.p-price, .fact-num, .step-n, .t-n { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  background: var(--noche); color: var(--blanco); padding: 10px 16px; border-radius: var(--r-sm);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  font-family: var(--f-body); font-weight: 700; font-size: .9375rem;
  text-decoration: none; border-radius: var(--r-sm);
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--naranja); color: var(--noche); }
.btn-primary:hover { background: #ff9445; }
.btn-ghost { border-color: var(--noche); color: var(--noche); background: transparent; }
.btn-ghost:hover { background: var(--noche); color: var(--blanco); }
.btn-dark { background: var(--noche); color: var(--blanco); }
.btn-dark:hover { background: var(--azul-profundo); }
.btn-sm { min-height: 40px; padding: 0 18px; }

/* ---------- Header ---------- */
/* Menú integrado al hero; al bajar toma fondo */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.is-scrolled {
  background: rgba(244, 246, 250, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -16px rgba(30, 46, 62, .35);
}
.header-inner { transition: height .3s; }
.site-header.is-scrolled .header-inner { height: 64px; }
section[id] { scroll-margin-top: 64px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav .btn { margin-left: 16px; }
.nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .9375rem; color: var(--noche);
  padding: 8px 14px; border-radius: 99px;
  /* contorno del color del fondo: se lee aunque haya triángulos encendidos detrás */
  text-shadow: 0 0 6px var(--niebla), 0 0 2px var(--niebla);
  transition: background-color .2s, color .2s, text-shadow .2s;
}
.nav a:not(.btn):hover { background: var(--noche); color: var(--blanco); text-shadow: none; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(72px + clamp(48px, 7vw, 96px)) 0 clamp(64px, 8vw, 112px);
  /* Fondo: luz azul detrás de la ficha, calidez abajo a la izquierda
     y una base vertical suave hacia la sección siguiente */
  background-color: var(--niebla);
  background-image:
    radial-gradient(ellipse 55% 60% at 72% 42%, rgba(120,165,245,.38), transparent 70%),
    radial-gradient(ellipse 40% 45% at 8% 100%, rgba(255,227,204,.75), transparent 70%),
    radial-gradient(ellipse 35% 35% at 95% 0%, rgba(40,94,201,.14), transparent 70%),
    linear-gradient(180deg, #EEF2FA 0%, var(--niebla) 100%);
}
/* Grilla de plano, fina y desvanecida hacia los bordes */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(40,94,201,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,94,201,.09) 1px, transparent 1px);
  background-size: 40px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 65% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 75% at 65% 45%, #000 20%, transparent 75%);
}

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; min-width: 0; }

.hero h1 {
  font-size: clamp(2.5rem, 4.4vw, 3.875rem);
  line-height: 1.02; letter-spacing: -.035em;
  max-width: 13ch;
}
.lead {
  margin-top: 24px; font-size: 1.125rem; line-height: 1.6;
  color: var(--pizarra); max-width: 46ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Ficha de producto: una tienda real dentro de una ventana de navegador */
.blueprint { position: relative; margin: 0; min-width: 0; padding-right: 21%; z-index: 2; }
.store {
  background: var(--blanco);
  border-radius: 14px;
  overflow: hidden;
  /* sombra en capas: contacto + profundidad, teñida de noche */
  box-shadow:
    0 0 0 1px rgba(30,46,62,.08),
    0 2px 4px rgba(30,46,62,.06),
    0 12px 24px -6px rgba(30,46,62,.14),
    0 40px 80px -20px rgba(18,52,128,.30);
}
.store-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #EEF1F6; border-bottom: 1px solid #E1E6EE;
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #D5DBE5; }
.dots i:nth-child(1) { background: #F2A39A; }
.dots i:nth-child(2) { background: #F4CD7E; }
.dots i:nth-child(3) { background: #9FD5A4; }
.url {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--pizarra);
  background: var(--blanco); border-radius: 8px; padding: 5px 12px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.url svg { width: 12px; height: 12px; flex: none; fill: none; stroke: #2E9E5B; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.shop-head {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; border-bottom: 1px solid #EEF1F6;
}
.shop-logo { font-family: var(--f-display); font-weight: 700; font-size: .9375rem; letter-spacing: .18em; color: var(--noche); }
.shop-nav { display: flex; gap: 14px; font-size: .75rem; color: var(--pizarra); flex: 1; }
.shop-cart { position: relative; display: grid; place-items: center; width: 28px; height: 28px; }
.shop-cart svg { width: 20px; height: 20px; fill: none; stroke: var(--noche); stroke-width: 1.6; stroke-linejoin: round; }
.shop-cart b {
  position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px; background: var(--noche); color: var(--blanco);
  font-size: .625rem; font-weight: 700; display: grid; place-items: center;
}

.store-body { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; padding: 20px; }
.gallery { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.product-img {
  position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1;
  background: #B9C3F2;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-img img, .thumbs img { outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.off {
  position: absolute; top: 10px; left: 10px;
  background: var(--noche); color: var(--blanco);
  font-size: .6875rem; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs span { border-radius: 8px; overflow: hidden; aspect-ratio: 1 / 1; box-shadow: 0 0 0 1px #E1E6EE; }
.thumbs span.on { box-shadow: 0 0 0 2px var(--noche); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-info { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 0; }
.crumbs { font-size: .6875rem; color: #66717F; }
.p-name { font-family: var(--f-display); font-weight: 500; font-size: 1.125rem; line-height: 1.25; }
.p-price { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.p-price s { display: block; font-family: var(--f-body); font-weight: 400; font-size: .75rem; color: #66717F; margin-bottom: 2px; }
.p-terms { font-size: .75rem; color: #1F7A46; font-weight: 500; }
.p-label { font-size: .6875rem; color: var(--pizarra); font-weight: 500; margin-top: 4px; }
.sizes { display: flex; gap: 5px; flex-wrap: wrap; }
.sizes span {
  font-size: .75rem; min-width: 30px; height: 30px; padding: 0 4px;
  display: grid; place-items: center; border: 1px solid #D5DBE5; border-radius: 6px; color: var(--noche);
}
.sizes .on { border-color: var(--noche); box-shadow: inset 0 0 0 1px var(--noche); font-weight: 700; }
.sizes .out { color: #A9B0BB; background: linear-gradient(to top right, transparent calc(50% - .5px), #D5DBE5 50%, transparent calc(50% + .5px)); }
.buy {
  display: block; text-align: center; background: var(--naranja); color: var(--noche);
  font-weight: 700; font-size: .875rem; padding: 12px 8px; border-radius: 8px; margin-top: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 6px 14px -6px rgba(252,129,38,.7);
}
.p-ship { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--pizarra); }
.p-ship svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--pizarra); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.notes { position: absolute; inset: 0; pointer-events: none; }
.notes li {
  position: absolute; left: calc(79% - 4px); right: -36px;
  display: flex; align-items: center;
  font-family: var(--f-label); font-size: .875rem; line-height: 1.35; color: var(--noche); font-weight: 500; letter-spacing: .01em;
  transform: translateY(-50%);
}
.notes li::before {
  content: ""; flex: 0 0 22px; height: 0;
  border-top: 1.5px dashed var(--azul);
  margin-right: 8px;
  transform-origin: left center;
}
.notes li::after {
  content: ""; position: absolute; left: -3px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--azul); box-shadow: 0 0 0 3px var(--blanco);
}
.notes span {
  background: var(--niebla); padding: 4px 8px;
  border: 1px solid var(--line-strong); border-radius: 4px;
}
/* Posiciones por defecto; script.js las ajusta al elemento real */
.n1 { top: 5%; } .n2 { top: 38%; } .n3 { top: 66%; } .n4 { top: 82%; }

.blueprint figcaption {
  padding: 4px 0;
  margin-top: 24px; font-family: var(--f-label); font-size: .875rem; color: var(--pizarra); font-weight: 500; letter-spacing: .01em;
}

/* Secuencia de carga: la única animación automática */
@media (prefers-reduced-motion: no-preference) {
  .notes li { animation: note .5s ease-out both; }
  .notes li::before { animation: leader .4s ease-out both; animation-delay: inherit; }
  .n1 { animation-delay: .7s; } .n2 { animation-delay: .9s; }
  .n3 { animation-delay: 1.1s; } .n4 { animation-delay: 1.3s; }
}
@keyframes note { from { opacity: 0; } to { opacity: 1; } }
@keyframes leader { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Encabezados de sección ---------- */
.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2, .media-head h2, .faq h2, .contact h2 {
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.025em;
}
.section-head p { margin-top: 16px; font-size: 1.125rem; color: var(--pizarra); }

/* ---------- Escalera: crear / desarrollar / expandir ---------- */
.climb { background: var(--blanco); }
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 32px);
  align-items: start;
}
.step {
  position: relative; padding: 28px 28px 32px;
  background: var(--niebla);
  border-top: 4px solid var(--azul);
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.s1 { margin-top: 128px; }
.s2 { margin-top: 64px; }
.s3 { border-top-color: var(--naranja); background: var(--noche); }
.s3 h3, .s3 p, .s3 li { color: var(--blanco); }
.step.s3 p, .step.s3 li { color: #C9D3E3; }
.step-n { font-family: var(--f-label); font-size: .9375rem; color: var(--azul); font-weight: 600; }
.s3 .step-n { color: var(--cielo); }
.step h3 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); letter-spacing: -.02em; margin: 6px 0 12px; }
.step p { color: var(--pizarra); }
.step ul { margin-top: 20px; border-top: 1px solid var(--line-strong); }
.s3 ul { border-top-color: rgba(120,165,245,.3); }
.step li {
  padding: 10px 0 10px 22px; position: relative; font-size: .9375rem;
  border-bottom: 1px solid var(--line);
}
.s3 li { border-bottom-color: rgba(120,165,245,.18); }
.step li::before {
  content: ""; position: absolute; left: 2px; top: 19px;
  width: 9px; height: 2px; background: var(--azul);
  transform: rotate(-37deg);
}
.s3 li::before { background: var(--naranja); }

.also {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
  padding-top: 40px; border-top: 1px solid var(--line-strong);
}
.also h3 { font-size: 1.5rem; margin-bottom: 10px; }
.also p { color: var(--pizarra); max-width: 52ch; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.platforms li {
  font-family: var(--f-label); font-size: .9375rem; font-weight: 500; letter-spacing: .01em;
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--pizarra);
}

/* ---------- Paid Media ---------- */
.media {
  background-color: var(--noche);
  background-image: radial-gradient(rgba(120,165,245,.18) 1px, transparent 1.4px);
  background-size: 24px 24px;
  color: #C9D3E3;
}
.media h2, .media h3 { color: var(--blanco); }
.media-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; }
.media-head p { font-size: 1.125rem; }

.journey {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  position: relative;
}
.journey::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px;
  background: linear-gradient(90deg, var(--azul) 0 75%, var(--naranja) 75%);
}
.journey li { position: relative; padding-top: 36px; }
.journey li::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--noche); border: 2px solid var(--cielo);
}
.journey .j-end::before { background: var(--naranja); border-color: var(--naranja); }
.j-label { font-family: var(--f-label); font-size: .875rem; color: var(--cielo); font-weight: 600; }
.j-end .j-label { color: var(--naranja); }
.journey h3 { font-size: 1.25rem; margin: 4px 0 8px; }
.journey p { font-size: .9375rem; }

.channels {
  margin-top: clamp(48px, 7vw, 80px);
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(120,165,245,.28); border-radius: var(--r-md);
}
.channels > div { padding: 32px; }
.channels > div + div { border-left: 1px solid rgba(120,165,245,.28); }
.channels h3 { font-size: 1.5rem; margin-bottom: 8px; }

/* ---------- Dato ---------- */
.fact { background: var(--durazno); }
.fact-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.fact-num {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(7rem, 20vw, 15rem); line-height: .85; letter-spacing: -.06em;
  color: var(--azul-profundo);
}
.fact-claim {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.125rem); line-height: 1.2; letter-spacing: -.015em;
  max-width: 22ch; margin-bottom: 16px;
}
.fact-text > p:not(.fact-claim) { color: var(--pizarra); max-width: 52ch; margin-bottom: 28px; }

/* ---------- Método ---------- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; row-gap: 48px; }
.timeline li { border-top: 1.5px solid var(--noche); padding-top: 16px; }
.t-n { font-family: var(--f-label); font-size: .9375rem; color: var(--azul); font-weight: 600; }
.timeline h3 { font-size: 1.375rem; margin: 4px 0 8px; }
.timeline p { color: var(--pizarra); max-width: 34ch; }

/* ---------- FAQ ---------- */
.faq { background: var(--blanco); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font-family: var(--f-display); font-weight: 500; font-size: 1.1875rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--azul); border-bottom: 2px solid var(--azul);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 40px 24px 0; color: var(--pizarra); max-width: 62ch; }

/* ---------- Contacto ---------- */
.contact {
  background-color: var(--niebla);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 120px 120px;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-copy p { margin-top: 16px; font-size: 1.125rem; color: var(--pizarra); max-width: 40ch; }
.contact-direct { margin-top: 40px; border-top: 1px solid var(--line-strong); }
.contact-direct li {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--line-strong);
}
.contact-direct span { font-family: var(--f-label); font-size: .9375rem; color: var(--pizarra); font-weight: 500; }
.contact-direct a { font-weight: 500; text-decoration: none; }
.contact-direct a:hover { color: var(--azul); text-decoration: underline; }

.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  background: var(--blanco); padding: clamp(24px, 4vw, 40px);
  border: 1.5px solid var(--noche); border-radius: var(--r-md);
  box-shadow: 10px 10px 0 var(--azul);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 500; font-size: .875rem; padding: 0; }
.opt { color: var(--pizarra); font-weight: 400; }
.field input, .field textarea {
  font: inherit; color: var(--noche);
  border: 1.5px solid #CBD3E0; border-radius: var(--r-sm);
  padding: 12px 14px; background: var(--niebla); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--azul); background: var(--blanco); box-shadow: 0 0 0 3px rgba(40,94,201,.18); }
.field input[aria-invalid="true"] { border-color: #C2410C; }
.field textarea { resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid #CBD3E0; border-radius: 99px;
  font-size: .875rem; transition: background-color .15s, border-color .15s, color .15s;
}
.chips input:checked + span { background: var(--noche); border-color: var(--noche); color: var(--blanco); }
.chips input:focus-visible + span { outline: 3px solid var(--azul-profundo); outline-offset: 2px; }
.form-error { grid-column: 1 / -1; color: #B23A0A; font-size: .9375rem; font-weight: 500; }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.form-done { grid-column: 1 / -1; }
.form-status { grid-column: 1 / -1; padding: 16px; border-radius: var(--r-sm); background: var(--niebla); border: 1px solid var(--line-strong); }
.form-status a { color: var(--azul); font-weight: 500; }
.form-done h3 { font-size: 1.5rem; margin-bottom: 8px; }
.form-done p { color: var(--pizarra); }

/* ---------- Footer ---------- */
.site-footer { background: var(--noche); color: #C9D3E3; padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px 48px; align-items: center; }
.footer-inner img { width: 140px; height: auto; }
.footer-inner nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-inner nav a { text-decoration: none; font-size: .9375rem; }
.footer-inner nav a:hover { color: var(--blanco); text-decoration: underline; }
.legal {
  grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(120,165,245,.2);
  font-family: var(--f-label); font-size: .875rem; color: #A9B4C4; font-weight: 500; letter-spacing: .01em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .blueprint { max-width: 720px; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1.5px solid var(--noche); border-radius: var(--r-sm); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after {
    display: block; width: 18px; height: 2px; background: var(--noche); position: relative; transition: transform .2s;
  }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; } .menu-bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--niebla); border-bottom: 1px solid var(--line-strong);
    padding: 8px var(--gutter) 20px; display: flex;
    /* menu dropdown: crece desde el header, cierra más rápido de lo que abre */
    transform-origin: top center;
    transform: scale(var(--dropdown-pre-scale)) translateY(calc(var(--distance-base, 8px) * -1));
    opacity: 0; visibility: hidden; pointer-events: none;
    transition:
      transform var(--duration-quick) var(--ease-smooth-out),
      opacity var(--duration-quick) var(--ease-smooth-out),
      visibility 0s linear var(--duration-quick);
  }
  .nav.open {
    transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    transition:
      transform var(--duration-fast) var(--ease-smooth-out),
      opacity var(--duration-fast) var(--ease-smooth-out),
      visibility 0s linear 0s;
  }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; border-radius: 0; }
  .nav a:not(.btn):hover { background: none; color: var(--azul); }
  .nav a:not(.btn)::after { left: 0; right: 0; bottom: -1px; }
  .nav .btn { margin-left: 0; }
  .nav .btn { margin-top: 16px; }

  .steps { grid-template-columns: 1fr; }
  .s1, .s2 { margin-top: 0; }
  .s2 { margin-left: 6%; } .s3 { margin-left: 12%; }
  .also, .media-head, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .platforms { justify-content: flex-start; }
  .journey { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .journey::before { display: none; }
  .channels { grid-template-columns: 1fr; }
  .channels > div + div { border-left: 0; border-top: 1px solid rgba(120,165,245,.28); }
  .fact-inner { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .blueprint { padding-right: 0; }
  .store-body { grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px; }
  .shop-nav { display: none; }
  .sizes span { min-width: 26px; height: 26px; font-size: .6875rem; }
  .shop-head { justify-content: space-between; padding: 10px 14px; }
  .p-name { font-size: 1rem; }
  .p-price { font-size: 1.25rem; }
  .notes {
    position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px;
  }
  .notes li { position: static; transform: none; top: auto !important; }
  .notes li::before, .notes li::after { display: none; }
  .notes span { width: 100%; }
  .s2, .s3 { margin-left: 0; }
  .journey, .timeline { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--azul); }
  .form .btn { justify-self: stretch; }
  .actions .btn { flex: 1 1 100%; }
}

/* =========================================================
   INTERACCIÓN — campo de triángulos y hovers
   ========================================================= */

/* Campo de triángulos a 37° que se ilumina con el cursor */
.tri-field {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.media { position: relative; overflow: hidden; }
.media > .wrap { position: relative; z-index: 1; }
.hero > .wrap { z-index: 1; }

/* Botones: elevación con sombra dura + barrido diagonal */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: background-color .2s, color .2s, border-color .2s, transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out);
}
.btn::after {
  content: ""; position: absolute; top: -50%; bottom: -50%; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-180%) rotate(37deg);
  z-index: -1; pointer-events: none;
}
.btn:hover::after { transform: translateX(320%) rotate(37deg); transition: transform .65s ease; }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--noche); }
.btn-dark:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--azul); }
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--azul); }
.btn:active { transform: scale(.96); box-shadow: 0 0 0 transparent; transition-duration: .06s; }

/* Navegación: subrayado que crece */
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
  background: var(--naranja); transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration-fast) var(--ease-smooth-out);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.brand img { transition: transform var(--duration-fast) var(--ease-smooth-out); }
.brand:hover img { transform: translate(2px, -2px); }

/* Plano: inclinación 3D siguiendo el cursor */
.blueprint { perspective: 1200px; }
.store {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform var(--duration-very-slow) var(--ease-smooth-out), box-shadow .4s;
}
.blueprint.is-tilting .store {
  transition: transform .1s linear, box-shadow .4s;
  box-shadow: 0 0 0 1px rgba(30,46,62,.08), 0 4px 8px rgba(30,46,62,.08), 0 20px 36px -8px rgba(30,46,62,.18), 0 56px 100px -24px rgba(18,52,128,.38);
}
.store [data-note] { transition: outline-color .2s, transform .2s; outline: 2px dashed transparent; outline-offset: 4px; border-radius: 4px; }
.store [data-note].is-hot { outline-color: var(--azul); }
.buy.is-hot { transform: scale(1.03); }
.notes span { pointer-events: auto; cursor: default; transition: background-color .2s, color .2s, border-color .2s; }
.notes li::before { transition: border-color .2s; }
.notes li.is-hot span { background: var(--noche); color: var(--blanco); border-color: var(--noche); }
.notes li.is-hot::before { border-top-color: var(--naranja); border-top-style: solid; }
.notes li.is-hot::after { background: var(--naranja); }
.product-img img { transition: transform var(--duration-slow) var(--ease-smooth-out); }
.store:hover .product-img img { transform: scale(1.04); }
.sizes span { transition: border-color .15s, background-color .15s; }
.sizes span:hover { border-color: var(--azul); background: var(--niebla); }

/* Tarjetas con foco de luz que sigue al cursor */
.step, .channels > div, .timeline li, .form { --mx: -999px; --my: -999px; }
.step {
  background-image: radial-gradient(280px circle at var(--mx) var(--my), rgba(40,94,201,.12), transparent 70%);
  transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out);
}
.s3 { background-image: radial-gradient(280px circle at var(--mx) var(--my), rgba(120,165,245,.22), transparent 70%); }
.step:hover { transform: translateY(-8px); box-shadow: 8px 8px 0 var(--azul); }
.s3:hover { box-shadow: 8px 8px 0 var(--naranja); }
.step h3 { transition: transform var(--duration-fast) var(--ease-smooth-out); }
.step:hover h3 { transform: translateX(4px); }

.platforms li { transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.platforms li:hover { background: var(--noche); border-color: var(--noche); color: var(--blanco); transform: translateY(-2px); }

.channels > div { background-image: radial-gradient(320px circle at var(--mx) var(--my), rgba(120,165,245,.16), transparent 70%); }
.channels h3 { transition: color .2s; }
.channels > div:hover h3 { color: var(--cielo); }

/* Recorrido: el nodo se enciende */
.journey li::before { transition: transform var(--duration-fast) var(--ease-smooth-out), background-color .2s, box-shadow .3s; }
.journey li:hover::before { transform: scale(1.35); background: var(--cielo); box-shadow: 0 0 0 6px rgba(120,165,245,.22); }
.journey .j-end:hover::before { background: var(--naranja); box-shadow: 0 0 0 6px rgba(252,129,38,.25); }
.journey h3 { transition: transform var(--duration-fast) var(--ease-smooth-out); }
.journey li:hover h3 { transform: translateX(4px); }

/* Método: la regla superior se llena de azul */
.timeline li { position: relative; padding-bottom: 8px; background-image: radial-gradient(220px circle at var(--mx) var(--my), rgba(40,94,201,.08), transparent 70%); }
.timeline li::before {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px;
  background: var(--azul); transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration-fast) var(--ease-smooth-out);
}
.timeline li:hover::before { transform: scaleX(1); }
.t-n { display: inline-block; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.timeline li:hover .t-n { transform: translate(3px, -3px); }

/* Preguntas */
.faq summary { transition: color .2s, transform var(--duration-fast) var(--ease-smooth-out); }
.faq summary:hover { color: var(--azul); transform: translateX(8px); }
.faq details[open] p { animation: faq-open .3s ease-out; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Dato */
.fact-num { display: inline-block; transition: transform var(--duration-fast) var(--ease-smooth-out), color .3s; }
.fact-inner:hover .fact-num { transform: translate(6px, -8px); color: var(--azul); }

/* Formulario */
.form { background-image: radial-gradient(360px circle at var(--mx) var(--my), rgba(40,94,201,.06), transparent 70%); }
.field input:hover, .field textarea:hover { border-color: var(--cielo); }
.chips span { transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
.chips label:hover span { border-color: var(--azul); transform: translateY(-2px); }

/* Contacto y pie */
.contact-direct li > * { display: inline-block; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.contact-direct li:hover > * { transform: translateX(8px); }
.footer-inner nav a { position: relative; }
.footer-inner nav a:hover { text-decoration: none; }
.footer-inner nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--naranja);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.footer-inner nav a:hover::after { transform: scaleX(1); }

/* Pantallas táctiles: sin elevaciones que queden pegadas */
@media (hover: none) {
  .step:hover, .btn:hover { transform: none; box-shadow: none; }
}

/* Linterna de color en los títulos: las letras cambian de color
   solo donde está el cursor (script.js agrega .spot y mueve --tx/--ty) */
@property --tr { syntax: "<length>"; inherits: false; initial-value: 0px; }
.spot {
  --tx: -999px; --ty: -999px;
  --t-base: var(--noche); --t-mid: var(--azul); --t-hot: var(--azul);
  background-image: radial-gradient(circle var(--tr) at var(--tx) var(--ty),
    var(--t-hot) 0 28%, var(--t-mid) 40%, var(--t-base) 100%);
  background-color: var(--t-base);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  transition: --tr var(--duration-fast) var(--ease-smooth-out);
}
.spot.is-lit { --tr: 90px; }
.spot-dark { --t-base: var(--blanco); --t-mid: var(--cielo); --t-hot: var(--cielo); }
.fact-num.spot { --t-base: var(--azul-profundo); --t-mid: var(--azul); --t-hot: var(--cielo); }

/* Error de formulario: sacudida corta del campo inválido (error state shake) */
.field input.is-shaking {
  animation: t-input-shake calc(var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2) linear;
}
@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}

/* Mensajes del formulario: aparecen con una subida corta */
.form-error:not([hidden]), .form-status:not([hidden]) {
  animation: msg-in var(--duration-fast) var(--ease-smooth-out);
}
@keyframes msg-in { from { opacity: 0; transform: translateY(var(--distance-micro, 4px)); } }

/* Preguntas: el contenido crece en alto (navegadores con ::details-content) */
@supports selector(::details-content) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0; overflow: clip;
    transition: block-size var(--duration-medium) var(--ease-smooth-out), content-visibility var(--duration-medium) allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; transition-duration: var(--duration-slow); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .store { transform: none !important; }
}

/* Campo trampa para bots: fuera de pantalla, no visible para personas */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error a { color: inherit; text-decoration: underline; }
.form button[disabled] { opacity: .7; cursor: progress; }
