/*
 * Squiq website — WEB-01.
 * Colours are the app's Night Premium tokens (code/docs/design/tokens.md): dark is the primary
 * look; light follows the visitor's system, or the toggle ([data-theme]). Space Grotesk for
 * headings and amounts, DM Sans for everything else, both self-hosted (OFL 1.1).
 */

/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/SpaceGrotesk_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/SpaceGrotesk_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/SpaceGrotesk_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../assets/fonts/DMSans_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../assets/fonts/DMSans_500Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../assets/fonts/DMSans_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../assets/fonts/DMSans_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root,
.theme-dark {
  color-scheme: dark;
  --page: #0e1013;
  --page-deep: #0a0c0f;
  --page-lift: #13161b;
  --card: #171a1f;
  --sunk: #1f232a;
  --hair: #202328;
  --hair-soft: rgba(255, 255, 255, 0.07);
  --border-strong: #2a2f37;
  --text: #f2f1ec;
  --text2: #a3a8b0;
  --text3: #8e949d;
  --accent: #c6ee6a;
  --accent-on: #0e1013;
  --accent-soft: #27301b;
  --accent-deep: #a9d34a;
  --warn: #f2b35b;
  --warn-text: #f6d39a;
  --track: #2a2f37;
  --rim: 143, 180, 255;
  --key: 198, 238, 106;
  --key-strength: 0.22;
  --glass: rgba(28, 32, 38, 0.78);
  --glass-ring: rgba(255, 255, 255, 0.14);
  --shadow-deep: 0 40px 90px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.5);
  --chart-2: #8fb4ff;
  --sheen: #fbffe2;
}

.theme-light {
  color-scheme: light;
  --page: #f4f4ef;
  --page-deep: #ecece5;
  --page-lift: #f8f8f4;
  --card: #ffffff;
  --sunk: #ebece6;
  --hair: #e6e7e1;
  --hair-soft: rgba(14, 16, 19, 0.08);
  --border-strong: #d9dbd3;
  --text: #0e1013;
  --text2: #585e67;
  --text3: #5e646d;
  --accent: #466a00;
  --accent-on: #ffffff;
  --accent-soft: #e8f3cc;
  --accent-deep: #34500a;
  --warn: #a86400;
  --warn-text: #5c3a00;
  --track: #e3e5de;
  --rim: 70, 110, 190;
  --key: 110, 160, 20;
  --key-strength: 0.16;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-ring: rgba(14, 16, 19, 0.1);
  --shadow-deep: 0 36px 80px rgba(30, 36, 20, 0.22);
  --shadow-soft: 0 16px 36px rgba(30, 36, 20, 0.16);
  --chart-2: #3d64b8;
  --sheen: #8fd11f;
}

/* The page follows the system in light, unless the visitor chose Dark. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --page: #f4f4ef;
    --page-deep: #ecece5;
    --page-lift: #f8f8f4;
    --card: #ffffff;
    --sunk: #ebece6;
    --hair: #e6e7e1;
    --hair-soft: rgba(14, 16, 19, 0.08);
    --border-strong: #d9dbd3;
    --text: #0e1013;
    --text2: #585e67;
    --text3: #5e646d;
    --accent: #466a00;
    --accent-on: #ffffff;
    --accent-soft: #e8f3cc;
    --accent-deep: #34500a;
    --warn: #a86400;
    --warn-text: #5c3a00;
    --track: #e3e5de;
    --rim: 70, 110, 190;
    --key: 110, 160, 20;
    --key-strength: 0.16;
    --glass: rgba(255, 255, 255, 0.78);
    --glass-ring: rgba(14, 16, 19, 0.1);
    --shadow-deep: 0 36px 80px rgba(30, 36, 20, 0.22);
    --shadow-soft: 0 16px 36px rgba(30, 36, 20, 0.16);
    --chart-2: #3d64b8;
    --sheen: #8fd11f;
  }
}

:root[data-theme='light'] {
  color-scheme: light;
  --page: #f4f4ef;
  --page-deep: #ecece5;
  --page-lift: #f8f8f4;
  --card: #ffffff;
  --sunk: #ebece6;
  --hair: #e6e7e1;
  --hair-soft: rgba(14, 16, 19, 0.08);
  --border-strong: #d9dbd3;
  --text: #0e1013;
  --text2: #585e67;
  --text3: #5e646d;
  --accent: #466a00;
  --accent-on: #ffffff;
  --accent-soft: #e8f3cc;
  --accent-deep: #34500a;
  --warn: #a86400;
  --warn-text: #5c3a00;
  --track: #e3e5de;
  --rim: 70, 110, 190;
  --key: 110, 160, 20;
  --key-strength: 0.16;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-ring: rgba(14, 16, 19, 0.1);
  --shadow-deep: 0 36px 80px rgba(30, 36, 20, 0.22);
  --shadow-soft: 0 16px 36px rgba(30, 36, 20, 0.16);
  --chart-2: #3d64b8;
  --sheen: #8fd11f;
}

/* ------------------------------------------------------------------ base */
/* The grid (WEB-03). One container for every section: `--max` wide plus `--gutter` each side, so
   every heading, label and paragraph starts on the same left edge. Pages with a phone beside the
   words (the hero, the scroll story, the stacked features) share one two-column grid: the words
   in `1fr`, the phone in `--media-w`, `--col-gap` between. The phone column is exactly the phone
   plus its callout, so the phone's centre is the same in every section. Two vertical steps:
   `--section-space` between sections, `--feature-space` between the stacked features. */
:root {
  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --gutter: 16px;
  --max: 1160px;
  --radius-card: 22px;
  --section-space: clamp(72px, 10vw, 136px);
  --feature-space: clamp(56px, 7vw, 104px);
  --col-gap: 48px;
  /* The phone: its size, and the scale every phone beside words is drawn at (`--z`). */
  --z: 1;
  --phone-w: 330px;
  --phone-h: 640px;
  /* The callout: one width, tucked over the phone's right bezel by `--callout-tuck`, so it covers
     only the bezel and the screen's side margin, never a figure. */
  --callout-w: 232px;
  --callout-tuck: 24px;
  --media-w: calc((var(--phone-w) + var(--callout-w) - var(--callout-tuck)) * var(--z));
}

@media (min-width: 1200px) {
  :root {
    --col-gap: 64px;
  }
}

/* Narrower desktops, and windows too short for a full-size phone, draw every phone at 86%. */
@media (min-width: 960px) and (max-width: 1199px), (min-width: 960px) and (max-height: 819px) {
  :root {
    --z: 0.86;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.lime {
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 640px) {
  :root {
    --gutter: 28px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 600;
  text-decoration: none;
}

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

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

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--page) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--hair-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.wordmark {
  font: 700 18px/1 var(--display);
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wordmark img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.wordmark .q {
  color: var(--accent);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 10px;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
}

.site-nav .nav-extra {
  display: none;
}

@media (min-width: 760px) {
  .site-nav .nav-extra {
    display: inline-block;
  }
}

@media (max-width: 420px) {
  .site-nav .nav-optional {
    display: none;
  }
}

/* ------------------------------------------------------------------ theme switch */
.theme-switch {
  display: none;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--sunk);
  box-shadow: inset 0 0 0 1px var(--hair-soft);
}

.js .theme-switch {
  display: inline-flex;
}

.theme-switch button {
  appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--text2);
  font: 600 13px/1 var(--body);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.theme-switch button:hover {
  color: var(--text);
}

.theme-switch button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-on);
}

.theme-switch--compact button {
  padding: 7px 9px;
}

.theme-switch--compact .label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.theme-switch--large {
  padding: 4px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px var(--glass-ring);
}

.theme-switch--large button {
  font-size: 14px;
  padding: 10px 18px;
  min-height: 40px;
}

.theme-note {
  font-size: 14px;
  color: var(--text3);
}

.js .theme-note--nojs {
  display: none;
}

/* ------------------------------------------------------------------ labels, chips, buttons */
.feature-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(var(--key), 0.16), rgba(var(--key), 0.04));
  box-shadow:
    inset 0 0 0 1px rgba(var(--key), 0.45),
    0 6px 20px rgba(var(--key), 0.12);
  font: 700 12px/1 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.feature-label svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex: none;
}

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

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
  font: 600 14px/1.2 var(--body);
  color: var(--text);
}

.chips svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex: none;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  border-radius: 16px;
  background: var(--text);
  color: var(--page);
  box-shadow: var(--shadow-soft);
}

.soon img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.soon .soon-small {
  display: block;
  font: 500 12px/1.2 var(--body);
  opacity: 0.72;
  letter-spacing: 0.02em;
}

.soon .soon-big {
  display: block;
  font: 600 17px/1.25 var(--display);
  letter-spacing: -0.01em;
}

.app-store {
  display: inline-flex;
  border-radius: 12px;
  line-height: 0;
}

.app-store img {
  display: block;
  width: 180px;
  height: 60px;
}

.app-store:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.button-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.button-ghost:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.button-ghost svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------------------ studio lighting */
.studio {
  position: relative;
  isolation: isolate;
}

.studio::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      560px 520px at 8% 0%,
      rgba(var(--key), var(--key-strength)),
      rgba(var(--key), 0) 70%
    ),
    radial-gradient(380px 380px at 100% 55%, rgba(var(--rim), 0.09), rgba(var(--rim), 0) 70%),
    linear-gradient(180deg, var(--page-deep) 0%, var(--page-lift) 52%, var(--page) 100%);
}

.hairline-top {
  position: relative;
}

.hairline-top::after {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--key), 0.5), transparent);
}

/* ------------------------------------------------------------------ hero */
.hero {
  padding-block: var(--feature-space);
  overflow: clip;
}

/* The words-and-phone grid, shared by the hero, the stacked features and the scroll story. */
.hero .container,
.feature .container {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero .container,
  .feature .container {
    grid-template-columns: minmax(0, 1fr) var(--media-w);
    column-gap: var(--col-gap);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 2.6vw + 1.5rem, 4.1rem);
  margin: 22px 0 16px;
}

.hero .subtitle {
  font: 600 clamp(1.25rem, 1vw + 1rem, 1.6rem) / 1.3 var(--display);
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero .promo {
  margin-top: 14px;
  max-width: 34em;
  color: var(--text2);
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
}

.hero .chips {
  margin-top: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

/* ------------------------------------------------------------------ the phone */
/* A phone's stage. On a phone or tablet the phone is centred with its callout under it; beside
   words (960 px and up) the phone sits at the left of its column with the callout off its right
   edge, the two filling the column exactly. */
.stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, 130%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(var(--key), 0.15), rgba(var(--key), 0));
  pointer-events: none;
}

.device {
  position: relative;
  width: var(--phone-w);
  flex: none;
}

@media (min-width: 960px) {
  .stage {
    justify-content: flex-start;
  }

  .stage::before {
    left: calc(var(--phone-w) * var(--z) / 2);
  }

  .device {
    zoom: var(--z);
  }
}

@media (max-width: 399px) {
  .device {
    zoom: 0.94;
  }
}

@media (max-width: 359px) {
  .device {
    zoom: 0.86;
  }
}

.phone {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  border-radius: 56px;
  padding: 10px;
  background: linear-gradient(160deg, #3a3f47, #15181c 40%, #0c0e11);
  box-shadow:
    var(--shadow-deep),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 46px;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.35;
}

.phone-screen::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 124px;
  height: 5px;
  margin-left: -62px;
  border-radius: 3px;
  background: var(--text);
  opacity: 0.85;
}

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  border-radius: 15px;
  background: #000;
  z-index: 2;
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 4px 30px 0;
  font: 600 14px/1 var(--body);
  color: var(--text);
}

.status .right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status .battery {
  width: 22px;
  height: 11px;
  border-radius: 3px;
  border: 1.5px solid currentColor;
  position: relative;
}

.status .battery::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  right: 4px;
  border-radius: 1px;
  background: currentColor;
}

.status svg {
  width: 15px;
  height: 15px;
}

.status .airplane {
  color: var(--accent);
  fill: currentColor;
}

/* WEB-04: a real screen of the app. The capture fills the screen from the top (its first 46 px
   are the app's own background, under the status bar and island drawn above it) and fades into
   the screen's colour at the foot, where the capture ends above the app's tab bar. The status bar,
   the island and the home indicator take the capture's theme, not the page's. */
.phone-screen.shot {
  --text: #f2f1ec;
  --accent: #c6ee6a;
  background: #0e1013;
}

.phone-screen.shot-light {
  --text: #0e1013;
  --accent: #466a00;
  background: #f4f4ef;
}

.shot .island,
.shot .status {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
}

.shot .island {
  left: 50%;
}

.shot .status {
  top: 0;
}

.shot picture {
  display: block;
}

.shot-img {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(#000 90%, transparent 99%);
  mask-image: linear-gradient(#000 90%, transparent 99%);
}

/* A soft light that sweeps across the glass once, when the screen comes alive (motion only). */
.shot::before {
  content: '';
  position: absolute;
  inset: -10% -60%;
  z-index: 3;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.09) 50%,
    transparent 58%
  );
  opacity: 0;
  pointer-events: none;
}

.shots-note {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text3);
}

/* The callout with the proof point: an opaque card, legible on both themes. One rule for every
   phone. On a phone or tablet it sits centred under the device, covering nothing. Beside words
   it hangs off the device's right edge at 70% of its height, tucked over the bezel only. */
.callout {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--callout-w);
  max-width: 100%;
  min-height: 72px;
  margin: 20px auto 0;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: var(--card);
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px var(--glass-ring);
  font-size: 14px;
  line-height: 1.3;
}

@media (min-width: 960px) {
  .callout {
    position: absolute;
    left: calc(100% - var(--callout-tuck));
    top: 70%;
    margin: 0;
  }
}

.callout .tile {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.callout .tile svg {
  width: 17px;
  height: 17px;
}

.callout strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.callout span {
  color: var(--text3);
  font-size: 12.5px;
}

/* ------------------------------------------------------------------ icon tiles */
.m-tile {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent-soft);
  color: var(--accent);
}

.m-tile svg {
  width: 19px;
  height: 19px;
}

/* ------------------------------------------------------------------ sections */
.section {
  padding-block: var(--section-space);
}

.section-head {
  max-width: 720px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw + 1rem, 3.4rem);
  margin: 18px 0 16px;
}

.section-head p:not(.eyebrow):not(.feature-label) {
  color: var(--text2);
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
}

.eyebrow {
  font: 600 12px/1 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
}

.question {
  display: block;
  font: italic 500 1.1rem/1.4 var(--body);
  color: var(--text2);
  margin: 22px 0 10px;
}

/* One feature: the words on the left, the phone on the right (the grid is the hero's). */
.feature {
  padding-block: var(--feature-space);
  overflow: clip;
}

.feature h2 {
  font-size: clamp(2rem, 3vw + 1rem, 3.25rem);
  margin-bottom: 18px;
}

.feature .body {
  color: var(--text2);
  font-size: clamp(1.03rem, 0.3vw + 1rem, 1.15rem);
  max-width: 32em;
}

.feature .body + .body {
  margin-top: 12px;
}

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

.feature .detail li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--text);
}

.feature .detail svg {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--accent);
  flex: none;
}

.divider {
  height: 1px;
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--max);
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--hair), transparent);
}

/* ------------------------------------------------------------------ the Plan toolkit list */
.tools {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 0.98rem;
  color: var(--text2);
}

.tools li {
  padding-left: 14px;
  border-left: 2px solid var(--track);
}

.tools a,
.tools strong {
  font-weight: 600;
  color: var(--text);
  margin-right: 6px;
}

.tools a {
  text-decoration-color: rgba(var(--key), 0.6);
  text-underline-offset: 3px;
}

.tools a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------------ the everyday pair (WEB-04) */
/* The phones' glow may spread past a narrow window; the section clips it, as .feature does. */
#everyday {
  overflow: clip;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 380px);
  gap: 64px;
  justify-content: center;
  margin-top: 56px;
}

@media (min-width: 860px) {
  .pair {
    grid-template-columns: repeat(2, minmax(0, 380px));
    column-gap: 72px;
  }
}

.pair-item h3 {
  margin: 36px 0 8px;
  font-size: 1.35rem;
}

.pair-item p {
  margin: 0;
  color: var(--text2);
}

.pair .stage {
  justify-content: center;
}

.pair .stage::before {
  left: 50%;
}

/* ------------------------------------------------------------------ light & dark */
.duo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.duo {
  position: relative;
  width: 540px;
  height: 640px;
  flex: none;
}

.duo .device {
  position: absolute;
  width: 290px;
  zoom: 1;
}

.duo .phone {
  width: 290px;
  height: 594px;
}

.duo .device:first-child {
  left: 0;
  top: 0;
  transform: rotate(-4deg);
  z-index: 1;
}

.duo .device:last-child {
  right: 0;
  top: 36px;
  transform: rotate(4deg);
  z-index: 2;
}

/* The pair is wider than one phone, so its column takes the pair's width. */
@media (min-width: 960px) {
  #light-and-dark .container {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .duo {
    zoom: var(--z);
  }
}

@media (max-width: 599px) {
  .duo {
    zoom: 0.8;
  }
}

@media (max-width: 479px) {
  .duo {
    zoom: 0.66;
  }
}

@media (max-width: 399px) {
  .duo {
    zoom: 0.6;
  }
}

@media (max-width: 359px) {
  .duo {
    zoom: 0.53;
  }
}

/* ------------------------------------------------------------------ grids */
.grid {
  display: grid;
  gap: 14px;
  margin-top: 48px;
  padding: 0;
  list-style: none;
}

@media (min-width: 560px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tile-card {
  background: var(--card);
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius-card);
  padding: 22px;
}

.tile-card .m-tile {
  margin-bottom: 16px;
}

/* On a phone, the "Also inside" cards become compact rows: icon left, words right. */
@media (max-width: 559px) {
  .grid .tile-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    padding: 16px;
  }

  .grid .tile-card .m-tile {
    grid-row: span 2;
    margin-bottom: 0;
  }
}

.tile-card h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tile-card p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text2);
}

.nope {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nope li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
  font: 600 16px/1.2 var(--display);
  letter-spacing: -0.005em;
}

.nope svg {
  width: 20px;
  height: 20px;
  color: var(--text3);
  flex: none;
}

/* ------------------------------------------------------------------ privacy + pricing */
.privacy-card {
  display: grid;
  gap: 32px;
  margin-top: 48px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 32px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 900px) {
  .privacy-card {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
  }
}

.badge-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 28px 20px;
  border-radius: 24px;
  background: var(--page);
  border: 1px solid var(--hair-soft);
}

.badge-big .m-tile {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.badge-big .m-tile svg {
  width: 34px;
  height: 34px;
}

.badge-big strong {
  font: 700 1.6rem/1.1 var(--display);
  letter-spacing: -0.02em;
}

.badge-big span {
  color: var(--text3);
  font-size: 14px;
}

.privacy-copy p {
  color: var(--text2);
}

.privacy-copy p + p {
  margin-top: 14px;
}

.privacy-copy .lead {
  color: var(--text);
  font-size: 1.15rem;
}

.pricing {
  text-align: center;
}

.pricing .section-head {
  margin-inline: auto;
}

.price-card {
  max-width: 640px;
  margin: 40px auto 0;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
}

.price-card .chips {
  justify-content: center;
}

.price-card p {
  margin-top: 18px;
  color: var(--text3);
  font-size: 15px;
}

/* ------------------------------------------------------------------ FAQ */
.faq {
  max-width: 820px;
  margin: 40px auto 0;
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--hair-soft);
  border-radius: 18px;
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font: 600 1.08rem/1.35 var(--display);
  letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text3);
  border-bottom: 2px solid var(--text3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t-fast) var(--ease-out);
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq details > div {
  padding: 0 0 20px;
  color: var(--text2);
}

.faq details > div p + p {
  margin-top: 10px;
}

/* ------------------------------------------------------------------ CTA band + footer */
.cta {
  text-align: center;
}

.cta .icon-big {
  width: 104px;
  height: 104px;
  margin: 0 auto 28px;
  border-radius: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 80px rgba(var(--key), 0.25);
}

.cta h2 {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.8rem);
}

.cta p:not(.soon) {
  margin: 16px auto 30px;
  max-width: 30em;
  color: var(--text2);
}

.site-footer {
  border-top: 1px solid var(--hair-soft);
  padding-block: 48px 40px;
  font-size: 15px;
  color: var(--text2);
}

.site-footer .container {
  display: grid;
  gap: 28px;
}

@media (min-width: 760px) {
  .site-footer .container {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: start;
  }
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer nav a {
  color: var(--text2);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer .tagline {
  margin-top: 12px;
}

.site-footer .fine {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text3);
}

.footer-theme {
  display: grid;
  gap: 10px;
  justify-items: start;
}

/* ------------------------------------------------------------------ inner pages */
.page-hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(32px, 4vw, 56px);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 4vw + 1rem, 4rem);
  margin: 18px 0 14px;
}

.page-hero p:not(.feature-label):not(.policy-updated):not(.contact-line) {
  max-width: 40em;
  color: var(--text2);
  font-size: 1.12rem;
}

.prose {
  max-width: 740px;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem);
  letter-spacing: -0.02em;
  margin: 56px 0 14px;
  scroll-margin-top: 84px;
}

.prose h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: var(--text2);
}

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

.prose p + p,
.prose ul + p,
.prose ol + p,
.prose p + ul,
.prose p + ol {
  margin-top: 14px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0;
}

.prose li + li {
  margin-top: 6px;
}

.prose li::marker {
  color: var(--accent);
}

.policy-layout {
  display: grid;
  gap: 40px;
  padding-bottom: var(--section-space);
}

@media (min-width: 1000px) {
  .policy-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  .policy-toc {
    position: sticky;
    top: 88px;
  }
}

.policy-toc {
  font-size: 14px;
}

.policy-toc h2 {
  font: 600 12px/1 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 14px;
}

.policy-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--hair);
}

.policy-toc a {
  display: block;
  padding: 5px 0 5px 14px;
  color: var(--text2);
  text-decoration: none;
}

.policy-toc a:hover {
  color: var(--accent);
}

@media (max-width: 999px) {
  .policy-toc {
    padding: 20px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--hair-soft);
  }

  .policy-toc ol {
    columns: 2 140px;
    column-gap: 20px;
    font-size: 13.5px;
    display: block;
    border-left: 0;
  }

  .policy-toc a {
    padding-left: 0;
  }
}

.policy-updated {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
  font-size: 14.5px;
  color: var(--text2);
}

.policy-updated strong {
  color: var(--text);
}

.policy-lede p {
  color: var(--text);
  font-size: 1.12rem;
}

.contact-card {
  margin-top: 40px;
  padding: 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
}

.contact-line {
  color: var(--text2);
}

.contact-line strong {
  color: var(--text);
}

.howto {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

@media (min-width: 760px) {
  .howto {
    grid-template-columns: repeat(2, 1fr);
  }
}

.howto .tile-card ol,
.howto .tile-card ul {
  margin: 10px 0 0;
  padding-left: 1.2em;
  color: var(--text2);
  font-size: 15.5px;
}

.howto .tile-card p {
  margin-top: 12px;
}

.howto .tile-card li + li {
  margin-top: 5px;
}

.howto .tile-card li::marker {
  color: var(--accent);
}

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

/* Press kit */
.downloads {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

@media (min-width: 760px) {
  .downloads {
    grid-template-columns: repeat(3, 1fr);
  }
}

.download {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
}

.download .preview {
  display: grid;
  place-items: center;
  height: 160px;
  border-radius: 16px;
  background: var(--page);
  border: 1px solid var(--hair-soft);
}

.download .preview.dark {
  background: #0e1013;
}

.download .preview.light {
  background: #f4f4ef;
}

.download .preview img {
  max-height: 110px;
  width: auto;
}

.download .preview img.icon {
  border-radius: 24px;
}

.download h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.download p {
  font-size: 14px;
  color: var(--text3);
}

.download .links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 600;
}

/* WEB-04: the App Store screenshots on the press page. */
.press-shots {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 16px;
}

@media (min-width: 1000px) {
  .press-shots {
    grid-template-columns: repeat(5, 1fr);
  }
}

.press-shot a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
}

.press-shot img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow:
    var(--shadow-soft),
    0 0 0 1px var(--hair-soft);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .press-shot img {
    transition: translate var(--t-med) var(--ease-out);
  }

  .press-shot a:hover img {
    translate: 0 -3px;
  }
}

.press-shot-name {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.press-shot-meta {
  font-size: 12.5px;
  color: var(--text3);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.swatches li {
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--hair-soft);
}

.swatches .chip {
  height: 76px;
  border-bottom: 1px solid var(--hair-soft);
}

.swatches div:last-child {
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text2);
}

.swatches strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.swatches code,
.copy-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.copy-block {
  margin-top: 20px;
  padding: 22px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--hair-soft);
  color: var(--text2);
  font-size: 15.5px;
}

.copy-block p + p {
  margin-top: 14px;
}

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

.rules li {
  display: flex;
  gap: 10px;
  color: var(--text2);
}

.rules svg {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--accent);
  flex: none;
}

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 80px;
}

.notfound .big {
  font: 700 clamp(5rem, 16vw, 10rem) / 1 var(--display);
  letter-spacing: -0.04em;
  color: var(--accent);
  text-shadow: 0 0 60px rgba(var(--key), 0.3);
}

.notfound h1 {
  font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem);
  margin: 12px 0 14px;
}

.notfound p {
  color: var(--text2);
  margin-bottom: 28px;
}

/* ==================================================================================== motion
 * WEB-02, "super premium": alive everywhere, never noisy. The rules every effect here keeps:
 *  - only transform and opacity animate (plus SVG stroke-dashoffset), so the compositor does
 *    the work. The one exception is the theme switch's circle, a View Transition clip-path that
 *    plays for 0.65 s after a click;
 *  - nothing is hidden unless a class proves it will come back: `.motion` (the head script, no
 *    "reduce motion"), `.reveal-on` / `.live-on` / `.story-live` (site.js, once it runs), so the
 *    page reads in full with JavaScript off;
 *  - `prefers-reduced-motion: reduce` gets none of it: no intro, no drift, no tilt, no
 *    marquee, no count-ups. Every final value is already in the HTML;
 *  - loops pause off-screen (`.is-off`, set by site.js) and while the tab is hidden;
 *  - a live mock's resting state is its finished screen: going live only adds motion (WEB-03).
 * One easing family (WEB-03): `--ease-out` for everything that arrives or changes state,
 * `--ease-loop` for everything that loops, and `--ease-open` only for the intro's opening (the
 * app splash's curve). Four durations, `--t-fast` to `--t-data` (bars, lines and count-ups), and
 * one stagger step, `--stagger`.
 */
:root {
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-loop: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-open: cubic-bezier(0.7, 0, 0.2, 1);
  --t-fast: 200ms;
  --t-med: 400ms;
  --t-slow: 700ms;
  --t-data: 1200ms;
  --stagger: 70ms;
  --hero-delay: 0s;
  /* Where the Q's counter sits in its letter box: the window opens from here. */
  --qx: 49%;
  --qy: 50%;
}

/* The hero composes itself under the intro, from first paint, so the window opens onto it
   settled (WEB-03): only its figures and callout are still coming alive as it is revealed. */

/* ------------------------------------------------------------------ light fields + grain */
.fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.fx::after {
  /* Film grain: a 180 px tile of SVG noise, drawn once, never animated. */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http%3A//www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url%28%23n%29'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.theme-light .fx::after,
:root[data-theme='light'] .fx::after {
  opacity: 0.05;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .fx::after {
    opacity: 0.05;
  }
}

.orb {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.orb-a {
  width: 820px;
  height: 820px;
  left: -260px;
  top: -340px;
  background: radial-gradient(closest-side, rgba(var(--key), 0.2), rgba(var(--key), 0));
}

.orb-b {
  width: 720px;
  height: 720px;
  right: -260px;
  top: 8%;
  background: radial-gradient(closest-side, rgba(var(--rim), 0.15), rgba(var(--rim), 0));
}

.orb-c {
  width: 460px;
  height: 460px;
  right: 16%;
  bottom: -200px;
  background: radial-gradient(closest-side, rgba(var(--key), 0.13), rgba(var(--key), 0));
}

/* ------------------------------------------------------------------ the intro */
.intro {
  display: none;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background: var(--page);
}

.intro-mark {
  position: relative;
  display: flex;
  font: 700 clamp(56px, 10vw, 132px) / 1.25 var(--display);
  letter-spacing: 0.02em;
  /* The last letter's spacing would push the word 0.01em left of centre. */
  margin-right: -0.02em;
  color: var(--text);
}

.intro-mark > span::before {
  content: attr(data-l);
  display: block;
}

.intro-q {
  position: relative;
  z-index: 0;
  color: var(--accent);
}

.intro-q::before {
  transform-origin: var(--qx) var(--qy);
}

.intro-anchor {
  position: absolute;
  left: var(--qx);
  top: var(--qy);
  width: 0;
  height: 0;
  z-index: -1;
  opacity: 0;
}

/* The window: a ring in the page colour whose round hole starts inside the Q's counter. The four
   page-coloured panels around it travel out with it, so the page shows only through the hole. */
.intro-hole {
  position: absolute;
  left: -0.3em;
  top: -0.3em;
  width: 0.6em;
  height: 0.6em;
  background: radial-gradient(circle closest-side, transparent 40%, var(--page) 47%);
}

.intro-anchor i {
  position: absolute;
  background: var(--page);
}

.intro-anchor .r-t,
.intro-anchor .r-b {
  left: -200vmax;
  width: 400vmax;
  height: 200vmax;
}

.intro-anchor .r-t {
  bottom: 0.21em;
}

.intro-anchor .r-b {
  top: 0.21em;
}

.intro-anchor .r-l,
.intro-anchor .r-r {
  top: -200vmax;
  width: 200vmax;
  height: 400vmax;
}

.intro-anchor .r-l {
  right: 0.21em;
}

.intro-anchor .r-r {
  left: 0.21em;
}

.intro-glow {
  position: absolute;
  left: var(--qx);
  top: var(--qy);
  width: 3.6em;
  height: 3.6em;
  margin: -1.8em 0 0 -1.8em;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--key), 0.3), rgba(var(--key), 0));
  opacity: 0;
}

/* ------------------------------------------------------------------ the marquee */
.marquee {
  display: none;
}

.js .marquee {
  display: block;
  height: 60px;
  margin-top: clamp(40px, 6vw, 72px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  height: 100%;
}

.marquee ul {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 6px;
  list-style: none;
}

.marquee li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 17px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--hair-soft);
  font: italic 500 16px/1 var(--body);
  color: var(--text);
  white-space: nowrap;
}

.marquee li svg {
  width: 12px;
  height: 12px;
  fill: var(--accent);
  flex: none;
}

/* ------------------------------------------------------------------ cards: spotlight + lift */
.has-spot {
  position: relative;
  isolation: isolate;
}

.spot {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.faq summary .spot {
  inset: 0 -20px;
  border-radius: 17px;
}

.spot i {
  position: absolute;
  left: 0;
  top: 0;
  width: 380px;
  height: 380px;
  margin: -190px 0 0 -190px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--key), 0.13), rgba(var(--key), 0));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}

.has-spot:hover .spot i {
  opacity: 1;
}

.tile-card {
  position: relative;
}

.tile-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    var(--shadow-soft),
    inset 0 0 0 1px rgba(var(--key), 0.32);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}

@media (hover: hover) {
  .tile-card:hover::after {
    opacity: 1;
  }
}

/* ------------------------------------------------------------------ the headline sheen */
/* Inline, not inline-block, so a word keeps its punctuation on the same line. */
.sw {
  position: relative;
}

.sw-win {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1.1em;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%, #000 55%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000 55%, transparent);
}

.sw-txt {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  color: var(--sheen);
  text-shadow: 0 0 0.3em rgba(var(--key), 0.6);
}

.sw-txt::before {
  content: attr(data-t);
}

/* ------------------------------------------------------------------ the story rail */
.story-rail {
  display: none;
}

/* ==================================================================== everything that moves */
@media (prefers-reduced-motion: no-preference) {
  /* ---------------------------------------------------------------- pausing */
  .is-off,
  .is-off *,
  .tab-hidden * {
    animation-play-state: paused !important;
  }

  /* ---------------------------------------------------------------- intro
     The letters, glow and exits use the tokens; the opening itself (the Q, the hole and its
     panels) is one choreographed 0.68 s sequence keyed to the app's splash, so its parts keep
     their own matched timings. */
  .intro-on .intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    overflow: hidden;
    /* Without the script it still leaves by itself. */
    animation: intro-leave var(--t-med) var(--ease-out) 1.6s forwards;
  }

  .intro.is-js {
    animation: none;
  }

  .intro.is-open {
    pointer-events: none;
  }

  .intro.is-skip {
    animation: intro-leave var(--t-fast) var(--ease-out) forwards;
  }

  .intro-mark > span {
    opacity: 0;
    transform: translateY(0.3em);
    animation: intro-rise var(--t-med) var(--ease-out) forwards;
  }

  .intro-mark > :nth-child(2) {
    animation-delay: calc(1 * var(--stagger));
  }
  .intro-mark > :nth-child(3) {
    animation-delay: calc(2 * var(--stagger));
  }
  .intro-mark > :nth-child(4) {
    animation-delay: calc(3 * var(--stagger));
  }
  .intro-mark > :nth-child(5) {
    animation-delay: calc(4 * var(--stagger));
  }

  .intro-glow {
    transform: scale(0.6);
    animation: intro-glow var(--t-med) var(--ease-out) 0.34s forwards;
  }

  .is-open .intro-mark > span:not(.intro-q) {
    animation: intro-out var(--t-fast) var(--ease-out) forwards;
  }

  .is-open .intro-q::before {
    animation: intro-q-open 0.68s linear forwards;
  }

  .is-open .intro-glow {
    animation: intro-glow-open 0.68s linear forwards;
  }

  .is-open .intro-bg {
    animation: intro-cut 0.17s step-end forwards;
  }

  .is-open .intro-anchor {
    animation: intro-show 0.14s step-end forwards;
  }

  .is-open .intro-hole,
  .is-open .intro-anchor i {
    will-change: transform;
    animation: 0.52s var(--ease-open) 0.16s forwards;
  }

  .is-open .intro-hole {
    animation-name: intro-hole;
  }
  .is-open .intro-anchor .r-t {
    animation-name: intro-r-t;
  }
  .is-open .intro-anchor .r-b {
    animation-name: intro-r-b;
  }
  .is-open .intro-anchor .r-l {
    animation-name: intro-r-l;
  }
  .is-open .intro-anchor .r-r {
    animation-name: intro-r-r;
  }

  /* ---------------------------------------------------------------- light fields */
  .motion .orb {
    will-change: transform;
  }

  .motion .orb-a {
    animation: drift-a 26s var(--ease-loop) infinite alternate;
  }

  .motion .orb-b {
    animation: drift-b 31s var(--ease-loop) infinite alternate;
  }

  .motion .orb-c {
    animation: drift-c 22s var(--ease-loop) infinite alternate;
  }

  /* ---------------------------------------------------------------- hero, timed by CSS alone */
  .motion .hero .copy > * {
    animation: rise-in var(--t-slow) var(--ease-out) both;
    animation-delay: calc(var(--hero-delay) + var(--d, 0) * var(--stagger));
  }

  .motion .hero .copy > :nth-child(2) {
    --d: 1;
  }
  .motion .hero .copy > :nth-child(3) {
    --d: 2;
  }
  .motion .hero .copy > :nth-child(4) {
    --d: 3;
  }
  .motion .hero .copy > :nth-child(6) {
    --d: 8;
  }

  .motion .hero .copy > .chips {
    animation: none;
  }

  .motion .hero .chips li {
    animation: rise-in var(--t-slow) var(--ease-out) both;
    animation-delay: calc(var(--hero-delay) + (4 + var(--c, 0)) * var(--stagger));
  }

  .motion .hero .chips li:nth-child(2) {
    --c: 1;
  }
  .motion .hero .chips li:nth-child(3) {
    --c: 2;
  }
  .motion .hero .chips li:nth-child(4) {
    --c: 3;
  }

  .motion .hero .stage {
    animation: stage-in var(--t-data) var(--ease-out) both;
    animation-delay: calc(var(--hero-delay) + var(--stagger));
  }

  .motion .hero .phone {
    animation: float 8s var(--ease-loop) infinite;
    animation-delay: calc(var(--hero-delay) + var(--t-data));
  }

  .motion .hero .shot-img {
    animation: shot-in var(--t-data) var(--ease-out) both;
    animation-delay: calc(var(--hero-delay) + 4 * var(--stagger));
  }

  .motion .hero .shot::before {
    animation: glint 1.6s var(--ease-out) both;
    animation-delay: calc(var(--hero-delay) + var(--t-data));
  }

  /* The callout settles in once the phone has, then breathes with it. */
  .motion .hero .callout {
    animation:
      callout-in var(--t-slow) var(--ease-out) both,
      bob 6s var(--ease-loop) infinite;
    animation-delay:
      calc(var(--hero-delay) + 16 * var(--stagger)),
      calc(var(--hero-delay) + 16 * var(--stagger) + var(--t-slow));
  }

  .motion .hero.hairline-top::after {
    animation: line-in var(--t-data) var(--ease-out) both;
    animation-delay: calc(var(--hero-delay) + 3 * var(--stagger));
  }

  .motion .hero .feature-label svg {
    animation: twinkle 4.8s var(--ease-loop) infinite;
    animation-delay: calc(var(--hero-delay) + var(--t-data) + var(--t-med));
  }

  /* ---------------------------------------------------------------- headline sheen */
  .is-sheen .sw-win {
    animation: sheen-win var(--t-data) var(--ease-out) both;
    animation-delay: calc(var(--k, 0) * 2 * var(--stagger));
  }

  .is-sheen .sw-txt {
    animation: sheen-txt var(--t-data) var(--ease-out) both;
    animation-delay: calc(var(--k, 0) * 2 * var(--stagger));
  }

  /* ---------------------------------------------------------------- reveals
     Each block starts as it enters the window and is done well before it reaches the middle.
     It only rises 16 px, less than the space to its neighbours, so nothing overlaps on the way. */
  .reveal-on .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity var(--t-slow) var(--ease-out),
      transform var(--t-slow) var(--ease-out);
  }

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

  .reveal-on .reveal .chips > li,
  .reveal-on .nope.reveal > li,
  .reveal-on .grid.reveal > li {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity var(--t-slow) var(--ease-out) calc((var(--i, 0) + 1) * var(--stagger)),
      transform var(--t-slow) var(--ease-out) calc((var(--i, 0) + 1) * var(--stagger)),
      translate var(--t-med) var(--ease-out);
  }

  .reveal-on .reveal.is-visible .chips > li,
  .reveal-on .nope.reveal.is-visible > li,
  .reveal-on .grid.reveal.is-visible > li {
    opacity: 1;
    transform: none;
  }

  .reveal-on .hairline-top:not(.hero)::after {
    transform: scaleX(0);
    transition: transform var(--t-data) var(--ease-out) var(--stagger);
  }

  .reveal-on .hairline-top.is-visible::after {
    transform: none;
  }

  .theme-anim,
  .theme-anim * {
    transition:
      background-color var(--t-med) var(--ease-out),
      color var(--t-med) var(--ease-out),
      border-color var(--t-med) var(--ease-out) !important;
  }

  :root.vt-theme::view-transition-old(root),
  :root.vt-theme::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
  }

  /* ---------------------------------------------------------------- micro-interactions */
  .tile-card {
    transition: translate var(--t-med) var(--ease-out);
  }

  .magnetic {
    transition:
      translate var(--t-med) var(--ease-out),
      box-shadow var(--t-fast) var(--ease-out);
  }

  @media (hover: hover) {
    .tile-card:hover {
      translate: 0 -4px;
    }
  }

  .motion .marquee-track {
    animation: marquee 80s linear infinite;
  }

  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }

  .motion .cta .icon-big {
    animation: breathe 5s var(--ease-loop) infinite;
  }

  .motion .duo .phone {
    animation: float 9s var(--ease-loop) infinite;
  }

  .motion .duo .device:last-child .phone {
    animation-delay: -4.5s;
  }

  /* ---------------------------------------------------------------- live screens
     A phone's stage is `.live` (site.js). Its resting state is the finished screen: complete before
     any motion, with the script off, and in a screenshot. It plays when it becomes `.is-live`: as
     it scrolls in from below, or, in the scroll story, when its words reach the middle. Going live
     only adds motion (WEB-04, real screens): the screen rises into place, a light sweeps the glass
     once, and the callout settles. */
  .live-on .live .shot-img {
    transform-origin: 50% 0;
  }

  .live-on .live.is-live .shot-img {
    animation: shot-in var(--t-slow) var(--ease-out) both;
  }

  .live-on .live.is-live .shot::before {
    animation: glint 1.4s var(--ease-out) var(--t-fast) both;
  }

  .live-on .live.is-live .callout {
    animation: settle var(--t-slow) var(--ease-out) var(--t-med) both;
  }

  .live-on .live[data-mock='offline'].is-live .status .airplane {
    animation: pop var(--t-med) var(--ease-out) var(--t-fast) both;
  }

  /* ---------------------------------------------------------------- the scroll story
     One grid for the story, the hero and the stacked features: the words in `1fr` on the left,
     the phone in `--media-w` on the right. Each step of words is exactly as tall as the phone and
     the steps are `--step-gap` apart, so a step is centred on the phone when it is the active
     one, the first step starts level with the phone and the last ends level with it. */
  @media (min-width: 960px) and (min-height: 700px) {
    .motion .story {
      --phone-hz: calc(var(--phone-h) * var(--z));
      /* The phone is centred in the window below the 64 px header. */
      --pin-top: max(80px, calc(50vh + 32px - var(--phone-hz) / 2));
      --step-gap: clamp(160px, 30vh, 300px);
      display: grid;
      grid-template-columns: minmax(0, 1fr) var(--media-w);
      column-gap: var(--col-gap);
      row-gap: var(--step-gap);
      width: 100%;
      max-width: calc(var(--max) + 2 * var(--gutter));
      margin-inline: auto;
      padding: var(--section-space) var(--gutter);
    }

    .motion .story > .feature,
    .motion .story > .feature > .container {
      display: contents;
    }

    .motion .story > .divider {
      display: none;
    }

    .motion .story .copy.reveal {
      grid-column: 1;
      min-height: var(--phone-hz);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      opacity: 1;
      transform: none;
    }

    /* Every phone sits in the same cell, pinned in the middle of the window. 11 rows: one per
       feature in the story (add a row here if a feature joins it). */
    .motion .story .stage.reveal,
    .story-live .story-rail {
      grid-column: 2;
      grid-row: 1 / span 11;
      align-self: start;
      position: sticky;
      top: var(--pin-top);
      opacity: 1;
      transform: none;
    }

    /* If the script never runs, the first phone stands for all of them. */
    .motion .story > .feature:not(:first-child) .stage {
      visibility: hidden;
    }

    /* Words: the active step at full strength, the others readable but quieter. */
    .story-live .story .copy.reveal {
      opacity: 0.5;
      transition: opacity var(--t-med) var(--ease-out);
    }

    .story-live .story .copy.reveal.is-active {
      opacity: 1;
    }

    /* The phone. The first stage's device is the one chassis everyone sees; the others draw only
       their screens and callouts, exactly over it. Only the active screen is shown: it fades in
       quickly over the one it replaces, which stays solid underneath until the fade is done, so
       nothing ever shows through to the page, and its rows settle in as it arrives. */
    .story-live .story > .feature:not(:first-child) .stage {
      visibility: visible;
    }

    .story-live .story > .feature:not(:first-child) .stage::before {
      content: none;
    }

    .story-live .story > .feature:not(:first-child) .phone {
      background: none;
      box-shadow: none;
    }

    .story-live .story .stage {
      z-index: 1;
    }

    .story-live .story .stage.is-active {
      z-index: 2;
    }

    /* A screen that stops being active stays solid, under the new one, for the length of the
       new one's fade, then goes. CSS alone times the hand-off. */
    .story-live .story .stage .phone-screen {
      visibility: hidden;
      opacity: 0;
      transition:
        opacity 0s linear var(--t-fast),
        visibility 0s linear var(--t-fast);
    }

    .story-live .story .stage .callout {
      visibility: hidden;
      opacity: 0;
      transition:
        opacity var(--t-fast) var(--ease-out),
        visibility 0s linear var(--t-fast);
    }

    .story-live .story .stage.is-active .phone-screen {
      visibility: visible;
      opacity: 1;
      transition:
        opacity var(--t-fast) var(--ease-out),
        visibility 0s;
    }

    /* The old callout leaves first; the new one arrives once the screen has changed. */
    .story-live .story .stage.is-active .callout {
      visibility: visible;
      opacity: 1;
      transition:
        opacity var(--t-med) var(--ease-out) var(--t-fast),
        visibility 0s;
    }

    /* The first screen (and any screen after a jump) appears without a fade. */
    .story-live .story.is-instant .stage .phone-screen,
    .story-live .story.is-instant .stage .callout {
      transition: none;
    }

    /* The progress rail: its own lane, centred in the gap between the words and the phone, as
       tall as the phone and pinned with it, so its track is always centred on the phone. */
    .story-live .story-rail {
      display: flex;
      align-items: center;
      justify-content: center;
      justify-self: start;
      width: 12px;
      height: var(--phone-hz);
      margin-left: calc(var(--col-gap) / -2 - 6px);
      pointer-events: none;
    }

    .story-track {
      position: relative;
      width: 2px;
      height: 46%;
      border-radius: 2px;
      background: var(--track);
    }

    .story-fill {
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: var(--accent);
      transform: scaleY(0);
      transform-origin: center top;
    }

    .story-track b {
      position: absolute;
      left: 50%;
      width: 10px;
      height: 10px;
      margin: -5px 0 0 -5px;
      border-radius: 50%;
      background: var(--page);
      box-shadow: inset 0 0 0 2px var(--track);
    }

    .story-track b::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 50%;
      background: var(--accent);
      box-shadow: 0 0 12px rgba(var(--key), 0.6);
      opacity: 0;
      transform: scale(0.4);
      transition:
        opacity var(--t-med) var(--ease-out),
        transform var(--t-med) var(--ease-out);
    }

    .story-track b.is-active::after {
      opacity: 1;
      transform: none;
    }
  }
}

/* ------------------------------------------------------------------ keyframes */
@keyframes shot-in {
  from {
    opacity: 0.4;
    transform: translateY(16px) scale(1.015);
  }
}

@keyframes glint {
  0% {
    opacity: 1;
    transform: translateX(-62%);
  }
  100% {
    opacity: 1;
    transform: translateX(62%);
  }
}

@keyframes intro-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-glow {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes intro-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: none;
  }
}

@keyframes intro-q-open {
  0% {
    opacity: 1;
    transform: scale(1);
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
  }
  18% {
    opacity: 1;
    transform: scale(0.94);
  }
  24% {
    opacity: 1;
    transform: scale(0.94);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  52%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

@keyframes intro-glow-open {
  0%,
  24% {
    opacity: 1;
    transform: scale(1);
    animation-timing-function: cubic-bezier(0.7, 0, 0.2, 1);
  }
  52%,
  100% {
    opacity: 0;
    transform: scale(3);
  }
}

@keyframes intro-cut {
  to {
    opacity: 0;
  }
}

@keyframes intro-show {
  to {
    opacity: 1;
  }
}

@keyframes intro-hole {
  to {
    transform: scale(var(--s, 80));
  }
}

@keyframes intro-r-t {
  to {
    transform: translateY(calc((1 - var(--s, 80)) * 0.21em));
  }
}

@keyframes intro-r-b {
  to {
    transform: translateY(calc((var(--s, 80) - 1) * 0.21em));
  }
}

@keyframes intro-r-l {
  to {
    transform: translateX(calc((1 - var(--s, 80)) * 0.21em));
  }
}

@keyframes intro-r-r {
  to {
    transform: translateX(calc((var(--s, 80) - 1) * 0.21em));
  }
}

@keyframes intro-leave {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
}

@keyframes callout-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

/* A live mock's rows settling into place: motion only, never hidden. */
@keyframes settle {
  from {
    transform: translateY(12px);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: none;
  }
}

/* Six rows, each held, then the next slides up; the second copy makes the loop seamless. */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(-4px) scale(1.02);
  }
}

@keyframes twinkle {
  0%,
  80%,
  100% {
    transform: none;
  }
  88% {
    transform: scale(1.35) rotate(45deg);
  }
}

@keyframes line-in {
  from {
    transform: scaleX(0);
  }
}

@keyframes drift-a {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(14%, 10%, 0) scale(1.14);
  }
}

@keyframes drift-b {
  from {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  to {
    transform: translate3d(-18%, 14%, 0) scale(0.92);
  }
}

@keyframes drift-c {
  from {
    transform: translate3d(0, 0, 0) scale(0.95);
  }
  to {
    transform: translate3d(-22%, -16%, 0) scale(1.15);
  }
}

@keyframes sheen-win {
  0% {
    opacity: 1;
    transform: translateX(-1.2em);
  }
  92% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(var(--ww, 4em));
  }
}

@keyframes sheen-txt {
  0% {
    transform: translateX(1.2em);
  }
  100% {
    transform: translateX(calc(-1 * var(--ww, 4em)));
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

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