/* juane.co · Hoja de estilos única del sitio de ventas.
   Tokens heredados de la app (app.juane.co/app/globals.css) para que el sitio
   se sienta hermano del producto. Mobile-first. */

/* ---------- tokens ---------- */
:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #ece9e3;
  --ink: #151515;
  --ink-2: #55534f;
  --ink-3: #6e6b66;          /* más oscuro que en la app para cumplir AA en textos pequeños */
  --line: #e2ded7;
  --line-strong: #cfcac1;      /* líneas decorativas */
  --field-border: #8a857d;     /* borde de controles: ≥3:1 sobre --surface y --bg (WCAG 1.4.11) */
  --accent: #28402f;         /* verde bosque */
  --accent-2: #dfe6dd;
  --accent-ink: #f4f2ee;
  --warm: #b8763e;           /* terracota: lo que viene de Juan o lo que Juan debe completar */
  --warm-2: #f3e6d9;
  --warm-ink: #8a5427;
  --danger: #9b3b2e;
  --danger-2: #f6e4e0;
  --protein: #9c5b3f;
  --carb: #c8a15a;
  --veg: #5f7d4f;
  --fat: #7b8a5a;

  --deep: #28402f;
  --deep-2: #304b37;
  --deep-line: rgba(244, 242, 238, .16);
  --deep-ink: #f4f2ee;
  --deep-ink-2: #c3cec1;
  --bezel: #151515;
  --focus: #28402f;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 6px 24px rgba(20, 20, 20, .04);
  --shadow-lift: 0 2px 6px rgba(20, 20, 20, .05), 0 18px 48px -18px rgba(20, 40, 28, .28);
  --shadow-phone: 0 2px 4px rgba(20, 20, 20, .06), 0 40px 80px -30px rgba(20, 40, 28, .45);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --gutter: 16px;
  --maxw: 1120px;
  --header-h: 64px;
  --section-y: clamp(72px, 9vw, 128px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111211;
    --surface: #1a1b1a;
    --surface-2: #232523;
    --ink: #f1efea;
    --ink-2: #b9b6af;
    --ink-3: #8f8c86;
    --line: #2c2e2c;
    --line-strong: #3b3e3b;
    --field-border: #6f726f;
    --accent: #a9c4a8;
    --accent-2: #243128;
    --accent-ink: #111211;
    --warm: #d9a172;
    --warm-2: #33271d;
    --warm-ink: #e6b88e;
    --danger: #ea9484;
    --danger-2: #3a221e;

    --deep: #1a2a1e;
    --deep-2: #213326;
    --deep-line: rgba(241, 239, 234, .12);
    --deep-ink: #f1efea;
    --deep-ink-2: #b7c4b5;
    --bezel: #000000;
    --focus: #a9c4a8;

    --shadow: none;
    --shadow-lift: none;
    --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

@media (min-width: 720px) { :root { --gutter: 24px; --header-h: 72px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent-2); color: var(--ink); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* Marcadores para que Juan complete datos reales. Visibles a propósito. */
.placeholder {
  display: inline;
  background: var(--warm-2);
  color: var(--warm-ink);
  border: 1px dashed var(--warm);
  border-radius: 6px;
  padding: .05em .4em;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  font-size: .9em;
  letter-spacing: 0;
  line-height: 1.7;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.placeholder-block { display: block; padding: 12px 14px; line-height: 1.5; }

/* ---------- type ---------- */
.eyebrow { font-size: .9375rem; line-height: 1.4; font-weight: 500; color: var(--accent); margin-bottom: 16px; }
.display {
  font-family: var(--serif);
  font-size: clamp(3.25rem, 2.15rem + 5.4vw, 6.75rem);
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.55rem + 2.8vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.125rem, 1.06rem + .3vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
  margin-top: 20px;
  text-wrap: pretty;
}
.text-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.25; text-align: center;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-light { background: var(--deep-ink); color: var(--deep); }
.btn-light:hover { background: color-mix(in srgb, var(--deep-ink) 88%, var(--deep)); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .9375rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.is-busy { opacity: .85; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.spinner {
  display: none; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
.is-busy .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.brand { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--ink); text-decoration: none; padding: 10px 0; white-space: nowrap; }
.nav-desktop { display: none; }
.nav-mobile { display: flex; align-items: center; gap: 8px; }
.nav-link { color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 12px 0; }
.nav-link:hover { color: var(--ink); }
.menu-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
}
.menu-btn[hidden] { display: none; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }
.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 4px var(--gutter) 20px;
  box-shadow: 0 24px 40px -24px rgba(20, 20, 20, .25);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.625rem; line-height: 1.1; text-decoration: none; color: var(--ink);
}
.mobile-menu li:last-child a { border-bottom: 0; font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--ink-2); }
@media (min-width: 900px) {
  .nav-desktop { display: flex; align-items: center; gap: 28px; }
  .nav-mobile, .mobile-menu { display: none !important; }
}
.header-back { font-size: .9375rem; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.header-back:hover { color: var(--ink); }
.header-back svg { width: 18px; height: 18px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(28px, 6vw, 72px) 0 clamp(64px, 8vw, 112px); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-copy .lede { margin-top: 24px; }
.hero-micro { margin-top: 20px; font-size: .9375rem; color: var(--ink-3); }
.hero-micro b { font-weight: 600; color: var(--ink-2); }
.hero-visual { position: relative; margin: 0; display: grid; justify-items: center; }
.hero-visual::before {
  /* el "sol" de Hoy detrás del teléfono */
  content: ""; position: absolute; z-index: 0;
  width: min(100%, 460px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent-2);
  top: 6%; left: 50%; transform: translateX(-50%);
}
.hero-caption { position: relative; z-index: 1; margin-top: 18px; font-size: .875rem; color: var(--ink-3); text-align: center; max-width: 30ch; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 32px; }
  .hero-visual::before { width: 520px; top: 2%; }
}

/* ---------- phone mockup (pantalla "Hoy" de la app) ---------- */
.phone {
  position: relative; z-index: 1;
  width: 292px; padding: 9px;
  border-radius: 50px; background: var(--bezel);
  box-shadow: var(--shadow-phone);
}
@media (prefers-color-scheme: dark) { .phone { box-shadow: var(--shadow-phone), 0 0 0 1px #2e302e; } }
.phone::before {
  content: ""; position: absolute; z-index: 3; top: 20px; left: 50%; transform: translateX(-50%);
  width: 82px; height: 24px; border-radius: 20px; background: #000;
}
.phone-screen {
  position: relative; height: 540px; overflow: hidden;
  border-radius: 41px; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 12px; line-height: 1.45; text-align: left;
}
@media (min-width: 960px) {
  .phone { width: 324px; padding: 10px; border-radius: 54px; }
  .phone-screen { height: 640px; border-radius: 44px; font-size: 13px; }
}
.m-scroll { padding: 4.4em 1.35em 6em; }
.m-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.6em; }
.m-brand { font-family: var(--serif); font-size: 1.3em; }
.m-avatar { width: 2.4em; height: 2.4em; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .9em; font-weight: 600; color: var(--ink-2); }
.m-eyebrow { font-size: .72em; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.m-h1 { font-family: var(--serif); font-size: 2.6em; line-height: 1.08; letter-spacing: -.01em; margin-top: .15em; }
.m-pills { display: flex; flex-wrap: wrap; gap: .5em; margin-top: 1em; }
.m-pill { display: inline-flex; padding: .38em .85em; border-radius: 999px; font-size: .78em; font-weight: 600; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); }
.m-pill-dark { background: var(--ink); color: var(--bg); }
.m-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .9em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 1.3em;
  padding: 1.05em 1.15em; box-shadow: var(--shadow);
}
.m-card + .m-card { margin-top: .75em; }
.m-warm { display: block; background: var(--warm-2); border-color: transparent; margin-top: 1.6em; box-shadow: none; }
.m-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.m-kicker { font-size: .74em; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin-bottom: .45em; }
.m-warm .m-kicker { color: var(--warm); }
.m-msg { font-size: 1.1em; line-height: 1.45; }
.m-title { font-size: 1.2em; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.m-sub { font-size: .88em; color: var(--ink-3); margin-top: .5em; }
.m-accent .m-kicker, .m-accent .m-sub { color: color-mix(in srgb, var(--accent-ink) 72%, transparent); }
.m-chev { width: 2.2em; height: 2.2em; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.m-chev svg { width: 1.2em; height: 1.2em; }
.m-accent .m-chev { border-color: transparent; background: rgba(255, 255, 255, .14); color: inherit; }
.m-section { margin-top: 1.7em; }
.m-section > .m-eyebrow { margin-bottom: .8em; }
.m-bar { height: 5px; width: 9em; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: .7em; }
.m-bar i { display: block; height: 100%; width: 50%; background: var(--accent); border-radius: 99px; }
.m-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: .7em .4em 1.6em;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.m-nav span { display: flex; flex-direction: column; align-items: center; gap: .2em; font-size: .7em; color: var(--ink-3); letter-spacing: .02em; }
.m-nav svg { width: 1.9em; height: 1.9em; }
.m-nav .on { color: var(--ink); }

/* Único momento de movimiento: el día se arma en el teléfono al cargar. */
@media (prefers-reduced-motion: no-preference) {
  .phone { animation: phone-in .9s cubic-bezier(.2, .7, .2, 1) .1s both; }
  .m-anim { animation: card-in .5s ease both; }
  .m-d1 { animation-delay: .55s; } .m-d2 { animation-delay: .67s; } .m-d3 { animation-delay: .79s; }
  .m-d4 { animation-delay: .91s; } .m-d5 { animation-delay: 1.03s; } .m-d6 { animation-delay: 1.15s; }
}
@keyframes phone-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- secciones ---------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.rule-top { border-top: 1px solid var(--line); }

/* Problema */
.problem-grid { display: grid; gap: 40px; }
.problem-list { list-style: none; border-bottom: 1px solid var(--line); }
.problem-list li { padding: 24px 0; border-top: 1px solid var(--line); }
.problem-list h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.problem-list p { margin-top: 8px; color: var(--ink-2); max-width: 46ch; }
.problem-close { margin-top: 32px; font-family: var(--serif); font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem); line-height: 1.2; color: var(--accent); max-width: 30ch; text-wrap: balance; }
@media (min-width: 900px) {
  .problem-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .problem-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* Método */
.blocks { list-style: none; display: grid; gap: 44px; }
.weeks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 20px; }
.weeks i { display: block; height: 4px; border-radius: 4px; background: var(--accent); }
.block-1 .weeks i { background: color-mix(in srgb, var(--accent) 38%, var(--bg)); }
.block-2 .weeks i { background: color-mix(in srgb, var(--accent) 68%, var(--bg)); }
.block-after .weeks i { background: none; border-top: 2px dashed var(--line-strong); height: 0; margin-top: 1px; }
.block-n { font-size: .9375rem; color: var(--ink-3); }
.block-name { font-family: var(--serif); font-size: clamp(2.5rem, 2.1rem + 1.4vw, 3rem); line-height: 1; margin-top: 8px; letter-spacing: -.01em; }
.block-title { font-weight: 600; margin-top: 14px; }
.block-text { color: var(--ink-2); margin-top: 6px; max-width: 40ch; }
.principles { list-style: none; display: grid; margin-top: clamp(56px, 7vw, 88px); border-top: 1px solid var(--line); }
.principles li { font-family: var(--serif); font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem); line-height: 1.2; padding: 22px 0; border-bottom: 1px solid var(--line); text-wrap: balance; }
@media (min-width: 640px) { .blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
@media (min-width: 1000px) {
  .blocks { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; border-top: 0; }
  .principles li { border-top: 1px solid var(--line); border-bottom: 0; padding-top: 24px; }
}

/* Plataforma (sección profunda) */
.on-deep { background: var(--deep); color: var(--deep-ink); --focus: var(--deep-ink); }
.on-deep .eyebrow { color: var(--deep-ink-2); }
.on-deep .lede { color: var(--deep-ink-2); }
.on-deep .text-link { color: var(--deep-ink); text-decoration-color: var(--deep-line); }
.features { list-style: none; display: grid; gap: 16px; }
.feature {
  display: flex; flex-direction: column;
  background: var(--deep-2); border: 1px solid var(--deep-line); border-radius: var(--radius);
  padding: 24px 22px 22px;
}
.feature-head { display: flex; align-items: center; gap: 14px; }
.feature-icon { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--deep-line); color: var(--deep-ink); }
.feature-icon svg { width: 20px; height: 20px; }
.feature-name { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.feature-text { margin-top: 14px; color: var(--deep-ink-2); font-size: 1rem; line-height: 1.6; }
.glimpse {
  margin-top: auto; padding-top: 20px;
}
.glimpse-card {
  background: var(--bg); color: var(--ink); border-radius: 14px; padding: 14px;
  font-size: .8125rem; line-height: 1.4;
}
.privacy-line { display: flex; align-items: flex-start; gap: 12px; margin-top: 40px; color: var(--deep-ink); font-size: 1.0625rem; max-width: 52ch; }
.privacy-line svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
@media (min-width: 680px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* fragmentos de app dentro de la grilla */
.g-kicker { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.g-warm { background: var(--warm-2); }
.g-warm .g-kicker { color: var(--warm-ink); }
.g-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.g-stat { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; text-align: center; }
.g-stat b { display: block; font-size: .9375rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.g-stat span { font-size: .5625rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.g-plate { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.g-legend { list-style: none; display: grid; gap: 4px; font-size: .75rem; color: var(--ink-2); }
.g-legend li { display: flex; align-items: center; gap: 7px; }
.g-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.g-p { background: var(--protein); } .g-c { background: var(--carb); } .g-v { background: var(--veg); } .g-f { background: var(--fat); }
.g-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.g-row b { font-weight: 600; font-size: .8125rem; }
.g-days { display: flex; gap: 4px; margin-top: 10px; }
.g-days span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .625rem; font-weight: 600; color: var(--ink-2); }
.g-days .on { background: var(--accent); color: var(--accent-ink); }
.g-days .today { outline: 1.5px solid var(--ink-2); outline-offset: 2px; }
.g-phase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.g-phase div { padding-top: 8px; border-top: 3px solid var(--line); font-size: .6875rem; color: var(--ink-3); }
.g-phase b { display: block; font-size: .75rem; color: var(--ink-2); font-weight: 600; }
.g-phase .done { border-color: var(--ink-2); }
.g-phase .current { border-color: var(--accent); }
.g-phase .current b { color: var(--ink); }
.g-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 8px; }
.g-scale span { height: 30px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .75rem; background: var(--surface); }
.g-scale .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* término con definición (RIR) */
.term {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 4px; margin: 0; vertical-align: middle; border: 0; background: none;
  color: inherit; font: inherit; font-weight: 600;
  text-decoration: underline dotted; text-underline-offset: 4px; cursor: help;
}
.term-def { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--deep); border: 1px solid var(--deep-line); color: var(--deep-ink); font-size: .9375rem; }
.term-def[hidden] { display: none; }

/* Pasos */
.steps-list { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.step-n { grid-row: span 2; font-family: var(--serif); font-size: 3rem; line-height: .9; color: var(--accent); }
.step-title { font-weight: 600; font-size: 1.1875rem; line-height: 1.35; letter-spacing: -.01em; }
.step p { color: var(--ink-2); max-width: 44ch; }
@media (min-width: 900px) {
  .steps-list { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; border-top: 0; }
  .step { grid-template-columns: 1fr; border-bottom: 0; border-top: 1px solid var(--line-strong); padding-top: 22px; align-content: start; }
  .step-n { grid-row: auto; font-size: 3.5rem; margin-bottom: 18px; }
}

/* Planes */
.plans { background: var(--surface-2); }
.plans .lede { color: var(--ink-2); }
.plan-grid { list-style: none; display: grid; gap: 16px; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 24px 24px; box-shadow: var(--shadow);
}
.plan-featured { background: var(--deep); color: var(--deep-ink); border-color: transparent; box-shadow: var(--shadow-lift); --focus: var(--deep-ink); }
.plan-badge {
  position: absolute; top: 32px; right: 24px;
  padding: 5px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600;
  background: var(--deep-ink); color: var(--deep);
}
.plan-name { font-family: var(--serif); font-size: 2.5rem; line-height: 1; letter-spacing: -.01em; }
.plan-line { margin-top: 10px; color: var(--ink-2); }
.plan-featured .plan-line { color: var(--deep-ink-2); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.plan-featured .plan-price { border-top-color: var(--deep-line); }
.plan-amount { font-family: var(--serif); font-size: 3rem; line-height: 1; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.plan-per { font-size: .875rem; color: var(--ink-3); font-weight: 500; }
.plan-featured .plan-per { color: var(--deep-ink-2); }
.plan-features { list-style: none; display: grid; gap: 10px; margin: 24px 0 28px; }
.plan-features li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 1rem; }
.plan-features svg { width: 18px; height: 18px; margin-top: 4px; color: var(--accent); }
.plan-featured .plan-features svg { color: var(--deep-ink-2); }
.plan .btn { margin-top: auto; }
.plans-foot { display: grid; gap: 14px; margin-top: 32px; font-size: .9375rem; color: var(--ink-2); max-width: 68ch; }
.trust { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.trust svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
@media (min-width: 960px) {
  .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
  .plan { padding: 32px 28px 28px; }
  .plan-line { min-height: 3.2em; }
  .plan-badge { top: 36px; right: 28px; }
}

/* Sobre Juan */
.about-grid { display: grid; gap: 40px; }
.about-photo { margin: 0; }
.photo-slot {
  position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 440px;
  border-radius: var(--radius-lg); background: var(--surface-2);
  border: 1px dashed var(--warm);
  display: grid; place-items: center; padding: 24px; text-align: center; overflow: hidden;
}
.photo-mono { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 9rem; color: color-mix(in srgb, var(--ink) 9%, transparent); line-height: 1; }
.photo-slot .placeholder { position: relative; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.facts li { font-size: .9375rem; }
.note { margin: 32px 0 0; padding: 0; }
.note p { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem); line-height: 1.3; letter-spacing: -.005em; max-width: 30ch; text-wrap: pretty; }
.note-sign { margin-top: 16px; font-family: var(--serif); font-size: 1.5rem; color: var(--accent); }
.note-review { margin-top: 12px; font-size: .9375rem; }
.about-story { margin-top: 24px; color: var(--ink-2); max-width: 52ch; }
.about-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.about-link:hover { text-decoration-color: currentColor; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
}

/* Preguntas */
.faq-grid { display: grid; gap: 32px; }
.faq-list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 0;
  font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary svg { width: 22px; height: 22px; flex: none; color: var(--ink-2); transition: transform .2s ease; }
.qa[open] summary svg { transform: rotate(45deg); }
.qa summary:hover svg { color: var(--ink); }
.qa-body { padding: 0 0 24px; color: var(--ink-2); max-width: 64ch; }
.qa-body p + p { margin-top: 12px; }
.qa-body a { color: var(--ink); text-underline-offset: 3px; }
.faq-more { margin-top: 28px; color: var(--ink-2); }
@media (min-width: 900px) {
  .faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .faq-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* CTA final */
.final-cta { position: relative; overflow: hidden; }
.final-inner { position: relative; max-width: 820px; }
.final-cta::before {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; background: var(--accent-2);
  width: 380px; aspect-ratio: 1; right: -160px; top: -60px;
}
@media (min-width: 900px) { .final-cta::before { width: 560px; right: -120px; top: -80px; } }
.final-cta { isolation: isolate; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: .9375rem; color: var(--ink-2); }
.footer-grid { display: grid; gap: 32px; }
.footer-brand .brand { font-size: 1.75rem; padding: 0; }
.footer-brand p { margin-top: 12px; max-width: 30ch; }
.footer-h { font-size: .9375rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.footer-col ul { list-style: none; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal { display: grid; gap: 6px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-3); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---------- barra CTA fija en móvil (solo inicio) ---------- */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  transform: translateY(110%); visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.cta-bar.is-visible { transform: none; visibility: visible; transition: transform .25s ease; }
.cta-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 560px; margin: 0 auto; }
.cta-bar-price { font-size: .875rem; color: var(--ink-2); line-height: 1.3; }
.cta-bar-price b { font-size: 1.0625rem; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
body.has-cta-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
/* Que la barra fija no tape el elemento enfocado con el teclado (WCAG 2.4.11). */
@media (max-width: 899px) {
  html.has-cta-bar { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  .cta-bar { display: none; }
  body.has-cta-bar { padding-bottom: 0; }
}

/* ---------- /empezar ---------- */
.checkout { padding: 20px 0 clamp(64px, 8vw, 96px); }
.checkout-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0 32px; max-width: 520px; }
.checkout-steps li { padding-top: 10px; border-top: 3px solid var(--line); font-size: .8125rem; color: var(--ink-3); line-height: 1.3; }
.checkout-steps li[aria-current="step"] { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.checkout-title { font-family: var(--serif); font-size: clamp(2.75rem, 2rem + 3vw, 4.25rem); line-height: 1; letter-spacing: -.015em; text-wrap: balance; }
.checkout .lede { margin-top: 14px; }
.checkout-grid { display: grid; gap: 28px; margin-top: 32px; grid-template-areas: "summary" "fields" "after"; }
.summary { grid-area: summary; }
.fields { grid-area: fields; min-width: 0; }
.after { grid-area: after; }
@media (min-width: 960px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "fields summary" "after summary"; column-gap: 56px; row-gap: 40px; align-items: start; }
  .summary { position: sticky; top: calc(var(--header-h) + 24px); }
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary { padding: 22px 20px; }
.kicker { font-size: .8125rem; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.summary-plan { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.summary-name { font-family: var(--serif); font-size: 2.25rem; line-height: 1; }
.summary-price { font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.plan-switch { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 10px; }
.seg-opt { position: relative; display: block; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 62px; padding: 10px 4px; border-radius: 14px;
  border: 1px solid var(--field-border); background: var(--surface); text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.seg-name { font-weight: 600; font-size: .9375rem; line-height: 1.2; }
.seg-price { font-size: .8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.seg-tag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 600; line-height: 1.5;
}
.seg-opt:hover .seg-box { border-color: var(--ink-2); }
.seg-opt input:checked + .seg-box { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--bg); }
.seg-opt input:focus-visible + .seg-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.summary-features { list-style: none; display: grid; gap: 8px; margin-top: 20px; font-size: .9375rem; }
.summary-features li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.summary-features svg { width: 16px; height: 16px; margin-top: 4px; color: var(--accent); }
.summary-total { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; }
.total-amount { font-family: var(--serif); font-size: 1.875rem; font-weight: 400; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.total-amount small { font-family: var(--sans); font-size: .8125rem; color: var(--ink-3); font-weight: 500; }
.total-note { margin-top: 8px; font-size: .875rem; color: var(--ink-2); }

.fieldset { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
.legend { padding: 0; margin-bottom: 18px; font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; }
.field { margin-bottom: 20px; }
.label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 8px; }
.label .opt { font-weight: 400; color: var(--ink-3); }
.input, .select, .textarea {
  display: block; width: 100%; min-height: 52px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--field-border); background: var(--surface); color: var(--ink);
  font-size: 1rem; line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.select {
  padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
.select:invalid { color: var(--ink-3); }
.select option { color: var(--ink); }
.textarea { min-height: 120px; resize: vertical; }
.phone-field { position: relative; }
.phone-prefix {
  position: absolute; left: 1px; top: 1px; bottom: 1px; display: grid; place-items: center;
  width: 60px; border-right: 1px solid var(--line); border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none;
}
.phone-field .input { padding-left: 76px; font-variant-numeric: tabular-nums; }
.phone-country { pointer-events: auto; text-align: center; font: inherit; font-weight: 600; padding: 0 4px; border: 0; border-right: 1px solid var(--field-border); border-radius: 10px 0 0 10px; }
.phone-country:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.field-help { margin-top: 8px; font-size: .875rem; color: var(--ink-2); line-height: 1.45; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.counter { margin-top: 8px; font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.counter.is-over { color: var(--danger); font-weight: 600; }
.field-error { display: flex; gap: 8px; margin-top: 8px; font-size: .875rem; font-weight: 500; color: var(--danger); line-height: 1.45; }
.field-error[hidden] { display: none; }
.field-error::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-top: .5em; }
.is-invalid .input, .is-invalid .select, .is-invalid .textarea, .input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.check-row { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.check-row input {
  width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer;
}
.check-row label { font-size: 1rem; line-height: 1.5; cursor: pointer; }
.check-row a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.field-check .field-help, .field-check .field-error { margin-left: 38px; }
.health-note { margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-size: .9375rem; line-height: 1.5; }
.health-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ref-toggle { margin-bottom: 20px; }
.ref-toggle > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: .9375rem; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px;
}
.ref-toggle > summary::-webkit-details-marker { display: none; }
.ref-toggle > summary:hover { text-decoration-color: currentColor; }
.ref-toggle[open] > summary { margin-bottom: 8px; }
.ref-toggle .field { margin-bottom: 0; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-summary, .form-alert {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--danger-2); color: var(--danger); font-weight: 500; font-size: .9375rem; line-height: 1.45;
}
.form-summary { margin-bottom: 24px; }
.form-summary:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.form-alert { margin-bottom: 16px; }
.form-alert a { color: inherit; }
.form-info { background: var(--warm-2); color: var(--warm-ink); }
.form-summary[hidden], .form-alert[hidden] { display: none; }
.pay { margin-top: 8px; }
.btn-pay { min-height: 58px; font-size: 1.0625rem; }
.pay-status { min-height: 1.5em; margin-top: 10px; font-size: .9375rem; color: var(--ink-2); text-align: center; }
.pay-note { margin-top: 4px; font-size: .875rem; color: var(--ink-2); text-align: center; }
.pay-legal { margin-top: 12px; font-size: .8125rem; color: var(--ink-3); text-align: center; }
.trust-list { list-style: none; display: grid; gap: 10px; margin-top: 28px; padding: 18px 18px; border-radius: var(--radius); background: var(--surface-2); font-size: .9375rem; color: var(--ink); }
.trust-list li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.trust-list svg { width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }
.trust-list a { color: inherit; }
.after-title { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; }
.after-list { list-style: none; counter-reset: after; margin-top: 16px; border-top: 1px solid var(--line); }
.after-list li { counter-increment: after; display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.after-list li::before { content: counter(after); font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .9375rem; color: var(--ink-2); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 18px; height: 18px; }

/* ---------- /gracias ---------- */
.status-page { padding: clamp(40px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.status-wrap { max-width: 640px; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 28px; background: var(--surface-2); color: var(--ink-2); }
.status-icon svg { width: 30px; height: 30px; }
.status-icon.is-ok { background: var(--accent-2); color: var(--accent); }
.status-icon.is-bad { background: var(--danger-2); color: var(--danger); }
.status-icon.is-wait svg { animation: spin 2.4s linear infinite; }
.status-title { font-family: var(--serif); font-size: clamp(2.5rem, 1.9rem + 2.6vw, 3.75rem); line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; }
.status-title:focus { outline: none; }
.status-text { margin-top: 18px; font-size: 1.125rem; color: var(--ink-2); max-width: 52ch; }
.status-help { margin-top: 12px; color: var(--ink-2); max-width: 52ch; }
.status-poll { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: .9375rem; color: var(--ink-3); }
.status-poll .spinner { display: inline-block; width: 14px; height: 14px; }
.status-warn { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--warm-2); color: var(--warm-ink); font-weight: 500; }
.status-net { margin-top: 18px; font-size: .9375rem; color: var(--danger); }
.details { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 28px 0 0; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.details dt { color: var(--ink-3); font-size: .9375rem; }
.details dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.next { margin-top: 40px; }
.next-title { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.next-list { list-style: none; counter-reset: nx; margin-top: 16px; border-top: 1px solid var(--line); }
.next-list li { counter-increment: nx; display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.next-list li::before { content: counter(nx); font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); }
.next-list b { display: block; font-weight: 600; }
.next-list p { color: var(--ink-2); margin-top: 4px; }
.status-note { margin-top: 24px; color: var(--ink-2); }
.status-actions { margin-top: 32px; }
/* Siguiente paso tras el pago aprobado (diagnóstico o reserva de la reunión inicial). */
.next-cta { margin-top: 28px; padding: 20px; border-radius: var(--radius); background: var(--accent-2); }
.next-cta-lead { font-weight: 600; color: var(--ink); }
.next-cta-count { margin-top: 6px; font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.next-cta-actions { margin-top: 16px; }
/* Sobre el fondo de la tarjeta, el borde normal del botón secundario casi no se ve (1,3:1). */
.next-cta .btn-ghost { border-color: var(--ink-2); }
.next-cta .btn-ghost:hover { border-color: var(--ink); }

/* ---------- documentos legales ---------- */
.doc { padding: clamp(32px, 6vw, 72px) 0 clamp(64px, 9vw, 120px); }
.doc-head { max-width: 760px; }
.doc-draft { display: block; margin-bottom: 24px; }
.doc-title { font-family: var(--serif); font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem); line-height: 1; letter-spacing: -.015em; text-wrap: balance; }
.doc-meta { margin-top: 16px; color: var(--ink-2); }
.doc-grid { display: grid; gap: 32px; margin-top: 40px; }
.doc-toc { font-size: .9375rem; }
.doc-toc details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.doc-toc summary { cursor: pointer; padding: 14px 16px; font-weight: 600; min-height: 48px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc summary svg { width: 18px; height: 18px; transition: transform .2s ease; }
.doc-toc details[open] summary svg { transform: rotate(45deg); }
.doc-toc ol { list-style: none; padding: 0 16px 12px; }
.doc-toc a { display: block; padding: 8px 0; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.doc-toc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-body { max-width: 68ch; min-width: 0; }
.doc-body section { padding-top: 8px; }
.doc-body section + section { margin-top: 40px; }
.doc-body h2 { font-family: var(--serif); font-size: clamp(1.75rem, 1.55rem + .7vw, 2.125rem); line-height: 1.15; margin-bottom: 14px; letter-spacing: -.005em; }
.doc-body h3 { font-size: 1.0625rem; font-weight: 600; margin: 24px 0 8px; }
.doc-body p, .doc-body li { color: var(--ink); line-height: 1.7; }
.doc-body p + p { margin-top: 12px; }
.doc-body ul, .doc-body ol.doc-ol { padding-left: 1.25em; margin-top: 10px; }
.doc-body ul li + li, .doc-body ol.doc-ol li + li { margin-top: 6px; }
.doc-body ul + p, .doc-body p + ul { margin-top: 12px; }
.doc-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.doc-body a:hover { text-decoration-color: currentColor; }
.doc-body dl { margin: 10px 0 0; }
.doc-body dt { font-weight: 600; margin-top: 12px; }
.doc-body dd { margin: 4px 0 0; }
.doc-callout { margin-top: 16px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); }
.rtable { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .9375rem; }
.rtable th { text-align: left; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
.rtable td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
@media (max-width: 719px) {
  .rtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .rtable td { padding: 3px 0; border: 0; }
  .rtable td::before { content: attr(data-label); display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
  .rtable td:first-child { font-weight: 600; font-size: 1.0625rem; }
  .rtable td:first-child::before { display: none; }
}
@media (min-width: 1000px) {
  .doc-grid { grid-template-columns: 260px minmax(0, 1fr); gap: 72px; align-items: start; }
  .doc-toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
  .doc-toc details { border: 0; background: none; }
  .doc-toc summary { padding: 0 0 10px; }
  .doc-toc summary svg { display: none; }
  .doc-toc ol { padding: 0; border-left: 1px solid var(--line); }
  .doc-toc a { padding: 6px 0 6px 16px; }
}

/* ---------- 404 ---------- */
.notfound { padding: clamp(56px, 12vw, 160px) 0; }
.notfound .display { font-size: clamp(3rem, 2.2rem + 4vw, 5.5rem); }
.notfound-alt { margin-top: 28px; color: var(--ink-2); }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .status-icon.is-wait svg, .spinner { animation: none !important; }
}

/* ---------- impresión (documentos legales) ---------- */
@media print {
  .site-header, .site-footer, .cta-bar, .doc-toc, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .doc-grid { display: block; }
}
