/* =====================================================================
   Pincoia — sitio de producto (pincoia.com)
   Sistema Marea Austral · Orilla. Light-first; Austral (Noche) para marketing.
   Fuente de verdad de marca: glu-v2-backend/.github/instructions/pincoia-brand.instructions.md
   ===================================================================== */

:root {
  /* Orilla — light */
  --arena: #f7f2e7;        /* background */
  --arena-2: #f0e9d9;      /* muted */
  --tinta: #123640;        /* foreground / mar-tinta */
  --petroleo: #0e4552;     /* primary — acción */
  --verdemar: #4e8d80;     /* secondary */
  --bruma: #4f666f;        /* muted-foreground para TEXTO (AA 5.0 sobre arena-2; el #6d8287 original fallaba) */
  --oro: #d9a441;          /* exhibición — SOLO perla, cifras hero y fondos Noche (2.0 sobre claro: nunca texto claro) */
  --oro-safe: #9a7412;     /* oro para texto GRANDE sobre claro (≥19px bold — wordmark, nombres de reina) */
  --oro-label: #7d5f10;    /* oro para labels PEQUEÑOS sobre claro (eyebrows, roles — AA 5.0) */
  --coral: #b0402f;        /* error only */
  --verde-ok: #2f8f6b;     /* semántica ok */
  --border: #e2dcc9;
  --card: #ffffff;

  /* Austral (Noche) — sistema oscuro de marketing */
  --noche: #071e26;
  --noche-2: #0c2a33;
  --noche-line: #1c3d47;

  --maxw: 1200px;
  --measure: 66ch;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 1px 2px rgba(18, 54, 64, 0.06), 0 1px 3px rgba(18, 54, 64, 0.05);
  --shadow-md: 0 8px 24px -8px rgba(18, 54, 64, 0.16), 0 2px 6px rgba(18, 54, 64, 0.06);
  --shadow-lg: 0 30px 60px -20px rgba(14, 69, 82, 0.28), 0 8px 20px -8px rgba(18, 54, 64, 0.12);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--arena);
  color: var(--tinta);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--oro-safe); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --- layout --- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
section { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--oro-label);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; line-height: 1.1; color: var(--tinta); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--bruma); max-width: var(--measure); }
.tnum { font-variant-numeric: tabular-nums; }

/* --- wordmark --- */
.wordmark { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
.wordmark .ia { color: var(--oro-safe); } /* sobre claro; en Noche el footer overridea a #d9a441 */

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--petroleo); color: var(--arena); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { color: var(--tinta); border: 1.5px solid var(--border); background: rgba(255,255,255,0.5); }
.btn-ghost:hover { border-color: var(--petroleo); background: var(--card); }
.btn-gold { background: var(--oro); color: #3a2a06; box-shadow: 0 8px 24px -8px rgba(217,164,65,0.6); }
.btn-gold:hover { transform: translateY(-2px); }

/* --- nav --- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--arena) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 0.55rem; font-size: 1.35rem; }
/* La Corona de Mareas es 240×150; en el nav vive a 26px de alto (mínimo de marca: ≥24px). */
.nav-brand .glyph { width: 42px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: 0.92rem; color: var(--tinta); font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-login { font-size: 0.92rem; font-weight: 500; color: var(--tinta); opacity: 0.85; transition: opacity 0.2s; }
.nav-login:hover { opacity: 1; }
/* Píldoras de anclaje para mobile (reemplazan a los links del nav bajo 860px) */
.nav-pills { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-login { display: none; } /* en mobile, el login queda en el footer; el CTA manda */
  .nav-pills {
    display: flex; gap: 8px; padding: 0 24px 10px; overflow-x: auto;
    scrollbar-width: none;
  }
  .nav-pills::-webkit-scrollbar { display: none; }
  .nav-pills a {
    flex: none; font-size: 0.82rem; font-weight: 600; color: var(--tinta);
    background: var(--card); border: 1px solid var(--border); border-radius: 999px;
    padding: 6px 14px;
  }
}

/* --- hero --- */
.hero { padding-top: clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
/* La corona del hero: se dibuja al cargar (draw-on del motion spec, ver script.js). */
.hero-crown { width: clamp(120px, 14vw, 168px); height: auto; overflow: visible; margin-bottom: 12px; margin-left: -8px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 520px at 78% -8%, color-mix(in srgb, var(--verdemar) 20%, transparent), transparent 60%),
    radial-gradient(760px 420px at 8% 4%, color-mix(in srgb, var(--oro) 14%, transparent), transparent 62%);
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.02fr 1fr; } }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.3rem); margin-block: 1rem 1.2rem; }
.hero h1 .accent { color: var(--petroleo); font-style: italic; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-trust { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; color: var(--bruma); font-size: 0.85rem; }
.hero-trust b { color: var(--tinta); font-weight: 600; }

/* --- generic figure card (mockups) --- */
.device {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.device-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--arena) 60%, var(--card)); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #e0776a; } .dot.y { background: #e6c15a; } .dot.g { background: #74b79a; }
.device-url { margin-left: 10px; font-size: 0.72rem; color: var(--bruma); font-variant-numeric: tabular-nums; }

/* inbox mockup */
.inbox { display: grid; grid-template-columns: 132px 1fr; min-height: 300px; }
.inbox-list { border-right: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; gap: 4px; background: color-mix(in srgb, var(--arena) 45%, var(--card)); }
.inbox-item { padding: 8px; border-radius: 10px; font-size: 0.72rem; display: flex; flex-direction: column; gap: 3px; }
.inbox-item.active { background: color-mix(in srgb, var(--verdemar) 16%, var(--card)); }
.inbox-item .who { font-weight: 600; color: var(--tinta); display: flex; align-items: center; gap: 5px; }
.chan { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.chan.wa { background: #25d366; } .chan.em { background: var(--petroleo); } .chan.web { background: var(--verdemar); } .chan.voz { background: var(--oro); }
.inbox-item .prev { color: var(--bruma); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-thread { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 0.8rem; line-height: 1.45; }
.bubble.in { background: var(--arena-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.out { background: var(--petroleo); color: var(--arena); border-bottom-right-radius: 4px; align-self: flex-end; }
.draft { margin-top: auto; border: 1px dashed color-mix(in srgb, var(--oro-safe) 55%, var(--border)); border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--oro) 8%, var(--card)); }
.draft .sig { font-size: 0.68rem; font-weight: 600; color: var(--oro-label); letter-spacing: 0.02em; margin-bottom: 3px; }
.draft .sig .ia { color: var(--oro-label); }
.draft p { font-size: 0.78rem; color: var(--tinta); }

/* flow builder mockup */
.flow { position: relative; padding: 22px; min-height: 300px; background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--bruma) 30%, transparent) 1px, transparent 0) 0 0 / 22px 22px; }
.node { position: absolute; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); padding: 9px 12px; font-size: 0.76rem; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.node .ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 0.7rem; flex: none; }
.node small { display: block; font-weight: 400; color: var(--bruma); font-size: 0.66rem; }
.node.n1 { top: 30px; left: 24px; } .node.n1 .ico { background: var(--verdemar); }
.node.n2 { top: 118px; left: 120px; } .node.n2 .ico { background: var(--petroleo); }
.node.n3 { top: 210px; left: 40px; } .node.n3 .ico { background: var(--oro-safe); }
.node.n4 { top: 210px; left: 230px; } .node.n4 .ico { background: var(--coral); }
.flow svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* --- feature rows --- */
.feature { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 940px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature.reverse .feature-media { order: 2; }
}
.feature-copy .lead { margin-top: 1rem; }
.feature-list { list-style: none; padding: 0; margin-top: 1.6rem; display: flex; flex-direction: column; gap: 0.85rem; }
.feature-list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.98rem; color: var(--tinta); }
.feature-list .tick { flex: none; width: 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--verdemar) 18%, var(--card)); color: var(--petroleo); display: grid; place-items: center; margin-top: 1px; }

/* --- canales chips --- */
.channels { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2rem; }
.chip { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.6rem 1.05rem; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-sm); }
.chip .d { width: 9px; height: 9px; border-radius: 3px; }

/* --- section headers --- */
.sec-head { max-width: 720px; }
.sec-head h2 { margin-top: 0.8rem; }
.sec-head p { margin-top: 1rem; color: var(--bruma); font-size: 1.08rem; }
.center { text-align: center; margin-inline: auto; }

/* --- Millarai (Austral / dark band) --- */
.austral { background: var(--noche); color: #d7e5e8; position: relative; }
.austral .eyebrow { color: var(--oro); }
.austral h2 { color: #f2ede0; }
.austral p { color: #9db4b9; }
.austral .lead { color: #a9c0c4; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 2rem; }
@media (min-width: 620px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--noche-2); border: 1px solid var(--noche-line); border-radius: 14px; padding: 16px; }
.kpi .k-label { font-size: 0.72rem; color: #8fa8ad; letter-spacing: 0.04em; }
.kpi .k-val { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; margin-top: 6px; color: #f2ede0; font-variant-numeric: tabular-nums; }
.kpi.gold .k-val { color: var(--oro); }
.kpi .k-sub { font-size: 0.72rem; color: #7f989d; margin-top: 4px; }
.chart { margin-top: 22px; background: var(--noche-2); border: 1px solid var(--noche-line); border-radius: 14px; padding: 18px; }
.chart .c-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; color: #9db4b9; margin-bottom: 12px; }

/* --- las reinas --- */
.court { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 2.4rem; }
@media (min-width: 820px) { .court { grid-template-columns: repeat(4, 1fr); } }
.queen { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.queen:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.queen .emoji { font-size: 1.6rem; }
.queen .name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-top: 10px; } /* 19.2px = texto grande → el oro-safe pasa AA */
.queen .name .ia { color: var(--oro-safe); }
.queen .role { font-size: 0.78rem; color: var(--oro-label); font-weight: 600; letter-spacing: 0.02em; margin-top: 2px; }
.queen p { font-size: 0.9rem; color: var(--bruma); margin-top: 10px; }
/* La voz de la reina: Fraunces itálica — SOLO en momentos de mito (regla de marca). */
.queen-voice { font-family: var(--font-display); font-style: italic; color: var(--tinta) !important; border-top: 1px solid var(--border); padding-top: 10px; }

/* --- comparison --- */
.compare { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 2.4rem; }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; } }
.cmp { border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.cmp.old { background: var(--arena-2); }
.cmp.new { background: var(--card); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--verdemar) 40%, var(--border)); }
.cmp h3 { font-family: var(--font-body); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.cmp.old h3 { color: var(--bruma); } .cmp.new h3 { color: var(--verdemar); }
.cmp ul { list-style: none; padding: 0; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.cmp li { display: flex; gap: 0.6rem; font-size: 0.95rem; align-items: flex-start; }
.cmp li .m { flex: none; font-weight: 700; }
.cmp.old li { color: var(--bruma); } .cmp.old li .m { color: var(--coral); }
.cmp.new li { color: var(--tinta); } .cmp.new li .m { color: var(--verde-ok); }

/* --- demo form --- */
.demo { background: linear-gradient(180deg, var(--arena), color-mix(in srgb, var(--verdemar) 10%, var(--arena))); }
.demo-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); padding: clamp(28px, 4vw, 48px); max-width: 980px; margin-inline: auto; display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 820px) { .demo-card { grid-template-columns: 1fr 1.1fr; } }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.78rem; font-weight: 600; color: var(--tinta); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 0.92rem; padding: 0.7rem 0.85rem; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--arena); color: var(--tinta); transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--petroleo); background: var(--card); }
.field textarea { resize: vertical; min-height: 84px; }
.form-note { font-size: 0.78rem; color: var(--bruma); margin-top: 4px; }
.form-ok { display: none; padding: 1rem 1.2rem; border-radius: 12px; background: color-mix(in srgb, var(--verde-ok) 14%, var(--card)); color: var(--verde-ok); font-weight: 600; font-size: 0.9rem; border: 1px solid color-mix(in srgb, var(--verde-ok) 40%, var(--border)); }

/* --- footer --- */
footer { background: var(--noche); color: #9db4b9; padding-block: 56px 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
footer .wordmark { color: #f2ede0; font-size: 1.4rem; }
.foot-crown { width: 88px; height: auto; margin-bottom: 10px; margin-left: -6px; }
footer a { color: #9db4b9; transition: color 0.2s; }
footer a:hover { color: #f2ede0; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.foot-col { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.foot-col .h { color: #7f989d; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.foot-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--noche-line); font-size: 0.82rem; color: #7f989d; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot-tag { font-family: var(--font-display); font-style: italic; color: #a9c0c4; }

/* --- reveal animation ---
   El estado oculto SOLO aplica cuando JS está activo (html.js): sin JS el contenido es visible
   (no-JS/SEO/robustez). Con JS, IntersectionObserver agrega .in al entrar en viewport. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ===================== Sprint 3 — secciones nuevas ===================== */

/* Cómo funciona — 3 mareas */
.steps { list-style: none; padding: 0; margin-top: 2.4rem; display: grid; grid-template-columns: 1fr; gap: 16px; counter-reset: paso; }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); position: relative; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: color-mix(in srgb, var(--verdemar) 16%, var(--card)); color: var(--petroleo); font-weight: 700; font-size: 1rem; }
.step h3 { margin-top: 12px; }
.step p { font-size: 0.92rem; color: var(--bruma); margin-top: 8px; }
.channels-compact { margin-top: 14px; gap: 8px; }
.channels-compact .chip { padding: 0.4rem 0.8rem; font-size: 0.78rem; box-shadow: none; }

/* Casos de uso */
.cases { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 2.4rem; }
@media (min-width: 880px) { .cases { grid-template-columns: repeat(3, 1fr); } }
.case { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.case:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.case-emoji { font-size: 1.7rem; }
.case h3 { margin-top: 10px; }
.case-tag { font-size: 0.78rem; color: var(--oro-label); font-weight: 600; letter-spacing: 0.02em; margin-top: 2px; }
.case p:not(.case-tag) { font-size: 0.92rem; color: var(--bruma); margin-top: 10px; }
.case p strong { color: var(--tinta); }

/* Enterprise */
.ent-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 2.4rem; }
@media (min-width: 760px) { .ent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .ent-grid { grid-template-columns: repeat(4, 1fr); } }
.ent { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.ent h3 { font-size: 1.02rem; }
.ent p { font-size: 0.88rem; color: var(--bruma); margin-top: 8px; }

/* FAQ — details nativo */
.faq-list { margin-top: 2.2rem; max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 0; overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 600; font-size: 0.98rem; color: var(--tinta); position: relative; padding-right: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--font-display); font-size: 1.3rem; color: var(--oro-label); transition: transform 0.25s var(--ease); }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 20px 16px; font-size: 0.92rem; color: var(--bruma); max-width: 64ch; }

/* ===================== Sprint 4 — animación ===================== */

/* Stagger en grids de tarjetas (corte, casos, pasos, enterprise, faq) */
.js .court .reveal:nth-child(2), .js .cases .reveal:nth-child(2), .js .steps .reveal:nth-child(2),
.js .ent-grid .reveal:nth-child(2), .js .faq-list .reveal:nth-child(2) { transition-delay: 80ms; }
.js .court .reveal:nth-child(3), .js .cases .reveal:nth-child(3), .js .steps .reveal:nth-child(3),
.js .ent-grid .reveal:nth-child(3), .js .faq-list .reveal:nth-child(3) { transition-delay: 160ms; }
.js .court .reveal:nth-child(4), .js .ent-grid .reveal:nth-child(4), .js .faq-list .reveal:nth-child(4) { transition-delay: 240ms; }
.js .faq-list .reveal:nth-child(5) { transition-delay: 320ms; }

/* El inbox del hero cobra vida: burbujas entran secuencialmente + la firma de Pincoia pulsa */
.js .inbox-thread .bubble, .js .inbox-thread .draft { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.js .inbox-thread .bubble.on, .js .inbox-thread .draft.on { opacity: 1; transform: none; }
@keyframes pearlPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,164,65,0); } 40% { box-shadow: 0 0 0 6px rgba(217,164,65,0.18); } }
.js .draft.on { animation: pearlPulse 2.4s var(--ease) 1; }
.typing { display: inline-flex; gap: 4px; padding: 9px 12px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--bruma); opacity: 0.5; animation: tdot 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.16s; } .typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes tdot { 0%,100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-3px); opacity: 0.9; } }

/* Millarai: las barras crecen al revelarse (transform scaleX desde el JS) */
.chart svg rect { transform-origin: left center; }
.js .chart:not(.grown) svg rect { transform: scaleX(0); }
.chart.grown svg rect { transition: transform 1.1s var(--ease); transform: scaleX(1); }
.chart.grown svg rect:nth-of-type(2) { transition-delay: 120ms; }
.chart.grown svg rect:nth-of-type(3) { transition-delay: 240ms; }
.chart.grown svg rect:nth-of-type(4) { transition-delay: 360ms; }

/* Coia: los cables del flujo se dibujan al revelarse la sección */
.js .flow .wires path { stroke-dasharray: 300; stroke-dashoffset: 300; }
.flow.wired .wires path { transition: stroke-dashoffset 0.9s var(--ease); stroke-dashoffset: 0; }
.flow.wired .wires path:nth-of-type(2) { transition-delay: 250ms; }
.flow.wired .wires path:nth-of-type(3) { transition-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  .js .inbox-thread .bubble, .js .inbox-thread .draft { opacity: 1; transform: none; animation: none; }
  .js .chart:not(.grown) svg rect, .js .flow .wires path { transform: none; stroke-dashoffset: 0; }
}

/* ===================================================================
   LA CORTE — las agentes diosas (bloque post-hero)
   =================================================================== */
.court-sec { background:
  radial-gradient(120% 80% at 82% 0%, rgba(78,141,128,0.08), transparent 60%),
  radial-gradient(90% 70% at 8% 100%, rgba(217,164,65,0.07), transparent 55%),
  var(--arena); }
.court-head { max-width: 760px; margin-inline: auto; text-align: center; }
.court-head p { margin-inline: auto; }

/* — Chips selector — */
.court-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: clamp(28px, 4vw, 44px) 0 clamp(24px, 3vw, 36px); }
.court-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.1rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--tinta);
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease); }
.court-chip .cc-emoji { font-size: 1.05rem; line-height: 1; }
.court-chip .cc-name i { font-style: normal; color: var(--oro-safe); }
.court-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--petroleo) 30%, var(--border)); }
.court-chip.is-active { background: var(--petroleo); border-color: var(--petroleo); color: var(--arena); box-shadow: 0 10px 26px -10px rgba(14,69,82,0.55); }
.court-chip.is-active .cc-name i { color: var(--oro); }

/* — Stage / card — */
.court-stage { position: relative; }
.court-card { display: none; gap: clamp(28px, 4vw, 56px); align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px; overflow: hidden;
  padding: clamp(24px, 3.4vw, 44px); box-shadow: var(--shadow-lg); }
.court-card.is-active { display: grid; animation: courtIn 0.55s var(--ease) both; }
@media (min-width: 940px) { .court-card.is-active { grid-template-columns: minmax(0,1fr) minmax(0,1.06fr); } }
@keyframes courtIn { from { opacity: 0; transform: translateY(14px) scale(0.99); } to { opacity: 1; transform: none; } }

/* — Copy (izquierda) — */
.court-name { display: flex; align-items: center; gap: 0.6rem; }
.court-name .cn-emoji { font-size: 1.6rem; line-height: 1; }
.court-name h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; color: var(--tinta); line-height: 1; }
.court-name h3 i { font-style: normal; color: var(--oro-safe); }
.court-role { margin-top: 0.5rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--oro-label); }
.court-copy > p { margin-top: 0.95rem; color: var(--bruma); font-size: 0.98rem; line-height: 1.62; max-width: 48ch; }
.court-copy > p strong { color: var(--tinta); }
.court-ficha { margin-top: 1.3rem; display: grid; gap: 0.55rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.court-ficha > div { display: grid; grid-template-columns: 108px 1fr; gap: 0.75rem; align-items: baseline; }
.court-ficha dt { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bruma); }
.court-ficha dd { font-size: 0.9rem; color: var(--tinta); font-weight: 500; }
.court-voice { margin-top: 1.4rem; padding-left: 1rem; border-left: 3px solid var(--oro); font-family: var(--font-display); font-style: italic; font-size: 1.12rem; line-height: 1.4; color: var(--tinta); }
.court-voice::before { content: "«"; color: var(--oro-safe); } .court-voice::after { content: "»"; color: var(--oro-safe); }

/* — Viz base (derecha) — */
.court-viz { position: relative; border-radius: 16px; padding: 18px; min-height: 300px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--q,#4e8d80) 8%, #fff), color-mix(in srgb, var(--q,#4e8d80) 3%, #fff));
  border: 1px solid color-mix(in srgb, var(--q,#4e8d80) 18%, var(--border)); overflow: hidden; }
.court-card[data-queen="pincoia"] { --q: var(--verdemar); }
.court-card[data-queen="raien"] { --q: #b8566b; }
.court-card[data-queen="coia"] { --q: var(--oro-safe); }
.court-card[data-queen="millarai"] { --q: var(--oro-safe); }
.viz-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.viz-head .vh-dot { width: 9px; height: 9px; border-radius: 50%; }
.viz-head .vh-dot:nth-child(1) { background: #e5837b; } .viz-head .vh-dot:nth-child(2) { background: #e8c069; } .viz-head .vh-dot:nth-child(3) { background: #86c2a2; }
.viz-head .vh-url { margin-left: 6px; font-size: 0.68rem; color: var(--bruma); font-family: var(--font-body); }

/* ── VIZ Pincoia: mareas → una orilla ── */
.orilla { position: relative; min-height: 216px; }
.tides { list-style: none; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); display: grid; gap: 16px; z-index: 2; }
.tides li { display: flex; align-items: center; gap: 7px; font-size: 0.74rem; font-weight: 600; color: var(--tinta); opacity: 0; transform: translateX(-8px); white-space: nowrap; }
.tides li .td { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.orilla-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.orilla-wires path { fill: none; stroke: var(--verdemar); stroke-width: 2; opacity: 0.5; stroke-dasharray: 180; stroke-dashoffset: 180; }
.orilla-inbox { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 45%; display: grid; gap: 8px; z-index: 2; }
.oi-row { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 9px; box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(6px); }
.oi-row b { display: block; height: 7px; width: 62%; border-radius: 4px; background: var(--verdemar); opacity: 0.55; }
.oi-row i { display: block; height: 6px; width: 90%; border-radius: 4px; background: var(--border); margin-top: 6px; }
.viz-pincoia .wave { position: absolute; left: 0; right: 0; bottom: 0; width: 200%; height: 26px; }
.viz-pincoia .wave path { fill: color-mix(in srgb, var(--verdemar) 22%, #fff); }
.court-stage.in .is-active .tides li { animation: cFadeX 0.5s var(--ease) both; animation-delay: calc(0.15s + var(--i) * 0.12s); }
.court-stage.in .is-active .orilla-wires path { animation: cDraw 0.9s var(--ease) both, cFlow 2.4s linear 1s infinite; }
.court-stage.in .is-active .orilla-wires path:nth-child(2) { animation-delay: 0.1s, 1.1s; }
.court-stage.in .is-active .orilla-wires path:nth-child(3) { animation-delay: 0.2s, 1.2s; }
.court-stage.in .is-active .orilla-wires path:nth-child(4) { animation-delay: 0.3s, 1.3s; }
.court-stage.in .is-active .oi-row { animation: cRise 0.5s var(--ease) both; animation-delay: calc(0.7s + var(--i) * 0.16s); }
.court-stage.in .is-active .viz-pincoia .wave { animation: cWave 7s linear infinite; }

/* ── VIZ Raién: siembra con permiso + funnel ── */
.seed-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.seed-chip, .seed-tpl { font-size: 0.74rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--border); color: var(--tinta); opacity: 0; transform: translateY(6px); }
.seed-tpl { color: var(--verde-ok); }
.seed-arrow { color: var(--bruma); opacity: 0; }
.seed-gate { font-size: 1.05rem; opacity: 0; }
.funnel { display: grid; gap: 12px; }
.fn { position: relative; height: 40px; border-radius: 9px; background: color-mix(in srgb, var(--q) 10%, #fff); border: 1px solid color-mix(in srgb, var(--q) 16%, var(--border)); overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.fn::before { content: ""; position: absolute; inset: 0; width: 0; background: color-mix(in srgb, var(--q) 20%, #fff); z-index: 0; }
.fn.gold::before { background: rgba(217,164,65,0.28); }
.fn span, .fn b { position: relative; z-index: 1; font-size: 0.8rem; }
.fn span { color: var(--tinta); font-weight: 600; } .fn b { color: var(--bruma); }
.court-stage.in .is-active .seed-chip { animation: cRise 0.45s var(--ease) 0.15s both; }
.court-stage.in .is-active .seed-arrow { animation: cFade 0.4s ease 0.35s both; }
.court-stage.in .is-active .seed-tpl { animation: cRise 0.45s var(--ease) 0.45s both; }
.court-stage.in .is-active .seed-gate { animation: cBloom 0.6s var(--ease) 0.7s both; }
.court-stage.in .is-active .fn::before { animation: cGrow 0.9s var(--ease) both; animation-delay: calc(0.6s + var(--i) * 0.18s); }

/* ── VIZ Coia: taller de nodos ── */
.mini-flow { position: relative; width: 300px; max-width: 100%; height: 232px; margin: 8px auto 0; }
.mf-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mf-wires path { fill: none; stroke: var(--verdemar); stroke-width: 2.2; opacity: 0.6; stroke-dasharray: 160; stroke-dashoffset: 160; }
.mf-node { position: absolute; display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-sm); padding: 8px 11px; font-size: 0.72rem; font-weight: 600; color: var(--tinta); opacity: 0; transform: translateY(8px) scale(0.96); }
.mf-node small { display: block; font-weight: 400; color: var(--bruma); font-size: 0.62rem; }
.mf-node .mf-ico { width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 0.68rem; flex: none; }
.mf-node.q1 { top: 10px; left: 8px; } .mf-node.q1 .mf-ico { background: var(--verdemar); }
.mf-node.q2 { top: 92px; left: 84px; } .mf-node.q2 .mf-ico { background: var(--petroleo); }
.mf-node.q3 { top: 176px; left: 4px; } .mf-node.q3 .mf-ico { background: var(--oro-safe); }
.mf-node.q4 { top: 176px; left: 168px; } .mf-node.q4 .mf-ico { background: var(--coral); }
.court-stage.in .is-active .mf-node { animation: cPop 0.5s var(--ease) both; animation-delay: calc(0.15s + var(--i) * 0.18s); }
.court-stage.in .is-active .mf-wires path { animation: cDraw 0.7s var(--ease) both; }
.court-stage.in .is-active .mf-wires path:nth-child(1) { animation-delay: 0.5s; }
.court-stage.in .is-active .mf-wires path:nth-child(2) { animation-delay: 0.95s; }
.court-stage.in .is-active .mf-wires path:nth-child(3) { animation-delay: 1.1s; }

/* ── VIZ Millarai: el oro de los datos ── */
.mi-kpi { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(217,164,65,0.16), rgba(217,164,65,0.05)); border: 1px solid rgba(217,164,65,0.3); margin-bottom: 18px; }
.mi-k-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--oro-label); }
.mi-k-val { font-family: var(--font-display); font-weight: 600; font-size: 2rem; color: var(--tinta); line-height: 1.1; }
.mi-k-sub { font-size: 0.72rem; color: var(--bruma); }
.mi-bars { display: grid; gap: 11px; }
.mi-b { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; font-size: 0.74rem; color: var(--tinta); font-weight: 600; }
.mi-b i { display: block; height: 11px; border-radius: 6px; background: var(--c, var(--verdemar)); width: 0; }
.mi-b.gold i { background: var(--oro); }
.mi-spark { width: 100%; height: 40px; margin-top: 14px; }
.mi-spark .sp-line { stroke: var(--oro); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 260; stroke-dashoffset: 260; }
.court-stage.in .is-active .mi-kpi { animation: cRise 0.5s var(--ease) 0.15s both; }
.court-stage.in .is-active .mi-b i { animation: cBar 0.9s var(--ease) both; animation-delay: calc(0.4s + var(--i,0) * 0.12s); }
.court-stage.in .is-active .mi-b:nth-child(1) i { --i: 0; } .court-stage.in .is-active .mi-b:nth-child(2) i { --i: 1; }
.court-stage.in .is-active .mi-b:nth-child(3) i { --i: 2; } .court-stage.in .is-active .mi-b:nth-child(4) i { --i: 3; }
.court-stage.in .is-active .mi-spark .sp-line { animation: cDrawLong 1.1s var(--ease) 0.7s both; }

/* — keyframes compartidas — */
@keyframes cFade { to { opacity: 1; } }
@keyframes cFadeX { to { opacity: 1; transform: none; } }
@keyframes cRise { to { opacity: 1; transform: none; } }
@keyframes cPop { to { opacity: 1; transform: none; } }
@keyframes cDraw { from { stroke-dashoffset: 180; } to { opacity: 0.5; stroke-dashoffset: 0; } }
@keyframes cDrawLong { to { stroke-dashoffset: 0; } }
@keyframes cFlow { to { stroke-dashoffset: -360; } }
@keyframes cGrow { to { width: var(--w); } }
@keyframes cBar { to { width: var(--w); } }
@keyframes cBloom { 0% { opacity: 0; transform: scale(0.4) rotate(-20deg); } 60% { opacity: 1; transform: scale(1.25) rotate(8deg); } 100% { opacity: 1; transform: none; } }
@keyframes cWave { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .court-card.is-active { animation: none; }
  .court-viz .tides li, .court-viz .oi-row, .court-viz .seed-chip, .court-viz .seed-tpl, .court-viz .seed-arrow,
  .court-viz .seed-gate, .court-viz .mf-node, .court-viz .mi-kpi { opacity: 1; transform: none; animation: none; }
  .court-viz .orilla-wires path, .court-viz .mf-wires path, .court-viz .mi-spark .sp-line { stroke-dashoffset: 0; animation: none; }
  .court-viz .fn::before { width: var(--w); animation: none; }
  .court-viz .mi-b i { width: var(--w); animation: none; }
  .viz-pincoia .wave { animation: none; }
}
