/* ============================================================
   APUNTIA — editorial premium design system
   Warm paper · ink · one refined brand color
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* surfaces */
  --paper:    oklch(0.987 0.004 85);
  --paper-2:  oklch(0.968 0.006 84);
  --surface:  #ffffff;

  /* ink */
  --ink:      oklch(0.245 0.013 275);
  --ink-2:    oklch(0.46 0.012 275);
  --ink-3:    oklch(0.62 0.010 275);

  /* hairlines */
  --line:     oklch(0.905 0.006 85);
  --line-2:   oklch(0.855 0.008 84);

  /* brand (tweakable) */
  --brand:        #4f46e5;
  --brand-deep:   color-mix(in oklab, var(--brand) 82%, #000);
  --brand-ink:    #ffffff;
  --brand-soft:   color-mix(in oklab, var(--brand) 10%, var(--paper));
  --brand-line:   color-mix(in oklab, var(--brand) 24%, var(--line));

  /* subject palette */
  --s-bio:   oklch(0.5  0.12 152);   /* biología — verde */
  --s-der:   oklch(0.46 0.135 22);   /* derecho — granate */
  --s-mat:   oklch(0.5  0.17 300);   /* matemáticas — morado */
  --s-hum:   oklch(0.52 0.07 70);    /* humanidades — sepia */
  --s-inf:   oklch(0.52 0.11 232);   /* informática — azul */

  /* callout accents */
  --c-key:   var(--brand);
  --c-exam:  oklch(0.62 0.14 70);    /* ámbar */
  --c-error: oklch(0.55 0.16 22);    /* rojo */
  --c-mem:   oklch(0.52 0.15 300);   /* morado */
  --c-ex:    oklch(0.5  0.1  152);   /* verde */

  /* radii */
  --r-xs: 7px;
  --r-sm: 11px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 34px;

  /* shadow */
  --sh-sm: 0 1px 2px oklch(0.3 0.02 275 / 0.05), 0 1px 1px oklch(0.3 0.02 275 / 0.04);
  --sh:    0 4px 14px oklch(0.3 0.02 275 / 0.07), 0 1px 3px oklch(0.3 0.02 275 / 0.05);
  --sh-lg: 0 18px 50px oklch(0.28 0.03 275 / 0.12), 0 4px 14px oklch(0.28 0.03 275 / 0.07);
  --sh-doc: 0 40px 90px oklch(0.26 0.04 275 / 0.16), 0 10px 30px oklch(0.26 0.04 275 / 0.10);

  /* type */
  --serif: "Newsreader", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  /* layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: -0.006em;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in oklab, var(--brand) 22%, transparent); }

/* ---------- Typography helpers ---------- */
.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow--brand { color: color-mix(in oklab, var(--brand) 78%, var(--ink-3)); }

.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--brand); }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--ink-2);
  line-height: 1.5;
  text-wrap: pretty;
  letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1320px; }
section { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  height: 50px; padding-inline: 1.35rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .18s cubic-bezier(.2,.7,.3,1), background .2s, box-shadow .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--brand-deep) 60%, transparent), var(--sh-sm);
}
.btn--primary:hover { background: var(--brand-deep); box-shadow: var(--sh); transform: translateY(-1px); }
.btn--ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-2); box-shadow: var(--sh-sm);
}
.btn--ghost:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn--quiet { background: transparent; color: var(--ink-2); height: 42px; padding-inline: 0.9rem; }
.btn--quiet:hover { color: var(--ink); }
.btn--lg { height: 56px; padding-inline: 1.7rem; font-size: 1.04rem; }
.btn--full { width: 100%; justify-content: center; }
.btn .ar { transition: transform .2s; }
.btn--primary:hover .ar { transform: translateX(3px); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: -0.01em;
  padding: 0.42rem 0.8rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink-2); box-shadow: var(--sh-sm);
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--brand); }

/* ============================================================
   PROMO MARQUEE (banner animado de registro)
   ============================================================ */
.promo {
  display: block; width: 100%; border: 0; cursor: pointer;
  padding: 0; margin: 0; overflow: hidden; position: relative;
  color: var(--brand-ink);
  background: linear-gradient(90deg, var(--brand-deep), var(--brand) 55%, var(--brand-deep));
  box-shadow: inset 0 -1px 0 color-mix(in oklab, #000 18%, transparent);
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
/* brillo que cruza el banner */
.promo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, color-mix(in oklab, #fff 30%, transparent) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: promo-shine 5.5s ease-in-out infinite;
  pointer-events: none;
}
.promo__track {
  display: inline-flex; white-space: nowrap; will-change: transform;
  animation: promo-scroll 30s linear infinite;
}
.promo:hover .promo__track { animation-play-state: paused; }
.promo__group { display: inline-flex; align-items: center; }
.promo__item {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding-block: 0.6rem; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.01em;
}
.promo__item b { font-weight: 700; }
.promo__gift { font-size: 1.05rem; animation: promo-bob 1.6s ease-in-out infinite; }
.promo__sep { opacity: 0.5; padding-inline: 1.15rem; }
.promo__ar { display: inline-block; transition: transform 0.2s; }
.promo:hover .promo__ar { transform: translateX(3px); }

@keyframes promo-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes promo-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes promo-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }

@media (prefers-reduced-motion: reduce) {
  .promo__track { animation: none; width: 100%; justify-content: center; }
  .promo__group:nth-child(2) { display: none; }
  .promo::after, .promo__gift { animation: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px) saturate(1.3);
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-color: var(--line); background: color-mix(in oklab, var(--paper) 88%, transparent); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: 0.95rem; color: var(--ink-2); transition: color .2s; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 0.6rem; }

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--serif); }
.brand__mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.15rem;
  box-shadow: var(--sh-sm);
}
.brand__name { font-size: 1.32rem; font-weight: 600; letter-spacing: -0.02em; }
.brand__name b { color: var(--brand); font-style: italic; font-weight: 600; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 6rem); overflow: clip; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero__eyebrow { margin-bottom: 1.4rem; display: flex; align-items: center; gap: 0.7rem; }
.hero__eyebrow .rule { height: 1px; width: 40px; background: var(--line-2); }
.hero h1.display { font-size: clamp(2.7rem, 6vw, 4.6rem); }
.hero__sub { margin-top: 1.5rem; max-width: 30ch; }
.hero__ctas { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero__chips { margin-top: 2.4rem; }

/* staggered entrance */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .8s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }
.r1 { animation-delay: .05s; } .r2 { animation-delay: .14s; }
.r3 { animation-delay: .23s; } .r4 { animation-delay: .32s; } .r5 { animation-delay: .42s; }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* hero media frame */
.hero__media { position: relative; }
.hero__media::before {
  content: ""; position: absolute; inset: -8% -12% -12% -6%;
  background: radial-gradient(60% 60% at 70% 20%, var(--brand-soft), transparent 70%);
  z-index: -1; filter: blur(6px);
}
/* ----- Hero carousel (coverflow) ----- */
.carousel { position: relative; }
.carousel__stage { position: relative; min-height: 460px; transition: height .55s cubic-bezier(.2,.7,.3,1); }
.carousel .doc {
  position: absolute; top: 0; left: 50%; width: 82%;
  transform: translateX(-50%);
  transform-origin: center top;
  transition: transform .55s cubic-bezier(.2,.7,.3,1), opacity .5s, filter .5s;
  cursor: pointer; will-change: transform, opacity;
}
.carousel .doc.is-active { cursor: default; box-shadow: var(--sh-doc); }
.carousel__badge {
  position: absolute; top: -16px; left: 50%; z-index: 200;
  transform: translateX(-50%) rotate(-2deg);
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.5rem 0.9rem; border-radius: 999px; box-shadow: var(--sh-lg);
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap;
}
.carousel__badge .swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--c, var(--brand)); transition: background .35s; }
.carousel__nav { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-top: 1.8rem; }
.carousel__arrow {
  width: 44px; height: 44px; border-radius: 999px; flex: none;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  display: grid; place-items: center; box-shadow: var(--sh-sm); transition: all .2s;
}
.carousel__arrow:hover { color: var(--ink); border-color: var(--ink-3); transform: translateY(-1px); }
.carousel__arrow:active { transform: translateY(1px); }
.carousel__arrow svg { width: 18px; height: 18px; }
.carousel__dots { display: flex; gap: 0.5rem; align-items: center; }
.carousel__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--line-2); transition: all .35s cubic-bezier(.2,.7,.3,1); cursor: pointer; }
.carousel__dot.is-active { width: 26px; background: var(--brand); }

/* floating subject badge */
.float-badge {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.5rem 0.85rem; border-radius: 999px;
  box-shadow: var(--sh-lg); font-size: 0.82rem; font-weight: 600;
  font-family: var(--mono); letter-spacing: -0.01em;
}
.float-badge .swatch { width: 12px; height: 12px; border-radius: 4px; }
.float-badge--tl { top: -14px; left: -22px; transform: rotate(-3deg); }
.float-badge--br { bottom: 18px; right: -20px; transform: rotate(2deg); }

/* ----- Hero variant B: centered editorial ----- */
[data-hero="center"] .hero__grid { grid-template-columns: 1fr; text-align: center; }
[data-hero="center"] .hero__eyebrow { justify-content: center; }
[data-hero="center"] .hero h1.display { font-size: clamp(2.8rem, 7vw, 5.6rem); margin-inline: auto; max-width: 16ch; }
[data-hero="center"] .hero__sub { margin-inline: auto; max-width: 52ch; }
[data-hero="center"] .hero__ctas { justify-content: center; }
[data-hero="center"] .hero__chips { justify-content: center; }
[data-hero="center"] .hero__text { display: flex; flex-direction: column; align-items: center; }
[data-hero="center"] .hero__media { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 720px; margin-inline: auto; }
[data-hero="center"] .hero__media .doc { transform: rotate(0deg); }
[data-hero="center"] .float-badge--tl { left: 2%; }
[data-hero="center"] .float-badge--br { right: 2%; }
[data-hero="center"] .hero__media::before { inset: -6% -4% -10% -4%; background: radial-gradient(50% 50% at 50% 12%, var(--brand-soft), transparent 70%); }

/* ============================================================
   THE DOCUMENT MOCKUP (visual protagonist)
   ============================================================ */
.doc {
  --subject: var(--s-bio);
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh-doc);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
  font-size: 13px;
  position: relative;
}
.doc__bar {
  height: 7px; background: var(--subject);
}
.doc__pad { padding: 1.7rem 1.8rem 1.9rem; }
.doc__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.9rem; margin-bottom: 1.1rem; }
.doc__subject {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--subject); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.45em;
}
.doc__subject .swatch { width: 9px; height: 9px; border-radius: 3px; background: var(--subject); }
.doc__meta { font-family: var(--mono); font-size: 0.58rem; color: var(--ink-3); letter-spacing: 0.04em; }
.doc__title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.05; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 0.2rem; }
.doc__h { font-family: var(--serif); font-size: 1.02rem; color: var(--subject); margin: 1.1rem 0 0.4rem; letter-spacing: -0.01em; font-weight: 600; }
.doc p { color: var(--ink-2); line-height: 1.5; font-size: 0.8rem; }
.doc p + p { margin-top: 0.5rem; }
.doc .term {
  color: var(--subject); border-bottom: 1.5px dotted color-mix(in oklab, var(--subject) 55%, transparent);
  font-weight: 600; cursor: help;
}

/* plain-words line */
.doc__plain {
  margin-top: 0.5rem; padding: 0.55rem 0.7rem 0.55rem 0.85rem;
  border-left: 2.5px solid color-mix(in oklab, var(--subject) 45%, var(--line));
  background: color-mix(in oklab, var(--subject) 5%, var(--surface));
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.doc__plain .tag { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 0.15rem; }
.doc__plain p { font-size: 0.76rem; color: var(--ink-2); font-style: italic; }

/* callouts */
.callout {
  --c: var(--brand);
  margin-top: 0.7rem; border-radius: var(--r-xs);
  border: 1px solid color-mix(in oklab, var(--c) 30%, var(--line));
  background: color-mix(in oklab, var(--c) 7%, var(--surface));
  padding: 0.6rem 0.7rem;
}
.callout__t { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: color-mix(in oklab, var(--c) 75%, var(--ink)); display: flex; align-items: center; gap: 0.4em; margin-bottom: 0.25rem; }
.callout p { font-size: 0.75rem; color: var(--ink-2); }
.callout--key     { --c: var(--c-key); }
.callout--concept { --c: oklch(0.52 0.11 232); }   /* concepto clave — azul */
.callout--exam    { --c: var(--c-exam); }          /* clave de examen — dorado */
.callout--error,
.callout--warn    { --c: var(--c-error); }          /* error frecuente — rojo */
.callout--mem,
.callout--mnem    { --c: oklch(0.5 0.1 152); }      /* regla mnemotécnica — verde */
.callout--ex      { --c: var(--c-ex); }
.callout--note    { --c: oklch(0.5 0.012 275); }    /* ejemplo / texto literal — gris */

/* gold inline highlight (dato a memorizar literal) */
.doc .hl {
  background: color-mix(in oklab, var(--c-exam) 26%, transparent);
  color: var(--ink); font-weight: 500; border-radius: 3px;
  padding: 0 0.18em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* figure */
.doc__fig {
  margin-top: 0.8rem; border: 1px solid var(--line); border-radius: var(--r-xs);
  overflow: hidden; background: var(--paper-2);
}
.doc__fig .ph {
  height: 96px;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklab, var(--subject) 12%, transparent) 0 6px, transparent 6px 12px),
    color-mix(in oklab, var(--subject) 5%, var(--surface));
  display: grid; place-items: center;
}
.doc__fig .ph span { font-family: var(--mono); font-size: 0.58rem; color: color-mix(in oklab, var(--subject) 60%, var(--ink-3)); letter-spacing: 0.05em; }
.doc__fig figcaption { font-family: var(--mono); font-size: 0.56rem; color: var(--ink-3); padding: 0.35rem 0.6rem; border-top: 1px solid var(--line); }

/* glossary mini */
.doc__gloss { margin-top: 1rem; border-top: 1px dashed var(--line-2); padding-top: 0.7rem; }
.doc__gloss .lbl { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.45rem; }
.doc__gloss dl { display: grid; gap: 0.35rem; }
.doc__gloss .row { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; align-items: baseline; }
.doc__gloss dt { font-weight: 600; color: var(--subject); font-size: 0.72rem; white-space: nowrap; }
.doc__gloss dd { font-size: 0.7rem; color: var(--ink-3); }

/* quiz mini */
.doc__quiz { margin-top: 0.9rem; }
.doc__quiz .q { display: flex; gap: 0.5rem; font-size: 0.75rem; color: var(--ink); }
.doc__quiz .q .n { font-family: var(--mono); color: var(--subject); font-weight: 600; }
.doc__quiz .a { margin-top: 0.25rem; margin-left: 1.1rem; font-size: 0.72rem; color: var(--ink-3); }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--paper2 { background: var(--paper-2); border-block: 1px solid var(--line); }
.section__head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head .eyebrow { margin-bottom: 1rem; }
.section__head .lede { margin-top: 1.1rem; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step__n {
  position: absolute; top: 0; left: 0;
  font-family: var(--serif); font-style: italic; font-size: 2.6rem; line-height: 1;
  color: var(--brand); opacity: 0.95;
}
.step__rule { height: 1px; background: var(--line-2); margin: 0.8rem 0 1.1rem; }
.step h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.01em; }
.step p { margin-top: 0.5rem; color: var(--ink-2); font-size: 0.98rem; }

/* features grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.feature {
  background: var(--surface); padding: 1.8rem 1.7rem 2rem;
  transition: background .25s;
}
.feature:hover { background: color-mix(in oklab, var(--brand) 3.5%, var(--surface)); }
.feature__ic {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); margin-bottom: 1.1rem;
  border: 1px solid var(--brand-line);
}
.feature__ic svg { width: 20px; height: 20px; }
.feature h3 { font-family: var(--serif); font-size: 1.32rem; font-weight: 500; letter-spacing: -0.01em; }
.feature p { margin-top: 0.5rem; color: var(--ink-2); font-size: 0.95rem; line-height: 1.5; }
.feature--wide { grid-column: span 1; }

/* subject color row */
.subjects { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.subj { display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--mono); font-size: 0.76rem; padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
.subj .sw { width: 11px; height: 11px; border-radius: 4px; }

/* ============================================================
   PRICING
   ============================================================ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.8rem 1.7rem 2rem;
  display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.plan--featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--sh-lg); position: relative; }
.plan--featured::after {
  content: "Recomendado"; position: absolute; top: -11px; left: 1.7rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--brand); color: var(--brand-ink); padding: 0.25rem 0.6rem; border-radius: 999px;
}
.plan__name { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.plan__price { font-family: var(--serif); font-size: 2.8rem; line-height: 1; margin-top: 0.9rem; letter-spacing: -0.02em; }
.plan__price small { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.plan__desc { color: var(--ink-2); margin-top: 0.5rem; font-size: 0.92rem; min-height: 2.6em; }
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; display: grid; gap: 0.6rem; }
.plan li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; color: var(--ink-2); }
.plan li svg { flex: none; width: 17px; height: 17px; margin-top: 0.18rem; color: var(--brand); }
.plan .btn { margin-top: auto; }
.pricing-note { text-align: center; margin-top: 1.6rem; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: color-mix(in oklab, white 78%, var(--ink)); padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem; }
.footer .brand__name { color: #fff; }
.footer .brand__name b { color: color-mix(in oklab, var(--brand) 60%, #fff); }
.footer .brand__mark { background: color-mix(in oklab, var(--brand) 80%, #fff); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid color-mix(in oklab, white 14%, var(--ink)); }
.footer__tag { margin-top: 1.1rem; max-width: 32ch; color: color-mix(in oklab, white 62%, var(--ink)); font-size: 0.95rem; }
.footer h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in oklab, white 55%, var(--ink)); margin-bottom: 1rem; font-weight: 500; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer a { color: color-mix(in oklab, white 78%, var(--ink)); font-size: 0.95rem; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer__bot { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; font-size: 0.85rem; color: color-mix(in oklab, white 50%, var(--ink)); font-family: var(--mono); flex-wrap: wrap; gap: 1rem; }

/* ============================================================
   APP SHELL (Generador + Mis documentos)
   ============================================================ */
.app { display: none; min-height: 100vh; }
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.appbar__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.appnav { display: flex; gap: 0.3rem; background: var(--paper-2); padding: 0.28rem; border-radius: 999px; border: 1px solid var(--line); }
.appnav button {
  font-size: 0.9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  padding: 0.5rem 1.05rem; border-radius: 999px; transition: all .2s;
}
.appnav button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); font-weight: 600; }
.appbar__acct { display: flex; align-items: center; gap: 0.8rem; }
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }

.app__view { display: none; padding-block: clamp(2rem, 4vw, 3.5rem) 5rem; }
.app__view.is-active { display: block; }
.app__head { margin-bottom: 2rem; }
.app__head h1 { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 500; letter-spacing: -0.02em; }
.app__head p { color: var(--ink-2); margin-top: 0.5rem; }

/* generador layout */
.gen { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card__pad { padding: clamp(1.4rem, 3vw, 2rem); }

/* dropzone */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--r);
  background: var(--paper-2);
  padding: 2.6rem 1.5rem; text-align: center;
  transition: border-color .2s, background .2s; cursor: pointer;
}
.drop:hover, .drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop__ic { width: 54px; height: 54px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 1rem; color: var(--brand); box-shadow: var(--sh-sm); }
.drop h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.drop p { color: var(--ink-2); font-size: 0.92rem; margin-top: 0.35rem; }
.drop .fmt { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.drop.has-file { border-style: solid; border-color: var(--brand); background: var(--surface); text-align: left; display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.5rem; }
.drop.has-file .drop__ic { margin: 0; width: 46px; height: 46px; }
.file-meta { flex: 1; min-width: 0; }
.file-meta strong { display: block; font-size: 0.98rem; }
.file-meta span { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); }
.file-x { color: var(--ink-3); width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; transition: all .2s; }
.file-x:hover { background: var(--paper-2); color: var(--c-error); }

/* form fields */
.field { margin-top: 1.4rem; }
.field > label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.field > label .opt { font-weight: 400; color: var(--ink-3); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0; }
.input, .select {
  width: 100%; height: 50px; padding-inline: 1rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface);
  font-size: 0.98rem; transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gen__cta { margin-top: 1.6rem; }

/* progress */
.progress { display: none; }
.progress.is-active { display: block; }
.progress__bar { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; border: 1px solid var(--line); }
.progress__fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 60%, var(--s-mat))); border-radius: 999px; transition: width .4s cubic-bezier(.3,.7,.3,1); }
.progress__row { display: flex; justify-content: space-between; margin-top: 0.7rem; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); }
.progress__steps { margin-top: 1.4rem; display: grid; gap: 0.6rem; }
.pstep { display: flex; align-items: center; gap: 0.7rem; font-size: 0.92rem; color: var(--ink-3); transition: color .3s; }
.pstep .tick { width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; transition: all .3s; }
.pstep.is-done { color: var(--ink); }
.pstep.is-done .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.pstep.is-active { color: var(--ink); font-weight: 600; }
.pstep.is-active .tick { border-color: var(--brand); }

/* aside preview */
.gen__aside .card__pad { display: flex; flex-direction: column; gap: 1rem; }
.aside-title { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.mini-list { display: grid; gap: 0.7rem; }
.mini-list .it { display: flex; gap: 0.6rem; font-size: 0.88rem; color: var(--ink-2); align-items: flex-start; }
.mini-list .it svg { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 0.15rem; }

/* documents list */
.doclist { display: grid; gap: 0.8rem; }
.docrow {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.2rem; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.docrow:hover { border-color: var(--line-2); box-shadow: var(--sh); transform: translateY(-1px); }
.docrow__ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-family: var(--mono); font-size: 0.6rem; font-weight: 600; color: #fff; letter-spacing: 0.02em; }
.docrow__main strong { display: block; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.docrow__sub { display: flex; gap: 0.8rem; align-items: center; margin-top: 0.2rem; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); flex-wrap: wrap; }
.docrow__sub .pill { padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--line-2); }
.expiry { font-family: var(--mono); font-size: 0.72rem; color: var(--c-exam); display: inline-flex; align-items: center; gap: 0.35rem; }
.expiry--gone { color: var(--ink-3); }
.dl-btn { display: inline-flex; align-items: center; gap: 0.5rem; height: 42px; padding-inline: 1.1rem; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: 0.9rem; transition: all .2s; }
.dl-btn:hover { background: var(--brand-deep); }
.dl-btn--gone { background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--line-2); cursor: default; }
.dl-btn--gone:hover { background: var(--paper-2); }

/* empty state filter row */
.doc-tools { display: flex; gap: 0.6rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.usage-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.usage-bar .meter { flex: 1; min-width: 160px; height: 7px; background: var(--paper-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.usage-bar .meter i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.usage-bar .txt { font-size: 0.9rem; color: var(--ink-2); }
.usage-bar .txt b { color: var(--ink); }

/* ============================================================
   MODAL (login / registro)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 1.5rem; }
.modal.is-open { display: grid; }
.modal__scrim { position: absolute; inset: 0; background: oklch(0.22 0.02 275 / 0.4); backdrop-filter: blur(4px); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal__card {
  position: relative; width: min(430px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  padding: clamp(1.6rem, 4vw, 2.2rem); animation: pop .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal__close { position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-3); transition: all .2s; }
.modal__close:hover { background: var(--paper-2); color: var(--ink); }
.modal__brand { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.tabs { display: flex; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.28rem; margin-bottom: 1.5rem; }
.tabs button { flex: 1; padding: 0.55rem; border-radius: 999px; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.tabs button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.gbtn { width: 100%; height: 50px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 0.7rem; font-weight: 600; font-size: 0.95rem; transition: all .2s; }
.gbtn:hover { border-color: var(--ink-3); box-shadow: var(--sh-sm); }
.divider { display: flex; align-items: center; gap: 1rem; margin: 1.3rem 0; color: var(--ink-3); font-family: var(--mono); font-size: 0.72rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.modal .field:first-of-type { margin-top: 0; }
.modal .btn { margin-top: 1.5rem; }
.modal__foot { text-align: center; margin-top: 1.2rem; font-size: 0.85rem; color: var(--ink-3); }
.modal__foot a { color: var(--brand); font-weight: 600; }

/* ============================================================
   ACCOUNT MENU (dropdown) — landing nav + appbar
   ============================================================ */
.acct { position: relative; }
.acct__btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem; border-radius: 999px; transition: background .2s; }
.acct__btn:hover { background: var(--paper-2); }
.acct__menu {
  position: absolute; right: 0; top: calc(100% + 0.6rem); z-index: 80;
  width: min(280px, 86vw); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg);
  padding: 0.5rem; display: none; animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
.acct.is-open .acct__menu { display: block; }
.acct__head { padding: 0.7rem 0.8rem 0.8rem; border-bottom: 1px solid var(--line); margin-bottom: 0.4rem; }
.acct__email { font-size: 0.9rem; font-weight: 600; word-break: break-all; }
.acct__plan { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.04em; margin-top: 0.2rem; }
.acct__item {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.8rem; border-radius: var(--r-sm); font-size: 0.92rem; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.acct__item:hover { background: var(--paper-2); color: var(--ink); }
.acct__item svg { width: 17px; height: 17px; flex: none; }
.acct__item--up { color: var(--brand); font-weight: 600; }
.acct__item--danger:hover { color: var(--c-error); }

/* ============================================================
   FEEDBACK: modal messages + generation status
   ============================================================ */
.msg { font-size: 0.86rem; line-height: 1.45; border-radius: var(--r-sm); padding: 0.7rem 0.85rem; margin-bottom: 0.9rem; display: none; }
.msg.is-show { display: block; }
.msg--err { background: color-mix(in oklab, var(--c-error) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--c-error) 32%, var(--line)); color: var(--c-error); }
.msg--ok  { background: color-mix(in oklab, var(--s-bio) 9%, var(--surface)); border: 1px solid color-mix(in oklab, var(--s-bio) 32%, var(--line)); color: var(--s-bio); }

.gen-status { margin-top: 1.1rem; font-size: 0.9rem; line-height: 1.5; display: none; align-items: flex-start; gap: 0.6rem; }
.gen-status.is-show { display: flex; }
.gen-status--err { color: var(--c-error); }
.gen-status--ok { color: var(--s-bio); }
.gen-status .btn { height: 38px; padding-inline: 0.9rem; font-size: 0.85rem; }

/* spinner (in buttons) */
.spin { width: 15px; height: 15px; border-radius: 999px; border: 2px solid color-mix(in oklab, currentColor 35%, transparent); border-top-color: currentColor; display: inline-block; animation: spin .65s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.is-hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { margin-top: 2.5rem; max-width: 560px; }
  .hero__media .doc { transform: rotate(0deg); }
  .float-badge--tl { left: 0; } .float-badge--br { right: 0; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .features { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .gen { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .features { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .docrow { grid-template-columns: auto 1fr; }
  .docrow__expiry-cell, .docrow .expiry { grid-column: 2; }
  .docrow .dl-btn { grid-column: 1 / -1; justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .appnav button { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
  .hero__ctas { width: 100%; }
  .hero__ctas .btn { flex: 1; justify-content: center; }
}

/* ============================================================
   RESEÑAS / OPINIONES (sección oscura)
   ============================================================ */
.reviews { background: var(--ink); padding-block: clamp(3.5rem, 7vw, 6rem); }
.reviews__head { text-align: center; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.reviews__starline { color: var(--c-exam); letter-spacing: 0.22em; font-size: 1.15rem; }
.reviews__title { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 4vw, 2.9rem); color: #fff; margin-top: 0.6rem; text-wrap: balance; }
.reviews__sub { color: color-mix(in oklab, #fff 60%, var(--ink)); margin-top: 0.6rem; font-size: 1.02rem; }
.reviews__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem;
  max-width: 940px; margin-inline: auto; }
.review { background: color-mix(in oklab, #fff 6%, var(--ink));
  border: 1px solid color-mix(in oklab, #fff 13%, var(--ink));
  border-radius: var(--r-lg); padding: 1.6rem 1.7rem; transition: border-color .2s, transform .2s; }
.review:hover { border-color: color-mix(in oklab, #fff 28%, var(--ink)); transform: translateY(-3px); }
.review__top { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.review__avatar { width: 48px; height: 48px; border-radius: 999px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; }
.review__name { font-weight: 600; color: #fff; font-size: 1rem; letter-spacing: -0.01em; }
.review__stars { color: var(--c-exam); font-size: 0.82rem; letter-spacing: 0.06em; margin-top: 0.1rem; }
.review__text { color: color-mix(in oklab, #fff 76%, var(--ink)); line-height: 1.6; font-size: 0.98rem; }
.review__link { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.1rem;
  color: #fff; font-weight: 600; font-size: 0.9rem; }
.review__link .ar { transition: transform .2s; }
.review__link:hover .ar { transform: translateX(3px); }
@media (max-width: 680px) { .reviews__grid { grid-template-columns: 1fr; } }

/* Nota del fundador (honesta: no es una reseña de cliente) */
.founder { max-width: 720px; margin: clamp(2.5rem, 5vw, 3.6rem) auto 0; text-align: center; }
.founder__avatar { width: 62px; height: 62px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--brand); color: #fff; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.5rem;
  box-shadow: 0 8px 30px color-mix(in oklab, var(--brand) 50%, transparent); }
.founder blockquote { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.4; color: #fff; margin: 1.1rem 0 0.9rem; text-wrap: balance; }
.founder blockquote em { color: var(--c-exam); font-style: italic; }
.founder__by { color: color-mix(in oklab, #fff 60%, var(--ink)); font-family: var(--mono);
  font-size: 0.82rem; letter-spacing: 0.06em; }
