/* Sitio de Flujo. Colores, tipografía y voz de docs/brand/guia-de-marca.html. */
:root {
  --bg: #F5F6FA;
  --surface: #FFFFFF;
  --surface-alt: #EEF0F5;
  --line: #E3E6EE;
  --fg: #12141A;
  --muted: #5F677C;
  --accent: #5B3BF0;
  --accent-fill: #7C5CFF;
  --accent-soft: rgba(124, 92, 255, 0.12);
  --in: #0B7F57;
  --out: #CC3350;
  --move: #687086;
  --warn: #9A6700;
  --phone-bg: #0E1015;
  --font: "Plus Jakarta Sans", -apple-system, system-ui, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1015; --surface: #161921; --surface-alt: #1D212B; --line: #262B37;
    --fg: #F2F4F8; --muted: #8A92A5;
    --accent: #9A85FF; --accent-soft: rgba(124, 92, 255, 0.16);
    --in: #2BC48A; --out: #FF6B81; --move: #8B95A7; --warn: #F5B544;
    --phone-bg: #000000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1015; --surface: #161921; --surface-alt: #1D212B; --line: #262B37;
  --fg: #F2F4F8; --muted: #8A92A5;
  --accent: #9A85FF; --accent-soft: rgba(124, 92, 255, 0.16);
  --in: #2BC48A; --out: #FF6B81; --move: #8B95A7; --warn: #F5B544;
  --phone-bg: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Encabezado */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; }
.brand img { width: 22px; height: 22px; }
.brand span { font-weight: 800; font-size: 22px; letter-spacing: -0.055em; line-height: 1; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--fg); background: var(--accent-soft); }

/* Portada */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(56px, 9vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; margin-top: 14px; }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34ch; margin-top: 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 14px;
  background: var(--fg); color: var(--bg); font-weight: 600; font-size: 16px; text-decoration: none;
}
.store svg { width: 20px; height: 20px; }
.store[aria-disabled="true"] { cursor: default; }
.cta small { color: var(--muted); font-size: 14px; }

/* Teléfono de muestra: siempre en modo oscuro, como el ícono */
.phone {
  justify-self: center; width: min(300px, 100%); aspect-ratio: 9 / 19.2;
  background: var(--phone-bg); border-radius: 46px; padding: 12px;
  box-shadow: 0 0 0 1px #262B37, 0 40px 80px -30px rgba(91, 59, 240, 0.6);
}
.screen {
  height: 100%; border-radius: 36px; background: #0E1015; color: #F2F4F8;
  padding: 44px 16px 16px; display: grid; gap: 12px; align-content: start; overflow: hidden;
  font-size: 13px; line-height: 1.35;
}
.screen .month { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.screen .sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: #161921; border-radius: 16px; padding: 12px 10px; }
.screen .sum div { display: grid; gap: 2px; min-width: 0; }
.screen .sum span { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #8A92A5; }
.screen .sum strong { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen .card { background: linear-gradient(135deg, #9479FF, #5B3BF0); border-radius: 16px; padding: 12px; display: grid; gap: 2px; }
.screen .card span { font-size: 11px; opacity: 0.85; }
.screen .card strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.screen .day { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #8A92A5; margin-top: 4px; }
.screen ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.screen li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid #1D212B; }
.screen li:last-child { border-bottom: 0; }
.screen .emoji { width: 30px; height: 30px; border-radius: 9px; background: #1D212B; display: grid; place-items: center; font-size: 15px; }
.screen .what { display: grid; min-width: 0; }
.screen .what b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen .what small { color: #8A92A5; font-size: 11px; }
.in { color: #2BC48A; } .out { color: #FF6B81; } .move { color: #8B95A7; }

/* Secciones */
section.band { padding: clamp(56px, 8vw, 88px) 0; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 10px; max-width: 60ch; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.sec-head p { color: var(--muted); font-size: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.panel h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.panel p { color: var(--muted); }
.pillar-k { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.features li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.features .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 18px; }
.features b { display: block; font-weight: 600; }
.features span { color: var(--muted); font-size: 15px; }

.private { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 5vw, 48px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; }
.private img { width: 88px; height: 88px; border-radius: 22.37%; box-shadow: 0 18px 40px -16px rgba(91, 59, 240, 0.55); }
.private h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.private p { color: var(--muted); margin-top: 10px; max-width: 62ch; }
.checks { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.checks li { font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); }

/* Páginas de texto (privacidad, soporte) */
.doc { padding: clamp(40px, 7vw, 72px) 0 clamp(56px, 8vw, 88px); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5.5vw, 52px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.doc .meta { color: var(--muted); margin-top: 12px; }
.doc .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; margin-top: 32px; }
.doc .summary p { font-size: 17px; }
.doc h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin-top: 44px; }
.doc h2 + p, .doc h2 + ul { margin-top: 12px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0 0; }
.doc li + li { margin-top: 6px; }
.doc p, .doc li { color: var(--fg); }

.contact { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-top: 32px; display: grid; gap: 6px; }
.contact a.mail { font-size: clamp(18px, 3vw, 22px); font-weight: 700; word-break: break-word; }
.contact p { color: var(--muted); }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 600; font-size: 17px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 500; color: var(--muted); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 0 0 20px; color: var(--muted); }
details > div p + p, details > div ol { margin-top: 10px; }
details ol { padding-left: 22px; margin: 0; }
details li + li { margin-top: 4px; }
.faq { margin-top: 40px; }
.faq h2 { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { summary::after { transition: none; } }

/* Pie */
footer { border-top: 1px solid var(--line); padding: 32px 0 calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--fg); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .grid-3, .grid-2, .features { grid-template-columns: minmax(0, 1fr); }
  .private { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .top nav a { padding: 8px; font-size: 14px; }
}
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--surface-alt); padding: 1px 6px; border-radius: 6px; }
