/* Sepia landing: the app's design system (docs/DESIGN.md). Every token it shares with src/styles/tokens.css has the
   same value (npm run check:tokens compares them). "Cristal para el marco, papel para el contenido": glass only for
   the bar; the frames around the recordings are solid so nothing blurs behind them. */
@font-face { font-family: 'Instrument Sans'; src: url(fonts/instrument-sans-latin-wght-normal.woff2) format('woff2-variations'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Instrument Sans'; src: url(fonts/instrument-sans-latin-ext-wght-normal.woff2) format('woff2-variations'); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: #F3F1EC;
  --paper: #FFFFFF;
  --ink: #1C1C1E;
  --ink-2: #6B6A67;
  --line: rgba(40, 36, 30, 0.10);
  --fill: rgba(40, 36, 30, 0.05);
  --accent: #0E6B63;
  --accent-hover: #0B5C55;
  --accent-soft: rgba(14, 107, 99, 0.10);
  --on-accent: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.60);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-edge: rgba(255, 255, 255, 0.80);
  --glass-stroke: rgba(30, 25, 20, 0.10);
  --glass-blur: blur(22px) saturate(180%);
  --frame-stroke: rgba(30, 25, 20, 0.10);
  --ambient-1: rgba(14, 107, 99, 0.16);
  --ambient-2: rgba(214, 170, 110, 0.22);
  --ambient-3: rgba(14, 107, 99, 0.07);
  --e1: 0 1px 2px rgba(40, 30, 20, 0.06), 0 6px 20px rgba(40, 30, 20, 0.04);
  --e2: 0 10px 30px rgba(40, 30, 20, 0.10), 0 1px 2px rgba(40, 30, 20, 0.06);
  --e3: 0 24px 60px rgba(40, 30, 20, 0.18), 0 2px 6px rgba(40, 30, 20, 0.08);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --gutter: 16px;
  --max: 1180px;
  --wide: min(1320px, 100vw - 2 * var(--gutter)); /* the hero: its recording as big as the screen allows */
  --phone: min(350px, 90vw); /* a phone recording's frame: its text close to the app's size */
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; --phone: 340px; } }
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #0E0F11;
    --paper: #18191C;
    --ink: #F2F1EE;
    --ink-2: #A09E99;
    --line: rgba(255, 255, 255, 0.08);
    --fill: rgba(255, 255, 255, 0.06);
    --accent: #4FB8AC;
    --accent-hover: #63C6BA;
    --accent-soft: rgba(79, 184, 172, 0.16);
    --on-accent: #06201D;
    --glass: rgba(30, 31, 35, 0.58);
    --glass-strong: rgba(30, 31, 35, 0.80);
    --glass-edge: rgba(255, 255, 255, 0.10);
    --glass-stroke: rgba(255, 255, 255, 0.08);
    --frame-stroke: rgba(255, 255, 255, 0.14);
    --ambient-1: rgba(79, 184, 172, 0.10);
    --ambient-2: rgba(214, 170, 110, 0.07);
    --ambient-3: rgba(79, 184, 172, 0.04);
    --e1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --e2: 0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --e3: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--canvas); color: var(--ink);
  font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 12px;
  background: var(--paper); box-shadow: var(--e2); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 8% -6%, var(--ambient-1), transparent 70%),
              radial-gradient(50% 36% at 96% 2%, var(--ambient-2), transparent 70%),
              radial-gradient(70% 50% at 50% 108%, var(--ambient-3), transparent 70%); }
.glass { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge), var(--e2); }
.glass-strong { background: var(--glass-strong); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--glass-strong); } }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ── Bar: both ways in, always one tap away ──────────── */
.bar { position: sticky; top: 10px; z-index: 10; width: min(calc(1320px + 16px), calc(100% - 2 * var(--gutter) + 16px)); /* as wide as the hero */
  margin: 10px auto 0; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 16px; border-radius: 999px; }
.brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; min-height: 44px;
  font-family: var(--serif); font-size: 26px; line-height: 1; text-decoration: none; }
.brand--small { font-size: 21px; margin: 0; }
@media (max-width: 359px) { .bar .brand span { display: none; } .bar .btn--sm { padding: 0 12px; } }

/* ── Buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px;
  border-radius: 14px; font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 15px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--tinted { background: var(--accent-soft); color: var(--accent); }
.btn--plain { color: var(--accent); }
.btn--plain:hover { background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* ── Type ────────────────────────────────────────────── */
.kicker, .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); text-wrap: balance; }
.eyebrow { color: var(--accent); }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 11vw, 92px); line-height: 0.98;
  letter-spacing: -0.02em; margin: 12px 0 0; text-wrap: balance; }
h1 em, h2 em { color: var(--accent); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 8.2vw, 56px); line-height: 1.02;
  letter-spacing: -0.015em; margin: 10px 0 14px; text-wrap: balance; }
h3 { font-size: 17px; font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.lead { font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 32em; text-wrap: pretty; }
.moment__copy p:not(.eyebrow), .ai__head p:not(.eyebrow), .cards p, .closing p { color: var(--ink-2); text-wrap: pretty; }
.ai__head a { color: var(--accent); }

/* ── Layout ──────────────────────────────────────────── */
main { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions--center { justify-content: center; }
@media (max-width: 479px) { .hero .actions .btn { flex: 1 1 auto; } }

/* Hero: the pain, then the recording that answers it (right under the headline on a phone, beside it on a desktop,
   wider than the rest of the page so the app reads at close to its own size). */
.hero { display: grid; gap: 20px; padding-top: 28px; grid-template-areas: 'head' 'clip' 'body'; }
.hero__head { grid-area: head; }
.hero .clip { grid-area: clip; }
.hero__body { grid-area: body; }
.assure { margin-top: 14px; max-width: 30em; font-size: 15px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
@media (min-width: 1024px) { h1 { font-size: 76px; } }
@media (min-width: 1200px) {
  .hero { margin-inline: calc((min(var(--max), 100vw - 2 * var(--gutter)) - var(--wide)) / 2);
    grid-template-columns: minmax(340px, 0.8fr) minmax(0, 2fr); grid-template-areas: 'head clip' 'body clip';
    grid-template-rows: auto 1fr; column-gap: 48px; row-gap: 22px; align-items: start; padding-top: 56px;
    min-height: min(calc(100svh - 96px), 780px); }
  .hero__head { align-self: end; }
  .hero .clip { align-self: center; }
  h1 { font-size: clamp(56px, 4.7vw, 72px); }
}

/* Del examen a la nota: three short steps under the hero. */
.steps { list-style: none; padding: 0; display: grid; gap: 14px; counter-reset: step; margin-top: 44px; }
.steps li { position: relative; padding-left: 40px; color: var(--ink-2); counter-increment: step; text-wrap: pretty; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px;
  font-variant-numeric: tabular-nums; }
.steps b { color: var(--ink); font-weight: 600; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
@media (min-width: 1024px) { .steps { margin-top: 56px; } }

/* A moment: when it hurts, one line on what Sepia does, and the recording of it. */
.moment { display: grid; gap: 24px; padding-top: 64px; }
.moment__copy { max-width: 30em; }
.moment__copy p:not(.eyebrow) { max-width: 26em; }
.moment__copy .fact { margin-top: 12px; font-size: 15px; }
.fact:has(span:empty) { display: none; }

/* What an NEAE coordinator checks first, one line each. */
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; max-width: 30em; }
.facts li { position: relative; padding-left: 20px; font-size: 16px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.facts li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); }
@media (min-width: 1024px) {
  .moment { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 96px; padding-top: 120px;
    max-width: 1000px; margin: 0 auto; }
  .moment--flip .moment__copy { order: 2; }
  .moment--wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); column-gap: 48px; max-width: none; }
}

/* Two short moments side by side on a desktop, each with its copy above its recording (one after the other on a phone). */
@media (min-width: 1024px) {
  .duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; max-width: 1000px;
    margin: 0 auto; padding-top: 120px; }
  .duo .moment { grid-template-columns: none; grid-template-rows: 1fr auto; align-items: start; row-gap: 28px;
    padding-top: 0; max-width: none; }
  .duo h2 { font-size: 44px; }
}

.week { padding-top: 80px; max-width: 30em; }
.week h2 { margin-bottom: 0; }
@media (min-width: 1024px) { .week { padding-top: 144px; max-width: none; text-align: center; } }

/* ── Recordings: a solid frame around the app; the poster underneath shows until the video plays ── */
.clip { display: grid; justify-items: center; gap: 12px; }
.clip__frame { width: var(--phone); padding: 6px; border-radius: 40px; background: var(--glass-strong);
  border: 0.5px solid var(--frame-stroke); box-shadow: inset 0 1px 0 var(--glass-edge), var(--e3); }
.clip__screen { position: relative; overflow: hidden; border-radius: 34px; background: var(--canvas); aspect-ratio: 390 / 844; }
.clip__screen img { width: 100%; height: 100%; object-fit: cover; }
.clip__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 240ms var(--ease); }
.clip.is-live video { opacity: 1; }
/* The hero and the history exam: the whole width on a phone (a shorter screen), the desktop app beside the copy. */
.clip--hero .clip__frame, .clip--wide .clip__frame { width: 100%; max-width: 420px; padding: 5px; border-radius: 26px; }
.clip--hero .clip__screen, .clip--wide .clip__screen { aspect-ratio: 390 / 660; border-radius: 21px; }
@media (min-width: 1024px) {
  .clip--hero .clip__frame, .clip--wide .clip__frame { max-width: none; padding: 6px; border-radius: 20px; }
  .clip--hero .clip__screen, .clip--wide .clip__screen { aspect-ratio: 1024 / 640; border-radius: 14px; }
}
.clip figcaption { display: flex; align-items: center; gap: 12px; max-width: 30em; font-size: 14px; line-height: 1.45;
  color: var(--ink-2); text-wrap: pretty; }
.clip--hero figcaption, .clip--wide figcaption { justify-self: start; }
.clip:not(.clip--hero):not(.clip--wide) figcaption { max-width: var(--phone); }
.clip__toggle { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); cursor: pointer;
  transition: background-color 160ms var(--ease); }
.clip__toggle:hover { background: var(--accent-soft); color: var(--accent); }
.clip__toggle[hidden] { display: none; }
.clip__toggle svg { width: 16px; height: 16px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .clip__screen video, .clip__toggle { transition: none; } }

/* ── IA, and coming from paper: a heading beside four short cards ── */
.ai { padding-top: 96px; display: grid; gap: 24px; }
.ai__head { max-width: 30em; }
.ai__head h2 { margin-bottom: 10px; }
.cards { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--e1); }
.cards li { background: var(--paper); padding: 20px 20px 22px; }
.cards p { font-size: 16px; }
@media (min-width: 768px) { .cards { grid-template-columns: 1fr 1fr; } .cards li { padding: 26px 28px 28px; } }
@media (min-width: 1024px) { .ai { padding-top: 144px; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: start; } }

/* ── Closing ─────────────────────────────────────────── */
.closing { margin: 96px auto 0; max-width: 34em; text-align: center; }
.closing h2 { margin-top: 0; }
.assure--list { list-style: none; padding: 0; margin: 22px auto 0; display: grid; gap: 6px; }
@media (min-width: 768px) { .assure--list { max-width: none; } }
@media (min-width: 1024px) { .closing { margin-top: 144px; } }

/* ── Footer ──────────────────────────────────────────── */
.foot { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 88px auto 0;
  padding: 24px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 0.5px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--ink-2); font-size: 14px; }
.foot .brand { color: var(--ink); }
.foot__legal { display: flex; gap: 16px; margin-left: auto; }
.foot__legal a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.foot__legal a:hover { color: var(--ink); text-decoration: underline; }
.foot__link { color: var(--accent); font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot__link:hover { text-decoration: underline; }
@media (max-width: 599px) { .foot__legal { margin-left: 0; } }

/* ── Legal pages (privacidad.html, aviso-legal.html) ─── */
.legal { max-width: 720px; padding-top: 48px; }
.legal h1 { font-size: clamp(44px, 10vw, 64px); margin-bottom: 12px; }
.legal h2 { font-family: var(--sans); font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: 0; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--ink-2); text-wrap: pretty; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 10px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal b { color: var(--ink); font-weight: 600; }
.legal a { color: var(--accent); }
.legal__pending { margin-top: 24px; padding: 18px 20px; border-radius: 20px; background: var(--paper); box-shadow: var(--e1); }
