/* ==========================================================================
   Desic Terminal — landing page
   Palette tracks the app's own tokens (src/styles.css): near-black surfaces,
   restrained violet brand accent, no ornamental gradients.
   ========================================================================== */

:root {
  /* brand, mirrored from the app */
  --bg: #020305;
  --panel: #080a0e;
  --text: #f5f7fb;
  --muted: #aab1c0;
  /* The app uses --weak #626b7c for de-emphasised labels, but at 3.7:1 on
     these surfaces it fails WCAG AA for body copy. Lifted to 6.4:1+ for the
     web while staying clearly subordinate to --muted. */
  --weak: #8a93a3;
  --purple: #955cff;
  --purple-2: #7138e8;
  --focus: #b89aff;
  --up: #f6465d;
  --down: #0ecb81;
  --warn: #f5a524;
  --line: rgba(174, 186, 210, 0.17);
  --line-soft: rgba(174, 186, 210, 0.085);

  /* first-viewport chrome */
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;

  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  /* System CJK faces only — no webfont, so switching language costs nothing. */
  --font-sans-zh: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", ui-monospace, "SFMono-Regular", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

/* Self-hosted so the page does not depend on the CDN staying up.
   244 glyphs, covers A-Z a-z 0-9 and the < % * # symbols. CC BY 4.0. */
@font-face {
  font-family: "BubbledotICG-FinePos";
  src: url("fonts/BubbledotICG-FinePos.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 600;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   1. First viewport
   ========================================================================== */

.hero-viewport {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  z-index: 0;
}

/* Candlestick tape, drawn in bg.js. Replaced the promo-video loop: that footage
   was made to be watched (on-screen UI text, hard scene cuts), so blurred it
   pulsed as unreadable blobs and its motion was intermittent rather than
   continuous. */
.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Violet bloom behind the headline, a vignette to hold the edges, and a scrim
   over the tape band so white text keeps its contrast. */
.bg-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 50% 38%, rgba(149, 92, 255, 0.17), transparent 74%),
    radial-gradient(130% 100% at 50% 44%, transparent 34%, rgba(2, 3, 5, 0.5) 100%),
    linear-gradient(
      180deg,
      rgba(2, 3, 5, 0.46) 0%,
      rgba(2, 3, 5, 0.2) 30%,
      rgba(2, 3, 5, 0.16) 52%,
      rgba(2, 3, 5, 0.4) 78%,
      rgba(2, 3, 5, 0.74) 100%
    );
}

/* Faint grid, so the tape reads as a chart surface rather than floating bars. */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(174, 186, 210, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 186, 210, 0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
  overflow: hidden;
}

/* --- header --------------------------------------------------------------- */

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: clamp(18px, 2.8vw, 28px);
  width: 100%;
  max-width: 720px;
  animation: slideDown 0.7s var(--ease) both;
}

.logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  transition: transform 0.25s var(--ease);
}

.logo:hover {
  transform: scale(1.04);
}

.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  height: clamp(44px, 5.2vw, 48px);
  max-width: 430px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  padding: 0 10px;
  color: var(--nav-text);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link.is-active {
  opacity: 1;
}

/* three 3px dots under the active label */
.nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.ghost-cta {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(16px, 1.8vw, 20px);
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-size: clamp(13px, 1.4vw, 14.5px);
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: var(--nav-shadow);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ghost-cta:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

.header-end {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
}

.lang-toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: clamp(44px, 5.2vw, 48px);
  height: clamp(44px, 5.2vw, 48px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-family: var(--font-sans);
  font-size: clamp(12.5px, 1.35vw, 13.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: var(--nav-shadow);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-toggle:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}

.burger {
  display: none;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  text-align: center;
}

/* trust row */
.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(16px, 2.5vh, 26px);
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--trust-size);
  height: var(--trust-size);
  padding: 5px;
  border: 1px solid var(--trust-border);
  border-radius: 50%;
  background: var(--trust-bg);
  transition: transform 0.35s var(--ease);
}

.avatar::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.avatar svg {
  position: relative;
  z-index: 1;
  width: calc(var(--trust-size) * 0.46);
  height: calc(var(--trust-size) * 0.46);
  color: #111;
}

.avatar.a1 {
  z-index: 1;
}

.avatar.a2 {
  z-index: 2;
  margin-left: calc(var(--trust-size) * -0.42);
}

.avatar.a3 {
  z-index: 4;
  margin-left: calc(var(--trust-size) * -0.42);
}

.trust:hover .a1 {
  transform: translateY(-2px);
}

.trust:hover .a2 {
  transform: translateY(-4px);
}

.trust:hover .a3 {
  transform: translateY(-2px);
}

.trust-pill {
  display: grid;
  place-items: center;
  height: var(--trust-size);
  margin-left: calc(var(--trust-size) * -0.42);
  padding-right: clamp(14px, 1.6vw, 18px);
  padding-left: calc(var(--trust-size) * 0.58);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  background: var(--trust-bg);
  color: var(--trust-text);
  font-size: clamp(12px, 1.4vw, 13.5px);
  font-weight: 500;
  white-space: nowrap;
}

/* headline */
.headline {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(28px, 6.2vw, 80px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.12;
  white-space: nowrap;
}

.headline span {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

.subhead {
  max-width: min(500px, 92%);
  margin: clamp(14px, 2.2vh, 22px) 0 0;
  color: #d0d0d0;
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  font-weight: 400;
  line-height: 1.55;
  opacity: 0.8;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  margin-top: clamp(18px, 3vh, 30px);
}

.cta {
  border-radius: 999px;
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  background: #fff;
  color: #000;
  font-size: clamp(13.5px, 1.5vw, 14.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 22px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.24),
    0 0 30px rgba(255, 255, 255, 0.45),
    0 0 62px rgba(255, 255, 255, 0.2);
}

.cta-alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(12.5px, 1.4vw, 13.5px);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.cta-alt:hover {
  color: #fff;
}

.cta-alt .mini {
  width: 15px;
  height: 15px;
}

/* --- stats footer -------------------------------------------------------- */

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  flex-shrink: 0;
  gap: clamp(10px, 2vw, 24px);
  width: 100%;
  max-width: 920px;
}

/* Separates the metrics from the candle tape running behind them. */
.stats::before {
  content: "";
  position: absolute;
  inset: -14% -8vw -40%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(58% 76% at 50% 50%, rgba(2, 3, 5, 0.82), transparent 74%);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.stat-icon {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 33px);
  line-height: 1.1;
}

.stat-value {
  color: #fff;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: #8e8e8e;
  font-size: clamp(11px, 1.2vw, 12.5px);
  font-weight: 400;
}

/* --- scroll hint --------------------------------------------------------- */

.scroll-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  opacity: 0;
  animation: reveal 0.85s var(--ease) 1s forwards;
}

.scroll-hint span {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg) translate(-1px, -1px);
  animation: nudge 1.9s ease-in-out infinite;
}

.scroll-hint:hover span {
  border-color: #fff;
}

/* ==========================================================================
   2. Scroll sections
   ========================================================================== */

.section {
  position: relative;
  padding: clamp(72px, 11vh, 132px) clamp(18px, 4vw, 40px);
  border-top: 1px solid var(--line-soft);
}

.section.is-tight {
  padding-top: clamp(56px, 8vh, 96px);
  padding-bottom: clamp(56px, 8vh, 96px);
}

.wrap {
  margin: 0 auto;
  width: 100%;
  max-width: 1080px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--purple);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-title {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.section-lead {
  max-width: 62ch;
  margin: clamp(14px, 2vw, 20px) 0 0;
  color: var(--muted);
  font-size: clamp(14.5px, 1.35vw, 16.5px);
  line-height: 1.62;
}

/* --- feature rows -------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(48px, 7vh, 84px);
}

.feature.is-flipped .feature-copy {
  order: 2;
}

.feature-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.feature-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.25vw, 15.5px);
  line-height: 1.66;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cfd4de;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.feature-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.feature-shot img {
  width: 100%;
  height: auto;
}

/* --- permission matrix --------------------------------------------------- */

.matrix {
  margin-top: clamp(28px, 4vh, 44px);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.matrix table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: clamp(13px, 1.2vw, 14.5px);
}

.matrix th,
.matrix td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: middle;
}

.matrix thead th {
  border-bottom: 1px solid var(--line);
  color: var(--weak);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.matrix tbody tr + tr th,
.matrix tbody tr + tr td {
  border-top: 1px solid var(--line-soft);
}

.matrix tbody th {
  font-weight: 500;
}

.matrix code {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(149, 92, 255, 0.11);
  color: var(--focus);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.92em;
}

.matrix td {
  color: var(--muted);
}

/* status dots, not filled row backgrounds */
.yes,
.no {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.yes::before,
.no::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.yes::before {
  background: var(--down);
}

.no::before {
  background: var(--weak);
}

.matrix-note {
  max-width: 66ch;
  margin: clamp(18px, 2.4vw, 24px) 0 0;
  color: var(--weak);
  font-size: 13.5px;
  line-height: 1.62;
}

/* --- downloads ----------------------------------------------------------- */

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 14px;
  margin-top: clamp(28px, 4vh, 40px);
}

.dl {
  display: grid;
  gap: 4px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 0.22s ease, transform 0.22s var(--ease), background 0.22s ease;
}

.dl:hover {
  border-color: rgba(149, 92, 255, 0.5);
  background: #0b0d12;
  transform: translateY(-2px);
}

.dl-icon {
  width: 19px;
  height: 19px;
  margin-bottom: 10px;
  color: var(--focus);
}

.dl-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.dl-kind {
  color: var(--weak);
  font-size: 12.5px;
}

.dl.is-current {
  border-color: rgba(149, 92, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(149, 92, 255, 0.2), 0 18px 44px rgba(113, 56, 232, 0.14);
}

.notice {
  margin-top: clamp(24px, 3.4vh, 34px);
  padding: 18px 20px;
  border: 1px solid rgba(245, 165, 36, 0.28);
  border-left: 2px solid var(--warn);
  border-radius: 12px;
  background: rgba(245, 165, 36, 0.05);
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.62;
}

.notice p + p {
  margin-top: 8px;
}

.notice strong {
  color: var(--text);
  font-weight: 600;
}

.release-link {
  margin: clamp(20px, 2.6vh, 26px) 0 0;
  font-size: 14px;
}

.release-link a {
  color: var(--focus);
  transition: color 0.2s ease;
}

.release-link a:hover {
  color: #d5c2ff;
}

/* --- contact ------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(18px, 3vw, 34px);
  margin-top: clamp(28px, 4vh, 40px);
}

.qq-card {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 24px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

/* The QR keeps its white quiet zone — scanners need the contrast, so it is
   not tinted to match the dark surface. */
.qq-card img {
  flex-shrink: 0;
  width: clamp(120px, 13vw, 150px);
  height: auto;
  border-radius: 10px;
  background: #fff;
}

.qq-meta {
  min-width: 0;
}

.qq-label {
  margin: 0;
  color: var(--weak);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qq-number {
  margin: 5px 0 0;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.qq-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.qq-join {
  display: inline-block;
  margin-top: 12px;
  color: var(--focus);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.18s ease;
}

.qq-join:hover {
  color: #d5c2ff;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-list li:hover {
  border-color: rgba(149, 92, 255, 0.42);
  background: #0b0d12;
}

.ct-label {
  flex-shrink: 0;
  min-width: 5.5em;
  color: var(--weak);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ct-value {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  word-break: break-word;
}

a.ct-value {
  color: var(--focus);
  transition: color 0.18s ease;
}

a.ct-value:hover {
  color: #d5c2ff;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .qq-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .qq-card img {
    width: min(160px, 55%);
  }

  .contact-list li {
    flex-direction: column;
    gap: 4px;
  }
}

/* --- footer -------------------------------------------------------------- */

.footer {
  padding: clamp(44px, 6vh, 68px) clamp(18px, 4vw, 40px) clamp(30px, 4vh, 44px);
  border-top: 1px solid var(--line-soft);
  background: #010203;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-mark {
  display: grid;
  place-items: center;
  padding: 7px;
  border-radius: 50%;
  background: #fff;
  box-sizing: content-box;
}

.footer-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-tag {
  margin: 4px 0 0;
  color: var(--weak);
  font-size: 12.5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13.5px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.disclaimer,
.credits {
  max-width: 78ch;
  margin: clamp(26px, 3.4vh, 34px) 0 0;
  color: var(--weak);
  font-size: 12px;
  line-height: 1.66;
}

.credits {
  margin-top: 12px;
}

.credits a {
  color: #a5adbb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   2b. Chinese typography
   Negative tracking tuned for Latin makes CJK cramped, and CJK needs a little
   more leading. The headline is unaffected — it stays English in both
   languages because the dot-matrix face has no CJK glyphs.
   ========================================================================== */

.lang-zh {
  font-family: var(--font-sans-zh);
}

.lang-zh .section-title,
.lang-zh .feature-copy h3,
.lang-zh .dl-name,
.lang-zh .footer-name {
  letter-spacing: -0.01em;
}

.lang-zh .subhead,
.lang-zh .section-lead,
.lang-zh .feature-copy p,
.lang-zh .matrix-note,
.lang-zh .notice p,
.lang-zh .disclaimer,
.lang-zh .credits {
  line-height: 1.78;
}

.lang-zh .nav-link,
.lang-zh .ghost-cta,
.lang-zh .cta,
.lang-zh .sheet-link,
.lang-zh .trust-pill {
  letter-spacing: 0;
}

.lang-zh .eyebrow {
  font-family: var(--font-sans-zh);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   3. Animation
   ========================================================================== */

.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

.cta-row.anim {
  animation-name: revealPulse;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.feature-copy.reveal {
  transition-delay: 0.05s;
}

.feature-shot.reveal {
  transition-delay: 0.12s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes revealPulse {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(6px);
  }
  72% {
    opacity: 1;
    transform: translateY(0) scale(1.015);
    filter: none;
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes headlineFade {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes nudge {
  0%,
  100% {
    transform: rotate(45deg) translate(-1px, -1px);
  }
  50% {
    transform: rotate(45deg) translate(2px, 2px);
  }
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes linkIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   4. Responsive
   ========================================================================== */

/* mobile menu chrome */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.28s ease both;
}

.mobile-menu {
  position: absolute;
  top: calc(clamp(16px, 2.4vh, 28px) + 60px);
  right: clamp(14px, 3vw, 32px);
  left: clamp(14px, 3vw, 32px);
  z-index: 9;
}

.sheet {
  display: grid;
  gap: 2px;
  padding: 22px 18px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  animation: menuIn 0.38s var(--ease) both;
}

.sheet-link {
  position: relative;
  padding: 14px 10px;
  color: var(--nav-text);
  font-size: 15.5px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  animation: linkIn 0.34s var(--ease) both;
}

.sheet-link:nth-child(1) {
  animation-delay: 0.06s;
}

.sheet-link:nth-child(2) {
  animation-delay: 0.11s;
}

.sheet-link:nth-child(3) {
  animation-delay: 0.16s;
}

.sheet-link:nth-child(4) {
  animation-delay: 0.21s;
}

.sheet-link.is-active::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #000;
  box-shadow: -5px 0 0 #000, 5px 0 0 #000;
}

.sheet-cta {
  margin-top: 10px;
  padding: 15px 10px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  animation: linkIn 0.34s var(--ease) 0.26s both;
}

@media (max-width: 980px) {
  .feature,
  .feature.is-flipped {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature.is-flipped .feature-copy {
    order: 0;
  }
}

@media (max-width: 720px) {
  .header {
    justify-content: space-between;
    max-width: none;
  }

  .nav,
  .ghost-cta {
    display: none;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .burger {
    display: grid;
    place-items: center;
    gap: 4.5px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--pill-dark);
    box-shadow: var(--nav-shadow);
    cursor: pointer;
    transition: background 0.24s ease;
  }

  .burger span {
    width: 18px;
    height: 1.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.28s var(--ease), opacity 0.2s ease, background 0.24s ease;
  }

  .burger[aria-expanded="true"] {
    background: #fff;
  }

  .burger[aria-expanded="true"] span {
    background: #111;
  }

  .burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* 6.2vw bottoms out on the 28px floor below ~450px, which left the headline
     ~110px short of the available width. This fills it and hands back to the
     base ramp at 720px (9.6vw caps at 46px ≈ 6.2vw at 720px). */
  .headline {
    font-size: clamp(34px, 9.6vw, 46px);
    letter-spacing: -0.08em;
    line-height: 1.05;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(14px, 3vh, 22px) 12px;
  }

  .cta-row {
    flex-direction: column;
    gap: 14px;
  }

  .footer-top {
    flex-direction: column;
  }
}

@media (max-width: 700px) and (max-height: 760px) {
  .trust {
    margin-bottom: 14px;
  }

  .subhead {
    margin-top: 12px;
  }

  .cta-row {
    margin-top: 16px;
  }
}

@media (max-width: 420px) {
  .trust {
    --trust-size: 34px;
  }

  .trust-pill {
    font-size: 12px;
  }

  /* Below ~315px the fixed-width pill would push past the viewport. */
  @media (max-width: 340px) {
    .trust-pill {
      padding-right: 11px;
      font-size: 11px;
    }
  }

  .headline {
    font-size: clamp(26px, 8.9vw, 40px);
    letter-spacing: -0.09em;
    line-height: 1.04;
  }

  .scroll-hint {
    display: none;
  }
}

/* ==========================================================================
   5. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }

  .anim,
  .headline span,
  .scroll-hint,
  .sheet-link,
  .sheet-cta {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .headline {
    color: #fff;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  /* bg.js draws a single static frame instead of animating; the canvas stays. */

  .scroll-hint span {
    animation: none;
  }
}
