/* Radícame. Lenguaje visual inspirado en aren.com (referencia de Jean): gris cálido, tinta petróleo,
   un solo acento azul eléctrico, sans liviana grande, etiquetas mono contadas. */

@font-face { font-family: "Hanken"; src: url("fonts/hanken-grotesk-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("fonts/hanken-grotesk-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("fonts/hanken-grotesk-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #E8E4E1;
  --bg-2: #F1EEEC;
  --surface: #F7F5F3;
  --ink: #112A33;
  --ink-2: #4A5D64;
  --line: rgba(17, 42, 51, .12);
  --accent: #1F5BFF;
  --accent-ink: #FFFFFF;
  --accent-soft: #D9E2FF;
  --ok: #1C7A4F;
  --err: #B42318;

  --r-lg: 28px;   /* tarjetas grandes */
  --r-md: 20px;   /* tarjetas internas: 28 - 8 de padding visual */
  --r-pill: 999px;

  --pad-x: clamp(16px, 5vw, 64px);
  --max: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1C22;
    --bg-2: #13252C;
    --surface: #182D35;
    --ink: #E9EEF0;
    --ink-2: #9FB2B8;
    --line: rgba(233, 238, 240, .12);
    --accent: #5B85FF;
    --accent-ink: #0B1520;
    --accent-soft: #1D2F5C;
    --ok: #4CC48A;
    --err: #FF8A80;
  }
}
:root[data-theme="dark"] {
    --bg: #0E1C22;
    --bg-2: #13252C;
    --surface: #182D35;
    --ink: #E9EEF0;
    --ink-2: #9FB2B8;
    --line: rgba(233, 238, 240, .12);
    --accent: #5B85FF;
    --accent-ink: #0B1520;
    --accent-soft: #1D2F5C;
    --ok: #4CC48A;
    --err: #FF8A80;
  }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 300; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.6vw, 60px); line-height: 1.06; }
h2 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.08; }
h3 { font-size: 22px; line-height: 1.25; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

.label {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

section { padding: clamp(64px, 8vw, 112px) var(--pad-x); max-width: var(--max); margin: 0 auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px;
  border-radius: var(--r-pill);
  font: 500 16px/1 "Hanken", sans-serif;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 88%, var(--ink)); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-2); }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  height: 72px; padding: 0 var(--pad-x);
  max-width: calc(var(--max) + 2 * var(--pad-x)); margin: 0 auto;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
.mark { width: 26px; height: 26px; }
.mark rect { fill: none; stroke: currentColor; stroke-width: 2; }
.mark rect + rect { fill: var(--bg); }
.links { display: flex; gap: 4px; margin-left: 12px; }
.links a {
  font-family: "DM Mono", monospace; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.links a:hover, .links a.is-active { border-color: var(--line); color: var(--accent); }
.nav-cta { margin-left: auto; height: 40px; padding: 0 20px; font-size: 15px; }
.lang-switch { display: flex; gap: 2px; font: 400 13px/1 "DM Mono", monospace; letter-spacing: .04em; }
.lang-switch a { text-decoration: none; padding: 8px 6px; color: var(--ink-2); border-radius: 6px; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  min-height: calc(100dvh - 72px); padding-top: clamp(24px, 4vw, 64px); padding-bottom: clamp(48px, 6vw, 96px);
}
.hero-copy { display: grid; gap: 28px; max-width: 640px; }
.lead { font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-2); max-width: 44ch; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.collage { position: relative; aspect-ratio: 1 / 1.02; width: 100%; max-width: 560px; justify-self: end; }
.tile { position: absolute; border-radius: var(--r-lg); }
.tile-texture {
  top: 0; right: 0; width: 58%; height: 52%;
  background:
    radial-gradient(120% 80% at 20% 30%, color-mix(in oklab, var(--accent) 70%, white) 0 18%, transparent 40%),
    radial-gradient(90% 70% at 80% 70%, var(--accent) 0 22%, transparent 48%),
    repeating-linear-gradient(115deg, color-mix(in oklab, var(--accent) 85%, white) 0 6px, var(--accent) 6px 13px);
  opacity: .9;
}
.tile-planilla {
  left: 0; top: 18%; width: 72%;
  background: var(--surface); padding: 24px;
  box-shadow: 0 30px 60px -30px color-mix(in oklab, var(--ink) 40%, transparent);
  display: grid; gap: 18px;
}
.tile-planilla header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.status {
  font-size: 13px; font-weight: 500; color: var(--ok);
  background: color-mix(in oklab, var(--ok) 12%, transparent);
  padding: 4px 10px; border-radius: var(--r-pill);
}
.tile-planilla dl { margin: 0; display: grid; }
.tile-planilla dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; }
.tile-planilla dl > div + div { border-top: 1px solid var(--line); }
.tile-planilla dt { color: var(--ink-2); font-size: 15px; }
.tile-planilla dd { margin: 0; font-size: 16px; }
.tile-planilla .total dt { color: var(--ink); }
.tile-planilla .total dd { font-size: 24px; font-weight: 300; }
.tile-planilla .foot { font-size: 14px; color: var(--ink-2); }

.tile-calendar {
  right: 2%; bottom: 0; width: 46%;
  background: var(--ink); color: var(--bg); padding: 22px 24px;
  display: grid; gap: 6px;
}
.tile-calendar .label { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.tile-calendar .big { font-size: clamp(32px, 3.4vw, 44px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.tile-calendar .small { font-size: 14px; color: color-mix(in oklab, var(--bg) 75%, transparent); }

/* ---------- Barrido de color (estilo Aren, sin degradado) ---------- */
.sweep { color: var(--accent); }
.js .sweep .ch { color: var(--ink); transition: color .5s var(--ease); transition-delay: calc(var(--i) * 28ms + 250ms); }
.js .is-in .sweep .ch { color: var(--accent); }

/* ---------- Por qué ---------- */
.why { display: grid; gap: 28px; }
.why h2 { max-width: 16ch; }
.body { color: var(--ink-2); max-width: 56ch; font-size: 18px; }
.facts { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: clamp(24px, 4vw, 56px); padding-top: 32px; border-top: 1px solid var(--line); }
.fact { display: grid; gap: 10px; align-content: start; }
.fact-n { font-size: clamp(44px, 5vw, 72px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.fact:first-child .fact-n { color: var(--accent); }
.fact-t { color: var(--ink-2); max-width: 26ch; }

/* ---------- Cómo funciona ---------- */
.how { display: grid; grid-template-columns: 1fr 1.25fr; column-gap: clamp(32px, 6vw, 96px); row-gap: 16px; align-items: start; }
.how .label { grid-column: 1; }
.how h2 { grid-column: 1; position: sticky; top: 112px; }
.steps { grid-column: 2; grid-row: 1 / span 2; list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.step {
  counter-increment: s; position: relative;
  background: var(--surface); border-radius: var(--r-lg); padding: 28px 28px 28px 92px;
  display: grid; gap: 8px;
}
.step::before {
  content: counter(s); position: absolute; left: 28px; top: 26px;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  font: 400 15px/1 "DM Mono", monospace; color: var(--accent); background: var(--accent-soft);
}
.step p { color: var(--ink-2); }

/* ---------- Qué llenamos (bento) ---------- */
.parts { display: grid; gap: 40px; }
.parts h2 { max-width: 18ch; }
.bento { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: minmax(220px, auto); gap: 12px; }
.cell { border-radius: var(--r-lg); padding: 28px; display: grid; gap: 10px; align-content: end; }
.cell p { color: var(--ink-2); max-width: 40ch; }
.cell-wide { grid-column: 1 / span 3; grid-row: span 2; background: var(--surface); align-content: space-between; }
.cell-wide h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 300; letter-spacing: -0.02em; }
.cell-accent { grid-column: 4 / span 2; background: var(--accent); color: var(--accent-ink); }
.cell-accent .label, .cell-accent p { color: color-mix(in oklab, var(--accent-ink) 82%, transparent); }
.cell-tint { grid-column: 4 / span 2; background: var(--bg-2); border: 1px solid var(--line); }

/* ---------- Precio ---------- */
.price { display: grid; gap: 20px; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.tier { padding: 28px 24px 8px 0; display: grid; gap: 8px; }
.tier + .tier { padding-left: 24px; border-left: 1px solid var(--line); }
.tier-q { color: var(--ink-2); }
.tier-p { font-size: clamp(44px, 5vw, 64px); font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.tier-p::after { content: "/mo"; font-size: 16px; letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
:lang(es) .tier-p::after { content: "/mes"; }
.behind { margin-top: 24px; font-size: 18px; }
.behind strong { font-weight: 500; color: var(--accent); }

/* ---------- Preguntas ---------- */
.faq { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 80px); }
.qs { display: grid; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 19px; line-height: 1.35;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform .3s var(--ease);
}
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { color: var(--ink-2); padding: 0 40px 24px 0; max-width: 60ch; }

/* ---------- Empieza ---------- */
.start {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start;
  background: var(--surface); border-radius: var(--r-lg);
  margin: 0 var(--pad-x) clamp(48px, 8vw, 96px); padding: clamp(32px, 5vw, 64px);
}
@media (min-width: 1368px) { .start { margin-left: auto; margin-right: auto; } }
.start-copy { display: grid; gap: 16px; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 15px; font-weight: 500; }
.field input {
  height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1px solid color-mix(in oklab, var(--ink) 28%, transparent);
  background: var(--bg-2); color: var(--ink);
  font: 400 17px/1 "Hanken", sans-serif;
}
.field input[aria-invalid="true"] { border-color: var(--err); }
.err { color: var(--err); font-size: 14px; }
.form .btn { justify-self: start; min-width: 160px; }
.form .btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.form-msg { font-size: 15px; min-height: 1.4em; }
.form-msg.ok { color: var(--ok); }
.form-msg.bad { color: var(--err); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--pad-x) 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px;
}
.footer .brand { color: var(--ink); font-size: 18px; }
.footer .mark { width: 22px; height: 22px; }

/* ---------- Aparición al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .tile { opacity: 0; transform: translateY(28px) scale(.98); animation: rise 1s var(--ease) forwards; }
  .js .tile-texture { animation-delay: .05s; }
  .js .tile-planilla { animation-delay: .2s; }
  .js .tile-calendar { animation-delay: .35s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .js .tile-texture { animation-name: rise-tex; }
  @keyframes rise-tex { to { opacity: .9; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .js .sweep .ch { transition: none; color: var(--accent); }
}

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .links { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 48px; }
  .collage { justify-self: stretch; max-width: 520px; }
  .facts { grid-template-columns: 1fr; gap: 32px; }
  .how { grid-template-columns: 1fr; }
  .how h2 { position: static; }
  .steps { grid-column: 1; grid-row: auto; margin-top: 16px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .cell-wide, .cell-accent, .cell-tint { grid-column: 1; grid-row: auto; min-height: 200px; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier:nth-child(3) { padding-left: 0; border-left: 0; }
  .tier:nth-child(n+3) { border-top: 1px solid var(--line); }
  .faq { grid-template-columns: 1fr; }
  .start { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav { height: 64px; gap: 8px; }
  .nav-cta { padding: 0 14px; font-size: 14px; }
  .brand { font-size: 20px; }
  .hero-copy { gap: 22px; }
  .ctas .btn { flex: 1 1 auto; }
  .collage { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile { position: relative; inset: auto; width: auto; }
  .tile-planilla { grid-column: 1 / -1; order: -1; padding: 20px; }
  .tile-planilla dt { font-size: 14px; }
  .tile-texture { grid-column: 1; height: auto; min-height: 140px; }
  .tile-calendar { grid-column: 2; padding: 18px; }
  .step { padding: 76px 22px 24px; }
  .step::before { left: 22px; top: 22px; }
  .tier { padding-right: 12px; }
  .tier + .tier { padding-left: 12px; }
  .tier:nth-child(3) { padding-left: 0; }
  .form .btn { justify-self: stretch; }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 14px; color: var(--ink-2); }
