/* ═══════════════════════════════════════════════════════════
   BeautyOS — Sistema Encendido
   Oro incandescente sobre negro. Verde WhatsApp solo convierte.
   ═══════════════════════════════════════════════════════════ */

/* ---------- Fuentes (self-hosted: sin peticiones a terceros) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
input, textarea { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  /* Paleta GRAFITO MONOCROMO — elegancia sin color: grafito, plata, blanco.
     (--gold y --ember conservan su nombre histórico pero ahora son plata y gris acero.)
     El verde WhatsApp es el ÚNICO color saturado: exclusivo de los CTAs de conversión. */
  --bg: #0b0b0c;
  --surface: #141415;
  --surface-2: #1a1a1c;
  --ink: #f2f2f0;
  --muted: #9c9c9a;
  --gold: #d6d6d2;
  --ember: #8e8e93;
  --wa: #25d366;
  --wa-ink: #07240f;
  --line: rgba(242, 242, 240, 0.09);
  --grad-brand: linear-gradient(135deg, var(--gold), var(--ember));
  /* Colores del canvas (r,g,b) y de la aurora — el JS los lee de aquí */
  --canvas-a: 214, 214, 210;
  --canvas-b: 142, 142, 147;
  --aurora-1: rgba(255, 255, 255, 0.055);
  --aurora-2: rgba(255, 255, 255, 0.035);

  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: clamp(4rem, 9vw, 7.5rem);

  --radius-card: 16px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --z-canvas: 1;
  --z-content: 2;
  --z-fab: 90;
  --z-menu: 110;
  --z-header: 120; /* por encima del menú overlay: la X de cerrar siempre visible */
  --z-grain: 200;
}
@supports (color: oklch(0.5 0 0)) {
  :root {
    --bg: oklch(0.145 0.002 286);
    --surface: oklch(0.185 0.002 286);
    --surface-2: oklch(0.215 0.003 286);
    --ink: oklch(0.955 0.002 106);
    --muted: oklch(0.685 0.002 106);
    --gold: oklch(0.875 0.003 106);
    --ember: oklch(0.635 0.005 286);
  }
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 420;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
::selection { background: var(--gold); color: #0b0b0c; }

h1, h2, h3 {
  font-weight: 720;
  font-variation-settings: "wdth" 118;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 5.2vw, 3.4rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); letter-spacing: -0.01em; }
p { text-wrap: pretty; }
a { color: inherit; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

main { position: relative; z-index: var(--z-content); }
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container-narrow { width: min(780px, 100% - 2.5rem); }

/* ---------- Fondos ---------- */
.aurora {
  position: fixed; inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 34% at 24% 22%, var(--aurora-1), transparent 70%),
    radial-gradient(38% 30% at 78% 74%, var(--aurora-2), transparent 70%);
  filter: blur(90px);
  animation: aurora-drift 60s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) rotate(0deg); }
  to   { transform: translate3d(2%, 2%, 0) rotate(4deg); }
}

#field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s ease;
}
#field.dim { opacity: 0.28; }

.grain {
  position: fixed; inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 11, 10, 0.85);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
  display: flex; align-items: center; gap: var(--space-md);
  padding-block: 0.8rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-mark { width: 40px; height: 38px; }
.brand-word {
  font-weight: 640;
  font-variation-settings: "wdth" 112;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}
.brand-word em {
  font-style: normal;
  font-weight: 740;
  color: var(--gold);
  background: linear-gradient(120deg, #ffffff, #d6d6d2 55%, #a8a8a4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* El toro aparece con un pop sutil al cargar */
.js .mark-bull {
  opacity: 0;
  transform-origin: 50% 60%;
  animation: mark-pop 0.7s var(--ease-out) 0.2s forwards;
}
@keyframes mark-pop {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
.brand:hover .brand-mark { filter: drop-shadow(0 0 6px rgba(214, 214, 210, 0.35)); }

.main-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.main-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 480;
  color: var(--muted);
  transition: color 0.2s ease;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; }
.main-nav + .header-actions { margin-left: 0; }

.menu-btn { display: none !important; width: 44px; height: 44px; position: relative; }
.menu-btn span {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
}
.menu-btn span:nth-child(1) { top: 18px; }
.menu-btn span:nth-child(2) { top: 25px; }
.menu-btn.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-btn.open span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Menú overlay ---------- */
.overlay-menu {
  position: fixed; inset: 0;
  z-index: var(--z-menu);
  background: rgba(11, 11, 10, 0.95);
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid; place-items: center;
  place-items: safe center;
  overflow-y: auto;
}
.overlay-menu[hidden] { display: none; }
.overlay-menu nav { display: grid; gap: 1.1rem; text-align: center; padding-block: 5.5rem 2rem; }
.overlay-menu a {
  text-decoration: none;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  font-weight: 700;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.02em;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), color 0.2s;
  transition-delay: calc(var(--i) * 55ms);
  color: var(--ink);
}
.overlay-menu a:hover { color: var(--gold); }
.overlay-menu.show a { opacity: 1; transform: none; }
.overlay-menu .menu-cta { color: var(--wa); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  border-radius: var(--radius-pill);
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  min-height: 44px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}
.btn .ico { width: 1.25em; height: 1.25em; flex: none; }
.btn:active { transform: scale(0.97); }

.btn-wa {
  background: var(--wa);
  color: var(--wa-ink);
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.35);
  animation: wa-pulse 3.2s ease-in-out infinite;
}
.btn-wa:hover { background: #2ee273; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.30); }
  50%      { box-shadow: 0 0 24px 2px rgba(37, 211, 102, 0.22); }
}

.btn-ghost {
  border: 1px solid rgba(214, 214, 210, 0.35);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1.05rem; font-size: 0.88rem; min-height: 44px; }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { border-radius: var(--radius-pill); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid; grid-template-columns: 100%;
  align-items: center;
  padding-top: 5.5rem;
  position: relative;
}
.hero-inner { min-width: 0; }
.hero-inner { width: min(1180px, 100% - 2.5rem); margin-inline: auto; max-width: 980px; }
.eyebrow { margin-bottom: 1.4rem; color: color-mix(in oklab, var(--gold) 70%, var(--muted)); }

.hero-title {
  font-size: clamp(2.55rem, 9.2vw, 5.6rem);
  font-weight: 760;
  font-variation-settings: "wdth" 120;
  letter-spacing: -0.025em;
  line-height: 1.01;
  margin-bottom: 1.6rem;
}
.hero-title .w { display: inline-block; }
.js .hero-title .w {
  opacity: 0;
  transform: translateY(0.55em);
  clip-path: inset(0 0 100% 0);
  animation: word-in 0.9s var(--ease-out) forwards;
  animation-delay: calc(0.9s + var(--w) * 95ms);
}
@keyframes word-in {
  to { opacity: 1; transform: none; clip-path: inset(-20% -5% -12% -5%); }
}
.hero-title .hl { color: var(--gold); }

.hero-sub {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  margin-bottom: 2.1rem;
}
.js .hero-sub, .js .hero-ctas, .js .trust-line, .js .eyebrow {
  opacity: 0;
  animation: soft-in 0.9s var(--ease-out) forwards;
}
.js .eyebrow { animation-delay: 0.75s; }
.js .hero-sub { animation-delay: 1.45s; }
.js .hero-ctas { animation-delay: 1.6s; }
.js .trust-line { animation-delay: 1.75s; }
@keyframes soft-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.8rem; }
.trust-line { letter-spacing: 0.12em; }

.scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%;
  width: 2px; height: 42px;
  transform: translateX(-50%);
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.scroll-hint span {
  position: absolute; left: 0; top: -30%;
  width: 100%; height: 30%;
  background: var(--gold);
  animation: hint 2.1s var(--ease-out) infinite;
}
@keyframes hint { 0% { top: -30%; } 70%, 100% { top: 110%; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: 1.05rem;
  background: rgba(23, 22, 19, 0.45);
  background: color-mix(in oklab, var(--surface) 45%, transparent);
  position: relative; z-index: var(--z-content);
}
.marquee-track {
  display: flex; align-items: center; gap: 2.2rem;
  width: max-content;
  white-space: nowrap;
  font-weight: 640;
  font-variation-settings: "wdth" 116;
  font-size: 1.05rem;
  color: rgba(242, 239, 230, 0.5);
}
.marquee-track i { font-style: normal; color: var(--gold); opacity: 0.7; }

/* ---------- Secciones ---------- */
.section { padding-block: var(--space-xl); position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section-head p { color: var(--muted); margin-top: 1rem; max-width: 54ch; }
.section-cta { margin-top: 2.6rem; display: flex; justify-content: center; }

/* ---------- Bento servicios ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.bento > * { grid-column: span 2; }
.bento > :nth-child(1) { grid-column: span 4; }
.bento > :nth-child(6) { grid-column: span 6; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(1.4rem, 3vw, 2rem);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, -40%), rgba(214, 214, 210, 0.10), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}
.card:hover::before, .card.lit::before { opacity: 1; }
.card:hover { border-color: rgba(214, 214, 210, 0.28); }

.card h3 { margin-bottom: 0.35rem; }
.card-kicker { color: var(--gold); font-weight: 590; margin-bottom: 0.7rem; }
.card p:not(.card-kicker) { color: var(--muted); font-size: 0.99rem; max-width: 52ch; }
.card-cta {
  display: inline-block;
  margin-top: 0.55rem;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(214, 214, 210, 0.4);
  padding: 0.6rem 0 0.35rem; /* objetivo táctil ≥44px sin romper el ritmo */
  transition: color 0.2s ease, border-color 0.2s ease;
}
.card-cta:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Demo ---------- */
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
/* En el DOM el texto va primero (orden de lectura); en desktop el chat se muestra a la izquierda */
.demo-chat { order: -1; }
.demo-side .section-head { margin-bottom: 1.8rem; }

.chat-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  max-width: 440px;
}
.chat-top {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.chat-top strong { display: block; font-size: 0.95rem; font-weight: 620; }
.chat-meta { font-size: 0.62rem; letter-spacing: 0.12em; }
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wa); flex: none; box-shadow: 0 0 8px rgba(37, 211, 102, 0.5); }

.chat-body { padding: 1.15rem; min-height: 300px; display: flex; flex-direction: column; gap: 0.65rem; }
.msg {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.msg.show { opacity: 1; transform: none; }
.msg-in { background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-out { background: #1c4a30; background: color-mix(in oklab, var(--wa) 24%, var(--surface)); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg time { display: block; font-size: 0.62rem; color: var(--muted); margin-top: 0.25rem; font-family: var(--font-mono); }
.typing { display: inline-flex; gap: 4px; padding: 0.25rem 0; }
.typing b { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ty 1s ease-in-out infinite; }
.typing b:nth-child(2) { animation-delay: 0.15s; }
.typing b:nth-child(3) { animation-delay: 0.3s; }
@keyframes ty { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.demo-caption { margin-top: 1.2rem; color: var(--muted); max-width: 44ch; font-size: 0.98rem; }
.demo-caption strong { color: var(--ink); }

.stats { display: grid; gap: 1.4rem; }
.stat { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.stat dt { font-size: 0.68rem; }
.stat dd {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 740;
  font-variation-settings: "wdth" 118;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  letter-spacing: -0.02em;
}

/* ---------- Proceso ---------- */
.process { position: relative; max-width: 680px; }
.process-line {
  position: absolute;
  left: 10px; top: 8px; bottom: 8px;
  width: 4px; height: calc(100% - 16px);
}
.pl-base { stroke: var(--line); stroke-width: 2; }
.pl-fill {
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.steps { list-style: none; display: grid; gap: clamp(1.8rem, 4vw, 2.8rem); }
.step { position: relative; padding-left: 3.2rem; }
.step::before {
  content: "";
  position: absolute; left: 5px; top: 0.35rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.step.on::before { border-color: var(--gold); box-shadow: 0 0 10px rgba(214, 214, 210, 0.35); }
.step-num { display: block; margin-bottom: 0.3rem; color: color-mix(in oklab, var(--gold) 65%, var(--muted)); }
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--muted); max-width: 52ch; }

/* ---------- Escenarios ---------- */
.scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(1.6rem, 4vw, 3rem);
}
.scenario { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.sc-tag { margin-bottom: 0.9rem; font-size: 0.66rem; }
.scenario h3 { margin-bottom: 1rem; }
.sc-flow p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.8rem; }
.sc-flow strong { color: var(--ink); font-weight: 600; }
.sc-result {
  color: var(--gold) !important;
  font-weight: 640;
  font-size: 1.05rem !important;
  margin-top: 1.1rem;
}

/* ---------- Sobre mí ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.terminal {
  max-width: 420px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.term-top {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.term-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(242, 239, 230, 0.18); }
.term-title { margin-left: auto; font-size: 0.6rem; }
.term-body {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 2;
  padding: 1.1rem 1.2rem 1.3rem;
  margin: 0;
  white-space: pre-wrap;
  min-height: 15rem;
}
.t-cmd { color: var(--ink); }
.t-run { color: var(--muted); }
.t-ok { color: var(--gold); }
.term-caret {
  display: inline-block; width: 0.55em; height: 1.1em;
  background: var(--gold);
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.about-text p { margin-bottom: 1.1rem; max-width: 56ch; }
.about-text p strong { color: var(--gold); font-weight: 640; }
.about-text .btn { margin-top: 0.6rem; }
.about-text .section-head { margin-bottom: 1.4rem; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); position: relative; }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 0.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 1.02rem;
  transition: color 0.2s ease;
}
.faq-q:hover { color: var(--gold); }
.faq-plus { position: relative; width: 16px; height: 16px; flex: none; transition: transform 0.28s var(--ease-out); }
.faq-plus::before, .faq-plus::after {
  content: ""; position: absolute; background: var(--muted); border-radius: 2px;
  transition: background 0.2s ease;
}
.faq-plus::before { left: 0; right: 0; top: 7px; height: 2px; }
.faq-plus::after { top: 0; bottom: 0; left: 7px; width: 2px; }
.faq-item.open .faq-plus { transform: rotate(45deg); }
.faq-item.open .faq-plus::before, .faq-item.open .faq-plus::after { background: var(--gold); }
.faq-item::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.faq-item.open::after { transform: scaleX(1); }
.faq-a {
  display: grid;
  transition: grid-template-rows 0.25s var(--ease-out), visibility 0s;
}
/* El colapso solo existe con JS (sin JS las respuestas quedan visibles y usables) */
.js .faq-a { grid-template-rows: 0fr; visibility: hidden; transition-delay: 0s, 0.25s; }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--muted); padding: 0 0.2rem 1.2rem; max-width: 62ch; }
.js .faq-item.open .faq-a { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s, 0s; }

/* ---------- CTA final ---------- */
.final { padding-bottom: clamp(5rem, 10vw, 8rem); }
.final-head { max-width: 720px; margin-bottom: clamp(2.4rem, 5vw, 3.8rem); }
.final-head h2 { font-size: clamp(2.3rem, 7vw, 4.4rem); }
.final-head .hl { color: var(--gold); }
.final-head p { color: var(--muted); margin-top: 1.2rem; max-width: 56ch; }

.final-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.final-actions { display: grid; gap: 1.2rem; justify-items: start; }
.cal-card {
  display: grid; gap: 0.3rem;
  width: 100%;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.25s ease;
}
.cal-card:hover { border-color: rgba(214, 214, 210, 0.4); }
.cal-card strong { font-weight: 640; }
.cal-card .mono { font-size: 0.62rem; }
.final-mail { color: var(--muted); font-size: 0.95rem; }
.final-mail a { color: var(--ink); text-decoration-color: rgba(214, 214, 210, 0.5); }
.final-mail a:hover { color: var(--gold); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: grid; gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.86rem; font-weight: 560; color: var(--muted); }
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid rgba(242, 239, 230, 0.35);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  width: 100%;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus {
  border-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.consent {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.9rem; color: var(--muted);
  cursor: pointer;
  padding-block: 0.3rem;
}
.consent input {
  width: 1.15rem; height: 1.15rem; margin-top: 0.15rem;
  accent-color: var(--gold);
  flex: none;
}
.consent a { color: var(--ink); }
.btn-submit { width: 100%; }
.form-note { font-size: 0.82rem; color: var(--muted); }
.form-note a { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.2rem;
  position: relative; z-index: var(--z-content);
  background: #100f0e;
  background: color-mix(in oklab, var(--surface) 40%, var(--bg));
}
.footer-word {
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: 760;
  font-variation-settings: "wdth" 120;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(242, 239, 230, 0.10);
  margin-bottom: 1.6rem;
  user-select: none;
}
.footer-word em { font-style: normal; color: rgba(214, 214, 210, 0.22); }
.footer-meta {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 0.9rem;
}
.footer-meta nav { display: flex; gap: 1.4rem; }
.footer-meta a { color: var(--muted); text-decoration: none; padding-block: 0.6rem; display: inline-block; }
.footer-meta a:hover { color: var(--ink); }

/* ---------- FAB WhatsApp ---------- */
.wa-fab {
  position: fixed;
  right: 1.1rem; bottom: 1.1rem;
  z-index: var(--z-fab);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: var(--wa-ink);
  display: grid; place-items: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.3);
  opacity: 0; pointer-events: none;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), visibility 0s 0.4s;
}
.wa-fab .ico { width: 27px; height: 27px; }
.wa-fab.show { opacity: 1; pointer-events: auto; visibility: visible; transform: none; transition-delay: 0s; }
.wa-fab:hover { background: #2ee273; }

/* ---------- Reveals ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(5px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
  /* Red de seguridad: si main.js no llega a ejecutarse, todo se revela solo a los 2.5s */
  animation: reveal-safety 0.6s var(--ease-out) 2.5s forwards;
}
.js .reveal.in-view { opacity: 1; transform: none; filter: none; animation: none; }
@keyframes reveal-safety { to { opacity: 1; transform: none; filter: none; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal, .js .hero-title .w, .js .hero-sub, .js .hero-ctas, .js .trust-line, .js .eyebrow {
    opacity: 1; transform: none; filter: none; clip-path: none;
  }
  .aurora { animation: none; }
  .scroll-hint { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > * { grid-column: span 1; }
  .bento > :nth-child(1), .bento > :nth-child(6) { grid-column: span 2; }
  .final-grid, .about, .demo-grid { grid-template-columns: 1fr; }
  .demo-chat { order: 0; } /* en columna única: primero el texto, después el chat */
  .about-visual { order: -1; }
  .monogram { max-width: 210px; }
}
@media (max-width: 760px) {
  /* Con JS: hamburger + overlay. Sin JS: la nav normal sigue visible (compacta). */
  .js .main-nav { display: none; }
  .main-nav { gap: 0.9rem; flex-wrap: wrap; }
  .js .menu-btn { display: block !important; }
  .bento { grid-template-columns: 1fr; }
  .bento > *, .bento > :nth-child(1), .bento > :nth-child(6) { grid-column: auto; }
  .hero { padding-top: 4.5rem; }
  .hero-ctas .btn { width: 100%; }
  .chat-frame { max-width: none; }
  .stat dd { font-size: 2rem; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .hero-title { font-size: 2.3rem; }
  .container, .header-inner { width: calc(100% - 1.6rem); }
  .header-inner { gap: 0.75rem; }
  .header-actions { gap: 0.5rem; }
  .header-actions .btn-label { display: none; } /* solo el icono de WhatsApp: cabe hasta en 320px */
  .header-actions .btn-sm { padding-inline: 0.8rem; }
}

/* ---------- Hover solo donde hay puntero real (evita hover pegado en táctil) ---------- */
@media (hover: none) {
  .main-nav a:hover { color: var(--muted); }
  .faq-q:hover { color: inherit; }
  .card:hover { border-color: var(--line); }
  .card:hover::before { opacity: 0; }
  .btn-wa:hover { background: var(--wa); }
  .btn-ghost:hover { border-color: rgba(214, 214, 210, 0.35); color: var(--ink); }
  .cal-card:hover { border-color: var(--line); }
  .card-cta:hover { color: var(--ink); border-color: rgba(214, 214, 210, 0.4); }
  .footer-meta a:hover { color: var(--muted); }
  .final-mail a:hover { color: var(--ink); }
  .wa-fab:hover { background: var(--wa); }
  .brand:hover .brand-mark { filter: none; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; top: 0.6rem; left: 0.6rem;
  z-index: 300;
  background: var(--gold); color: #0b0b0c;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-weight: 640;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* ---------- Print ---------- */
@media print {
  :root { --bg: #ffffff; --surface: #f4f2ec; --surface-2: #ece9e0; --ink: #16150f; --muted: #4c483d; --line: rgba(22, 21, 15, 0.2); }
  .grain, .aurora, #field, .wa-fab, .site-header, .scroll-hint, .marquee, .overlay-menu { display: none !important; }
  body { background: #fff; }
  .js .reveal, .js .hero-title .w, .js .hero-sub, .js .hero-ctas, .js .trust-line, .js .eyebrow {
    opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; animation: none !important;
  }
  .js .faq-a { grid-template-rows: 1fr; visibility: visible; }
  .hero { min-height: auto; padding-top: 1rem; }
  .btn, .cal-card { border: 1px solid #999; box-shadow: none; animation: none; }
}
