/*
  TapTL site. Material 3 Expressive, hand-written: the colour roles come from the launcher icon
  (teal #0B5C6B as primary, indigo #2A2F7A as secondary, amber #FFB547 as tertiary), the shapes
  use the M3 corner scale (8 / 12 / 16 / 28 / 48 / full) and the motion uses the expressive
  spring-like easing. No framework, no build step.
*/

@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/google-sans-flex-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/google-sans-flex-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Colour roles ---------- */
:root {
  color-scheme: light;
  --primary: #00687a;
  --on-primary: #ffffff;
  --primary-container: #aeecff;
  --on-primary-container: #001f26;
  --secondary: #4a54a6;
  --on-secondary: #ffffff;
  --secondary-container: #dfe0ff;
  --on-secondary-container: #00105b;
  --tertiary: #845400;
  --on-tertiary: #ffffff;
  --tertiary-container: #ffddb5;
  --on-tertiary-container: #2a1800;
  --surface: #f5fafc;
  --surface-dim: #d5dbdd;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #eff4f6;
  --surface-container: #e9eff1;
  --surface-container-high: #e3e9eb;
  --surface-container-highest: #dde3e5;
  --on-surface: #171d1e;
  --on-surface-variant: #3f484b;
  --outline: #6f797b;
  --outline-variant: #bfc8cb;
  --inverse-surface: #2b3133;
  --inverse-on-surface: #ecf2f4;
  --scrim: rgb(0 0 0 / 0.4);

  --shape-xs: 4px;
  --shape-s: 8px;
  --shape-m: 12px;
  --shape-l: 16px;
  --shape-xl: 28px;
  --shape-2xl: 48px;
  --shape-full: 999px;

  --ease-spatial: cubic-bezier(0.38, 1.21, 0.22, 1);
  --ease-effects: cubic-bezier(0.34, 0.8, 0.34, 1);

  --wrap: 1180px;
  --gutter: 16px;
  --font: "Google Sans Flex", "Google Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --primary: #84d2e6;
    --on-primary: #00363f;
    --primary-container: #004e5c;
    --on-primary-container: #aeecff;
    --secondary: #bcc2ff;
    --on-secondary: #1a2575;
    --secondary-container: #333d8d;
    --on-secondary-container: #dfe0ff;
    --tertiary: #ffb95a;
    --on-tertiary: #462a00;
    --tertiary-container: #643f00;
    --on-tertiary-container: #ffddb5;
    --surface: #0e1416;
    --surface-dim: #0e1416;
    --surface-container-lowest: #090f10;
    --surface-container-low: #171d1e;
    --surface-container: #1b2122;
    --surface-container-high: #252b2d;
    --surface-container-highest: #303638;
    --on-surface: #dee3e5;
    --on-surface-variant: #bfc8cb;
    --outline: #899295;
    --outline-variant: #3f484b;
    --inverse-surface: #dee3e5;
    --inverse-on-surface: #2b3133;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #84d2e6;
  --on-primary: #00363f;
  --primary-container: #004e5c;
  --on-primary-container: #aeecff;
  --secondary: #bcc2ff;
  --on-secondary: #1a2575;
  --secondary-container: #333d8d;
  --on-secondary-container: #dfe0ff;
  --tertiary: #ffb95a;
  --on-tertiary: #462a00;
  --tertiary-container: #643f00;
  --on-tertiary-container: #ffddb5;
  --surface: #0e1416;
  --surface-dim: #0e1416;
  --surface-container-lowest: #090f10;
  --surface-container-low: #171d1e;
  --surface-container: #1b2122;
  --surface-container-high: #252b2d;
  --surface-container-highest: #303638;
  --on-surface: #dee3e5;
  --on-surface-variant: #bfc8cb;
  --outline: #899295;
  --outline-variant: #3f484b;
  --inverse-surface: #dee3e5;
  --inverse-on-surface: #2b3133;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, kbd { font-family: ui-monospace, "Roboto Mono", monospace; font-size: 0.92em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: var(--shape-s); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.muted { color: var(--on-surface-variant); }
.small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 18px; border-radius: var(--shape-full); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Icons ---------- */
.ic { width: 24px; height: 24px; flex: none; fill: currentColor; }
.ic-s { width: 20px; height: 20px; }

/* ---------- Buttons (M3: filled, tonal, outlined, text, icon) ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 24px;
  border-radius: var(--shape-full); border: 0;
  font: 600 1rem/1 var(--font); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  position: relative; isolation: isolate; overflow: hidden;
  transition: border-radius 0.35s var(--ease-spatial), transform 0.35s var(--ease-spatial), box-shadow 0.2s var(--ease-effects);
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: currentColor; opacity: 0; transition: opacity 0.2s var(--ease-effects);
}
.btn:hover::after { opacity: 0.08; }
.btn:active::after { opacity: 0.12; }
/* Expressive press: the pill squares off a little while held. */
.btn:active { border-radius: var(--shape-m); }
.btn-l { --h: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn-xl { --h: 64px; padding: 0 32px; font-size: 1.125rem; }
.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-filled:hover { box-shadow: 0 1px 3px rgb(0 0 0 / 0.2), 0 2px 6px rgb(0 0 0 / 0.12); }
.btn-tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn-tertiary { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.btn-outlined { background: transparent; color: var(--on-surface-variant); box-shadow: inset 0 0 0 1px var(--outline-variant); }
.btn-outlined { color: var(--primary); }
.btn-text { background: transparent; color: var(--primary); padding: 0 14px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: var(--shape-full); border: 0;
  background: transparent; color: var(--on-surface-variant); cursor: pointer;
  position: relative; isolation: isolate; overflow: hidden; text-decoration: none;
  transition: border-radius 0.35s var(--ease-spatial);
}
.icon-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity 0.2s; }
.icon-btn:hover::after { opacity: 0.08; }
.icon-btn:active { border-radius: var(--shape-m); }

/* ---------- Top app bar ---------- */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: background-color 0.25s var(--ease-effects), box-shadow 0.25s;
}
.top-bar.scrolled { background: color-mix(in srgb, var(--surface-container) 92%, transparent); }
.bar-inner { display: flex; align-items: center; gap: 8px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-surface); margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 11px; }
.brand span { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 10px 16px; border-radius: var(--shape-full);
  color: var(--on-surface-variant); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  transition: background-color 0.2s, color 0.2s;
}
.nav a:hover { background: var(--surface-container-high); color: var(--on-surface); }
.nav a[aria-current="page"] { background: var(--secondary-container); color: var(--on-secondary-container); }
.bar-actions { display: flex; align-items: center; gap: 4px; }
.bar-actions .btn { --h: 40px; padding: 0 20px; font-size: 0.9375rem; margin-left: 4px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* Narrow screens: the links become a scrolling row of chips under the bar. No JS needed. */
@media (max-width: 920px) {
  .bar-inner { flex-wrap: wrap; min-height: 64px; padding-top: 8px; }
  .nav {
    order: 3; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 10px; overflow-x: auto; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; background: var(--surface-container); padding: 8px 14px; font-size: 0.875rem; }
  html { scroll-padding-top: 124px; }
}
@media (max-width: 480px) {
  .bar-actions .btn-label { display: none; }
  .bar-actions .btn { padding: 0 12px; }
  .brand span { font-size: 1.25rem; }
}

/* ---------- Sections ---------- */
section { padding: clamp(32px, 4.5vw, 56px) 0; }
.section-head { max-width: 820px; margin-bottom: clamp(24px, 3vw, 36px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--primary); margin-bottom: 14px;
}
h2.headline { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 750; }
.section-head p { margin-top: 16px; font-size: 1.125rem; color: var(--on-surface-variant); }

/* ---------- Hero ---------- */
.hero { padding: clamp(20px, 4vw, 48px) 0 clamp(36px, 5vw, 64px); position: relative; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: var(--shape-s);
  font-size: 0.875rem; font-weight: 500;
  background: var(--surface-container-low); color: var(--on-surface-variant);
  box-shadow: inset 0 0 0 1px var(--outline-variant);
}
.chip.accent { background: var(--tertiary-container); color: var(--on-tertiary-container); box-shadow: none; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  font-weight: 800; letter-spacing: -0.012em; word-spacing: 0.06em; line-height: 1;
  font-variation-settings: "opsz" 144;
}
.hero h1 .swap { display: inline-block; color: var(--primary); }
.hero h1 .zh { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--on-surface-variant); font-weight: 700; }
.hero .lede { margin-top: 24px; font-size: clamp(1.0625rem, 1.7vw, 1.3rem); color: var(--on-surface-variant); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 500px; }
/* M3 Expressive shapes (the 9-point and 4-point "cookie"), tinted by the colour roles. */
.shape {
  position: absolute; aspect-ratio: 1;
  -webkit-mask: url(/img/shape-cookie9.svg) center / contain no-repeat;
  mask: url(/img/shape-cookie9.svg) center / contain no-repeat;
  animation: spin 60s linear infinite;
}
.hero-art .shape { background: var(--primary-container); width: min(100%, 470px); }
.hero-art .shape-2 {
  background: var(--tertiary-container); width: 140px; right: 0; bottom: 4%;
  -webkit-mask-image: url(/img/shape-cookie4.svg); mask-image: url(/img/shape-cookie4.svg);
  animation-duration: 36s; animation-direction: reverse;
}
.hero-art .shape-3 { background: var(--secondary-container); width: 90px; left: 2%; top: 8%; animation-duration: 48s; }
.phone {
  position: relative; width: min(64vw, 270px);
  border-radius: 40px; padding: 10px;
  background: #1a1c1e;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(255 255 255 / 0.06) inset;
  transform: rotate(-4deg);
  transition: transform 0.6s var(--ease-spatial);
}
.phone:hover { transform: rotate(0deg) scale(1.02); }
.phone img { border-radius: 31px; width: 100%; aspect-ratio: 1080 / 2400; object-fit: cover; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Before / after ---------- */
.compare-card {
  background: var(--surface-container-low);
  border-radius: var(--shape-2xl);
  padding: clamp(14px, 2.4vw, 28px);
}
.compare-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 4px 6px 0; }
.compare-top h3 { font-size: 1.25rem; font-weight: 650; }
.segmented {
  --seg-w: 120px;
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: var(--seg-w);
  border-radius: var(--shape-full); box-shadow: inset 0 0 0 1px var(--outline); overflow: hidden;
}
/* Sliding pill: same colour as the slider handle, glides to the picked side. */
.segmented::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--seg-w);
  border-radius: var(--shape-full); background: var(--primary-container);
  opacity: 0; transform: translateX(0) scale(0.85);
  transition: transform 0.45s var(--ease-spatial), opacity 0.2s var(--ease-effects);
}
.segmented[data-active="before"]::before { opacity: 1; transform: translateX(0); }
.segmented[data-active="after"]::before { opacity: 1; transform: translateX(100%); }
.segmented button {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 14px; border: 0; background: transparent; cursor: pointer;
  font: 600 0.875rem var(--font); color: var(--on-surface);
  transition: color 0.25s var(--ease-effects);
}
.segmented button + button { box-shadow: inset 1px 0 0 var(--outline); }
.segmented button[aria-pressed="true"] { color: var(--on-primary-container); }
.segmented .check {
  width: 0; height: 18px; margin-right: 0; opacity: 0; transform: scale(0.4);
  transition: width 0.3s var(--ease-spatial), margin 0.3s var(--ease-spatial), opacity 0.2s var(--ease-effects), transform 0.3s var(--ease-spatial);
}
.segmented button[aria-pressed="true"] .check { width: 18px; margin-right: 6px; opacity: 1; transform: none; }

.compare {
  --pos: 50%;
  position: relative; overflow: hidden;
  border-radius: var(--shape-xl);
  aspect-ratio: 2400 / 1080;
  background: #10161d;
  user-select: none; touch-action: pan-y;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px;
  background: var(--primary-container); pointer-events: none;
}
.compare .knob {
  position: absolute; top: 50%; left: var(--pos);
  width: 48px; height: 48px; margin: -24px 0 0 -24px;
  display: grid; place-items: center; border-radius: var(--shape-l);
  background: var(--primary-container); color: var(--on-primary-container);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.35); pointer-events: none;
  transition: border-radius 0.35s var(--ease-spatial);
}
.compare:active .knob { border-radius: var(--shape-full); }
/* Until the visitor touches it, a soft ring pulses around the handle so it reads as draggable. */
.compare.idle .knob::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit;
  box-shadow: 0 0 0 2px var(--primary-container);
  animation: knob-ping 2.4s var(--ease-effects) 1.6s 5;
}
@keyframes knob-ping {
  0% { transform: scale(1); opacity: 0.9; }
  60%, 100% { transform: scale(1.7); opacity: 0; }
}
.compare .tag {
  position: absolute; top: 14px; padding: 6px 12px; border-radius: var(--shape-full);
  background: rgb(0 0 0 / 0.6); color: #fff; font-size: 0.8125rem; font-weight: 600; pointer-events: none;
}
.compare .tag-before { left: 14px; }
.compare .tag-after { right: 14px; }
.compare input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
}
.compare-note { margin-top: 14px; padding: 0 6px; font-size: 0.9rem; color: var(--on-surface-variant); }
.shot-wide { margin-top: 18px; border-radius: var(--shape-xl); overflow: hidden; }

/* ---------- Bento: why ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile {
  border-radius: var(--shape-xl); padding: 28px 24px;
  background: var(--surface-container); min-height: 210px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  transition: border-radius 0.5s var(--ease-spatial), transform 0.5s var(--ease-spatial);
}
.tile:hover { border-radius: var(--shape-2xl); }
.tile .big { font-size: clamp(2.25rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tile h3 { font-size: 1.125rem; font-weight: 650; margin-bottom: 6px; }
.tile p { color: inherit; opacity: 0.82; font-size: 0.95rem; }
.tile.t1 { background: var(--primary-container); color: var(--on-primary-container); }
.tile.t2 { background: var(--secondary-container); color: var(--on-secondary-container); }
.tile.t3 { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.tile.t4 { background: var(--inverse-surface); color: var(--inverse-on-surface); }

/* ---------- Feature list ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature {
  background: var(--surface-container-low); border-radius: var(--shape-xl);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 10px;
}
.feature .icon-wrap {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--primary-container); color: var(--on-primary-container);
  border-radius: var(--shape-l);
  transition: border-radius 0.5s var(--ease-spatial), transform 0.5s var(--ease-spatial);
}
.feature:nth-child(3n+2) .icon-wrap { background: var(--secondary-container); color: var(--on-secondary-container); border-radius: var(--shape-full); }
.feature:nth-child(3n) .icon-wrap { background: var(--tertiary-container); color: var(--on-tertiary-container); border-radius: 50% 50% var(--shape-l) 50%; }
.feature:hover .icon-wrap { border-radius: var(--shape-xl); transform: rotate(-8deg); }
.feature h3 { font-size: 1.1875rem; font-weight: 650; }
.feature p { color: var(--on-surface-variant); }

/* ---------- How it works (pipeline) ---------- */
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; }
.pipeline li {
  counter-increment: step; position: relative;
  background: var(--surface-container); border-radius: var(--shape-xl); padding: 22px 20px 24px;
}
.pipeline li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px;
  border-radius: var(--shape-full); background: var(--primary); color: var(--on-primary);
  font-weight: 700;
}
.pipeline h3 { font-size: 1.0625rem; font-weight: 650; margin-bottom: 6px; }
.pipeline p { font-size: 0.925rem; color: var(--on-surface-variant); }
.never {
  margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: 18px 22px; border-radius: var(--shape-xl);
  background: var(--surface-container-low); box-shadow: inset 0 0 0 1px var(--outline-variant);
}
.never strong { margin-right: 4px; }
.never .chip { background: var(--surface); }
.never .chip svg { color: var(--outline); }

/* ---------- Languages ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.lang {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 18px; border-radius: var(--shape-l);
  background: var(--surface-container-low); box-shadow: inset 0 0 0 1px var(--outline-variant);
}
.lang b { font-size: 1.125rem; font-weight: 650; }
.lang span { font-size: 0.875rem; color: var(--on-surface-variant); }
.lang.star { background: var(--primary-container); color: var(--on-primary-container); box-shadow: none; }
.lang.star span { color: inherit; opacity: 0.85; }
.lang-note { margin-top: 16px; color: var(--on-surface-variant); }

/* ---------- Video ---------- */
.videos { display: grid; grid-template-columns: 2.6fr 1fr; gap: 12px; }
.video-card { background: var(--surface-container-low); border-radius: var(--shape-xl); padding: 12px; display: flex; flex-direction: column; }
.video-card video { width: 100%; border-radius: var(--shape-l); background: #000; }
.video-card .landscape video { aspect-ratio: 2400 / 1080; }
/* The portrait video fills whatever height the landscape card sets, so both cards end level. */
.video-card .portrait { flex: 1; position: relative; min-height: 0; }
.video-card .portrait video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.video-card h3 { font-size: 1.0625rem; font-weight: 650; margin: 14px 8px 4px; }
.video-card p { margin: 0 8px 8px; color: var(--on-surface-variant); font-size: 0.925rem; }

/* ---------- Install ---------- */
.install-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.panel { background: var(--surface-container-low); border-radius: var(--shape-2xl); padding: clamp(24px, 3.4vw, 40px); }
.panel h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.steps > li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; counter-increment: s; }
.steps > li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--shape-m); background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 700;
}
.steps p { padding-top: 7px; }
.steps ul { margin: 10px 0 0; padding-left: 18px; color: var(--on-surface-variant); display: grid; gap: 6px; }
.panel .btn { margin-top: 24px; }

.perm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.perm-list li {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  padding: 14px; border-radius: var(--shape-l); background: var(--surface);
}
.perm-list li:first-child { border-radius: var(--shape-xl) var(--shape-xl) var(--shape-s) var(--shape-s); }
.perm-list li:last-child { border-radius: var(--shape-s) var(--shape-s) var(--shape-xl) var(--shape-xl); }
.perm-list .ic-wrap { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--shape-full); background: var(--primary-container); color: var(--on-primary-container); }
.perm-list b { display: block; font-weight: 650; }
.perm-list span { color: var(--on-surface-variant); font-size: 0.925rem; }

.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  margin-top: 12px; padding: 22px 24px; border-radius: var(--shape-xl);
  background: var(--tertiary-container); color: var(--on-tertiary-container);
}
.callout h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 4px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; align-items: start; }
.faq { display: grid; gap: 6px; }
.faq details {
  background: var(--surface-container-low); border-radius: var(--shape-l);
  transition: border-radius 0.4s var(--ease-spatial), background-color 0.25s;
}
.faq details:first-child { border-top-left-radius: var(--shape-xl); border-top-right-radius: var(--shape-xl); }
.faq details:last-child { border-bottom-left-radius: var(--shape-xl); border-bottom-right-radius: var(--shape-xl); }
.faq details[open] { background: var(--surface-container); border-radius: var(--shape-xl); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-weight: 600; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform 0.4s var(--ease-spatial); color: var(--on-surface-variant); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 24px 22px; color: var(--on-surface-variant); }

.limits.panel { border-radius: var(--shape-xl); background: var(--surface-container); }
.limits h3 { font-size: 1.375rem; font-weight: 700; margin-bottom: 14px; }
.limits ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--on-surface-variant); }

/* ---------- Support band ---------- */
.support-band {
  border-radius: var(--shape-2xl); padding: clamp(28px, 5vw, 64px);
  background: var(--primary); color: var(--on-primary);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
  position: relative; overflow: hidden; isolation: isolate;
}
.support-band::before {
  content: ""; position: absolute; z-index: -1; right: -80px; top: -90px; width: 340px; height: 340px;
  background: var(--on-primary); opacity: 0.08;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.support-band h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); font-weight: 750; }
.support-band p { margin-top: 12px; opacity: 0.9; font-size: 1.0625rem; }
.support-band .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.support-band .actions .btn:last-child { grid-column: 1 / -1; }
.support-band .btn-on { background: var(--on-primary); color: var(--primary); }
.support-band .btn-ghost { background: transparent; color: var(--on-primary); box-shadow: inset 0 0 0 1px currentColor; }

/* ---------- Page (support, privacy) ---------- */
.page { padding: clamp(32px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.page-head { max-width: 760px; margin-bottom: 36px; }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.03em; }
.page-head p { margin-top: 16px; font-size: 1.125rem; color: var(--on-surface-variant); }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.give { display: flex; flex-direction: column; gap: 12px; }
.give h2 { font-size: 1.625rem; font-weight: 750; }
/* Buttons sit on the bottom edge so cards of different text length still line up. */
.give .btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.panel .btn-row .btn { margin-top: 0; }
.chip-in { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; }
.qr-row { display: flex; flex-wrap: wrap; gap: 16px; }
.qr-row figure { margin: 0; display: grid; justify-items: center; gap: 10px; }
.qr-row img { width: 148px; height: 148px; border-radius: var(--shape-l); padding: 10px; background: #fff; }
.qr-row figcaption { font-size: 0.875rem; color: var(--on-surface-variant); }
.prose { max-width: 760px; display: grid; gap: 32px; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.prose p + p, .prose ul { margin-top: 10px; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }
.prose p, .prose li { color: var(--on-surface-variant); }

/* ---------- Footer ---------- */
.footer { background: var(--surface-container-low); border-radius: var(--shape-2xl) var(--shape-2xl) 0 0; padding: 44px 0 28px; margin-top: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.footer .brand { margin-bottom: 12px; }
.footer h2 { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; color: var(--on-surface-variant); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { color: var(--on-surface); text-decoration: none; }
.footer ul a:hover { color: var(--primary); text-decoration: underline; }
.footer-legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--outline-variant); font-size: 0.85rem; color: var(--on-surface-variant); display: grid; gap: 6px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { transform: translateY(28px); transition: transform 0.9s var(--ease-spatial); }
.js .reveal.in { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .lang-grid { grid-template-columns: repeat(4, 1fr); }
  .support-band { grid-template-columns: 1fr; }
  .support-band .actions { grid-template-columns: repeat(3, auto); justify-content: start; }
  .support-band .actions .btn:last-child { grid-column: auto; }
}
@media (max-width: 860px) {
  /* Single column: the phone leads, the copy sits centred under it. */
  .hero-grid { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .hero-art { order: -1; min-height: 360px; }
  .phone { width: 210px; }
  .hero .chip-row, .hero-cta { justify-content: center; }
  .hero .lede { margin-inline: auto; }
  .videos, .install-grid, .cards-2, .cards-3, .faq-grid, .chip-in { grid-template-columns: 1fr; }
  .video-card .portrait { flex: none; height: min(70vh, 520px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .lang { padding: 12px 14px; }
  /* Tiles go two by two; features and steps put the icon beside the text to save height. */
  .bento { gap: 10px; }
  .tile { min-height: 0; padding: 18px 16px; gap: 14px; }
  .tile .big { font-size: 2rem; }
  .tile h3 { font-size: 1rem; }
  .tile p { font-size: 0.875rem; }
  .features, .pipeline { grid-template-columns: 1fr; gap: 8px; }
  .feature { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; padding: 16px; }
  .feature .icon-wrap { grid-row: span 2; width: 44px; height: 44px; margin: 0; }
  .feature h3 { font-size: 1.0625rem; }
  .feature p { font-size: 0.9375rem; }
  .pipeline li { display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; padding: 16px; }
  .pipeline li::before { grid-row: span 2; width: 36px; height: 36px; margin: 0; }
  .pipeline h3 { margin: 0; }
  .never { padding: 16px; }
  .hero-cta .btn { flex: 1 1 0; padding: 0 16px; --h: 56px; font-size: 1rem; }
  .hero { padding-top: 8px; }
  .hero-art { min-height: 290px; }
  .hero-art .shape { width: min(80vw, 300px); }
  .hero-art .shape-2 { width: 96px; right: 4%; bottom: 2%; }
  .hero-art .shape-3 { width: 64px; left: 6%; top: 4%; }
  .phone { width: min(40vw, 150px); border-radius: 26px; padding: 6px; }
  .phone img { border-radius: 21px; }
  .chip-row { margin-bottom: 16px; gap: 6px; }
  .hero .chip { padding: 0 10px; font-size: 0.8125rem; height: 30px; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 2.75rem); }
  .hero .lede { margin-top: 16px; font-size: 1rem; max-width: 32ch; }
  .hero-cta { margin-top: 24px; }
  .compare .tag { top: 8px; font-size: 0.75rem; padding: 4px 9px; }
  .compare .knob { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .compare-top { flex-direction: column; align-items: flex-start; }
  .panel { padding: 20px; }
  .perm-list li { padding: 12px; gap: 12px; }
  .faq summary { padding: 16px 18px; font-size: 1rem; }
  .faq details p { padding: 0 18px 18px; }
  .support-band .actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; }
}
