/* Turnspeak website. Same tokens as the app (design/tokens.css); no gradients except the brand ground. */
:root {
  --surface-lime: #f3f6d6; --surface-mid: #f4f1fa; --surface-lavender: #ede8fc; --surface: #ffffff;
  --ink: #1e1b2e; --ink-soft: #3a3650; --ink-muted: #565370; --ink-on-pastel: #3b3852;
  --accent: #6b4def; --accent-strong: #5b3fe0; --accent-light: #a48cf9; --accent-soft: #f1edfe;
  --staff-fill: #dcd1fb; --patient-fill: #a8e9d3; --patient-card: #c9f0e0; --patient-ink: #0b6e52;
  --peach: #ffd37a; --pink: #ffc3d0; --alert-soft: #fde8e8; --alert-ink: #b91c1c;
  --line: #d8d4e8; --line-soft: #e2ddf5; --link: var(--accent-strong);
  --radius-blob: 36px; --radius-blob-pull: 56px; --radius-sheet: 36px; --radius-card: 20px;
  --shadow-card: 0 8px 24px rgba(30,27,46,0.08); --shadow-chip: 0 4px 12px rgba(30,27,46,0.06);
  --shadow-float: 0 12px 32px rgba(30,27,46,0.14); --shadow-button: 0 14px 30px rgba(30,27,46,0.22);
  --font-sans: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ground: linear-gradient(165deg, var(--surface-lime) 0%, var(--surface-mid) 50%, var(--surface-lavender) 100%);
  /* Motion: quick for controls, composed for scenes. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-settle: cubic-bezier(0.2, 1.25, 0.35, 1);
  --t-fast: 180ms; --t-mid: 420ms; --t-scene: 800ms;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); color: var(--ink); background: var(--surface-mid); -webkit-font-smoothing: antialiased; }
/* The floating cards may reach past the edge; clip them without making a scroll container, so sticky still works. */
main { overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: var(--link); }
button { font-family: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
svg use { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 24px; text-decoration: none; }
.skip:focus { top: 16px; }

.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent-strong); margin-bottom: 14px; }
.section-title { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; max-width: 22ch; }
.soft { font-weight: 400; color: var(--ink-muted); }
.section-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- navigation */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 18px var(--gutter); transition: padding var(--t-mid) var(--ease-out); }
.nav__inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 24px; height: 60px; padding: 0 10px 0 12px; border-radius: 30px; transition: background var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), height var(--t-mid) var(--ease-out); }
.nav.is-scrolled { padding-top: 10px; }
.nav.is-scrolled .nav__inner { height: 56px; background: rgba(255,255,255,0.92); box-shadow: var(--shadow-card); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand__disc { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 14px; border-radius: 20px; transition: background var(--t-fast); }
.nav__links a:hover { background: rgba(107,77,239,0.08); }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: 22px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform var(--t-fast) var(--ease-out); }
.pill-btn:active { transform: scale(0.96); }
.pill-btn--dark { background: var(--ink); color: #fff; }
/* The same page in another language: its flag and its name, written in that language. */
.lang-switch { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 20px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background var(--t-fast); }
.lang-switch:hover { background: rgba(107,77,239,0.08); }
.lang-switch img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 1100px) { .nav__links a { padding: 8px 10px; font-size: 14px; } }
@media (max-width: 960px) { .nav__links a[href="/#how"] { display: none; } }
@media (max-width: 760px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } .lang-switch { margin-left: auto; } .lang-switch + .nav__cta { margin-left: 0; } }
@media (max-width: 420px) { .lang-switch { width: 40px; padding: 0; justify-content: center; } .lang-switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }

/* ---------------------------------------------------------------- store badges */
.stores { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stores--center { justify-content: center; }
.store { display: inline-flex; flex: none; border-radius: 12px; transition: transform var(--t-fast) var(--ease-out); }
.store img { max-width: none; }
.store:hover { transform: translateY(-2px); }
.store:active { transform: scale(0.97); }
.store--apple img { height: 52px; width: auto; }
/* Google's badge carries its own clear space: taller image, pulled in to line up with Apple's. */
.store--google img { height: 77px; width: auto; margin: -12.5px -10px; }

/* ---------------------------------------------------------------- shared: language cards (the app's blob selectors) */
.lang-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; width: 220px; padding: 18px 18px 18px 20px; border-radius: var(--radius-blob) var(--radius-blob-pull) 32px 32px; color: var(--ink); box-shadow: var(--shadow-float); }
.lang-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 44px 60px 40px 40px; background: inherit; opacity: 0.5; transform: rotate(5deg) translate(4px, -6px); }
.lang-card--mirror { border-radius: var(--radius-blob-pull) var(--radius-blob) 32px 32px; }
.lang-card--mirror::before { border-radius: 60px 44px 40px 40px; transform: rotate(-5deg) translate(-4px, -6px); }
.lang-card--staff { background: var(--staff-fill); }
.lang-card--patient { background: var(--patient-fill); }
.lang-card__label { font-size: 13px; font-weight: 500; color: var(--ink-on-pastel); }
.lang-card__name { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; line-height: 1.1; }
.lang-card__name img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; flex-shrink: 0; }

/* ---------------------------------------------------------------- shared: the phone (a real iPhone frame) */
/* A photographed gold iPhone frame (transparent screen and surroundings) on top; under it, in the frame's screen
   opening, the running app (/app/?demo=…) at its real size, 402 × 874 points, scaled to fit: text stays sharp. */
.phone { position: relative; aspect-ratio: 732 / 1508; filter: drop-shadow(0 40px 38px rgba(30,27,46,0.22)) drop-shadow(0 10px 12px rgba(30,27,46,0.14)); }
.phone__frame { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.phone__screen { position: absolute; left: 5.601%; top: 2.188%; width: 88.661%; height: 94.164%; overflow: hidden; border-radius: 12.63% / 5.77%; background: var(--ground); isolation: isolate; container-type: inline-size; }
.phone__status { position: absolute; z-index: 4; inset: 0 0 auto 0; height: 5.4%; display: flex; align-items: center; justify-content: space-between; padding: 0 9.5% 0 12%; color: var(--ink); font: 600 3.98cqw / 1 var(--font-sans); pointer-events: none; }
.phone__status svg { height: 2.99cqw; width: auto; }
.angled__screen .phone__status { font-size: 16px; }
.angled__screen .phone__status svg { height: 12px; }
.phone--light-status .phone__status { color: #fff; }
.live { position: relative; overflow: hidden; }
.live iframe, .phone__screen iframe, .demo-snap { position: absolute; left: 0; top: 0; width: 402px; height: 874px; border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; }
.demo-snap { display: block; max-width: none; user-select: none; }
/* The live screen fades in over its still once it has drawn with its fonts. */
.demo-frame { opacity: 0; transition: opacity 500ms cubic-bezier(0.25, 0.1, 0.25, 1); }
.demo-frame.is-drawn { opacity: 1; }
.phone__layer { position: absolute; inset: 0; }
.live--tile { border-radius: 26px; margin-top: auto; box-shadow: 0 0 0 1px var(--line-soft); background: var(--surface-mid); }
.live--start { border-radius: 40px; box-shadow: none; background: transparent; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: center; gap: 24px; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 120px var(--gutter) 64px; }
.hero::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--ground); }
.hero__kicker { display: block; margin-bottom: 14px; font-size: 14px; line-height: 1.4; font-weight: 600; letter-spacing: 0; color: var(--accent-strong); }
.hero__title { font-size: clamp(42px, 4.7vw, 76px); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; }
.phrase { display: block; }
.phrase--soft { font-weight: 400; color: var(--ink-muted); }
.hero__lead { margin-top: 26px; max-width: 34em; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; color: var(--ink-muted); }
.hero .stores { margin-top: 36px; }
.explore { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.explore__disc { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; transition: transform var(--t-fast) var(--ease-out); }
.explore:hover .explore__disc { transform: translateY(3px); }
/* The free trial beside it: the same link, its disc in the accent, an arrow that moves on */
.hero__more { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; margin-top: 28px; }
.hero__more .explore { margin-top: 0; }
.explore__disc--accent { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(107,77,239,0.45); }
.explore--try:hover .explore__disc { transform: translateX(3px); }

.hero__stage { position: relative; height: min(84svh, 800px); display: flex; align-items: center; justify-content: center; perspective: 1800px; }
.hero__rig { position: relative; width: min(22vw, 36svh, 320px); transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform 600ms var(--ease-out); transform-style: preserve-3d; }
.phone--hero { transform: rotateY(-14deg) rotateX(6deg) rotateZ(2deg); animation: phone-in 1.2s var(--ease-settle) 0.1s both, float 9s ease-in-out 2.2s infinite; }
.hero__card { position: absolute; z-index: 2; }
.hero__card--mine { left: -62%; top: 15%; animation: card-in-left 0.9s var(--ease-out) 0.55s both; }
.hero__card--other { right: -58%; top: 52%; animation: card-in-right 0.9s var(--ease-out) 0.7s both; }
.exchange__disc { position: absolute; z-index: 3; left: -20%; top: 38%; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(30,27,46,0.16); animation: disc-in 0.6s var(--ease-settle) 1.1s both, disc-turn 7s var(--ease-out) 2.4s infinite; }
.exchange__msg { position: absolute; z-index: 3; padding: 10px 16px; border-radius: 18px; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow-float); opacity: 0; }
.exchange__msg--out { left: -58%; top: calc(15% + 120px); background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; animation: msg-out 7s var(--ease-out) 1.6s infinite; }
.exchange__msg--in { right: -52%; top: calc(52% + 120px); background: var(--ink); color: #fff; border-bottom-right-radius: 6px; animation: msg-in 7s var(--ease-out) 1.6s infinite; }
/* Tablets and phones: copy first, then the phone with its two languages. */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; gap: 8px; }
  .hero__stage { height: auto; padding: 40px 0 24px; }
  .hero__rig { width: min(50vw, 250px); }
  .hero__card { width: 168px; padding: 14px 14px 14px 16px; gap: 12px; }
  .hero__card .lang-card__name { font-size: 18px; }
  .hero__card--mine { left: -40%; top: 10%; }
  .hero__card--other { right: -40%; top: 58%; }
  .exchange__disc { left: -14%; top: 38%; width: 48px; height: 48px; }
  .exchange__msg { font-size: 13px; padding: 8px 12px; }
  .exchange__msg--out { left: -36%; top: calc(10% + 96px); }
  .exchange__msg--in { right: -36%; top: calc(58% + 96px); }
}
@media (max-width: 600px) {
  /* On a phone the real screen is the story: the cards would cover it, the sentences stay. */
  .hero__card, .exchange__disc { display: none; }
  .hero__rig { width: min(62vw, 250px); }
  .exchange__msg--out { left: -18%; top: 22%; } .exchange__msg--in { right: -18%; top: 64%; }
}
@media (max-width: 420px) {
  .store--apple img { height: 46px; } .store--google img { height: 68px; margin: -11px -9px; }
}

@keyframes phrase-in { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
.hero__title .phrase { animation: phrase-in 0.7s var(--ease-out) both; }
.hero__title .phrase + .phrase { animation-delay: 0.14s; }
.hero__lead { animation: phrase-in 0.7s var(--ease-out) 0.26s both; }
@keyframes phone-in { from { opacity: 0; transform: translateY(60px) rotateY(-38deg) rotateX(14deg) rotateZ(9deg) scale(0.92); } to { opacity: 1; transform: rotateY(-14deg) rotateX(6deg) rotateZ(2deg); } }
@keyframes card-in-left { from { opacity: 0; transform: translateX(-70px) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes card-in-right { from { opacity: 0; transform: translateX(70px) rotate(6deg); } to { opacity: 1; transform: none; } }
@keyframes disc-in { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes disc-turn { 0%, 30% { transform: rotate(0); } 45%, 100% { transform: rotate(180deg); } }
/* One sentence leaves the staff card; its translation arrives at the other side. */
@keyframes msg-out { 0% { opacity: 0; transform: translateY(-8px); } 8%, 30% { opacity: 1; transform: none; } 42%, 100% { opacity: 0; transform: translate(40px, 24px) scale(0.9); } }
@keyframes msg-in { 0%, 36% { opacity: 0; transform: translate(-40px, -24px) scale(0.9); } 50%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(8px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------------------------------------------------------------- band: one phone, two people */
.band { position: relative; overflow: hidden; min-height: min(96svh, 900px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 24px; padding: 80px var(--gutter); background: var(--surface-lavender); }
.band__scene { order: 2; display: flex; justify-content: center; }
.angled { position: relative; width: min(100%, 720px); transform: translateY(calc((1 - var(--lay, 1)) * 60px)) rotate(calc((1 - var(--lay, 1)) * -6deg)); }
.angled__box { position: absolute; left: 0; top: 0; transform-origin: 0 0; opacity: calc(0.3 + 0.7 * var(--lay, 1)); filter: drop-shadow(0 40px 36px rgba(30,27,46,0.2)) drop-shadow(0 8px 10px rgba(30,27,46,0.12)); }
.angled__screen { position: absolute; left: 0; top: 0; width: 402px; height: 874px; transform-origin: 0 0; overflow: hidden; border-radius: 56px; background: var(--staff-fill); }
.angled__screen .demo-snap { transform: none; }
.angled__screen iframe { position: absolute; left: 0; top: 0; width: 402px; height: 874px; border: 0; pointer-events: none; }
.angled__screen .phone__status { color: #fff; }
.angled__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.angled .band__tag { position: absolute; z-index: 2; }
.angled .band__tag--other { left: 2%; top: -3%; transform: rotate(-12deg); }
.angled .band__tag--mine { right: 2%; bottom: -2%; transform: rotate(-12deg); }
.band__tag { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 9px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-card); font-size: 14px; font-weight: 600; white-space: nowrap; }
.band__tag img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.band__tag--other { background: var(--patient-card); }
.band__tag--mine { background: var(--staff-fill); }
.band__copy { order: 1; max-width: 440px; }
.band__title { font-size: clamp(34px, 4vw, 56px); line-height: 1.06; font-weight: 700; letter-spacing: -0.02em; }
.band__copy p { margin-top: 16px; font-size: 17px; line-height: 1.65; color: var(--ink-muted); }
@media (max-width: 900px) {
  .band { grid-template-columns: 1fr; min-height: 0; padding: 72px var(--gutter) 88px; gap: 40px; }
  .band__scene { order: 2; } .band__copy { order: 1; }
}

/* ---------------------------------------------------------------- how it works (scroll story) */
.how { position: relative; height: 360vh; background: var(--surface-mid); }
.how__sticky { position: sticky; top: 0; height: 100svh; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 96px var(--gutter) 40px; display: grid; grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; column-gap: 48px; }
.how__intro { grid-column: 1; align-self: end; padding-bottom: 36px; }
.how__stage { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; min-height: 0; padding-right: 12%; }
.how__rig { position: relative; width: min(35svh, 330px); }
.steps { grid-column: 1; grid-row: 2; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-self: start; }
.step { display: flex; gap: 18px; padding: 18px 20px; border-radius: 24px; transition: background var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out); }
.step.is-active { background: var(--surface); box-shadow: var(--shadow-card); }
.step__num { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--staff-fill); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; transition: background var(--t-mid), color var(--t-mid); }
.step.is-active .step__num { background: var(--accent); color: #fff; }
/* The steps waiting their turn step back by colour, not transparency, so their text keeps its contrast. */
.step h3 { font-size: 20px; font-weight: 600; margin-top: 5px; color: var(--ink-muted); transition: color var(--t-mid) var(--ease-out); }
.step.is-active h3 { color: var(--ink); }
.step p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-muted); max-width: 30em; }
.step__crop { display: none; }

.phone--how .phone__layer + .phone__layer { opacity: var(--flip, 0); }
/* The highlight: everything outside the rectangle dims, like a light over one part of the screen. */
.spot { position: absolute; z-index: 3; left: var(--sx, 4%); top: var(--sy, 23.5%); width: var(--sw, 92%); height: var(--sh, 8%); border-radius: 22px; box-shadow: 0 0 0 200vmax rgba(30,27,46,0.42), 0 0 0 3px var(--accent) inset; transition: left var(--t-scene) var(--ease-out), top var(--t-scene) var(--ease-out), width var(--t-scene) var(--ease-out), height var(--t-scene) var(--ease-out), opacity var(--t-mid); pointer-events: none; opacity: var(--spot-on, 1); }
.lens { position: absolute; left: calc(100% - 70px); top: var(--lens-y, 30%); width: min(340px, 24vw); padding: 10px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-float); transform: translateY(-50%) scale(var(--lens-scale, 1)); opacity: var(--lens-on, 1); transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out), top var(--t-scene) var(--ease-out); }
.lens__live { aspect-ratio: var(--lens-ar, 5); border-radius: 20px; background: var(--surface-mid); }
.lens__live iframe { transition: transform var(--t-scene) var(--ease-out); }
.how__pair { position: absolute; left: 5.601%; top: 2.188%; width: 88.661%; height: 94.164%; container-type: size; pointer-events: none; z-index: 7; } /* the frame's screen opening */
.how__card { position: absolute; top: 35.7%; height: 12.8%; width: 42.5%; padding: 4.5cqw 4cqw 4cqw 5cqw; gap: 0; box-shadow: var(--shadow-float); opacity: var(--pair-on, 0); transition: opacity var(--t-mid); }
.how__card--mine { left: 5.97%; transform: translate(var(--mx, 0), var(--my, 0)) scale(var(--ps, 1)); }
.how__card--other { left: 51.5%; transform: translate(var(--ox, 0), var(--oy, 0)) scale(var(--ps, 1)); }
.how__card .lang-card__label { font-size: 3.3cqw; }
.how__card .lang-card__name { font-size: 5.4cqw; gap: 2.4cqw; }
.how__card .lang-card__name img { width: 7cqw; height: 7cqw; }
.how__swap { position: absolute; left: 50%; top: 42.1%; width: 13cqw; height: 13cqw; margin: -6.5cqw 0 0 -6.5cqw; border-radius: 50%; background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(30,27,46,0.18); opacity: var(--pair-on, 0); transform: rotate(var(--swap-turn, 0deg)) scale(var(--swap-scale, 1)); transition: opacity var(--t-mid); z-index: 2; }

/* Phones and tablets: a plain vertical walkthrough, one close-up per step. */
@media (max-width: 900px), (max-height: 560px) {
  .how { height: auto; padding: 72px 0 32px; }
  .how__sticky { position: static; height: auto; display: block; padding: 0 var(--gutter); }
  .how__intro { padding-bottom: 20px; }
  .how__stage { display: none; }
  .steps { gap: 16px; }
  .step { background: var(--surface); box-shadow: var(--shadow-card); flex-wrap: wrap; }
  .step h3 { color: var(--ink); }
  .step .step__num { background: var(--accent); color: #fff; }
  .step > div { flex: 1 1 200px; }
  .step__crop { display: block; flex: 1 1 100%; border-radius: 18px; box-shadow: 0 0 0 1px var(--line-soft); background: var(--surface-mid); }
}

/* ---------------------------------------------------------------- features */
.features { padding: clamp(80px, 11vw, 150px) 0; background: var(--surface-mid); }
.bento { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 48px auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.tile { background: var(--surface); border-radius: var(--radius-sheet); padding: clamp(24px, 2.6vw, 36px); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 22px; overflow: hidden; }
.tile h3 { font-size: 22px; line-height: 1.25; font-weight: 600; }
.tile__copy p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--ink-muted); max-width: 36em; }
.tile--pair { grid-column: span 7; }
.tile--settings { grid-column: span 5; }
.tile--detect, .tile--fav, .tile--start { grid-column: span 4; }
.tile--hold, .tile--safety { grid-column: span 6; }
@media (max-width: 1100px) {
  .tile--pair, .tile--settings { grid-column: span 12; }
  .tile--detect, .tile--fav { grid-column: span 6; }
  .tile--start { grid-column: span 12; }
}
@media (max-width: 760px) { .bento > .tile { grid-column: span 12; } }

.pairs { display: flex; flex-wrap: wrap; gap: 8px; }
.pair-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 6px; border: 0; border-radius: 20px; background: var(--surface-mid); font-size: 14px; font-weight: 600; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.pair-chip:hover { background: var(--accent-soft); }
.pair-chip:active { transform: scale(0.95); }
.pair-chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
.pair-chip__flags { display: inline-flex; }
.pair-chip__flags img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface-mid); transition: box-shadow var(--t-fast); }
.pair-chip__flags img + img { margin-left: -9px; }
.pair-chip:hover .pair-chip__flags img { box-shadow: 0 0 0 2px var(--accent-soft); }
.pair-chip[aria-pressed="true"] .pair-chip__flags img { box-shadow: 0 0 0 2px var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preview { position: relative; padding: 44px 24px 22px; border-radius: 28px; background: var(--ground); display: flex; flex-direction: column; gap: 22px; }
.preview__tag { position: absolute; left: 18px; top: 14px; font-size: 12px; font-weight: 600; color: var(--ink-on-pastel); background: rgba(255,255,255,0.75); padding: 4px 10px; border-radius: 12px; }
.preview__cards { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.preview__card { width: auto; min-width: 0; min-height: 112px; box-shadow: none; transition: transform var(--t-mid) var(--ease-settle); }
.preview__card .lang-card__name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.swap-btn { position: absolute; left: 50%; top: 50%; z-index: 2; width: 52px; height: 52px; margin: -26px 0 0 -26px; border: 0; border-radius: 50%; background: var(--surface); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(30,27,46,0.14); transition: transform var(--t-mid) var(--ease-settle); }
.swap-btn:hover { transform: scale(1.06); }
.swap-btn:active { transform: scale(0.92); }
.preview.is-swapping .swap-btn { transform: rotate(180deg); }
.preview.is-swapping [data-side="mine"] { transform: translateX(calc(100% + 14px)); }
.preview.is-swapping [data-side="other"] { transform: translateX(calc(-100% - 14px)); }
.preview.is-fading .lang-card__name, .preview.is-fading .bubble { opacity: 0; transform: translateY(6px); }
.lang-card__name, .bubble { transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.bubbles { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.bubble { padding: 12px 16px; border-radius: 20px; font-size: 16px; font-weight: 600; line-height: 1.35; }
.bubble--staff { background: var(--surface); border-bottom-left-radius: 6px; }
.bubble--patient { background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubbles__arrow { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.8); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; }
.preview__note { font-size: 12px; color: var(--ink-on-pastel); }
@media (max-width: 520px) {
  .bubbles { grid-template-columns: 1fr; } .bubbles__arrow { transform: rotate(90deg); justify-self: center; }
  .preview { padding: 44px 14px 18px; }
  .preview__cards { gap: 10px; }
  .preview__card { min-height: 96px; padding: 14px 12px 14px 14px; }
  .preview__card .lang-card__name { font-size: 16px; gap: 8px; }
  .preview__card .lang-card__name img { width: 24px; height: 24px; }
  .swap-btn { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

.segbar { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px; border-radius: 26px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft), var(--shadow-chip); }
.segbar button { position: relative; z-index: 1; height: 62px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 500; border-radius: 22px; transition: color var(--t-mid) var(--ease-out); }
.segbar button[aria-pressed="true"] { color: #fff; }
.segbar__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 22px; background: var(--accent); transform: translateX(calc(var(--seg, 0) * 100%)); transition: transform 280ms cubic-bezier(0.3, 1.4, 0.5, 1); }
.phrases__label { font-size: 12px; color: var(--ink-muted); margin-bottom: -10px; }
.phrases { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.phrases li { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px 6px 12px; border: 1px solid var(--line-soft); border-radius: 18px; font-size: 13px; font-weight: 500; animation: chip-in var(--t-mid) var(--ease-out) both; }
.phrases li:nth-child(2) { animation-delay: 60ms; } .phrases li:nth-child(3) { animation-delay: 120ms; }
.phrases svg { color: var(--accent-strong); flex-shrink: 0; }
@keyframes chip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.detect-pill { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px 0 8px; border-radius: 28px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft), var(--shadow-chip); font-size: 14px; }
.detect-pill__disc { width: 40px; height: 40px; border-radius: 50%; background: var(--patient-card); color: var(--patient-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.detect-pill__q { font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detect-pill__a { color: var(--patient-ink); font-weight: 600; font-size: 13px; white-space: nowrap; }

.favs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fav { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border-radius: 22px 30px 20px 20px; transition: transform var(--t-fast) var(--ease-out); }
.fav:nth-child(even) { border-radius: 30px 22px 20px 20px; }
.fav:hover { transform: translateY(-2px); }
.fav img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; flex-shrink: 0; }
.fav span { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-on-pastel); min-width: 0; }
.fav b { font-size: 16px; font-weight: 600; color: var(--ink); }
.fav--staff { background: var(--staff-fill); } .fav--patient { background: var(--patient-fill); } .fav--peach { background: var(--peach); } .fav--pink { background: var(--pink); }

.start-btn { display: flex; align-items: center; gap: 12px; height: 64px; padding: 6px 6px 6px 26px; border-radius: 32px; background: var(--ink); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, var(--shadow-button); margin-top: auto; }
.start-btn__text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 18px; font-weight: 600; line-height: 1.2; }
.start-btn__text small { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.start-btn__flags { display: flex; }
.start-btn__flags img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); }
.start-btn__flags img + img { margin-left: -8px; }
.start-btn__arrow { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(107,77,239,0.45); }
.start-btn__arrow svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(4px); } }

/* ---------------------------------------------------------------- use cases */
.cases { padding: clamp(80px, 10vw, 140px) 0; background: var(--surface); }
.cases__tabs { max-width: var(--max); margin: 36px auto 0; padding: 0 var(--gutter); display: flex; gap: 8px; flex-wrap: wrap; }
.cases__tabs button { height: 46px; padding: 0 22px; border: 0; border-radius: 23px; background: var(--surface-mid); font-size: 15px; font-weight: 600; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.cases__tabs button:hover { background: var(--accent-soft); }
.cases__tabs button:active { transform: scale(0.96); }
.cases__tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.cases__frame { position: relative; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 24px auto 0; padding: 0 var(--gutter); }
.cases__media { position: relative; height: min(68svh, 50vw, 700px); border-radius: var(--radius-sheet); overflow: hidden; background: var(--surface-mid); }
.scene { position: absolute; inset: -3% 0; opacity: 0; transform: scale(1.05) translateY(var(--parallax, 0)); transition: opacity var(--t-scene) var(--ease-out), transform 1.4s var(--ease-out); }
.scene.is-on { opacity: 1; transform: scale(1) translateY(var(--parallax, 0)); }
.scene { width: 100%; height: 106%; object-fit: cover; object-position: 60% 50%; background: var(--surface-mid); }
.case-card { position: absolute; left: calc(var(--gutter) + clamp(20px, 3vw, 44px)); bottom: clamp(20px, 3vw, 44px); width: min(400px, 36%); padding: 28px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-float); }
.case-card__setting { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 10px; border-radius: 17px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.case-card h3 { margin-top: 16px; font-size: 24px; line-height: 1.2; font-weight: 600; }
.case-card p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-muted); }
.case-card.is-changing > * { opacity: 0; transform: translateY(8px); }
.case-card > * { transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out); }
@media (max-width: 700px) {
  .cases__media { height: auto; aspect-ratio: 620 / 752; }
  .scene { object-position: 50% 50%; }
  .case-card { position: relative; left: auto; bottom: auto; width: auto; margin: -56px 12px 0; }
}

/* ---------------------------------------------------------------- FAQ */
.faq { padding: clamp(80px, 10vw, 140px) 0; background: var(--surface-mid); }
.faq__list { max-width: 880px; margin: 40px auto 0; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-chip); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; font-size: 17px; font-weight: 600; cursor: pointer; border-radius: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b3fe0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center no-repeat; transition: transform var(--t-mid) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 24px; font-size: 15px; line-height: 1.7; color: var(--ink-muted); max-width: 60em; }

/* ---------------------------------------------------------------- closing */
.closing { position: relative; overflow: hidden; padding: clamp(90px, 11vw, 160px) var(--gutter) clamp(80px, 9vw, 120px); background: var(--ground); text-align: center; }
.closing__stage { position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 7.2; margin: 0 auto; border-radius: var(--radius-sheet); overflow: hidden; background: #dfe3d7; transform: scale(calc(0.9 + 0.1 * var(--c, 1))); opacity: calc(0.4 + 0.6 * var(--c, 1)); }
.closing__video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.closing__reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: none; }
/* The video's own last, empty frame: the logo lands on exactly the background the ribbons left. */
.closing__veil { position: absolute; inset: 0; background: url("img/ribbons-end.webp") 50% 45% / cover no-repeat; opacity: 0; transition: opacity 900ms var(--ease-out); }
/* Apple-style: slow, even fades. The logo comes into focus while settling a touch smaller; the name follows as its
   letters draw together; the line under it last. */
.closing__disc { position: relative; width: clamp(84px, 9vw, 116px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 18px 40px rgba(107,77,239,0.3); opacity: 0; }
.closing__disc img { width: 62%; height: auto; }
.closing__word { position: relative; font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); opacity: 0; }
.closing__tag { position: relative; margin-top: -8px; font-size: clamp(14px, 1.2vw, 17px); font-weight: 500; color: var(--ink-on-pastel); opacity: 0; }
.closing__veil { transition-duration: 1400ms !important; transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1) !important; }
.closing__stage.is-revealed .closing__veil { opacity: 1; }
.closing__stage.is-revealed .closing__disc { animation: apple-focus 1.6s cubic-bezier(0.25, 0.1, 0.25, 1) 500ms both; }
.closing__stage.is-revealed .closing__word { animation: apple-word 1.6s cubic-bezier(0.25, 0.1, 0.25, 1) 1000ms both; }
.closing__stage.is-revealed .closing__tag { animation: apple-fade 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) 1700ms both; }
@keyframes apple-focus { from { opacity: 0; transform: scale(1.06); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes apple-word { from { opacity: 0; letter-spacing: 0.12em; filter: blur(6px); } to { opacity: 1; letter-spacing: -0.02em; filter: blur(0); } }
@keyframes apple-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.closing__title { margin: 48px auto 0; font-size: clamp(36px, 5vw, 68px); line-height: 1.06; font-weight: 700; letter-spacing: -0.025em; max-width: 18ch; }
.closing .stores { margin-top: 36px; }
.closing__org { margin-top: 24px; font-size: 15px; color: var(--ink-muted); }
@media (max-width: 700px) { .closing__stage { aspect-ratio: 4 / 3; } }

/* ---------------------------------------------------------------- for organisations: the card and the enquiry */
.org-cta { max-width: 980px; margin: 56px auto 0; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--radius-sheet); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 32px; text-align: left; box-shadow: var(--shadow-button); }
.org-cta__copy { flex: 1; }
.org-cta__eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-light); }
.org-cta__title { margin-top: 8px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.org-cta__text { margin-top: 10px; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.72); max-width: 44em; }
.org-cta__btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 14px; height: 60px; padding: 4px 4px 4px 26px; border: 0; border-radius: 30px; background: #fff; color: var(--ink); font-size: 17px; font-weight: 600; transition: transform var(--t-fast) var(--ease-out); }
.org-cta__btn:hover .org-cta__arrow { transform: translateX(3px); }
.org-cta__btn:active { transform: scale(0.97); }
.org-cta__arrow { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(107,77,239,0.45); transition: transform var(--t-fast) var(--ease-out); }
.org-cta__btn--dark { background: var(--ink); color: #fff; }
@media (max-width: 700px) { .org-cta { flex-direction: column; align-items: stretch; gap: 20px; } .org-cta__btn { justify-content: space-between; } }
.linklike { border: 0; padding: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }

.contact { width: min(980px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: var(--radius-sheet); background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px rgba(30,27,46,0.35); overflow: hidden; }
.contact[open] { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); animation: contact-in 520ms var(--ease-out); }
.contact::backdrop { background: rgba(30,27,46,0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in 400ms ease both; }
@keyframes contact-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.contact__side { padding: 40px 36px; background: var(--accent); color: #fff; display: flex; flex-direction: column; gap: 22px; }
.contact__mark { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; }
.contact__title { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.contact__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.contact__points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.contact__points svg { flex-shrink: 0; margin-top: 2px; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: #fff; color: var(--accent-strong); }
.contact__points svg use { stroke-width: 3; }
.contact__alt { margin-top: auto; font-size: 13px; color: rgba(255,255,255,0.8); }
.contact__alt a, .contact__alt .linklike { color: #fff; }
.contact__main { position: relative; padding: 36px; overflow-y: auto; }
.contact__close { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-mid); display: flex; align-items: center; justify-content: center; }
.contact__close svg { transform: rotate(45deg); }
.contact__form { display: flex; flex-direction: column; gap: 18px; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-right: 44px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-on-pastel); }
.field--wide { grid-column: 1 / -1; }
.field em { font-style: normal; font-weight: 500; color: var(--ink-muted); }
.field input, .field textarea { width: 100%; box-sizing: border-box; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); font: 500 15px var(--font-sans); color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .is-invalid, .field input[aria-invalid="true"] { border-color: var(--alert-ink); }
.choice { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink-on-pastel); }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.choice span { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 21px; background: var(--surface-mid); font-size: 14px; font-weight: 600; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.choice label:hover span { background: var(--accent-soft); }
.choice input:checked + span { background: var(--accent); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice label:active span { transform: scale(0.96); }
.contact__done[hidden], .contact__form[hidden], .contact__error[hidden] { display: none; }
.optin { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); cursor: pointer; }
.optin input { flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.unsub-form { margin-top: 28px; }
.contact__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact__error { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--alert-soft); color: var(--alert-ink); font-size: 14px; font-weight: 600; }
.contact__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.contact__note { font-size: 12px; color: var(--ink-muted); max-width: 24em; }
.contact__form.is-sending .org-cta__btn { opacity: 0.6; pointer-events: none; }
.contact__done { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; animation: fade-in 500ms ease both; }
.contact__check { width: 76px; height: 76px; border-radius: 50%; background: var(--patient-card); color: var(--patient-ink); display: flex; align-items: center; justify-content: center; animation: apple-focus 900ms cubic-bezier(0.25, 0.1, 0.25, 1) both; }
.contact__check use { stroke-width: 2.6; }
.contact__done h3 { font-size: 26px; font-weight: 700; }
.contact__done p { font-size: 15px; color: var(--ink-muted); margin-bottom: 12px; }
.contact__done .org-cta__btn { padding: 0 34px; }
/* "Get a free access code": the code and its QR, ready for the phone */
.register__done { min-height: 0; padding: 4px 0; }
.register__done h3 { padding: 0 44px; }
.register__done > p { margin-bottom: 4px; }
.register__card { display: flex; align-items: center; gap: 24px; padding: 18px 26px 18px 18px; border-radius: var(--radius-card); background: var(--surface-mid); text-align: start; }
.register__qr { width: 148px; height: 148px; flex-shrink: 0; box-sizing: border-box; padding: 8px; border-radius: 16px; background: #fff; }
.register__qr svg { display: block; width: 100%; height: 100%; }
.register__info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.register__label { font-size: 13px; font-weight: 600; color: var(--ink-on-pastel); }
.register__code { font: 700 30px/1.1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.04em; color: var(--ink); white-space: nowrap; }
.register__copy { height: 36px; padding: 0 18px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); font: 600 14px var(--font-sans); box-shadow: var(--shadow-chip); cursor: pointer; transition: transform var(--t-fast) var(--ease-out); }
.register__copy:active { transform: scale(0.96); }
.register__valid { font-size: 13px; color: var(--ink-muted); }
.register__done .stores { margin-top: 10px; }
/* On the phone itself there is nothing to scan: the code alone, for the app. */
.register__how--phone { display: none; }
@media (hover: none) and (pointer: coarse) and (max-width: 760px) {
  .register__how { display: none; }
  .register__how--phone { display: block; }
  .register__qr { display: none; }
}
@media (max-width: 760px) {
  .contact { width: 100vw; max-width: 100vw; max-height: 94svh; margin: auto 0 0; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; }
  .contact[open] { grid-template-columns: 1fr; overflow-y: auto; animation: sheet-up 480ms var(--ease-out); }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .contact__side { padding: 28px 24px; gap: 14px; }
  .contact__points, .contact__alt { display: none; }
  .contact__title { font-size: 22px; padding-right: 40px; }
  .contact__main { padding: 24px; overflow: visible; }
  .contact__close { top: -64px; right: 16px; background: rgba(255,255,255,0.2); color: #fff; }
  .contact__grid { grid-template-columns: 1fr; padding-right: 0; }
  .contact__foot { flex-direction: column-reverse; align-items: stretch; }
  .contact__foot .org-cta__btn { justify-content: space-between; }
  .register__card { flex-direction: column; padding: 18px; text-align: center; }
  .register__info { align-items: center; }
}

/* ---------------------------------------------------------------- languages (homepage) */
.langs { padding: clamp(64px, 8vw, 110px) 0 clamp(80px, 10vw, 130px); background: var(--surface); }
.section-lead { margin-top: 16px; max-width: 40em; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--ink-muted); }
.langs__chips { max-width: var(--max); margin: 36px auto 0; padding: 0 var(--gutter); }
.langs__more { max-width: var(--max); margin: 28px auto 0; padding: 0 var(--gutter); font-size: 15px; font-weight: 600; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 8px; border-radius: 22px; background: var(--surface-mid); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; transition: background var(--t-fast), transform var(--t-fast) var(--ease-out); }
.lang-chip:hover { background: var(--accent-soft); }
.lang-chip:active { transform: scale(0.96); }
.lang-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface); flex-shrink: 0; }
.lang-chips--nav .lang-chip { padding: 0 18px; background: var(--surface); box-shadow: var(--shadow-chip); }
.case-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--accent-strong); text-decoration: none; }
.case-card__more:hover span { text-decoration: underline; }

/* ---------------------------------------------------------------- pages beyond the homepage (lib/site.js) */
body.page { background: var(--surface-mid); }
.page-hero { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 132px var(--gutter) 72px; }
.page-hero::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--ground); }
.page-hero--wide { grid-template-columns: 1fr; padding-bottom: 48px; }
.page-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.eyebrow__flag { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface); }
.crumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-title { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; max-width: 18ch; }
.page-lead { margin-top: 22px; max-width: 36em; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; color: var(--ink-muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin-top: 32px; }
.page-hero__phone { display: flex; justify-content: center; }
.phone--still { width: min(100%, 330px); }
.phone__snap { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.page-section { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--gutter) 0; }
.section-title--sm { font-size: clamp(26px, 3vw, 40px); max-width: 28ch; }
.page-text { margin-top: 14px; max-width: 46em; font-size: 16px; line-height: 1.7; color: var(--ink-muted); }
.page-steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.page-steps li, .page-feature { background: var(--surface); border-radius: 28px; padding: 28px; box-shadow: var(--shadow-card); }
.page-steps .step__num { background: var(--accent); color: #fff; }
.page-steps h3, .page-feature h3 { margin-top: 16px; font-size: 19px; line-height: 1.3; font-weight: 600; }
.page-feature h3 { margin-top: 0; }
.page-steps p, .page-feature p { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--ink-muted); }
.page-features { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.phrases--page { margin-top: 24px; }
.phrases--page li { background: var(--surface); font-size: 14px; }
.page-note { padding: 28px 32px; border-radius: 28px; background: var(--surface); box-shadow: inset 6px 0 0 var(--accent), var(--shadow-card); }
.page-note h2 { font-size: 20px; font-weight: 600; }
.page-note p { margin-top: 8px; max-width: 52em; font-size: 15px; line-height: 1.7; color: var(--ink-muted); }
.page-faq { padding: clamp(56px, 7vw, 96px) 0 0; background: transparent; }
.page-faq .faq__list { margin-top: 28px; }
.page-cta { padding: clamp(64px, 8vw, 110px) var(--gutter) clamp(72px, 9vw, 120px); }
.page-cta .org-cta { margin-top: 0; }
.page-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.page-split .lang-chips { margin-top: 20px; }
.page-split .lang-chip { background: var(--surface); }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lang-card-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-chip); color: var(--ink); text-decoration: none; transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.lang-card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.lang-card-link img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface); flex-shrink: 0; }
.lang-card-link span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: var(--ink-muted); }
.lang-card-link b { font-size: 17px; font-weight: 600; color: var(--ink); }
.table-wrap { margin-top: 24px; overflow-x: auto; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-card); }
.phrase-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.phrase-table th { padding: 16px 20px; text-align: start; font-size: 12px; font-weight: 600; color: var(--ink-muted); border-bottom: 1px solid var(--line-soft); }
.phrase-table td { padding: 14px 20px; line-height: 1.5; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.phrase-table tr:last-child td { border-bottom: 0; }
.phrase-table td:nth-child(2) { font-weight: 600; }
.phrase-table td:nth-child(3) { color: var(--ink-muted); font-size: 13px; }
.phrase-table--ui td:nth-child(2) { font-weight: 400; }
.phrase-table--ui td:nth-child(3) { color: var(--ink); font-size: 15px; font-weight: 600; }
.phrase-table td[dir="rtl"] { text-align: right; }
.page-quote { margin-top: 24px; padding: 22px 24px; border-radius: 24px; background: var(--patient-card); }
.page-quote__label { font-size: 13px; font-weight: 500; color: var(--ink-on-pastel); }
.page-quote__text { margin-top: 8px; font-size: 18px; line-height: 1.5; font-weight: 600; }
.page-quote__text--sm { margin: 14px 0; padding: 16px 20px; border-radius: 20px; background: var(--patient-card); font-size: 17px; }
@media (min-width: 901px) and (max-width: 1100px) { .page-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .phrase-table:not(.phrase-table--ui) :is(th, td):nth-child(3) { display: none; } .phrase-table :is(th, td) { padding: 12px 14px; } }
@media (max-width: 900px) {
  .page-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 108px; }
  .phone--still { width: min(68vw, 280px); }
  .page-steps, .page-features, .page-split { grid-template-columns: 1fr; }
  .page-split { gap: 56px; }
}

/* ---------------------------------------------------------------- footer */
.footer { background: var(--surface); padding: 36px var(--gutter); }
.footer { padding-top: 56px; padding-bottom: 40px; }
.footer__inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 48px; align-items: start; }
.footer__tag { margin-top: 14px; max-width: 30em; font-size: 14px; line-height: 1.6; color: var(--ink-muted); }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer__cols > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__head { margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.footer__cols a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.footer__cols a:hover { text-decoration: underline; }
.footer__legal { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-muted); }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr; } .footer__cols { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- reveal on scroll, pause, reduced motion */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.bento .reveal:nth-child(3n+2) { transition-delay: 80ms; }
.bento .reveal:nth-child(3n) { transition-delay: 160ms; }
.no-js .reveal { opacity: 1; transform: none; }

.motion-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border: 0; border-radius: 20px; background: rgba(255,255,255,0.94); box-shadow: var(--shadow-card); font-size: 13px; font-weight: 600; opacity: 0.8; transition: opacity var(--t-fast); }
.motion-toggle:hover, .motion-toggle:focus-visible { opacity: 1; }
@media (max-width: 600px) {
  .motion-toggle { width: 40px; padding: 0; justify-content: center; }
  .motion-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Paused: every looping decoration stops where it is. */
.motion-paused .phone--hero, .motion-paused .exchange__disc, .motion-paused .exchange__msg, .motion-paused .start-btn__arrow svg { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .exchange__msg--out, .exchange__msg--in { opacity: 1; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .motion-toggle { display: none; }
}
