/* ==========================================================================
   Trimbo - site styles
   One theme (dark, taken from the app icon), one accent (mascot blue).
   Shape rule: interactive controls are pills, surfaces are 24px squircles
   (echoing the app-icon corner), form fields are 14px.
   ========================================================================== */

@font-face {
  font-family: "Funnel Display";
  src: url("../fonts/funnel-display.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("../fonts/funnel-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette, sampled from the mascot artwork */
  --ink: #1f2226;          /* deepest surface: footer, loader */
  --ground: #2b2f33;       /* the app-icon grey: page background */
  --raise: #33383d;        /* raised panels */
  --raise-2: #3a3f45;      /* skeleton base */
  --line: #4a5057;         /* hairlines */
  --text: #eef2f5;         /* 13.0:1 on ground */
  --muted: #b5bec7;        /*  7.6:1 on ground */
  --quiet: #9ba5af;        /*  5.4:1 on ground (never lighter) */
  --blue: #89cff0;         /* mascot body: the single accent */
  --blue-deep: #5aa9de;    /* mascot legs: hover / pressed accent */
  --coral: #ff8a7a;        /* mascot cheeks: error status only (6.3:1) */
  --on-blue: #1f2226;      /* text on blue buttons (9.6:1) */

  --f-display: "Funnel Display", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-sans: "Funnel Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.2rem + 1vw, 2rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.9vw, 4.75rem);
  --step-5: clamp(2.75rem, 1.5rem + 5.4vw, 5.75rem);

  --gutter: clamp(16px, 4vw, 48px);
  --wrap: 1320px;
  --mast-h: 68px;
  --r-surface: 24px;
  --r-field: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quart: cubic-bezier(0.25, 1, 0.5, 1);

  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h) + 16px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { overflow-x: clip; display: block; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, summary, label, select, input { touch-action: manipulation; -webkit-tap-highlight-color: rgba(137, 207, 240, 0.18); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--blue); color: var(--on-blue); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.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-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--blue); color: var(--on-blue); padding: 10px 18px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- wordmark: the dot of the i is the mascot's four-point star ---------- */
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.wordmark__mascot { width: 30px; height: auto; flex: none; }
.wordmark__type {
  font-family: var(--f-display); font-weight: 700; font-size: 1.45rem;
  letter-spacing: -0.04em; line-height: 1;
}
.wm-i { position: relative; display: inline-block; }
.wm-star {
  position: absolute; left: 50%; top: -0.16em; width: 0.36em; height: 0.36em;
  transform: translateX(-50%); fill: var(--blue);
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--blue); --fg: var(--on-blue);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bg);
  font-family: var(--f-sans); font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn:hover { --bg: #a6dcf5; }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn--ghost { --bg: transparent; --fg: var(--text); border-color: var(--line); }
.btn--ghost:hover { --bg: transparent; border-color: var(--blue); color: var(--blue); }
.btn--sm { min-height: 40px; padding: 0 1.1em; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn svg { width: 1em; height: 1em; flex: none; }

.text-link {
  color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.22em; transition: color 0.2s;
}
.text-link:hover { color: var(--text); }

/* ---------- masthead ---------- */
.mast {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--mast-h);
  display: flex; align-items: center;
  background: rgba(43, 47, 51, 0.96); border-bottom: 1px solid var(--line);
  transition: background-color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
/* Over the hero (JS confirms position): transparent. Without JS it stays solid. */
html.js .mast[data-over-hero="true"] { background: rgba(43, 47, 51, 0); border-bottom-color: transparent; }
.mast__inner { display: flex; align-items: center; gap: 24px; width: 100%; }
.mast__nav { margin-left: auto; }
.mast__nav ul { display: flex; gap: clamp(16px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.mast__nav a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.97rem;
  padding: 8px 0; transition: color 0.2s;
}
.mast__nav a:hover, .mast__nav a[aria-current="page"] { color: var(--text); }
.mast__cta { flex: none; }

/* language switcher: a native <details>, so it works without JS too */
.langsw { position: relative; flex: none; }
.langsw summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px 0 14px; border-radius: 999px; border: 1px solid var(--line);
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--text);
  transition: border-color 0.2s, color 0.2s;
}
.langsw summary::-webkit-details-marker { display: none; }
.langsw summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -3px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg);
  transition: transform 0.25s var(--ease-out), margin-top 0.25s var(--ease-out);
}
.langsw[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.langsw summary:hover, .langsw[open] summary { border-color: var(--blue); color: var(--blue); }
.langsw__list {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; min-width: 190px;
  list-style: none; margin: 0; padding: 6px; border-radius: 18px;
  background: var(--raise); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(15, 17, 19, 0.45);
}
.langsw__list a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500;
}
.langsw__list a:hover, .langsw__list a:focus-visible { background: var(--ink); color: var(--blue); }
.langsw__list a[aria-current="true"]::after {
  content: ""; width: 10px; height: 5px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg) translateY(-2px);
}
.mast__menu { display: none; }

@media (max-width: 860px) {
  .mast__cta { display: none; }
}
@media (max-width: 640px) {
  .mast__inner { gap: 10px; }
  .langsw { margin-left: auto; order: 2; }
  .langsw summary { min-height: 44px; }
  .mast__menu {
    order: 3;
    display: inline-flex; align-items: center; gap: 8px; margin-left: 0;
    min-height: 44px; padding: 0 16px; border-radius: 999px;
    background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 600; cursor: pointer;
  }
  .mast__menu-icon { width: 16px; height: 10px; position: relative; }
  .mast__menu-icon::before, .mast__menu-icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out);
  }
  .mast__menu-icon::before { top: 0; }
  .mast__menu-icon::after { top: 8px; }
  .mast__menu[aria-expanded="true"] .mast__menu-icon::before { top: 4px; transform: rotate(45deg); }
  .mast__menu[aria-expanded="true"] .mast__menu-icon::after { top: 4px; transform: rotate(-45deg); }

  html.js .mast__nav {
    position: fixed; inset: var(--mast-h) 0 auto 0; margin: 0;
    background: var(--ground); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 28px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
  }
  html.js .mast.is-open { background: var(--ground); border-bottom-color: var(--line); }
  html.js .mast.is-open .mast__nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  html.js .mast__nav ul { flex-direction: column; gap: 0; }
  html.js .mast__nav li + li { border-top: 1px solid var(--line); }
  html.js .mast__nav a { display: block; padding: 16px 0; font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); }
  /* No JS: links stay reachable as a compact row; the menu button is pointless. */
  html:not(.js) .mast__menu { display: none; }
  html:not(.js) .mast { position: absolute; height: auto; min-height: var(--mast-h); padding-block: 10px; }
  html:not(.js) .mast__inner { flex-wrap: wrap; row-gap: 6px; }
  html:not(.js) .mast__nav { margin-left: 0; width: 100%; order: 4; }
  html:not(.js) .doc-head { padding-top: calc(var(--mast-h) + 120px); }
  html:not(.js) .mast__nav ul { flex-wrap: wrap; gap: 4px 18px; }
}

/* ---------- skeletons: only show if an image takes longer than ~300ms ---------- */
.media { position: relative; overflow: hidden; background: var(--raise); isolation: isolate; }
.media::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(100deg, transparent 20%, rgba(238, 242, 245, 0.07) 45%, transparent 70%) var(--raise-2);
  background-size: 220% 100%;
  opacity: 0;
  animation: sk-in 0.3s linear 0.3s forwards, sk-shimmer 1.4s linear 0.3s infinite;
}
.media.is-loaded::before { animation: none; opacity: 0; transition: opacity 0.3s; }
.media > img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
html.js .media > img { opacity: 0; transition: opacity 0.6s var(--ease-out); }
html.js .media.is-loaded > img { opacity: 1; }
@keyframes sk-in { to { opacity: 1; } }
@keyframes sk-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* generic skeleton bars, used for the plans placeholder */
.sk {
  display: block; border-radius: 999px; height: 0.9em;
  background: linear-gradient(100deg, transparent 20%, rgba(238, 242, 245, 0.07) 45%, transparent 70%) var(--raise-2);
  background-size: 220% 100%;
  animation: sk-shimmer 1.6s linear infinite;
}

/* ---------- load sequence (only when JS opted in, see inline head script) ---------- */
.loader { display: none; }
html.js-loader .loader {
  display: flex; position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--text);
  align-items: flex-end; justify-content: space-between;
  padding: var(--gutter);
}
html.js-loader body { overflow: hidden; }
.loader__count {
  font-family: var(--f-display); font-weight: 600; letter-spacing: -0.05em; line-height: 0.85;
  font-size: clamp(5rem, 18vw, 15rem); font-variant-numeric: tabular-nums;
}
.loader__mark { width: clamp(72px, 10vw, 128px); height: auto; align-self: flex-end; margin-bottom: 0.4em; }
.loader__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--mast-h) + clamp(24px, 5vh, 64px));
  overflow: hidden;
}
.hero__ghost {
  position: absolute; z-index: 0; right: -14vw; top: 50%; width: min(118vw, 1300px);
  transform: translateY(-50%); pointer-events: none;
}
.hero__ghost path { fill: none; stroke: rgba(137, 207, 240, 0.09); stroke-width: 0.35; }
.hero__grid {
  position: relative; z-index: 1; flex: 1;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.hero__title { font-size: var(--step-5); font-weight: 650; line-height: 0.98; letter-spacing: -0.045em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: block; }
.hero__title em { font-style: normal; color: var(--blue); }
.hero__sub { margin-top: clamp(20px, 3vh, 32px); max-width: 34ch; font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.hero__ctas { margin-top: clamp(24px, 4vh, 40px); display: flex; flex-wrap: wrap; gap: 12px; }
.hero__mascot { position: relative; justify-self: center; width: min(100%, 520px); }
.mascot { width: 100%; height: auto; overflow: visible; }
.mascot .m-glint { transform-box: fill-box; transform-origin: center; }
.mascot .m-closed { opacity: 0; }
.mascot.is-blinking .m-closed { opacity: 1; }
.mascot.is-blinking .m-open { opacity: 0; }
/* French and German headlines run longer: same rhythm, slightly smaller scale */
html[lang="fr"] .hero__title { font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.9rem); }
html[lang="de"] .hero__title { font-size: clamp(2.3rem, 1.2rem + 3.9vw, 4.3rem); }
.sec__title, .doc-head h1, .hero__title, .get__title { overflow-wrap: break-word; }
.hero__foot {
  position: relative; z-index: 1; margin-top: clamp(24px, 5vh, 56px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 18px 22px; color: var(--muted); font-size: var(--step--1);
}
.hero__foot p { margin: 0; }
.hero__down {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text);
  transition: border-color 0.2s, color 0.2s, transform 0.3s var(--ease-out);
}
.hero__down:hover { border-color: var(--blue); color: var(--blue); transform: translateY(2px); }
.hero__down svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; align-content: center; gap: 8px; }
  .hero__mascot { order: -1; width: min(52vw, 260px); justify-self: start; margin-bottom: 8px; }
  .hero__ghost { right: -60vw; width: 170vw; top: 34%; }
}
@media (max-width: 560px) {
  .hero__foot { flex-wrap: wrap; }
  .hero__foot .hero__langs { order: 3; width: 100%; }
  .hero__mascot { width: min(44vw, 190px); }
}
@media (max-height: 700px) and (min-width: 901px) {
  .hero__mascot { width: min(100%, 400px); }
}

/* ---------- statement ---------- */
.statement { padding-block: clamp(96px, 16vw, 200px); }
.statement__text {
  max-width: 22ch; margin-inline: auto; text-align: center;
  font-family: var(--f-display); font-weight: 550; font-size: var(--step-4);
  line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance;
}
.statement__text .w { color: var(--text); transition: color 0.3s; }
html.js .statement__text.is-scrubbing .w { color: var(--quiet); }
html.js .statement__text.is-scrubbing .w.is-on { color: var(--text); }
.statement__text .hl { color: var(--blue); }
html.js .statement__text.is-scrubbing .hl.is-on { color: var(--blue); }

/* ---------- section heads ---------- */
.sec { padding-block: clamp(80px, 12vw, 160px); }
.sec__title { font-size: var(--step-4); max-width: 16ch; }
.sec__lede { margin-top: 20px; max-width: 52ch; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.line-mask { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line-mask > span { display: inline-block; }

/* ---------- how it works ---------- */
.how { border-top: 1px solid var(--line); }
.how__pin { padding-block: clamp(80px, 10vw, 128px); }
@media (min-width: 901px) and (min-height: 760px) {
  /* pinned on desktop: the whole stage must fit one viewport */
  .how__pin { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding-block: calc(var(--mast-h) + 24px) 32px; }
  .how__pin > .wrap { width: 100%; }
  .preview { width: clamp(170px, min(20vw, 30vh), 290px); }
  .how__title { font-size: clamp(2.2rem, 1rem + 2.6vw, 3.6rem); }
  .how .steps { margin-top: clamp(20px, 3vh, 36px); }
  .how .step { padding-block: clamp(12px, 2vh, 20px); }
  .how .step h3 { font-size: clamp(1.25rem, 0.9rem + 1vw, 1.75rem); }
}
.how__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.how__title { font-size: var(--step-4); max-width: 12ch; }
.steps { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; gap: 0; }
.step { padding-block: 22px; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step h3 { font-size: var(--step-2); letter-spacing: -0.03em; transition: color 0.4s var(--ease-out); }
.step p { margin-top: 8px; color: var(--muted); max-width: 40ch; transition: color 0.4s var(--ease-out); }
html.js .how.is-pinned .step h3 { color: var(--quiet); }
html.js .how.is-pinned .step p { color: var(--quiet); }
html.js .how.is-pinned .step.is-active h3 { color: var(--text); }
html.js .how.is-pinned .step.is-active p { color: var(--muted); }

.editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.editor__stage { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: end; }
.preview {
  position: relative; width: clamp(180px, 22vw, 300px); aspect-ratio: 9 / 16;
  border-radius: var(--r-surface); border: 1px solid var(--line);
}
.preview .media { position: absolute; inset: 0; border-radius: inherit; }
.preview .media + .media { opacity: 0; }
html:not(.js) .preview .media + .media { display: none; }
.editor__mascot { position: relative; width: clamp(110px, 13vw, 180px); aspect-ratio: 1; justify-self: start; }
.editor__mascot .pose { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out); }
.editor__mascot .pose--done { opacity: 0; transform: translateY(8px) scale(0.96); }
.editor.is-done .pose--think { opacity: 0; transform: translateY(-6px) scale(0.96); }
.editor.is-done .pose--done { opacity: 1; transform: none; }
.editor__caption { color: var(--muted); font-size: var(--step--1); max-width: 34ch; margin-top: 14px; }
.editor__caption strong { color: var(--text); font-weight: 600; }

.timeline { position: relative; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-surface); background: var(--ink); }
.timeline__track { display: flex; gap: 4px; height: clamp(56px, 6vw, 76px); }
.seg { position: relative; flex: 3 1 0; min-width: 0; border-radius: 10px; overflow: hidden; }
.seg .media { position: absolute; inset: 0; border-radius: inherit; }
.seg--cut {
  flex-grow: 1;
  background: repeating-linear-gradient(-45deg, rgba(137, 207, 240, 0.32) 0 2px, transparent 2px 9px) var(--raise);
  border: 1px dashed rgba(137, 207, 240, 0.55);
}
.seg--retake .media { opacity: 0.4; }
.seg--retake::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, rgba(137, 207, 240, 0.38) 0 2px, transparent 2px 9px);
  border: 1px dashed rgba(137, 207, 240, 0.6);
}
.timeline__head {
  position: absolute; z-index: 3; top: 6px; bottom: 6px; left: 14px; width: 2px; border-radius: 2px;
  background: var(--blue); box-shadow: 0 0 0 3px rgba(137, 207, 240, 0.18);
  opacity: 0;
}
.timeline__legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; color: var(--muted); font-size: var(--step--1); }
.timeline__legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 18px; height: 12px; border-radius: 4px; flex: none; }
.swatch--clip { background: var(--blue-deep); }
.swatch--cut { background: repeating-linear-gradient(-45deg, rgba(137, 207, 240, 0.6) 0 2px, transparent 2px 6px) var(--raise); border: 1px dashed rgba(137, 207, 240, 0.7); }

@media (max-width: 900px) {
  .how__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .editor__stage { grid-template-columns: 1fr auto; }
  .preview { width: min(54vw, 210px); }
  .editor__mascot { width: 96px; }
  .timeline { padding: 10px; border-radius: 18px; }
  .timeline__track { gap: 3px; height: 48px; }
  .seg { border-radius: 7px; }
}

/* ---------- languages ---------- */
.langs { border-top: 1px solid var(--line); }
.langs__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; }
.langs__pose { width: clamp(110px, 13vw, 190px); height: auto; margin-bottom: -8px; }
@media (max-width: 640px) { .langs__head { grid-template-columns: 1fr; } .langs__pose { order: -1; width: 104px; } }
.langs__list { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.lang {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline;
  gap: 8px 32px; padding-block: clamp(18px, 2.6vw, 30px); border-bottom: 1px solid var(--line);
}
.lang__name {
  font-family: var(--f-display); font-weight: 600; font-size: var(--step-3); letter-spacing: -0.04em; line-height: 1.05;
  transition: color 0.35s var(--ease-out), transform 0.5s var(--ease-out);
}
.lang__line { color: var(--muted); font-size: var(--step-1); transition: color 0.35s var(--ease-out); }
@media (hover: hover) {
  .lang:hover .lang__name { color: var(--blue); transform: translateX(6px); }
  .lang:hover .lang__line { color: var(--text); }
}
@media (max-width: 640px) {
  .lang { grid-template-columns: 1fr; }
}

/* ---------- plans ---------- */
.plans { border-top: 1px solid var(--line); }
.plans__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(8px, 2vw, 24px); }
.plans .sec__title { max-width: none; }
.plans__wrap { position: relative; padding-top: clamp(64px, 7vw, 96px); }
.plans__pose { position: absolute; top: 6px; right: clamp(20px, 4vw, 48px); width: clamp(96px, 10vw, 140px); height: auto; z-index: 1; }
.plans__panel {
  position: relative; z-index: 0;
  border: 1px solid var(--line); border-radius: var(--r-surface); background: var(--ink);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.plan-sk { padding: clamp(20px, 2.6vw, 32px); display: grid; gap: 14px; align-content: start; min-height: 300px; }
.plan-sk + .plan-sk { border-left: 1px solid var(--line); }
.plan-sk .sk:nth-child(1) { width: 46%; height: 1.1em; }
.plan-sk .sk:nth-child(2) { width: 64%; height: 2.4em; border-radius: 12px; margin-bottom: 12px; }
.plan-sk .sk:nth-child(3) { width: 92%; }
.plan-sk .sk:nth-child(4) { width: 78%; }
.plan-sk .sk:nth-child(5) { width: 84%; }
.plan-sk .sk:nth-child(6) { width: 100%; height: 44px; margin-top: 18px; }
.plans__note { margin-top: 20px; color: var(--muted); }
@media (max-width: 900px) {
  .plans__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .plans__panel { grid-template-columns: 1fr; }
  .plan-sk { min-height: 0; }
  .plan-sk + .plan-sk { border-left: 0; border-top: 1px solid var(--line); }
}
/* Real plan rows (see the commented template in index.html) */
.plan-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.plan__name { font-size: var(--step-3); }
.plan__price { font-family: var(--f-display); font-size: var(--step-2); font-weight: 600; }
.plan__detail { color: var(--muted); grid-column: 1 / -1; max-width: 60ch; }
.plan--extra .plan__name { font-size: var(--step-2); }

/* ---------- about ---------- */
.about { border-top: 1px solid var(--line); text-align: center; }
.about__pose { width: clamp(120px, 14vw, 180px); height: auto; margin: 0 auto clamp(20px, 3vw, 36px); }
.about__title { font-size: var(--step-4); }
.about__copy { margin: 24px auto 0; max-width: 44ch; color: var(--muted); font-size: var(--step-1); line-height: 1.55; }
.about__sign { margin-top: 28px; font-weight: 600; }
.about__sign span { display: block; font-weight: 400; color: var(--muted); font-size: var(--step--1); }

/* ---------- get the app ---------- */
.get { padding-block: clamp(80px, 12vw, 160px); }
.get__panel {
  position: relative; overflow: hidden;
  border-radius: calc(var(--r-surface) * 1.5); background: var(--blue); color: var(--on-blue);
  padding: clamp(32px, 6vw, 88px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: end;
}
.get__title { font-size: var(--step-5); letter-spacing: -0.045em; line-height: 0.98; }
.get__copy { margin-top: 20px; font-size: var(--step-1); max-width: 34ch; line-height: 1.5; }
.get__direct { margin-top: 28px; font-weight: 500; }
.get__direct a { color: var(--on-blue); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.get__direct a:hover { text-decoration-thickness: 2px; }
.get__mascot { width: min(100%, 300px); justify-self: end; }
.get .btn { --bg: var(--ink); --fg: var(--text); }
.get .btn:hover { --bg: #000; }
.get__ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.get .btn--ghost { --bg: transparent; --fg: var(--on-blue); border-color: rgba(31, 34, 38, 0.45); }
.get .btn--ghost:hover { border-color: var(--on-blue); color: var(--on-blue); }
@media (max-width: 760px) {
  .get__panel { grid-template-columns: 1fr; }
  .get__mascot { justify-self: start; width: 150px; order: -1; }
}

/* ---------- footer ---------- */
.foot { background: var(--ink); border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px) 28px; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 40px 32px; }
.foot__brand p { margin-top: 16px; color: var(--muted); max-width: 30ch; }
.foot__brand a.text-link { display: inline-block; margin-top: 12px; }
.foot h2 { font-family: var(--f-sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--text); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot li a, .foot li button {
  display: inline-block; padding: 6px 0; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer;
  font-size: 0.97rem; text-align: left; transition: color 0.2s;
}
.foot li a:hover, .foot li button:hover { color: var(--blue); }
.foot__langs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot__langs a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.foot__langs a:hover { color: var(--blue); }
.foot__langs a[aria-current="true"] { color: var(--text); text-decoration: underline; text-underline-offset: 0.25em; text-decoration-color: var(--blue); }
.foot__base {
  margin-top: clamp(48px, 7vw, 88px); padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: var(--step--1);
}
@media (max-width: 900px) {
  .foot__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- document pages (legal, support, company) ---------- */
.doc-head {
  position: relative; overflow: hidden;
  padding-top: calc(var(--mast-h) + clamp(48px, 9vw, 120px)); padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.doc-head__ghost { position: absolute; right: -8vw; top: 10%; width: min(70vw, 720px); pointer-events: none; }
.doc-head__ghost path { fill: none; stroke: rgba(137, 207, 240, 0.1); stroke-width: 0.4; }
.doc-head__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; }
.doc-head__pose { width: clamp(120px, 15vw, 220px); height: auto; }
@media (max-width: 760px) {
  .doc-head__inner { grid-template-columns: 1fr; }
  .doc-head__pose { order: -1; width: 92px; margin-bottom: -8px; }
}
.doc-head__crumb { position: relative; color: var(--muted); font-size: var(--step--1); margin-bottom: 18px; }
.doc-head__crumb a { color: var(--muted); text-underline-offset: 0.2em; }
.doc-head__crumb a:hover { color: var(--blue); }
.doc-head h1 { position: relative; font-size: var(--step-5); max-width: 14ch; letter-spacing: -0.045em; }
.doc-head__lede { position: relative; margin-top: 22px; max-width: 54ch; color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.doc-head__meta { position: relative; margin-top: 18px; color: var(--quiet); font-size: var(--step--1); }

.doc { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 96px); padding-block: clamp(48px, 7vw, 96px) clamp(80px, 10vw, 140px); }
.toc { position: sticky; top: calc(var(--mast-h) + 32px); align-self: start; }
.toc h2 { font-family: var(--f-sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent;
  color: var(--muted); text-decoration: none; font-size: 0.95rem; line-height: 1.4; transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--text); }
.toc a.is-current { color: var(--blue); border-left-color: var(--blue); }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}

.prose { max-width: 68ch; }
.prose > section + section { margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.prose h2 { font-size: var(--step-3); margin-bottom: 18px; }
.prose h3 { font-size: var(--step-1); letter-spacing: -0.02em; margin: 28px 0 10px; font-family: var(--f-sans); font-weight: 650; }
.prose p, .prose ul, .prose ol, .prose dl, .prose table { color: var(--muted); }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol, .prose ol + p, .prose p + table, .prose table + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--blue); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a:not(.btn) { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.prose a:not(.btn):hover { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.prose th { color: var(--text); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.table-scroll table:has(th:nth-child(4)):not(.doc-table) { min-width: 520px; }
.facts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--text); font-weight: 600; padding-right: 16px; }
.facts dd { color: var(--muted); }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .facts dd { padding-top: 0; }
}

/* Placeholders the owner still has to fill in. Visible on purpose. */
.todo {
  background: rgba(137, 207, 240, 0.14); color: var(--blue); border: 1px dashed rgba(137, 207, 240, 0.55);
  border-radius: 6px; padding: 0 0.35em; font-style: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; overflow-wrap: anywhere;
}

.callout {
  border: 1px solid var(--line); border-radius: var(--r-surface); background: var(--raise);
  padding: clamp(20px, 3vw, 32px); margin-top: 20px;
}
.callout p { color: var(--muted); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-family: var(--f-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.02em; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none; margin-right: 4px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .faq__body { padding: 0 0 22px; color: var(--muted); max-width: 60ch; }
.faq .faq__body p + p { margin-top: 10px; }

/* ---------- contact by email (no forms, nothing sent to third parties) ---------- */
.mailbox {
  margin-top: 24px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--r-surface);
  background: var(--raise); display: grid; gap: 14px; justify-items: start;
}
.mailbox__note { color: var(--muted); max-width: 56ch; }
.mailbox__copy { color: var(--muted); font-size: 0.97rem; }
.mailbox__copy .text-link { user-select: all; }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: calc(var(--mast-h) + 40px) var(--gutter) 64px; }
.lost__mascot { width: min(46vw, 220px); margin: 0 auto 28px; }
.lost h1 { font-size: var(--step-5); letter-spacing: -0.045em; }
.lost p { margin: 18px auto 0; max-width: 38ch; color: var(--muted); font-size: var(--step-1); }
.lost .btn { margin-top: 32px; }
.lost__langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 28px !important; font-size: 0.97rem; }
.lost__langs a { color: var(--muted); text-underline-offset: 0.2em; }
.lost__langs a:hover { color: var(--blue); }

/* ---------- reveal states (armed by JS only for below-the-fold elements) ---------- */
html.js [data-reveal].is-armed { opacity: 0; transform: translateY(28px); }
html.js .line-mask.is-armed > span { transform: translateY(105%); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .media::before, .sk { animation: none !important; opacity: 1; }
  .media.is-loaded::before { opacity: 0; }
  html.js .media > img { transition: opacity 0.2s linear !important; }
}

/* ---------- homepage: links to the pages, one ruled row each ---------- */
.explore { padding-bottom: clamp(80px, 12vw, 160px); }
.explore__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.explore__list li { border-bottom: 1px solid var(--line); }
.explore__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(18px, 2.6vw, 30px); text-decoration: none; color: var(--text);
}
.explore__text { display: grid; gap: 6px; }
.explore__title {
  font-size: var(--step-3); letter-spacing: -0.04em; line-height: 1.05;
  transition: color 0.35s var(--ease-out), transform 0.5s var(--ease-out);
}
.explore__line { color: var(--muted); font-size: var(--step-1); }
.explore__pose { width: clamp(64px, 7vw, 96px); height: auto; transition: transform 0.5s var(--ease-out); }
.explore__arrow {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 999px;
  border: 1px solid var(--line); transition: border-color 0.3s, color 0.3s, transform 0.4s var(--ease-out);
}
.explore__arrow svg { width: 20px; height: 20px; }
.explore__row:hover .explore__title, .explore__row:focus-visible .explore__title { color: var(--blue); transform: translateX(6px); }
.explore__row:hover .explore__pose { transform: translateY(-6px) rotate(-4deg); }
.explore__row:hover .explore__arrow { border-color: var(--blue); color: var(--blue); transform: translateX(4px); }
@media (max-width: 560px) {
  .explore__row { grid-template-columns: minmax(0, 1fr) auto; }
  .explore__arrow { display: none; }
  .explore__pose { width: 64px; }
}

/* ---------- standalone pages ---------- */
.page-body { padding-block: clamp(48px, 7vw, 96px) clamp(80px, 10vw, 140px); }
.how { border-top: 0; }
.soon {
  display: inline-block; vertical-align: middle; margin-left: 0.25em;
  font-family: var(--f-sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; line-height: 1;
  padding: 0.6em 1em; border-radius: 999px; background: var(--blue); color: var(--on-blue);
  transform: translateY(-0.4em); white-space: nowrap;
}
.soon--dark { background: var(--ink); color: var(--text); margin: 0 0 18px; transform: none; }
.plans__note { margin-top: 24px; color: var(--muted); }
.about-body { display: grid; gap: 20px; justify-items: start; }
.about-body > * { max-width: 60ch; }
.about-body .about__sign { margin-top: 0; }
.about__more { color: var(--muted); font-size: var(--step-1); }
.get__panel .get__copy { margin-top: 0; font-family: var(--f-display); font-weight: 600; font-size: var(--step-3); letter-spacing: -0.035em; line-height: 1.05; }

/* ---------- legal and help documents (word for word from the PDFs) ---------- */
.doc-note {
  margin: 0 0 28px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-field);
  background: var(--raise); color: var(--text);
}
.doc-intro p { color: var(--muted); font-size: var(--step-1); line-height: 1.55; }
.doc-intro p + p { margin-top: 12px; }
.prose > .doc-intro + section { margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.prose td strong, .prose td { color: var(--muted); }
.doc-table th { white-space: nowrap; }
.doc-table td:first-child { color: var(--text); }
.table-scroll .doc-table { min-width: 0; }
@media (max-width: 640px) {
  /* four columns of prose do not fit a phone: each row becomes a small labelled block */
  .doc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td { display: block; }
  .doc-table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .doc-table td { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 4px 0; border: 0; }
  .doc-table td::before { content: attr(data-label); color: var(--quiet); font-size: 0.88rem; }
  .doc-table td:first-child { font-weight: 600; }
}
.qa { margin: 0; border-top: 1px solid var(--line); }
.qa > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.qa dt { font-family: var(--f-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.02em; color: var(--text); }
.qa dd { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.qa dd strong { color: var(--text); }
.foot__company { display: inline-block; margin-top: 6px; }
