/* Maru · landing
   Paleta del logo v2: washi (papel), sumi (tinta), shu (el sol), mikan (las manchas de la gata),
   sakura y kin (las nubes). Tipos: Shippori Mincho (títulos) / Zen Kaku Gothic New (texto). */

:root {
  /* Marca (no cambian con el tema) */
  --sumi: #2B2724;
  --sumi-2: #3A342F;
  --sumi-3: #221E1B;
  --sumi-soft: #B9AEA2;
  --mandarina: #C8452C; /* acento principal: el sol (shu). El nombre se conserva por compatibilidad */
  --mikan: #DE9A5A;
  --kin: #D7B98C;
  --beni: #B8392A;

  /* Semánticos: tema claro */
  --bg: #F3EDE2;
  --paper: #FBF7EF;
  --shiro: #EDE5D8;
  --kori: #ECE2D3;
  --text: #2B2724;
  --muted: #6B6055;
  --meta: #857A6E;
  --line: #DDD2C2;
  --line-soft: #E8DFD1;
  --line-strong: #D0C2AE;
  --mandarina-deep: #A8361F;
  --mandarina-tint: #F6DED4;
  --tint-2: #F0CDBF;
  --tint-text: #7A2A18;
  --warn-bg: #FBEADF;
  --warn-text: #9A3A1E;
  --warn-line: #EBC2AE;
  --ok-text: #3F7A4A;
  --ok-bg: #E4EEDF;
  --ink-block: #2B2724;
  --ink-block-2: #3A342F;
  --band: #2B2724;
  --chat-bg: #ECE3D5;
  --case-dark: #2B2724;
  --bubble-out: #F4DDD3;
  --chat-head: rgba(251, 247, 239, .8);
  --nav-bg: rgba(243, 237, 226, .97);
  --hover: rgba(43, 39, 36, .05);
  --shadow: 70 48 32;
  --ring: rgba(43, 39, 36, .08);
  --scroll-thumb: #CDBFAC;
  --on-accent: #FFF6EE;

  --m-ink: var(--text);
  --m-halo: var(--bg);
  --m-accent: var(--mandarina);

  --display: "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --body: "Zen Kaku Gothic New", "Yu Gothic", "Hiragino Sans", system-ui, sans-serif;
  --wordmark: "Tenor Sans", "Zen Kaku Gothic New", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 14px;
  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 11vw, 144px);

  color-scheme: light;
}

/* Tema oscuro: noche japonesa (añil, texto crema, faroles bermellón). Sigue al sistema salvo que el usuario elija. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sumi-3: #0D1220; --bg: #111726; --paper: #182033; --shiro: #202A40; --kori: #141B2C;
    --text: #EEE8DC; --muted: #ABA79E; --meta: #8F8C87;
    --line: #2A3450; --line-soft: #212A40; --line-strong: #34405C;
    --mandarina: #D9563A; --mandarina-deep: #F08A6C; --mandarina-tint: #3A2530; --tint-2: #4A2A30; --tint-text: #F6C3B2;
    --warn-bg: #3A2528; --warn-text: #F2A585; --warn-line: #5E3A3A;
    --ok-text: #93C995; --ok-bg: #1C2E2B;
    --beni: #E0654A; --ink-block: #2C3752; --ink-block-2: #37445F; --bubble-out: #2E3550; --band: #0B0F19;
    --chat-bg: #151C2D; --case-dark: #1B2338; --chat-head: rgba(24, 32, 51, .85);
    --nav-bg: rgba(17, 23, 38, .97); --hover: rgba(255, 255, 255, .05);
    --shadow: 0 0 0; --ring: rgba(255, 255, 255, .07); --scroll-thumb: #37425E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sumi-3: #0D1220; --bg: #111726; --paper: #182033; --shiro: #202A40; --kori: #141B2C;
  --text: #EEE8DC; --muted: #ABA79E; --meta: #8F8C87;
  --line: #2A3450; --line-soft: #212A40; --line-strong: #34405C;
  --mandarina: #D9563A; --mandarina-deep: #F08A6C; --mandarina-tint: #3A2530; --tint-2: #4A2A30; --tint-text: #F6C3B2;
  --warn-bg: #3A2528; --warn-text: #F2A585; --warn-line: #5E3A3A;
  --ok-text: #93C995; --ok-bg: #1C2E2B;
  --beni: #E0654A; --ink-block: #2C3752; --ink-block-2: #37445F; --bubble-out: #2E3550; --band: #0B0F19;
  --chat-bg: #151C2D; --case-dark: #1B2338; --chat-head: rgba(24, 32, 51, .85);
  --nav-bg: rgba(17, 23, 38, .97); --hover: rgba(255, 255, 255, .05);
  --shadow: 0 0 0; --ring: rgba(255, 255, 255, .07); --scroll-thumb: #37425E;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-color: var(--scroll-thumb) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--mandarina);
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--mandarina); color: var(--on-accent); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--mandarina); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink-block); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s var(--ease-out); }
.skip:focus { top: 12px; }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
/* La gata siempre con su proporción (Safari antiguo no la infiere del viewBox) */
svg[viewBox="0 0 112 76"] { aspect-ratio: 112 / 76; height: auto; }
.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem/1 var(--body);
  text-decoration: none;
  border-radius: 999px;
  padding: 15px 24px;
  border: 0; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .2s ease, box-shadow .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 10px 16px; font-size: .9375rem; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-lg { padding: 18px 30px; font-size: 1.0625rem; }
.btn-ink { background: var(--ink-block); color: #fff; }
.btn-orange { background: var(--mandarina); color: var(--on-accent); letter-spacing: .01em; box-shadow: 0 6px 16px -8px rgb(var(--shadow) / .45); }
@media (hover: hover) and (pointer: fine) {
  .btn-ink:hover { background: var(--ink-block-2); }
  .btn-orange:hover { background: #D65A3F; box-shadow: 0 10px 22px -10px rgb(var(--shadow) / .5); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand { gap: 12px; }
.brand-seal {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 8px; transform: rotate(-4deg);
  background: var(--mandarina); color: var(--on-accent); font: 700 1.2rem/1 var(--display);
}
.brand-word { font: 400 1.3rem/1 var(--wordmark); letter-spacing: .26em; color: var(--text); }
nav { margin-left: auto; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.lang {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 999px; border: 1px solid var(--line);
}
.lang::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--paper);
  box-shadow: 0 1px 3px rgb(var(--shadow) / .18), 0 0 0 1px var(--ring);
  transition: transform .4s var(--ease-out);
}
.lang[data-active="en"]::before { transform: translateX(100%); }
.lang button {
  position: relative; z-index: 1; height: 32px; min-width: 36px; padding: 0 8px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 700 .75rem/1 var(--body); letter-spacing: .04em; color: var(--muted);
  transition: color .25s ease;
}
.lang button[aria-pressed="true"] { color: var(--text); }
.theme-btn {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .2s ease, transform .16s var(--ease-out);
}
.theme-btn:active { transform: scale(0.92); }
.theme-btn svg { position: absolute; width: 19px; height: 19px; transition: transform .5s var(--ease-out), opacity .25s ease; }
.ic-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
:root[data-theme="dark"] .ic-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .ic-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .ic-moon { opacity: 0; transform: rotate(90deg) scale(.5); }
}
@media (hover: hover) and (pointer: fine) {
  .theme-btn:hover { background: var(--hover); }
  .lang button:hover { color: var(--text); }
}
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .9688rem; color: var(--muted); transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { overflow-x: clip; padding-block: clamp(32px, 5vw, 64px) clamp(72px, 9vw, 120px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "ask stage" "ask out";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 24px;
}
.hero-ask { grid-area: ask; position: relative; z-index: 1; }
.hero-sun {
  grid-area: stage; align-self: start; justify-self: end; position: relative; z-index: 0;
  width: clamp(230px, 36vw, 470px); aspect-ratio: 1;
  transform: translate(26%, -12%); pointer-events: none;
}
.orb { position: absolute; inset: 0; border-radius: 50%; transition: transform 1s var(--ease-io), opacity .7s ease; }
.orb-sun { background: radial-gradient(circle at 36% 32%, #D9603F 0%, #C8452C 58%, #A93622 100%); }
.orb-moon {
  opacity: 0; transform: translateY(45%) scale(.9);
  background: radial-gradient(circle at 38% 34%, #FBF5E6 0%, #EFE5CC 52%, #D9CCAD 100%);
  box-shadow: 0 0 70px 12px rgba(239, 229, 204, .16), 0 0 160px 40px rgba(239, 229, 204, .08);
}
/* Mares de la luna, apenas insinuados */
.orb-moon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 63% 40%, rgba(160, 145, 115, .30) 0 9%, transparent 10.5%),
    radial-gradient(circle at 42% 66%, rgba(160, 145, 115, .24) 0 6%, transparent 7.5%),
    radial-gradient(circle at 30% 34%, rgba(160, 145, 115, .18) 0 4.5%, transparent 6%),
    radial-gradient(circle at 70% 70%, rgba(160, 145, 115, .16) 0 3.5%, transparent 5%);
}
.hero-sun .star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #F3EAD6; opacity: 0; transition: opacity .8s ease .5s; }
.hero-sun .s1 { left: -8%; top: 12%; } .hero-sun .s2 { left: 10%; top: -4%; width: 3px; height: 3px; } .hero-sun .s3 { left: -22%; top: 40%; width: 3px; height: 3px; }
/* Nubes kin cruzando el astro */
.hero-sun::before, .hero-sun::after {
  content: ""; position: absolute; z-index: 2; height: clamp(5px, .7vw, 9px); border-radius: 9px;
  background: var(--kin); transition: background-color .8s ease;
}
.hero-sun::before { left: 40%; top: 18%; width: 78%; }
.hero-sun::after { left: 56%; top: 23.5%; width: 56%; opacity: .75; }
:root[data-theme="dark"] .orb-sun { opacity: 0; transform: translateY(45%) scale(.9); }
:root[data-theme="dark"] .orb-moon { opacity: 1; transform: none; transition-delay: .18s; }
:root[data-theme="dark"] .hero-sun .star { opacity: .85; }
:root[data-theme="dark"] .hero-sun::before, :root[data-theme="dark"] .hero-sun::after { background: #8C8EA6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .orb-sun { opacity: 0; transform: translateY(45%) scale(.9); }
  :root:not([data-theme="light"]) .orb-moon { opacity: 1; transform: none; transition-delay: .18s; }
  :root:not([data-theme="light"]) .hero-sun .star { opacity: .85; }
  :root:not([data-theme="light"]) .hero-sun::before, :root:not([data-theme="light"]) .hero-sun::after { background: #8C8EA6; }
}
/* En escritorio el escenario baja un poco para que el astro se vea entero sobre él */
@media (min-width: 1021px) { .stage { margin-top: clamp(40px, 6vw, 84px); } }
.stage { grid-area: stage; }
.hero-out { grid-area: out; }

.hero h1 { font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; }
.lede { margin-top: 18px; font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); color: var(--muted); }

/* Opciones: lista tipo índice en escritorio, fila deslizable en móvil */
.pains { border: 0; margin: 32px 0 0; padding: 0; min-inline-size: 0; display: grid; }
.pain { position: relative; cursor: pointer; display: block; }
.pain input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pain b { font-weight: inherit; }
.pain-ic, .pain .ps { display: none; }
.pain span {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 44px 14px 16px;
  border-top: 1.5px solid var(--line);
  font-weight: 500; font-size: 1.0625rem; line-height: 1.3;
  color: var(--text);
  transition: color .3s var(--ease-out), transform .16s var(--ease-out);
  overflow: hidden;
}
.pain:last-child span { border-bottom: 1.5px solid var(--line); }
/* Punto que crece y se vuelve el fondo de la opción elegida */
.pain span::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--meta);
  transition: background-color .25s ease, border-color .25s ease;
}
.pain span::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink-block);
  clip-path: circle(0% at 21px 50%);
  transition: clip-path .5s var(--ease-out);
}
.pain input:checked + span { color: #fff; border-color: transparent; }
.pain input:checked + span::before { background: var(--mandarina); border-color: var(--mandarina); }
.pain input:checked + span::after { clip-path: circle(150% at 21px 50%); }
.pain + .pain input:checked + span, .pain input:checked + span { border-radius: 12px; }
.pain:has(input:checked) + .pain span { border-top-color: transparent; }
/* Flecha que apunta al escenario */
.pain i svg { width: 100%; height: 100%; }
.pain i {
  position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  color: var(--mandarina);
  opacity: 0; transform: translateX(-8px);
  transition: opacity .25s ease, transform .35s var(--ease-out);
}
.pain input:checked ~ i { opacity: 1; transform: none; }
.pain:active span { transform: scale(0.985); }
.pain input:focus-visible + span { outline: 2.5px solid var(--mandarina); outline-offset: 2px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) {
  .pain input:not(:checked) + span:hover { color: var(--text); background: var(--hover); }
  .pain input:not(:checked) + span:hover::before { border-color: var(--text); }
}

/* ---------- Escenario ---------- */
.stage {
  position: relative; z-index: 1;
  --stage-bg: var(--paper);
  background: var(--stage-bg);
  border-radius: 20px;
  box-shadow: 0 1px 0 var(--ring), 0 24px 50px -28px rgb(var(--shadow) / .45), 0 0 0 1px var(--ring);
  overflow: hidden;
  transition: background-color .45s var(--ease-out);
  align-self: start;
}
.stage[data-scene="whatsapp"] { --stage-bg: var(--chat-bg); }
.stage[data-scene="cobros"] { --stage-bg: var(--sumi-3); }
.stage[data-scene="ia"] { --stage-bg: var(--chat-bg); }

.stage-bar {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 10px 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  font-size: .875rem;
}
.stage-tool { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.stage-tool svg { width: 18px; height: 18px; color: var(--mandarina-deep); }
.stage-tag {
  margin-left: auto;
  font-size: .75rem; font-weight: 600; color: var(--muted);
  padding: 3px 9px; border-radius: 999px; background: var(--shiro);
}
.stage-replay {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--muted);
  opacity: .35; pointer-events: none;
  transition: opacity .3s ease, background-color .2s ease, transform .16s var(--ease-out);
}
.stage-replay svg { width: 18px; height: 18px; }
.stage.done .stage-replay { opacity: 1; pointer-events: auto; }
.stage-replay:active { transform: scale(0.92) rotate(-30deg); }
@media (hover: hover) and (pointer: fine) { .stage-replay:hover { background: var(--shiro); color: var(--text); } }

.stage-view {
  position: relative;
  height: clamp(400px, 36vw, 460px);
  container: stage / inline-size;
  overflow: hidden;
}
.scene { position: absolute; inset: 0; }
.ic { width: 16px; height: 16px; flex: none; }

/* Salida */
.hero-out { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px 32px; padding-inline: 4px; }
.out-copy { display: grid; gap: 6px; max-width: 46ch; transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), filter .2s var(--ease-out); }
.out-copy.swap { opacity: 0; transform: translateY(4px); filter: blur(3px); }
.out-title { font-size: clamp(1.35rem, 2vw, 1.6rem); line-height: 1.2; }
.out-text { color: var(--muted); font-size: 1rem; }
.out-svc { font-size: .875rem; color: var(--muted); }
.out-svc strong { color: var(--mandarina-deep); font-weight: 600; }
.out-cta { display: grid; gap: 8px; justify-items: center; flex: none; }
.out-note { font-size: .8125rem; color: var(--muted); }

/* ===== Escena: chat ===== */
.sc-chat { display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--chat-head); border-bottom: 1px solid var(--ring); }
.chat-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-block); color: #fff; font: 700 .9rem/1 var(--display); }
.chat-who { display: grid; line-height: 1.2; }
.chat-who strong { font-size: .9375rem; }
.chat-who span { font-size: .75rem; color: var(--ok-text); }
.chat-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 16px; overflow: hidden; }
.bub {
  max-width: min(78%, 360px);
  padding: 9px 12px 7px; border-radius: 14px;
  font-size: .9375rem; line-height: 1.4;
  box-shadow: 0 1px 1px var(--ring);
}
.bub.in { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 4px; }
.bub.out { align-self: flex-end; background: var(--bubble-out); border-bottom-right-radius: 4px; }
.bub-text { display: block; }
.bub-meta { display: block; text-align: right; font-size: .6875rem; color: var(--meta); margin-top: 2px; }
.bub.out .bub-meta { color: var(--tint-text); }
.bub-typing { display: flex; gap: 4px; padding: 12px 14px; }
.bub-typing i { width: 7px; height: 7px; border-radius: 50%; background: #B58152; animation: dot 1s infinite ease-in-out; }
.bub-typing i:nth-child(2) { animation-delay: .15s; }
.bub-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-qr { align-self: flex-end; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qr { font-size: .8125rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--paper); color: var(--mandarina-deep); border: 1px solid var(--warn-line); transition: background-color .2s ease, color .2s ease; }
.qr.on { background: var(--mandarina); color: var(--on-accent); border-color: var(--mandarina); }
.chat-done {
  align-self: center; margin-top: 6px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: var(--ink-block); color: #fff; font-size: .8125rem; font-weight: 600;
}
.chat-done .ic { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--mandarina); color: var(--on-accent); }

/* ===== Escena: agenda ===== */
.sc-cal { padding: 18px; display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.cal-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .9375rem; }
.cal-top strong { font: 700 1.05rem/1.2 var(--display); }
.cal-count { font-size: .8125rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.cal-grid { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); grid-template-rows: 22px; gap: 4px; }
.cal-day { font-size: .75rem; font-weight: 600; color: var(--muted); text-align: center; }
.cal-hr { font-size: .6875rem; color: var(--muted); text-align: right; padding-right: 6px; padding-top: 4px; font-variant-numeric: tabular-nums; }
.cal-cell { position: relative; border-radius: 8px; background: var(--shiro); min-height: 44px; }
.cal-busy { position: absolute; inset: 3px; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--line) 0 4px, transparent 4px 8px); }
.cal-ev {
  position: absolute; inset: 3px; border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 2px;
  padding: 0 6px; background: var(--mandarina-tint); border-left: 1px solid var(--mandarina);
  font-size: .75rem; font-weight: 600; color: var(--tint-text); overflow: hidden; white-space: nowrap;
  transition: background-color .3s ease;
}
.cal-ev.confirmed { background: var(--tint-2); }
.cal-ev .ok { width: 14px; height: 14px; color: var(--mandarina-deep); }
.cal-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 14px; border-radius: 12px; background: var(--ink-block); color: #fff;
  font-size: .8125rem; font-weight: 600; opacity: 0;
  box-shadow: 0 10px 24px -12px rgb(var(--shadow) / .6);
}
.cal-toast .ic { color: var(--mandarina); }

/* ===== Escena: Excel ===== */
.sc-xl { padding: 22px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px 20px; align-content: center; }
.xl-notes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.xl-note { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px; border-radius: 999px; background: var(--shiro); font-size: .75rem; font-weight: 600; color: var(--text); }
.xl-note .ic { width: 14px; height: 14px; color: var(--mandarina-deep); }
.sc-xl:not(.has-notes) .xl-notes { visibility: hidden; }
.xl-sheet {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper);
  font-size: .875rem;
}
.sc-xl:not(.has-sheet) .xl-sheet, .sc-xl:not(.has-chart) .xl-chart { visibility: hidden; }
.xl-h { padding: 8px 10px; background: var(--shiro); font-weight: 700; color: var(--text); border-bottom: 1px solid var(--line); }
.xl-c { height: 42px; padding: 0 10px; display: flex; align-items: center; border-bottom: 1px solid var(--line-soft); white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.xl-c.num { justify-content: flex-end; }
.xl-h:not(:last-child), .xl-c:not(.num) { border-right: 1px solid var(--line-soft); }
.xl-c.raw { color: var(--warn-text); background: var(--warn-bg); font-style: italic; }
.xl-scan { position: absolute; left: 0; right: 0; top: 0; height: 42px; background: rgba(200, 69, 44, .14); box-shadow: inset 2px 0 0 var(--mandarina); opacity: 0; pointer-events: none; }
.xl-mess { position: absolute; inset: 0; pointer-events: none; }
.xl-chip {
  position: absolute; white-space: nowrap;
  padding: 6px 10px; border-radius: 6px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: .8125rem; color: var(--text);
  box-shadow: 0 6px 14px -8px rgb(var(--shadow) / .4);
}
.xl-chip.loud { font-weight: 700; background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.xl-chip.dup { text-decoration: line-through; text-decoration-color: var(--warn-line); color: var(--meta); }
.xl-chart { display: grid; gap: 10px; align-content: start; }
.xl-ctitle { font: 700 .95rem/1.2 var(--display); }
.xl-bars { display: grid; gap: 8px; }
.xl-bar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 52px; align-items: center; gap: 8px; font-size: .75rem; }
.xl-bl { color: var(--muted); }
.xl-bv { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.xl-track { display: block; height: 12px; border-radius: 4px; background: var(--shiro); overflow: hidden; }
.xl-fill { display: block; height: 100%; border-radius: 4px; background: var(--mandarina); transform-origin: left center; }
.xl-bar:first-child .xl-fill { background: var(--text); }
.xl-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.xl-total strong { font: 800 1.35rem/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }

/* ===== Escena: panel ===== */
.sc-dash { padding: 20px 22px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 8px; }
.dash-kpi { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dash-kpi > div { display: grid; }
.dash-lab { font-size: .8125rem; color: var(--muted); font-weight: 500; }
.dash-val { font: 800 clamp(1.9rem, 5cqi, 2.5rem)/1.05 var(--display); letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
.dash-live { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--ok-text); padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); white-space: nowrap; }
.dash-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-chart { position: relative; min-height: 110px; margin: 6px 0 0; }
.dash-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dash-line { fill: none; stroke: var(--mandarina); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; }
.dash-area { fill: rgba(200, 69, 44, .12); }
.dash-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--mandarina); transform: translate(-50%, -50%); }
.dash-dot.ping::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--mandarina); animation: ping 1.4s var(--ease-out) 3; opacity: 0; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.dash-axis { display: flex; justify-content: space-between; font-size: .6875rem; color: var(--muted); padding-top: 4px; }
.dash-top { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.dash-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; font-size: .8125rem; }
.dash-row .xl-track { height: 10px; }
.dash-toast {
  position: absolute; right: 18px; top: 74px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; background: var(--ink-block); color: #fff; font-size: .8125rem; font-weight: 600;
  box-shadow: 0 10px 24px -12px rgb(var(--shadow) / .6); opacity: 0;
}
.dash-toast .ic { color: var(--mandarina); }

/* ===== Escena: flujo de nodos ===== */
.sc-flow {
  color: #E6EBF0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.flow-edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow-edges path { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 1.75; stroke-dasharray: 1; }
.fnode { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; }
.fnode-box {
  position: relative;
  width: 58px; height: 58px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(255, 255, 255, .16);
  transition: border-color .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.fnode.trig .fnode-box { border-radius: 26px 14px 14px 26px; }
.fnode-box .ic { width: 24px; height: 24px; color: #DDE4EA; }
.fnode.side .fnode-lab { top: 50%; left: calc(100% + 10px); transform: translateY(-50%); width: 120px; text-align: left; }
.fnode-lab { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 110px; text-align: center; display: grid; line-height: 1.25; }
.fnode-lab strong { font-size: .8125rem; color: #fff; }
.fnode-lab span { font-size: .6875rem; color: var(--sumi-soft); }
/* Carga: el propio contorno del nodo se va llenando de naranja, en sentido horario */
@property --trace { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.fnode-box::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 2px;
  background: conic-gradient(from 0deg, var(--mandarina) var(--trace), transparent 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; pointer-events: none;
}
.fnode.run .fnode-box::after { opacity: 1; animation: trace .65s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.fnode.run .fnode-box { box-shadow: 0 0 0 4px rgba(200, 69, 44, .12); }
@keyframes trace { to { --trace: 360deg; } }
.fnode.ok .fnode-box { border-color: var(--mandarina); background: rgba(255, 255, 255, .1); }
.fnode.ok .fnode-box::before {
  content: ""; position: absolute; right: -7px; top: -7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--mandarina) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%23FFF6EE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.flow-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--mandarina); box-shadow: 0 0 0 4px rgba(200, 69, 44, .25), 0 0 16px rgba(200, 69, 44, .7); opacity: 0; pointer-events: none; }
.flow-count { position: absolute; transform: translate(-50%, -50%); font-size: .6875rem; font-weight: 600; color: #F6C3B2; background: var(--sumi-3); padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); white-space: nowrap; opacity: 0; }
.sc-flow.narrow .flow-msg { top: 14px; bottom: auto; left: 14px; right: 14px; width: auto; z-index: 3; }
.sc-flow.narrow .flow-msg p { box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6); }
.flow-msg { position: absolute; left: 16px; bottom: 16px; width: min(300px, calc(100% - 32px)); display: grid; gap: 6px; }
.flow-msg-h { font-size: .6875rem; font-weight: 600; color: var(--sumi-soft); display: flex; align-items: center; gap: 6px; }
.flow-msg-h::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #5BC287; }
.flow-msg p { background: var(--bubble-out); color: var(--text); border-radius: 12px 12px 12px 4px; padding: 9px 12px; font-size: .8438rem; line-height: 1.4; }

/* ===== Escena: IA ===== */
.sc-ia { padding: 18px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.ia-docs { position: relative; display: grid; gap: 8px; }
.ia-label { font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.ia-doc {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: .8125rem; font-weight: 500; white-space: nowrap; overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.ia-doc span { overflow: hidden; text-overflow: ellipsis; }
.ia-doc .ic { color: var(--muted); }
.ia-doc.read .ic { color: var(--mandarina-deep); }
.ia-doc.cited { border-color: var(--mandarina); box-shadow: 0 0 0 3px rgba(200, 69, 44, .2); }
.ia-doc.ghost { position: absolute; margin: 0; pointer-events: none; z-index: 2; }
.ia-panel { background: var(--paper); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: 330px; }
.ia-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); line-height: 1.25; }
.ia-head > div { display: grid; }
.ia-head strong { font-size: .875rem; }
.ia-known { font-size: .75rem; color: var(--muted); }
.ia-seal { width: 38px; height: 38px; font-size: 1.15rem; }
.ia-chat { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px; }
.ia-chat .bub.in { background: var(--shiro); }
.ia-src { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--mandarina-deep); }

/* Escenario angosto (móvil) */
@container stage (max-width: 520px) {
  .sc-xl { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 12px; }
  .xl-c { height: 30px; }
  .xl-sheet { font-size: .8125rem; }
  .xl-notes { gap: 5px; }
  .xl-note { font-size: .6875rem; padding: 4px 8px 4px 6px; }
  .xl-bars { gap: 5px; }
  .sc-ia { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 10px; }
  .ia-docs { display: flex; gap: 6px; }
  .ia-label { display: none; }
  .ia-doc { flex: 1 1 0; min-width: 0; padding: 8px; font-size: .75rem; }
  .ia-panel { min-height: 0; }
  .fnode-box { width: 44px; height: 44px; border-radius: 12px; }
  .fnode.trig .fnode-box { border-radius: 22px 12px 12px 22px; }
  .fnode-box .ic { width: 20px; height: 20px; }
  .fnode-lab { width: 78px; }
  .fnode-lab strong { font-size: .75rem; }
  .flow-count { font-size: .625rem; }
  .sc-cal { padding: 14px; }
  .cal-grid { grid-template-columns: 36px repeat(5, minmax(0, 1fr)); gap: 3px; }
  .cal-ev { justify-content: center; padding: 0 2px; font-size: .6875rem; }
  .cal-ev .ok { display: none; }
  .dash-row { grid-template-columns: 96px minmax(0, 1fr); }
  .dash-toast { top: 64px; right: 14px; }
  .sc-dash { padding: 16px; }
  .bub { max-width: 86%; }
}

/* Proyectos: casos reales. Un bloque destacado (el bot) y dos de apoyo, de distinto tamaño y fondo */
.work { padding-block: clamp(24px, 4vw, 48px) var(--section); }
.work-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.case { border-radius: 20px; padding: clamp(24px, 3.4vw, 44px); display: grid; gap: 12px; align-content: start; }
.case h3 { font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.12; letter-spacing: -0.005em; max-width: 22ch; }
.case-meta { font-size: .9063rem; font-weight: 600; color: var(--mandarina-deep); }

.case-feature {
  grid-column: 1 / -1;
  --beni: #E0654A; --mandarina-deep: #F08A6C;
  background: var(--case-dark); color: #E9EDF1;
  box-shadow: 0 30px 60px -36px rgb(var(--shadow) / .6), 0 0 0 1px var(--ring);
}
.case-feature h3 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; max-width: 24ch; }
.case-ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(32px, 5vw, 80px); margin-top: 22px; }
.case-lab { font-size: .875rem; font-weight: 600; color: var(--sumi-soft); margin-bottom: 14px; }
/* La rutina de antes, tachada en rojo beni */
.case-before { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; justify-items: start; }
.case-before li { color: #A9A095; }
/* El tachado va en el span en línea: si el texto se parte en dos líneas, cada línea se tacha */
.case-before li span {
  background: linear-gradient(var(--beni), var(--beni)) no-repeat 0 60% / 100% 1.5px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .55s var(--ease-io), color .4s ease;
}
/* El flujo de ahora: es una secuencia real, por eso va numerado */
.case-flow { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.case-flow li {
  counter-increment: f; position: relative;
  display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; align-items: start;
  padding-bottom: 16px; color: #fff;
  transition: opacity .45s ease, transform .55s var(--ease-out);
}
.case-flow li::before {
  content: counter(f); margin-top: -3px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .875rem/1 var(--display); color: #fff;
  background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .2);
}
.case-flow li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: rgba(255, 255, 255, .14); }
.case-flow .case-you { font-weight: 700; padding-bottom: 0; }
.case-flow .case-you::before { background: var(--mandarina); border-color: var(--mandarina); color: var(--on-accent); }

/* Coreografía al entrar en pantalla: se tacha lo de antes, luego se enciende lo de ahora */
.case-feature.armed .case-before li span { background-size: 0% 1.5px; color: #E6DED1; }
.case-feature.armed .case-flow li { opacity: .3; transform: translateX(-6px); }
.case-feature.play .case-before li span { background-size: 100% 1.5px; color: #A9A095; }
.case-feature.play .case-flow li { opacity: 1; transform: none; }
.case-feature.play .case-before li:nth-child(2) span { transition-delay: .18s; }
.case-feature.play .case-before li:nth-child(3) span { transition-delay: .36s; }
.case-feature.play .case-before li:nth-child(4) span { transition-delay: .54s; }
.case-feature.play .case-flow li:nth-child(1) { transition-delay: .95s; }
.case-feature.play .case-flow li:nth-child(2) { transition-delay: 1.12s; }
.case-feature.play .case-flow li:nth-child(3) { transition-delay: 1.29s; }
.case-feature.play .case-flow li:nth-child(4) { transition-delay: 1.5s; }

.case-app { background: var(--paper); box-shadow: 0 0 0 1px var(--ring); }
.case-was { color: var(--muted); }
.case-ticks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.case-ticks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.case-ticks .ic { width: 24px; height: 24px; padding: 5px; border-radius: 50%; background: var(--mandarina-tint); color: var(--mandarina-deep); }

.case-webs { background: var(--kori); box-shadow: 0 0 0 1px var(--ring); }
.case-sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; margin-top: 6px; }
.case-site { display: grid; gap: 4px; align-content: start; padding-top: 14px; border-top: 1.5px solid var(--line-strong); }
.case-site-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 700 1.2rem/1.25 var(--display); color: var(--text); }
.case-status { font: 600 .75rem/1 var(--body); color: var(--muted); background: var(--paper); padding: 5px 9px; border-radius: 999px; }
.case-site-where { font-size: .875rem; font-weight: 600; color: var(--mandarina-deep); }
.case-site p:last-child { margin-top: 4px; color: var(--muted); font-size: .9688rem; }

/* ---------- Secciones ---------- */
/* Encabezado apilado: un solo mensaje por sección, alineado con el contenido */
.sec-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; }
.sec-head p { color: var(--muted); max-width: 56ch; }

/* Servicios: módulos desplegables */
.services { padding-block: var(--section); background: var(--paper); }
.svc-list { list-style: none; margin: 0; padding: 0; border-bottom: 1.5px solid var(--line); }
.svc { position: relative; border-top: 1.5px solid var(--line); }
/* Hilo rojo sobre el módulo abierto */
.svc::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1.5px; height: 1.5px;
  background: var(--beni); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.svc[data-open]::before { transform: scaleX(1); }
.svc h3 { margin: 0; font: inherit; letter-spacing: normal; }
.svc-toggle {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; align-items: center; gap: 6px 32px;
  padding: 24px 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
.svc-toggle:focus-visible { outline-offset: -2px; border-radius: 10px; }
.svc-name { font: 700 clamp(1.35rem, 2.3vw, 1.9rem)/1.15 var(--display); letter-spacing: -0.005em; transition: transform .45s var(--ease-out); }
.svc-for { font-size: .9375rem; font-weight: 600; color: var(--mandarina-deep); text-align: right; }
.svc-plus {
  position: relative; width: 34px; height: 34px; border-radius: 50%; justify-self: end;
  border: 1.5px solid var(--line); color: var(--text);
  transition: border-color .2s ease, background-color .3s ease, color .3s ease, transform .5s var(--ease-out);
}
.svc-plus::before, .svc-plus::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.75px; margin: -.875px 0 0 -6px;
  border-radius: 2px; background: currentColor; transition: transform .5s var(--ease-out);
}
.svc-plus::after { transform: rotate(90deg); }
.svc[data-open] .svc-plus { transform: rotate(180deg); background: var(--ink-block); border-color: var(--ink-block); color: #fff; }
.svc[data-open] .svc-plus::after { transform: rotate(0deg); }
.svc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.svc[data-open] .svc-panel { grid-template-rows: 1fr; }
.svc-inner { min-height: 0; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 40px; }
.svc-inner p { max-width: 60ch; padding-bottom: 28px; color: var(--muted); }
.svc-inner > * { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .45s var(--ease-out); }
.svc[data-open] .svc-inner > * { opacity: 1; transform: none; transition-delay: .08s; }
.svc-demo {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px;
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent;
  font-weight: 600; font-size: .9063rem; cursor: pointer; white-space: nowrap;
}
.svc-inner .svc-demo { transition: opacity .25s ease, transform .45s var(--ease-out), border-color .2s ease, background-color .2s ease, color .2s ease; }
.svc-demo svg { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform .3s var(--ease-out); }
.svc-demo:active { scale: .96; }
@media (hover: hover) and (pointer: fine) {
  .svc-toggle:hover .svc-name { transform: translateX(4px); }
  .svc-toggle:hover .svc-plus { border-color: var(--text); }
  .svc-demo:hover { background: var(--ink-block); border-color: var(--ink-block); color: #fff; }
  .svc-demo:hover svg { transform: rotate(-90deg) translateX(2px); }
}

/* Proceso: una sola línea que se llena con el scroll y enciende cada paso al pasar */
.process { padding-block: var(--section); }
.steps {
  --g: clamp(24px, 3vw, 48px);
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g);
}
.steps::before, .steps::after {
  content: ""; position: absolute; top: 29px; left: 30px; height: 2px;
  right: calc((100% - 2 * var(--g)) / 3 - 30px);
  border-radius: 2px;
}
.steps::before { background: var(--line); }
.steps::after {
  background: var(--mandarina); transform: scaleX(0); transform-origin: left;
  transition: transform 1s var(--ease-io);
}
.steps:has(.step:nth-child(2).on)::after { transform: scaleX(.5); }
.steps:has(.step:nth-child(3).on)::after { transform: scaleX(1); }
.step { display: grid; gap: 12px; align-content: start; position: relative; }
.step-n {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  font: 800 1.6rem/1 var(--display);
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--line);
  position: relative; z-index: 1;
  margin-bottom: 10px;
  transition: background-color .5s var(--ease-out), border-color .5s var(--ease-out), color .5s var(--ease-out), transform .5s var(--ease-out);
}
.step.on .step-n { background: var(--mandarina); border-color: var(--mandarina); color: var(--on-accent); }
.step h3 { font-size: 1.5rem; }
.step p { color: var(--muted); max-width: 40ch; }
.step .step-out { color: var(--text); font-weight: 600; font-size: .9688rem; }

/* Donde el navegador lo permite, la línea sigue exactamente al scroll */
@supports (animation-timeline: view()) {
  @media (min-width: 721px) and (prefers-reduced-motion: no-preference) {
    .steps { view-timeline: --steps block; }
    .steps::after, .step:nth-child(2) .step-n, .step:nth-child(3) .step-n {
      transition: none;
      animation-timing-function: linear; animation-fill-mode: both;
      animation-timeline: --steps; animation-range: entry 90% cover 58%;
    }
    .steps::after { animation-name: steps-fill; }
    .step:nth-child(2) .step-n { animation-name: step-lit-2; }
    .step:nth-child(3) .step-n { animation-name: step-lit-3; }
  }
}
@keyframes steps-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes step-lit-2 {
  0%, 47% { background: var(--bg); border-color: var(--line); color: var(--text); transform: scale(1); }
  51% { background: var(--mandarina); border-color: var(--mandarina); color: var(--on-accent); transform: scale(1.12); }
  58%, 100% { background: var(--mandarina); border-color: var(--mandarina); color: var(--on-accent); transform: scale(1); }
}
@keyframes step-lit-3 {
  0%, 94% { background: var(--bg); border-color: var(--line); color: var(--text); transform: scale(1); }
  97% { background: var(--mandarina); border-color: var(--mandarina); color: var(--on-accent); transform: scale(1.12); }
  100% { background: var(--mandarina); border-color: var(--mandarina); color: var(--on-accent); transform: scale(1); }
}

/* Por qué */
.why { padding-block: var(--section); background: var(--kori); }
.why-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.why h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 36px; }
.principles { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.principles div { display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 1.5px solid var(--line-strong); }
.principles dt { font: 700 1.15rem/1.25 var(--display); color: var(--text); }
.principles dd { margin: 0; color: var(--muted); }
.mandarina {
  position: relative; margin: 0;
  background: #F2EBDF; color: #2B2724; border-radius: 24px;
  padding: clamp(20px, 3vw, 36px) clamp(24px, 3.4vw, 44px) clamp(28px, 4vw, 44px);
  display: grid; gap: 18px; overflow: hidden;
  box-shadow: 0 30px 60px -40px rgb(var(--shadow) / .55), 0 0 0 1px var(--ring);
}
.mandarina-art {
  width: min(420px, 100%); height: auto; justify-self: center;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 82%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 82%, transparent 100%);
}
.maru-ja {
  position: absolute; top: 20px; right: 18px;
  writing-mode: vertical-rl;
  font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1 var(--display);
  letter-spacing: .14em; color: var(--beni);
}
/* Sello (hanko) en rojo: firma pequeña, como en una pintura */
.hanko {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 7px;
  border: 2px solid var(--beni); color: var(--beni);
  font: 700 1.05rem/1 var(--display);
  transform: rotate(-6deg);
}
.mandarina .hanko { position: absolute; right: 22px; bottom: 22px; }
.mandarina-cat { width: min(280px, 72%); height: auto; justify-self: center; margin-top: 12px; transform-origin: 55% 100%; animation: breathe 4.2s ease-in-out infinite paused; }
.mandarina.visible .mandarina-cat { animation-play-state: running; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.03); } }
.mandarina figcaption { font-size: .9688rem; color: #6B6055; line-height: 1.7; }
.mandarina figcaption strong { display: block; font: 700 1.3rem/1.3 var(--display); color: #2B2724; margin-bottom: 6px; }

/* FAQ */
.faq { padding-block: var(--section); background: var(--paper); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; }
.faq h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.01em; }
.faq-list { display: grid; }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq details:first-child { border-top: 1.5px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-weight: 600; font-size: 1.125rem;
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); border-color: var(--beni); }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: var(--mandarina-deep); } }
.faq-a p { color: var(--muted); padding-bottom: 24px; max-width: 62ch; }
/* Apertura suave donde el navegador lo permite */
@supports (interpolate-size: allow-keywords) {
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: clip; opacity: 0; transition: height .35s var(--ease-out), opacity .25s ease, content-visibility .35s allow-discrete; }
  .faq details[open]::details-content { height: auto; opacity: 1; }
}

/* Cierre: el mensaje ya escrito */
.close { --m-ink: #F4F5F3; --m-halo: var(--band); background: var(--band); color: #EEF1F4; padding-block: var(--section); overflow: hidden; }
.close-in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px clamp(40px, 6vw, 96px); align-items: center; }
.close-copy { display: grid; gap: 20px; justify-items: start; }
.close h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.02; color: #fff; font-weight: 800; letter-spacing: -0.01em; }
.close-copy p { color: var(--sumi-soft); max-width: 44ch; font-size: 1.125rem; margin-bottom: 8px; }
.composer {
  background: var(--chat-bg); color: var(--text); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
  transform: rotate(1.5deg);
}
.composer-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--paper); --m-ink: var(--text); --m-halo: var(--paper); }
.composer-seal, .ia-seal {
  display: grid; place-items: center; flex: none; border-radius: 10px; transform: rotate(-4deg);
  background: var(--mandarina); color: var(--on-accent); font: 700 1.3rem/1 var(--display);
}
.composer-seal { width: 42px; height: 42px; }
.composer-head div { display: grid; line-height: 1.2; }
.composer-head strong { font-size: .9688rem; }
.composer-head span { font-size: .75rem; color: var(--muted); }
.composer-body { padding: 28px 16px 18px; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; }
.composer-bubble { align-self: flex-end; max-width: 88%; background: var(--bubble-out); border-radius: 16px 16px 4px 16px; padding: 12px 14px; font-size: 1rem; line-height: 1.45; }
.caret { display: none; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -3px; background: var(--mandarina-deep); animation: blink 1s steps(1) infinite; }
.composer.typing .caret { display: inline-block; }
@keyframes blink { 50% { opacity: 0; } }
.composer-bar { display: flex; align-items: center; gap: 10px; padding: 0 12px 14px; }
.composer-bar > span:first-child { flex: 1; background: var(--paper); border-radius: 999px; padding: 11px 16px; font-size: .9375rem; color: var(--muted); }
.composer-send { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--mandarina); color: var(--on-accent); }
.composer-send svg { width: 20px; height: 20px; }

.foot { background: var(--band); color: var(--sumi-soft); border-top: 1px solid rgba(255, 255, 255, .08); --m-ink: #F4F5F3; --m-halo: var(--band); }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-block: 32px; font-size: .9063rem; }
.foot .brand-seal { width: 30px; height: 30px; font-size: 1.05rem; }
.foot .brand-word { color: #F3EDE2; font-size: 1.15rem; }
.foot-legal { margin-left: auto; display: flex; gap: 18px; }
.foot-legal a { color: inherit; text-underline-offset: 3px; }
.foot-legal a:hover { color: #F3EDE2; }
.foot-small { display: inline-flex; align-items: center; gap: 12px; }
.foot .hanko { --beni: #E0654A; width: 26px; height: 26px; font-size: .9rem; border-radius: 6px; }

/* Rendimiento: secciones lejanas no se pintan hasta acercarse */
.services, .why, .faq, .close { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ask" "stage" "out"; grid-template-rows: auto; }
  .hero h1 { max-width: 16ch; }
  .hero-sun { width: clamp(180px, 46vw, 300px); transform: translate(30%, -18%); }
  .pains { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
  .pain span { padding: 11px 16px 11px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .9688rem; background: var(--paper); }
  .pain:last-child span { border-bottom: 1.5px solid var(--line); }
  .pain:has(input:checked) + .pain span { border-top-color: var(--line); }
  .pain + .pain input:checked + span, .pain input:checked + span { border-radius: 999px; border-color: var(--ink-block); }
  .pain i { display: none; }
  .why-grid, .faq-grid, .close-in, .work-grid { grid-template-columns: minmax(0, 1fr); }
  .sec-head { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-tools { margin-left: auto; gap: 8px; }
  .nav-in { gap: 12px; }
  .nav-in { height: 64px; }
  .brand-mark { width: 40px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .step { padding-left: 80px; }
  .step-n { position: absolute; left: 0; top: 0; margin: 0; }
  /* En móvil: línea vertical por tramo, se llena al llegar a cada paso */
  .steps::before, .steps::after { display: none; }
  .step:not(:last-child)::after, .step:not(:last-child)::before {
    content: ""; position: absolute; top: 64px; bottom: -32px; left: 29px; width: 2px; border-radius: 2px;
  }
  .step:not(:last-child)::after { background: var(--line); }
  .step:not(:last-child)::before { background: var(--mandarina); z-index: 1; transform: scaleY(0); transform-origin: top; transition: transform .9s var(--ease-io) .1s; }
  .step.on:has(+ .step.on)::before { transform: scaleY(1); }
  .svc-toggle { grid-template-columns: minmax(0, 1fr) 34px; gap: 6px 16px; padding: 20px 0; }
  .svc-for { grid-column: 1; grid-row: 2; text-align: left; font-size: .875rem; }
  .svc-plus { grid-column: 2; grid-row: 1 / span 2; }
  .svc-inner p { padding-bottom: 14px; }
  .svc-demo { margin-bottom: 22px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .case-ba, .case-sites { grid-template-columns: minmax(0, 1fr); }
  .hero-out { flex-direction: column; align-items: stretch; }
  .out-cta .btn { width: 100%; }
  .composer { transform: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 24px; }
  .hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.15rem); }
  .hero-out { padding-inline: 0; }
  .out-title { font-size: 1.3rem; }
  .lede { margin-top: 10px; font-size: 1rem; }
  /* Opciones en grilla 3 x 2: todas visibles, ícono + nombre corto */
  .pains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
  .pain span {
    flex-direction: column; justify-content: center; gap: 6px;
    min-height: 70px; padding: 10px 4px; border-radius: 14px;
    text-align: center; font-size: .8438rem; font-weight: 600; line-height: 1.15;
  }
  .pain + .pain input:checked + span, .pain input:checked + span { border-radius: 14px; }
  .pain span::before { display: none; }
  .pain span::after { clip-path: circle(0% at 50% 36%); }
  .pain input:checked + span::after { clip-path: circle(150% at 50% 36%); }
  .pain-ic { display: block; width: 22px; height: 22px; color: var(--mandarina-deep); transition: color .3s ease, transform .4s var(--ease-out); }
  .pain input:checked + span .pain-ic { color: var(--mandarina); transform: translateY(-1px) scale(1.08); }
  .pain .ps { display: block; }
  .pain .pl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pain input:focus-visible + span { border-radius: 14px; }
  .hero-grid { row-gap: 18px; }
  .stage-view { height: 390px; }
  .stage-bar { padding-left: 14px; }
  .btn-sm span { display: none; }
  .btn-sm { padding: 10px; }
  .foot-legal { margin-left: 0; }
  .foot-small { margin-left: 0; }
  .close h2 { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mandarina-cat, .bub-typing i, .caret, .fnode.run .fnode-box::after, .dash-dot.ping::after { animation: none; }
  .out-copy { transition: opacity .15s linear; }
  .out-copy.swap { transform: none; filter: none; }
  .orb, .hero-sun .star,
  .pain span::after, .step-n, .step::before, .steps::after, .svc::before, .svc-panel, .svc-inner > *, .case-before li span, .case-flow li { transition-duration: .01s; transition-delay: 0s !important; }
}

/* ---------- Transiciones de idioma y tema ---------- */
html.vt-lang::view-transition-old(root) { animation: vt-out .16s ease-in both; }
html.vt-lang::view-transition-new(root) { animation: vt-in .34s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } }
html.vt-theme::view-transition-image-pair(root) { isolation: auto; }
html.vt-theme::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
html.vt-theme::view-transition-new(root) { animation: vt-reveal .65s var(--ease-io) both; mix-blend-mode: normal; }
@keyframes vt-reveal {
  from { clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 0)); }
  to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 90%) var(--vt-y, 0)); }
}
