/* MiAula · landing de validación. El papel, la tinta y los subrayadores de DESIGN.md a escala de página. */
:root {
  --paper: #f9f6f2;
  --cream: #f4eee5;
  --card: #ffffff;
  --ink: #141414;
  --ink-hover: #2c2c2b;
  --body: #262626;
  --muted: #4e4d4c;
  --fine: #686765;
  --edge: #e7e7e7;
  --edge-strong: #d6d1c9;
  --lime: #94e130;
  --yellow: #ffd919;
  --orange: #ffa24d;
  --pink: #fad0f6;
  --lavender: #d9b6fd;
  --sky: #a9dcff;
  --mint: #a8ecc8;
  --coral: #ffab9c;

  --f-title: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --r-btn: 5px;
  --r-card: 10px;
  --r-panel: 16px;
  --r-pill: 52px;

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(88px, 12vw, 152px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-paper: 0 1px 2px rgba(20, 20, 20, .06), 0 8px 24px -12px rgba(20, 20, 20, .16);
  --shadow-phone: 0 2px 6px rgba(20, 20, 20, .14), 0 32px 56px -28px rgba(20, 20, 20, .42);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--ink);
  scrollbar-color: #cfc8bd var(--paper);
}
::selection { background: var(--lime); color: var(--ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #cfc8bd; border-radius: 12px; border: 3px solid var(--paper); }
img, svg { display: block; }
h1, h2, h3 { color: var(--ink); font-family: var(--f-title); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(20, 20, 20, .35); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-btn); font: 600 15px var(--f-title); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  font: 600 1rem/1.2 var(--f-title); letter-spacing: -.005em;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out);
}
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-hover); }
.btn-ink:active { background: #000; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn-line { background: var(--card); color: var(--ink); border-color: var(--edge-strong); min-height: 44px; padding: 10px 16px; font-size: .9375rem; }
.btn-line:hover { border-color: var(--ink); }
.btn-line:active { background: var(--cream); }
.btn-line[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-line .ic { width: 18px; height: 18px; }

.text-link { font: 600 1rem/1.3 var(--f-title); color: var(--ink); }
.fine { font-size: .875rem; line-height: 1.5; color: var(--fine); }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 1.25rem/1 var(--f-title); letter-spacing: -.02em; }
.brand img { border-radius: 9px; }
.brand-sm { font-size: 1.0625rem; }
.brand-sm img { border-radius: 7px; }
.top-nav { display: none; gap: 28px; margin-left: auto; }
.top-nav a { font: 500 .9375rem/1 var(--f-title); color: var(--muted); text-decoration: none; padding: 10px 0; }
.top-nav a:hover { color: var(--ink); }
.top > .btn { margin-left: auto; }
@media (min-width: 860px) { .top-nav { display: flex; } .top-nav ~ .btn { margin-left: 8px; } }

/* ---------- Hero + tour + sticky demo ---------- */
.split { display: block; padding-bottom: var(--section); }
.hero { padding-block: clamp(24px, 5vw, 48px) 40px; }
.hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 2.6vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  max-width: 14em;
}
.hl {
  color: var(--ink); padding: 0 .14em; margin: 0 -.14em; border-radius: var(--r-pill);
  background: linear-gradient(var(--hl, var(--lime)), var(--hl, var(--lime))) no-repeat 0 0 / 0% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .55s var(--ease-out);
}
.clause { color: inherit; text-decoration: none; border-radius: var(--r-btn); }
.clause.is-on .hl { background-size: 100% 100%; }
.js .clause { cursor: pointer; }
.js .clause:not(.is-on) { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: .16em; text-decoration-color: rgba(20, 20, 20, .28); }
.js .clause:not(.is-on):hover { text-decoration-color: var(--ink); }
.lede { margin-top: 24px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.55; color: var(--body); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 32px; }
.hero .fine { margin-top: 28px; max-width: 32em; }

.stage {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0; padding: 20px 16px 16px;
  background: var(--cream); border: 1px solid var(--edge); border-radius: var(--r-panel);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.cutout { position: absolute; z-index: -1; fill: var(--paper); pointer-events: none; }
.stage .cutout-burst { width: 380px; height: 380px; right: -128px; top: -150px; }
.phone {
  /* Proporción de teléfono (393 × 852, como el prototipo). En móvil manda el ancho; en escritorio, el
     alto (más abajo). La demo se dibuja a 393 px y site.js la escala para que quepa (--demo-scale). */
  aspect-ratio: 393 / 852; width: min(100%, 340px); height: auto; min-width: 0; min-height: 0;
  padding: 8px; border-radius: 34px;
  background: var(--ink); box-shadow: var(--shadow-phone);
}
.screen { width: 100%; height: 100%; overflow: hidden; border-radius: 27px; isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); background: var(--paper); }
.phone iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--paper); }
.phone.is-scaled .screen { position: relative; }
.phone.is-scaled iframe { position: absolute; top: 0; left: 0; width: 393px; height: var(--demo-h, 852px); transform: scale(var(--demo-scale, 1)); transform-origin: 0 0; }
.stage-close { display: none; }
@media (max-width: 959px) {
  html.demo-open { overflow: hidden; }
  .stage-col.is-open { min-height: var(--col-h, auto); }
  .stage-col.is-open .stage {
    position: fixed; inset: 0; z-index: 60;
    border: 0; border-radius: 0; padding: 12px 16px 16px; gap: 12px;
    animation: stage-in .32s var(--ease-out);
  }
  .stage-col.is-open .stage-close { display: inline-flex; align-self: flex-start; }
  .stage-col.is-open .phone { width: auto; height: min(calc(100svh - 132px), calc((100vw - 32px) * 2.168)); }
}
@keyframes stage-in { from { transform: translateY(24px); } }
.stage-cap { font-size: .875rem; color: var(--fine); text-align: center; }
.stage-cap a { color: var(--muted); }

.tour { margin-top: 56px; }
.tabs-bar {
  position: sticky; top: 0; z-index: 5;
  margin-inline: calc(-1 * var(--gutter)); padding: 10px var(--gutter);
  background: var(--paper);
}
.tabs {
  position: relative; display: flex; gap: 2px; width: max-content; max-width: 100%;
  padding: 4px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-pill);
  overflow-x: auto; scrollbar-width: none; box-shadow: var(--shadow-paper);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 10px 16px; border-radius: var(--r-pill);
  font: 600 .9375rem/1 var(--f-title); color: var(--muted); text-decoration: none;
  transition: color .3s var(--ease-out);
}
.tab .ic { width: 18px; height: 18px; }
.tab:hover { color: var(--ink); }
.tab[aria-current="true"] { color: var(--ink); }
.js .tab[aria-current="true"] { color: #fff; }
.tabs-ink { position: absolute; z-index: 0; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: var(--r-pill); background: var(--ink); opacity: 0; }
.js .tabs-ink { opacity: 1; }
.tabs-ink.is-moving { transition: transform .45s var(--ease-out), width .45s var(--ease-out); }
@media (min-width: 960px) { .tab { padding-inline: 14px; } }
@media (max-width: 1199px) { .tab .ic { display: none; } }
@media (max-width: 560px) { .tab { padding-inline: 8px; font-size: .875rem; } }

.tab-section { padding-top: 72px; max-width: 36rem; }
.tab-title { display: flex; align-items: center; gap: 14px; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); line-height: 1.05; letter-spacing: -.03em; }
.mark-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--hl); color: var(--ink); flex: none; }
.mark-icon .ic { width: 24px; height: 24px; }
.tab-lede { margin-top: 18px; font-size: 1.1875rem; line-height: 1.5; color: var(--body); }
.rows { list-style: none; margin: 28px 0 0; padding: 0; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-card); }
.rows li { text-wrap: pretty; padding: 14px 18px; font-size: 1rem; line-height: 1.5; color: var(--body); }
.rows li + li { border-top: 1px solid var(--edge); }
.show-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.why { padding-top: 88px; max-width: 36rem; }
.why h2 { font-size: clamp(2rem, 1.45rem + 1.9vw, 3rem); line-height: 1.05; letter-spacing: -.03em; }
.why-list { list-style: none; margin: 28px 0 0; padding: 0; }
.why-list li { padding: 18px 0; border-top: 1px solid var(--edge-strong); text-wrap: pretty; }
.why-list li:last-child { border-bottom: 1px solid var(--edge-strong); }
.why-list s {
  display: block; width: fit-content;
  font: 600 1.375rem/1.25 var(--f-title); letter-spacing: -.02em; color: var(--ink);
  text-decoration: line-through; text-decoration-thickness: .1em; text-decoration-color: var(--ink);
}
.why-list span { display: block; margin-top: 6px; color: var(--body); }

@media (min-width: 960px) {
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(40px, 5vw, 88px);
  }
  .hero { grid-column: 1; grid-row: 1; min-height: calc(100svh - 80px); display: flex; flex-direction: column; justify-content: center; padding-block: 24px 64px; }
  .tour { grid-column: 1; grid-row: 2; margin-top: 0; }
  .stage-col { grid-column: 2; grid-row: 1 / span 3; }
  .why { grid-column: 1; grid-row: 3; padding-top: 112px; }
  .stage {
    position: sticky; top: 16px;
    height: calc(100svh - 104px); min-height: 600px; max-height: 960px;
    padding: 28px 28px 18px; justify-content: center;
  }
  .stage .cutout-burst { width: 460px; height: 460px; right: -150px; top: -180px; }
  .phone { width: auto; height: calc(100% - 40px); min-height: 0; max-height: 862px; }
  .tabs-bar { margin-inline: 0; padding: 16px 0 12px; }
  .tab-section { min-height: 76svh; padding-top: 112px; }
  /* Tras la última pestaña sigue «por qué», también junto al teléfono: así la columna no acaba justo
     tras los botones y el teléfono fijo no sube ni se corta al pulsar los de «Más». */
  .tab-section:last-child { min-height: 0; padding-bottom: 0; }
}

/* ---------- Panels: plans and waitlist ---------- */
.panel {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--cream); border: 1px solid var(--edge); border-radius: var(--r-panel);
  padding: clamp(28px, 5vw, 64px);
}
.panel h2 { font-size: clamp(2rem, 1.45rem + 1.9vw, 3rem); line-height: 1.05; letter-spacing: -.03em; }
.plans-head { max-width: 40rem; }
.plans-head p { margin-top: 16px; font-size: 1.125rem; color: var(--body); }
.cutout-scallop { width: 300px; height: 300px; left: -120px; bottom: -130px; }
.plan-grid { display: grid; gap: 16px; margin-top: 36px; }
@media (min-width: 760px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-card); padding: 26px 26px 18px; box-shadow: var(--shadow-paper); }
.plan h3 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; letter-spacing: -.02em; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font: 600 .75rem/1 var(--f-title); color: var(--ink); }
.pill .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.pill-lock { background: var(--lavender); }
.checks { list-style: none; margin: 18px 0 0; padding: 0; }
.checks li { text-wrap: pretty; display: flex; gap: 12px; padding: 10px 0; line-height: 1.45; }
.checks li + li { border-top: 1px solid var(--edge); }
.checks .ic { width: 18px; height: 18px; margin-top: 2px; stroke-width: 2.2; color: var(--ink); }
.checks-plain li + li { border-top-color: rgba(20, 20, 20, .08); }
.plans-foot { margin-top: 20px; }

.waitlist { margin-top: var(--section); }
.panel-lista { display: grid; gap: 32px; }
.panel-lista .cutout-burst { width: 420px; height: 420px; right: -170px; top: -190px; }
.lista-copy p:not(.fine) { margin-top: 16px; font-size: 1.125rem; }
.lista-copy .checks { margin-top: 22px; }
.lista-copy .fine { margin-top: 18px; }
.form-card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-card); padding: 20px clamp(16px, 3vw, 28px); box-shadow: var(--shadow-paper); min-height: 320px; }
.form-slot iframe { display: block; width: 100%; border: 0; min-height: 420px; }
.form-missing { display: grid; place-items: center; min-height: 280px; text-align: center; color: var(--fine); font-size: .9375rem; padding: 24px; border: 1px dashed var(--edge-strong); border-radius: var(--r-card); }
@media (min-width: 960px) {
  .panel-lista { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 56px; align-items: start; }
  .lista-copy { position: sticky; top: 32px; }
}

/* ---------- FAQ ---------- */
.faq { margin-top: var(--section); }
.faq h2 { font-size: clamp(2rem, 1.45rem + 1.9vw, 3rem); letter-spacing: -.03em; }
.faq-list { margin-top: 28px; max-width: 48rem; padding-block: 4px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-card); }
.faq details + details { border-top: 1px solid var(--edge); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 16px 20px; cursor: pointer; list-style: none;
  font: 600 1.0625rem/1.35 var(--f-title); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--muted); transition: transform .3s var(--ease-out); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq summary:hover .ic { color: var(--ink); }
.faq details p { padding: 0 20px 20px; max-width: 40rem; color: var(--body); }

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: var(--section); padding-block: 32px 40px; border-top: 1px solid var(--edge); }
.foot p { color: var(--fine); font-size: .875rem; flex: 1 1 18rem; }
.foot nav { display: flex; gap: 20px; }
.foot nav a { font: 500 .9375rem/1 var(--f-title); color: var(--muted); padding: 8px 0; }

/* ---------- Privacy page ---------- */
.doc { max-width: 46rem; padding-top: 24px; padding-bottom: var(--section); }
.doc h1 { font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem); line-height: 1.05; letter-spacing: -.03em; }
.doc .lede { margin-top: 18px; }
.doc h2 { font-size: 1.5rem; letter-spacing: -.02em; margin-top: 48px; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc li::marker { color: var(--fine); }
.doc .card-note { margin-top: 28px; background: var(--cream); border: 1px solid var(--edge); border-radius: var(--r-card); padding: 18px 20px; }
.todo { background: color-mix(in srgb, var(--yellow) 45%, #fff); color: var(--ink); padding: 0 .25em; border-radius: 4px; }
.notfound { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.notfound h1 { font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem); letter-spacing: -.03em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
