/* Shared styling for the static pages (about, privacy, terms, developers).
   Not used by the Flutter app itself.

   Direction: quiet and editorial rather than a SaaS template.
   Geist throughout: headings set large and tight, body text quiet;
   white in light,
   deep ink in dark; the brand violet is kept for actions, with a lighter violet
   hairline for rules and numerals.

   Theme resolution has three states, so the dark tokens are defined twice:
   the bare :root is light; the prefers-color-scheme block (guarded
   :root:not([data-theme="light"]) so an explicit light choice beats a dark
   OS) redefines them for dark; and :root[data-theme="dark"] does again so
   the header toggle wins the other way. site.js stamps data-theme from
   localStorage before first paint. (No "star-slash" inside comments here:
   one once closed a comment early and dropped the whole light block.) */

:root {
  --paper: #FFFFFF;
  --sheet: #FFFFFF;
  --ink: #14111A;
  --muted: #5D5A66;
  --line: rgba(23, 18, 31, 0.12);
  --line-soft: rgba(23, 18, 31, 0.07);
  --detail: #7C5CC4;
  --accent: #6D28D9;
  --accent-ink: #5B21B6;
  --accent-soft: rgba(109, 40, 217, 0.08);
  --on-accent: #FFFFFF;
  --btn-a: #7C3AED;
  --btn-b: #5B21B6;
  --header-bg: rgba(255, 255, 255, 0.95);
  --shadow: rgba(40, 24, 64, 0.16);
  --hl: #FFF2A8;

  /* The hero is ink in both themes: a dark stage for the devices. */
  --stage: #110C19;
  --stage-ink: #F6F2FA;
  --stage-muted: #B9B0C8;

  --serif: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --fs-display: clamp(2.6rem, 5.2vw + 1rem, 4.6rem);
  --fs-xl: clamp(1.7rem, 1.8vw + 1rem, 2.4rem);
  --fs-lg: 1.25rem;
  --fs-md: 1.0625rem;
  --fs-base: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C0912;
    --sheet: #15111D;
    --ink: #F3EFF8;
    --muted: #A9A1B7;
    --line: rgba(243, 239, 248, 0.12);
    --line-soft: rgba(243, 239, 248, 0.06);
    --detail: #B9A5F2;
    --accent: #B79CFF;
    --accent-ink: #CDB9FF;
    --accent-soft: rgba(183, 156, 255, 0.1);
    --on-accent: #160C28;
    --btn-a: #CDB9FF;
    --btn-b: #A78BFA;
    --header-bg: rgba(12, 9, 18, 0.94);
    --shadow: rgba(0, 0, 0, 0.6);
    --hl: #5E5426;
    --stage: #08060C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0C0912;
  --sheet: #15111D;
  --ink: #F3EFF8;
  --muted: #A9A1B7;
  --line: rgba(243, 239, 248, 0.12);
  --line-soft: rgba(243, 239, 248, 0.06);
  --detail: #B9A5F2;
  --accent: #B79CFF;
  --accent-ink: #CDB9FF;
  --accent-soft: rgba(183, 156, 255, 0.1);
  --on-accent: #160C28;
  --btn-a: #CDB9FF;
  --btn-b: #A78BFA;
  --header-bg: rgba(12, 9, 18, 0.94);
  --shadow: rgba(0, 0, 0, 0.6);
  --hl: #5E5426;
  --stage: #08060C;
  color-scheme: dark;
}

/* Theme-paired images: one <img> per theme. `html .` so this outranks a
   later single-class rule that also sets display. */
html .theme-dark-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
  :root:not([data-theme="light"]) .theme-dark-only { display: block; }
}
:root[data-theme="dark"] .theme-light-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: block; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* The header and hero bleed past .wrap; never let that widen the page. */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
/* Full-bleed header background behind a centred row. */
/* Full width, like the hero, so the blur covers the whole bar. */
.top { margin: 0 calc(50% - 50vw); padding-inline: max(24px, calc(50vw - 556px)); }
@media (max-width: 600px) { .top { padding-inline: 16px; } }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand-wide img { width: auto; height: 46px; }
.brand-narrow img { width: 28px; height: 28px; }
.brand-narrow { display: none; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top .link { font-size: var(--fs-sm); color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.top .link:hover { color: var(--ink); }
.top .link[aria-current="page"] { color: var(--ink); }
/* Phones: the mark alone (it links home), and About drops out for room. */
@media (max-width: 560px) {
  .brand-wide { display: none; }
  .brand-narrow { display: block; }
  .top .link { padding: 8px 6px; }
  .top .link[href$="/about"] { display: none; }
}
.top .btn { white-space: nowrap; }
@media (max-width: 359px) { .top .link[href$="/terms"] { display: none; } }

.theme-toggle {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Buttons: glossy, not flat ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-base);
  padding: 13px 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn-sm { padding: 8px 16px; font-size: var(--fs-sm); }
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 24px -10px rgba(109, 40, 217, 0.65);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 2px 4px rgba(0, 0, 0, 0.2), 0 16px 30px -12px rgba(109, 40, 217, 0.75); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }

/* ---------- Hero: an ink stage with the real app on it ---------- */
.hero {
  position: relative;
  isolation: isolate;
  margin: 0 calc(50% - 50vw);
  padding: clamp(56px, 8vw, 112px) max(24px, calc(50vw - 556px)) 0;
  background:
    radial-gradient(50% 60% at 75% 55%, rgba(124, 58, 237, 0.42), transparent 70%),
    radial-gradient(40% 40% at 15% 0%, rgba(99, 102, 241, 0.16), transparent 70%),
    var(--stage);
  color: var(--stage-ink);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
/* Film grain, so the gradient reads as a surface, not a screen effect. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.09; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(183, 156, 255, 0.55), transparent); }
.hero-copy { padding-bottom: clamp(56px, 7vw, 96px); }
.kicker { font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--detail); margin: 0 0 22px; }
.hero .kicker { color: #C9B8FF; }
.headline { font-size: var(--fs-display); font-weight: 600; letter-spacing: -0.045em; line-height: 1.0; }
.headline em { font-style: normal; color: #C9B8FF; }
.hero-sub { font-size: var(--fs-lg); line-height: 1.55; color: var(--stage-muted); margin: 26px 0 34px; max-width: 36ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .btn-primary { --on-accent: #FFFFFF; --btn-a: #8B5CF6; --btn-b: #6D28D9; }
.hero .btn-ghost { color: var(--stage-ink); border-color: rgba(246, 242, 250, 0.22); }
.hero .btn-ghost:hover { border-color: rgba(246, 242, 250, 0.5); }
.hero-note { margin: 18px 0 0; font-size: var(--fs-sm); color: var(--stage-muted); }

/* The laptop with the iPad and phone tucked against it, beside the copy. */
.devices.hero-devices { margin: 0; padding: 0 4% clamp(56px, 7vw, 96px) 6%; }
.hero-devices .laptop { width: 100%; }
.hero-devices .tablet { right: 0; bottom: clamp(40px, 5vw, 72px); width: 40%; }
.hero-devices .devices-phone { left: 0; bottom: clamp(28px, 4vw, 56px); width: 17%; }
@media (max-width: 860px) { .devices.hero-devices { max-width: 560px; margin: 0 auto; } }

@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 0; } .hero-copy { padding-bottom: 40px; } }

/* ---------- The phone frame ---------- */
.phone {
  position: relative;
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(145deg, #3A3445, #121017 45%, #2A2532);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 0 0 3px #0A090D,
    0 2px 0 rgba(255, 255, 255, 0.05),
    0 40px 80px -30px rgba(0, 0, 0, 0.75),
    0 20px 40px -20px rgba(60, 20, 120, 0.5);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 38px; }
/* Glass: a soft diagonal sheen across the screen. */
.phone::after {
  content: ""; position: absolute; inset: 9px; border-radius: 38px; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 28%, transparent 42%);
}

/* ---------- Editorial sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: end; margin-bottom: 48px; }
.section-head h2 { font-size: var(--fs-xl); }
.section-head p { margin: 0; color: var(--muted); font-size: var(--fs-md); max-width: 52ch; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px; } }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.features li { padding: 30px 28px 34px 0; border-bottom: 1px solid var(--line); }
.features li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.features li:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.features .num { display: block; font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--detail); margin-bottom: 18px; }
.features h3 { font-size: 1.3rem; margin-bottom: 10px; }
.features p { margin: 0; color: var(--muted); font-size: var(--fs-base); }
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
  .features li, .features li + li { padding: 26px 22px 28px 0; border-left: 0; }
  .features li:nth-child(even) { padding-left: 22px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .features li, .features li + li, .features li:nth-child(even) { padding: 24px 0; border-left: 0; }
}

/* A row of real screens, each with a caption set like a plate in a book. */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); padding: 0 clamp(0px, 4vw, 48px); }
.gallery figure { margin: 0; }
.gallery .phone { max-width: 280px; margin: 0 auto; }
.gallery figcaption { margin-top: 22px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 24px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
  .gallery figure { scroll-snap-align: center; }
}

/* Translations, typeset as a single line rather than a row of pills. */
.versions { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 6px; margin: 0; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--sans); font-weight: 500; letter-spacing: -0.01em; font-size: clamp(1.1rem, 1vw + 0.85rem, 1.4rem); text-align: center; color: var(--ink); }
.versions span { white-space: nowrap; }
.versions .sep { color: var(--detail); margin: 0 0.6em; }
.versions-note { text-align: center; color: var(--muted); font-size: var(--fs-sm); margin: 16px 0 0; }

.pledge {
  margin-top: clamp(72px, 9vw, 120px);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center;
  padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.pledge h2 { font-size: var(--fs-lg); }
.pledge p { margin: 0; color: var(--muted); max-width: 60ch; }
@media (max-width: 760px) { .pledge { grid-template-columns: 1fr; gap: 12px; } }

.closing { text-align: center; padding: clamp(80px, 10vw, 140px) 0 clamp(64px, 8vw, 110px); }
.closing h2 { font-size: var(--fs-display); letter-spacing: -0.045em; }
.closing h2 em { color: var(--accent); }
.closing p { color: var(--muted); font-size: var(--fs-md); margin: 18px auto 30px; max-width: 46ch; }
.closing .hero-ctas { justify-content: center; }

footer {
  border-top: 1px solid var(--line-soft);
  padding: 26px 0 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: var(--fs-xs); color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* ---------- Document pages: a printed sheet ---------- */
.doc {
  max-width: 760px;
  margin: clamp(32px, 6vw, 72px) auto 0;
  padding: clamp(28px, 6vw, 72px) clamp(22px, 6vw, 80px);
  background: var(--sheet);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--line-soft), 0 30px 60px -40px var(--shadow);
}
.doc h2 { font-size: 1.55rem; margin: 2.2em 0 0.4em; }
.doc h3 { font-size: 1.2rem; margin: 1.6em 0 0.3em; }
.doc p, .doc li { font-size: 1.06rem; line-height: 1.7; color: var(--ink); }
.doc p { margin: 0.75em 0; }
.doc > p:first-child { font-size: 1.2rem; line-height: 1.6; color: var(--muted); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0.6em 0; }
.doc li { margin-bottom: 0.35em; }
.doc li::marker { color: var(--detail); }
.doc a { color: var(--accent-ink); }
.doc strong { font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: var(--fs-sm); }
.doc th, .doc td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-family: var(--sans); }
.doc th { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-soft); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.85em; }
.doc pre { background: var(--accent-soft); border-radius: 6px; padding: 14px 16px; overflow-x: auto; margin: 0.9em 0; line-height: 1.5; }
.doc pre code { background: none; padding: 0; font-size: 0.82em; white-space: pre; }
.doc td code { word-break: break-word; }
.doc .toc { margin: 1.6em 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc .toc p { font-family: var(--sans); font-size: var(--fs-sm); margin: 0; }
/* Privacy and terms number their sections; the developers page numbers
   its own in the text. */
.doc.legal { counter-reset: section; }
.doc.legal h2 { counter-increment: section; }
.doc.legal h2::before { content: counter(section, decimal-leading-zero); display: block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--detail); margin-bottom: 8px; }
.doc + footer { max-width: 760px; margin: 40px auto 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Motion ----------
   Slow and small, the way an expensive page moves: the hero settles in on
   load, the devices arrive and catch the light, and sections rise into view
   as they're scrolled to. site.js adds .reveal-ready only when it can show
   them again (IntersectionObserver, motion allowed), so without it nothing
   is ever hidden. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 900ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 180ms; }
  .hero-copy > :nth-child(4) { animation-delay: 280ms; }
  .hero-copy > :nth-child(5) { animation-delay: 380ms; }

  /* The devices arrive one after another, then rest; the only ongoing
     movement is a band of light crossing the three screens in turn. */
  .hero-devices .laptop { animation: rise 1100ms 200ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero-devices .tablet { animation: from-right 1100ms 480ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero-devices .devices-phone { animation: from-left 1100ms 680ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero-devices .laptop-screen { position: relative; }
  .hero-devices .laptop-screen::after, .hero-devices .tablet::after, .hero-devices .phone::after {
    content: ""; position: absolute; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.2) 48%, transparent 60%) no-repeat;
    background-size: 260% 100%; background-position: 160% 0;
    animation: sheen 9s 2s ease-in-out infinite;
  }
  .hero-devices .laptop-screen::after { inset: 1.6% 1.6% 2.2%; border-radius: 6px; }
  .hero-devices .tablet::after { inset: 1.6%; border-radius: 14px; animation-delay: 2.5s; }
  .hero-devices .phone::after { animation-delay: 1.6s; }

  .reveal-ready .reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms cubic-bezier(.2, .7, .2, 1), transform 900ms cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
  .reveal-ready .reveal.in { opacity: 1; transform: none; }

  .btn-primary { background-size: 100% 200%; background-position: 0 0; }
  .btn-primary:hover { background-position: 0 100%; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes from-right { from { opacity: 0; transform: translateX(40px); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-40px); } }
@keyframes sheen { 0%, 60% { background-position: 160% 0; } 85%, 100% { background-position: -60% 0; } }

/* ---------- Devices: laptop, tablet and phone together ---------- */
.devices { position: relative; max-width: 1040px; margin: 0 auto; padding-bottom: 6%; }
.laptop { width: 82%; }
.laptop-screen {
  padding: 1.6% 1.6% 2.2%;
  border-radius: 20px 20px 6px 6px;
  background: linear-gradient(160deg, #2B2733, #0E0C12 50%, #221E29);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 50px 90px -40px var(--shadow), 0 30px 50px -30px rgba(60, 20, 120, 0.35);
}
.laptop-screen img { display: block; width: 100%; height: auto; border-radius: 6px; }
.laptop-base {
  position: relative; height: 16px; width: 112%; margin-left: -6%;
  border-radius: 2px 2px 18px 18px;
  background: linear-gradient(180deg, #E4E1EA, #B9B5C3 60%, #8F8A9B);
  box-shadow: 0 24px 30px -18px var(--shadow);
}
.laptop-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 6px; transform: translateX(-50%); border-radius: 0 0 8px 8px; background: rgba(0, 0, 0, 0.16); }
.tablet {
  position: absolute; right: 0; bottom: 0; width: 40%;
  padding: 1.6%;
  border-radius: 26px;
  background: linear-gradient(145deg, #3A3445, #121017 45%, #2A2532);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 70px -30px rgba(0, 0, 0, 0.6), 0 20px 40px -20px rgba(60, 20, 120, 0.45);
}
.tablet img { display: block; width: 100%; height: auto; border-radius: 14px; }
.devices-phone { position: absolute; left: 4%; bottom: -2%; width: 15%; padding: 6px; border-radius: 30px; }
.devices-phone img, .devices-phone::after { border-radius: 25px; }
.devices-phone::after { inset: 6px; }
@media (max-width: 760px) {
  .laptop { width: 100%; }
  .tablet { width: 46%; right: -2%; bottom: -8%; padding: 1.8%; border-radius: 16px; }
  .tablet img { border-radius: 9px; }
  .devices-phone { width: 20%; left: -2%; bottom: -10%; padding: 4px; border-radius: 18px; }
  .devices-phone img, .devices-phone::after { border-radius: 15px; inset: 4px; }
  .devices { padding-bottom: 14%; }
}

/* Each device's screen is a stack of three app screens: the first sets the
   size and shows when motion is off, the other two fade in over it in turn
   (about five seconds each). The tablet and phone run a beat behind the
   laptop so they never change together. */
.screens { position: relative; }
.screens img + img { position: absolute; inset: 0; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .screens img:nth-child(2) { animation: screen 15s calc(3s + var(--shift, 0s)) ease-in-out infinite; }
  .screens img:nth-child(3) { animation: screen 15s calc(8s + var(--shift, 0s)) ease-in-out infinite; }
}
@keyframes screen { 0% { opacity: 0; } 5%, 33% { opacity: 1; } 38%, 100% { opacity: 0; } }

/* ---------- Subpages: the about page's dark band, with the sheet over it ---------- */
.page-hero { display: block; padding-bottom: clamp(120px, 12vw, 168px); }
.page-hero .hero-copy { max-width: 760px; margin: 0 auto; padding-bottom: 0; }
.page-hero .headline { font-size: clamp(2.6rem, 4vw + 1rem, 4.2rem); }
.page-hero .hero-sub { margin-bottom: 0; font-size: var(--fs-md); }
.page-hero + .doc { position: relative; z-index: 1; margin-top: calc(-1 * clamp(80px, 9vw, 120px)); padding-top: clamp(28px, 5vw, 56px); border-radius: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .page-hero + .doc { animation: rise 1000ms 250ms cubic-bezier(.2, .7, .2, 1) both; }
}
