/* Overlay Sub Translator — landing page.
   The app's own look: night-navy ground, frosted glass panels with a pale edge, violet for
   actions, the two soft orbs of the app's backdrop, and the castle-in-the-clouds art from its
   login screen. Every picture is a film frame carrying its two subtitle lines. */

:root {
  /* Taken from Overlay_Translator/src/ui/theme.ts */
  --bg: #0B1020;
  --surface: #151D33;
  --surface-2: #1C2540;
  --glass: rgba(26, 35, 59, .62);
  --glass-solid: rgba(26, 35, 59, .78);
  --edge: rgba(198, 209, 255, .14);
  --ink: #F4F6FF;
  --muted: #A8B4CF;
  --accent: #B4B0FF;
  --primary: #5E54DB;  /* the app's #7167ED, one step deeper so white text passes 4.5:1 */
  --primary-hover: #7167ED;
  --lavender: #C6C3F8;
  --success: #79E2B5;
  --letterbox: #04060D;

  --font: 'Be Vietnam Pro', system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.2rem + 3.6vw, 4.5rem);

  --m: clamp(16px, 2.4vw, 40px);
  --gutter: clamp(12px, 1.6vw, 24px);
  --gap: clamp(120px, 12vw, 200px);
  --r: 12px;
  --r-s: 10px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-soft: cubic-bezier(.25, .8, .25, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.55 var(--font); overflow-x: clip; }
/* The app's backdrop: two faint orbs, violet top-right and teal bottom-left. */
body::before, body::after { content: ''; position: fixed; z-index: -1; border-radius: 50%; pointer-events: none; }
body::before { width: 70vmax; height: 70vmax; top: -30vmax; right: -24vmax; background: rgba(103, 85, 205, .16); filter: blur(60px); }
body::after { width: 56vmax; height: 56vmax; bottom: -26vmax; left: -26vmax; background: rgba(54, 139, 183, .12); filter: blur(60px); }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

.glass {
  background: var(--glass); border: 1px solid var(--edge); border-radius: var(--r);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
}
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; } }

.hero__title, .section-title, .how__title, .show__list button, .faq__head h2, .cta__word, .footer__name, .footer__invite h2 {
  font-family: var(--font); font-weight: 700; letter-spacing: -.035em; line-height: 1.04;
}
.section-title { font-size: var(--step-head); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px;
  background: var(--primary); color: var(--ink); font-weight: 600; text-decoration: none; border: 0; border-radius: var(--r-s);
  transition: transform 140ms var(--ease-out), background-color 160ms ease;
}
.button:active { transform: scale(.97); }
.button--glass { background: var(--glass); border: 1px solid var(--edge); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--primary-hover); }
  .button--glass:hover { background: rgba(190, 200, 255, .14); }
}

/* ---------- nav ---------- */
.nav { position: absolute; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 32px; padding: 20px var(--m); }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; margin-right: auto; }
.nav__brand img { width: 32px; height: 32px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { text-decoration: none; color: var(--ink); opacity: .85; transition: opacity 160ms ease, color 160ms ease; }
.footer__links a, .footer__legal a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .3em; transition: text-decoration-color 160ms ease; }
.nav__action { font-weight: 600; text-decoration: none; padding: 9px 16px; border-radius: var(--r-s); background: var(--primary); transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.nav__action:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { opacity: 1; color: var(--accent); }
  .footer__links a:hover, .footer__legal a:hover { text-decoration-color: currentColor; }
  .nav__action:hover { background: var(--primary-hover); }
}

/* ---------- hero: the login art behind, the film in a glass frame ---------- */
.hero { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: center; min-height: 100svh; padding: 120px var(--m) 72px; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; }
/* Neutral scrim so the headline reads on the painting. */
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(11, 16, 32, .92) 0%, rgba(11, 16, 32, .7) 42%, rgba(11, 16, 32, .25) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(11, 16, 32, 0) 30%); }
.hero__copy { grid-column: 1 / 6; display: grid; gap: 28px; justify-items: start; }
.hero__title { font-size: clamp(56px, 7.4vw, 124px); line-height: 1; letter-spacing: -.045em; }
.mask { display: block; overflow: hidden; padding: .14em 0 .06em; margin-top: -.14em; }
.mask > span { display: block; }
.hero__text { max-width: 36ch; font-size: var(--step-lead); line-height: 1.45; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.scrap { grid-column: 6 / 13; position: relative; padding: 12px; container-type: inline-size; }
.scrap__screen { position: relative; overflow: hidden; border-radius: 6px 6px 0 0; background: var(--letterbox); padding-top: 5%; }
.scrap video { width: 100%; height: auto; aspect-ratio: 1280 / 544; object-fit: cover; }
.scrap__bar { display: grid; place-items: center; min-height: 12cqw; padding: 10px 16px; background: var(--letterbox); border-radius: 0 0 6px 6px; }
.scrap__pill { position: absolute; top: -20px; left: 28px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: var(--step-small); font-weight: 600; background: var(--glass-solid); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.sub-en, .sub-vi, .screen__en, .screen__vi, .tile__sub, .tile__en, .tile__vi, .card__en, .card__vi { font-family: var(--font); font-weight: 600; line-height: 1.25; }
.sub-en { position: absolute; left: 50%; bottom: 7%; translate: -50% 0; width: max-content; max-width: 90%; text-align: center; color: #fff; font-size: var(--step-body); -webkit-text-stroke: .22em #000; paint-order: stroke fill; transition: opacity 220ms ease; }
.sub-vi { color: #fff; text-align: center; font-size: var(--step-lead); transition: opacity 220ms ease; }
.scrap.is-swapping .sub-en, .scrap.is-swapping .sub-vi { opacity: 0; }

/* ---------- showcase ---------- */
.show { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding: var(--gap) var(--m) 0; align-items: start; }
.show__index { grid-column: 1 / 6; display: grid; gap: 36px; align-content: start; }
.show__title { font-size: var(--step-lead); font-weight: 600; color: var(--muted); }
.show__list { display: grid; gap: 4px; }
.show__list button {
  background: none; border: 0; padding: 0; text-align: left; font-size: var(--step-head); color: var(--muted);
  opacity: .5; transition: opacity 180ms ease, color 180ms ease, transform 180ms var(--ease-out);
}
.show__list button[aria-selected="true"] { color: var(--ink); opacity: 1; }
.show__list button[aria-selected="true"]::after { content: ''; display: inline-block; width: .22em; height: .22em; margin-left: .2em; border-radius: 50%; background: var(--accent); vertical-align: .14em; }
@media (hover: hover) and (pointer: fine) { .show__list button:hover { opacity: 1; transform: translateX(6px); } }
.show__note { max-width: 36ch; }

.show__stage { grid-column: 6 / 13; padding: clamp(16px, 3vw, 40px); display: grid; gap: 24px; }
.screen { position: relative; aspect-ratio: 16 / 9; background: var(--letterbox); border-radius: 6px; overflow: hidden; container-type: inline-size; touch-action: none; user-select: none; }
.screen__art { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; width: 100%; height: auto; aspect-ratio: 1600 / 680; object-fit: cover; transition: opacity 200ms ease; }
.screen.is-swapping .screen__art, .screen.is-swapping .screen__en, .screen.is-swapping .screen__vi { opacity: 0; }
.screen__en, .screen__vi { position: absolute; left: 50%; translate: -50% 0; width: max-content; max-width: 88%; text-align: center; font-size: max(14px, 3.3cqw); transition: opacity 220ms ease; }
.screen__en { z-index: 2; bottom: 24%; color: #fff; -webkit-text-stroke: .22em #000; paint-order: stroke fill; pointer-events: none; }
.screen__vi { z-index: 3; bottom: 4.5%; color: #fff; opacity: 0; }
.screen[data-mode="over"] .screen__vi { bottom: 24%; background: var(--letterbox); padding: 0 .6em; border-radius: 4px; }
/* Covering mode: the Vietnamese line takes the English line's place. */
.screen[data-mode="over"].is-on .screen__en { opacity: 0; }
.screen.is-on .screen__vi { opacity: 1; }
.scan {
  position: absolute; z-index: 4; left: 4%; top: 14%; width: 92%; height: 13%; cursor: grab; border-radius: 6px;
  outline: 2px dashed var(--accent); background: rgba(180, 176, 255, .10); transition: top 700ms var(--ease-in-out), background-color 200ms ease;
}
.scan.is-dragging { cursor: grabbing; transition: background-color 200ms ease; }
.screen.is-on .scan { outline-style: solid; background: rgba(180, 176, 255, .06); }
.show__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.seg { display: inline-flex; background: rgba(8, 14, 29, .6); border: 1px solid var(--edge); border-radius: var(--r-s); padding: 4px; }
.seg button { border: 0; background: none; padding: 10px 16px; min-height: 44px; border-radius: 7px; font-size: var(--step-small); font-weight: 600; color: var(--muted); transition: background-color 160ms ease, color 160ms ease; }
.seg button[aria-pressed="true"] { background: rgba(139, 127, 255, .28); color: var(--ink); }
.readout { font-size: var(--step-small); color: var(--muted); }
.readout.is-on { color: var(--success); }

/* ---------- features ---------- */
.feats { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding: var(--gap) var(--m); }
.feats__head { grid-column: 1 / 4; display: grid; gap: 24px; align-content: start; }
.feats__head p { max-width: 30ch; color: var(--muted); }
.feats__grid { grid-column: 4 / 13; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 14px; }
.tile { display: grid; gap: 14px; align-content: start; }
.tile--wide { grid-column: span 2; }
.tile__pic { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r); background: var(--surface); container-type: inline-size; }
.tile--wide .tile__pic { aspect-ratio: 8 / 5; }
.tile__pic > img { width: 100%; height: 100%; object-fit: cover; transition: scale 600ms var(--ease-soft); }
.tile__pic--light { background: var(--lavender); }
.tile__pic--light .multiply { mix-blend-mode: multiply; object-fit: contain; padding: 8% 8% 20%; }
.tile__pic--app { background: var(--primary); }
.tile__pic--app img { width: 76%; height: auto; margin: 14% auto 0; object-fit: initial; border-radius: 10px 10px 0 0; }
.tile__pic--box { background: var(--letterbox); }
.tile__pic--box img { position: absolute; inset: 15% 0 auto; height: auto; aspect-ratio: 1600 / 680; }
.chip { position: absolute; top: 14px; left: 14px; color: var(--ink); font-size: var(--step-small); font-weight: 600; padding: 6px 12px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; }
.key { background: var(--primary); color: var(--ink); padding: 0 6px; border-radius: 4px; }
.tile__sub { position: absolute; left: 50%; bottom: 8%; translate: -50% 0; width: max-content; max-width: 90%; text-align: center; background: var(--letterbox); color: #fff; padding: .3em .7em; border-radius: 4px; font-size: 14px; }
.tile__en, .tile__vi { position: absolute; left: 50%; translate: -50% 0; width: max-content; max-width: 84%; text-align: center; color: #fff; font-size: 14px; }
.tile__en { bottom: 23%; -webkit-text-stroke: .22em #000; paint-order: stroke fill; }
.tile__vi { bottom: 5%; }
.tile figcaption { display: grid; gap: 2px; }
.tile figcaption strong { font-size: var(--step-lead); font-weight: 600; line-height: 1.25; }
.tile figcaption span { color: var(--muted); max-width: 34ch; }
@media (hover: hover) and (pointer: fine) { .tile:hover .tile__pic > img:not(.multiply) { scale: 1.04; } }

/* ---------- how: four glass panels over the login art ---------- */
.how { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 120px var(--m); overflow: hidden; isolation: isolate; }
.how__bg { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.how::before { content: ''; position: absolute; z-index: -1; inset: 0; background: rgba(11, 16, 32, .45); }
.field { position: relative; min-height: 72svh; padding: 28px; display: flex; flex-direction: column; }
.how__title { font-size: var(--step-head); position: absolute; top: 28px; left: 28px; right: 28px; }
.field .card { margin: 30svh auto 0; }
.field__line { margin-top: auto; padding-top: 32px; font-weight: 600; font-size: var(--step-lead); line-height: 1.25; letter-spacing: -.015em; max-width: 16ch; }

.card { width: min(260px, 100%); background: var(--bg); color: var(--ink); font-size: 14px; padding: 12px; display: grid; gap: 6px; border: 1px solid var(--edge); border-radius: var(--r-s); transition: transform 150ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .field:hover .card { transform: translateY(-6px); } }
.card__search { background: rgba(8, 14, 29, .6); border: 1px solid var(--edge); border-radius: 8px; color: var(--muted); padding: 8px 10px; }
.card__row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.card__row.is-hot { background: rgba(139, 127, 255, .2); }
.tick { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.dot--a { background: #ff8a00; } .dot--b { background: #e33; } .dot--c { background: #2a6edb; }
.card__q { font-weight: 600; font-size: 15px; padding: 4px 4px 6px; }
.card__opt { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.card__opt.is-hot .radio { border: 5px solid var(--accent); }
.card__btns { display: flex; justify-content: flex-end; gap: 16px; padding: 8px 4px 2px; font-weight: 600; }
.card__go { color: var(--accent); }
.card--frame { position: relative; aspect-ratio: 16 / 10; padding: 0; background: var(--letterbox); overflow: hidden; container-type: inline-size; display: block; }
.card--frame img { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; width: 100%; height: auto; }
.card__en, .card__vi { position: absolute; left: 50%; translate: -50% 0; width: max-content; color: #fff; font-size: 14px; }
.card__en { bottom: 26%; -webkit-text-stroke: .22em #000; paint-order: stroke fill; }
.card__vi { bottom: 5%; }
.card__scan { position: absolute; left: 6%; right: 6%; bottom: 23%; height: 17%; border-radius: 4px; outline: 2px dashed var(--accent); }

/* ---------- faq ---------- */
.faq { padding: var(--gap) var(--m) 0; display: grid; gap: 10px; }
.faq__head { padding-bottom: 40px; }
.faq__head h2 { font-size: var(--step-head); }
.qa { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding: 36px 32px; background: var(--glass); border: 1px solid var(--edge); border-radius: var(--r); }
.qa h3 { grid-column: 1 / 6; font-size: var(--step-lead); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; }
.qa p { grid-column: 7 / 13; max-width: 52ch; color: var(--ink); }

/* ---------- cta: one word is the button ---------- */
.cta { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; min-height: 60svh; margin: var(--gap) var(--m) 0; border-radius: 20px; background: var(--primary); color: var(--ink); text-decoration: none; overflow: hidden; padding: 28px 32px 0; transition: background-color 200ms ease; }
.cta__note { display: block; max-width: 34ch; font-weight: 600; }
.cta__arrow { position: absolute; top: 24px; right: 28px; width: 48px; height: 48px; transition: transform 200ms var(--ease-out); }
.cta__word { display: block; font-size: clamp(110px, 27vw, 520px); line-height: .82; letter-spacing: -.06em; white-space: nowrap; margin-bottom: -.04em; }
.cta:hover, .cta:focus-visible { background: var(--primary-hover); }
.cta:hover .cta__arrow { transform: translate(4px, -4px); }
.cta:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* ---------- footer ---------- */
.footer { position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; padding: var(--gap) var(--m) 0; }
.footer__top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); }
.footer__invite { grid-column: 1 / 8; display: grid; gap: 32px; justify-items: start; }
.footer__invite h2 { font-size: var(--step-head); }
.footer__links { grid-column: 10 / 13; display: grid; gap: 10px; align-content: start; font-weight: 600; }
.footer__legal { margin-top: auto; display: flex; justify-content: space-between; gap: 24px; font-size: var(--step-small); color: var(--muted); padding-top: 48px; }
.footer__name { font-size: clamp(110px, 19vw, 360px); line-height: .8; letter-spacing: -.06em; white-space: nowrap; transform: translateY(24%); margin-top: 8px; color: var(--surface-2); }

.donate { display: grid; gap: 16px; justify-items: start; }
.amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid var(--edge); background: var(--glass); border-radius: var(--r-s); padding: 10px 16px; min-height: 44px; font-weight: 600; transition: background-color 160ms ease, border-color 160ms ease; }
.chip-btn[aria-pressed="true"] { background: rgba(139, 127, 255, .2); border-color: var(--accent); }
.qr img { width: 220px; height: 220px; background: #fff; border-radius: var(--r-s); }

/* ---------- motion ---------- */
.rise { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
@media (prefers-reduced-motion: no-preference) {
  .js .rise:not(.is-in) { opacity: 0; transform: translateY(24px); }
  .js .mask > span { transform: translateY(105%); transition: transform 900ms var(--ease-out); }
  .js .mask:nth-child(2) > span { transition-delay: 90ms; }
  .js .is-loaded .mask > span { transform: none; }
  .js .shutter { clip-path: inset(100% 0 0 0 round var(--r)); transition: clip-path 1100ms var(--ease-in-out) 200ms; }
  .js .shutter video { transform: scale(1.12); transition: transform 1500ms var(--ease-soft) 200ms; }
  .js .shutter.is-in { clip-path: inset(-40px -40px -40px -40px round var(--r)); }
  .js .shutter.is-in video { transform: none; }
  .hero__bg { animation: drift 24s var(--ease-in-out) infinite alternate; }
  @keyframes drift { to { transform: scale(1.06) translateY(-1.5%); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scan { transition: background-color 200ms ease; }
}

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .hero { align-content: center; row-gap: 48px; }
  .hero__copy { grid-column: 1 / -1; }
  .scrap { grid-column: 1 / -1; }
  .show__index { grid-column: 1 / -1; margin-bottom: 40px; }
  .show__stage { grid-column: 1 / -1; }
  .feats__head { grid-column: 1 / -1; margin-bottom: 40px; }
  .feats__grid { grid-column: 1 / -1; }
  .how { grid-template-columns: repeat(2, 1fr); }
  .field { min-height: 0; padding: 32px 24px 36px; }
  .how__title { position: static; order: -2; margin-bottom: 24px; }
  .field__line { order: -1; margin: 0 0 28px; padding-top: 0; max-width: 18ch; }
  .field .card { margin: 0; }
  .nav__links { display: none; }
  .footer { min-height: 0; }
  .footer__legal { margin-top: 120px; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .hero { padding-top: 104px; padding-bottom: 56px; }
  .hero::before { background: linear-gradient(180deg, rgba(11, 16, 32, .78) 0%, rgba(11, 16, 32, .55) 55%, var(--bg) 100%); }
  .hero__title { font-size: 17vw; }
  .hero__actions .button { flex: 1 1 100%; }
  .scrap { padding: 8px; }
  .scrap__pill { left: 16px; }
  .sub-en { font-size: 13px; }
  .sub-vi { font-size: 15px; }

  .show { padding-top: 120px; }
  .show__index { gap: 20px; margin-bottom: 24px; }
  .show__list { display: flex; flex-wrap: wrap; gap: 4px 20px; }
  .screen__en, .screen__vi { font-size: 14px; }

  .feats__grid { grid-template-columns: repeat(2, 1fr); gap: 24px 8px; }
  .tile--wide { grid-column: 1 / -1; order: -1; }
  .tile figcaption strong { font-size: 17px; }
  .tile figcaption span { font-size: 15px; }
  .tile__sub { font-size: 13px; }
  .tile__en, .tile__vi { font-size: 13px; }

  .how { grid-template-columns: 1fr; padding: 72px var(--m); }
  .field { padding: 28px 20px 32px; }
  .field__line { margin-bottom: 20px; max-width: none; }

  .qa { display: block; padding: 24px 20px; }
  .qa h3 { font-size: 20px; margin-bottom: 8px; }

  .cta { min-height: 46svh; padding: 24px 20px 0; }
  .cta__arrow { width: 32px; height: 32px; top: 20px; right: 20px; }
  .cta__note { max-width: 22ch; font-size: 17px; }
  .cta__word { font-size: 30vw; }

  .footer__invite, .footer__links { grid-column: 1 / -1; }
  .footer__invite .button { width: 100%; }
  .footer__links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 40px; }
  .footer__legal { flex-direction: column; gap: 8px; font-size: 13px; }
  .footer__name { font-size: 30vw; }
  .nav__brand { font-size: 0; }
  .nav__brand img { width: 36px; height: 36px; }
}

/* ---------- Legal pages: privacy, terms, delete-account ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 128px var(--m) 96px; }
.doc h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.15; letter-spacing: -.02em; }
.doc__meta { color: var(--muted); font-size: var(--step-small); margin-top: 12px; }
.doc__lead { font-size: var(--step-lead); color: var(--muted); margin-top: 24px; }
.doc h2 { font-size: 1.25rem; margin: 48px 0 12px; }
.doc p + p, .doc p + ul, .doc ul + p, .doc ol + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.25em; display: grid; gap: 8px; }
.doc ul { list-style: disc; }
.doc li::marker { color: var(--accent); }
.doc a { color: var(--accent); text-underline-offset: .2em; }
.doc strong { font-weight: 600; }
.doc .glass { padding: 24px; margin-top: 16px; }
.doc__toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 32px; font-size: var(--step-small); }
.doc__toc a { color: var(--muted); }
.doc__foot { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--edge); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--step-small); color: var(--muted); }
.doc__foot a { color: var(--muted); }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: var(--step-small); }
.form input, .form textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-s); padding: 12px 14px; width: 100%; }
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.form__check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; }
.form__check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.form .button { justify-self: start; border: 0; }
.form__note { color: var(--muted); font-size: var(--step-small); }
@media (max-width: 640px) { .doc { padding-top: 96px; } .nav__links { display: none; } }
