/* Paperless support site in the app's「原生」(native) theme (paperless-site-app-theme).
   Values come from the app's theme code; each token names its Swift source. Light / dark follow the visitor
   (prefers-color-scheme). System font stack only, no web fonts. */

/* ---------- Theme tokens (light) ---------- */
:root {
  color-scheme: light dark;

  /* Colours: app/PaperProto/Theme/ThemeTokens.swift `nativeTokens` (system semantic colours, iOS light values). */
  --pl-bg: #F2F2F7;              /* canvasBackdrop = .secondarySystemBackground */
  --pl-card: #FFFFFF;            /* panelFill .material(.regular) / rowFill .secondarySystemGroupedBackground, opaque */
  --pl-label: #000000;           /* textPrimary = .label */
  /* textSecondary = .secondaryLabel; the system value (#3C3C43 at 60 %) is 3.5:1 on white, below WCAG AA for body
     text, so the site uses the darkest grey of the same family that passes (ThemeTokens.swift contrast rule). */
  --pl-secondary-label: #6E6E73;
  --pl-accent: #007AFF;          /* accent = .systemBlue (rings, focus, non-text marks) */
  --pl-accent-text: #0062CC;     /* accentText = .hex(0x0062CC, 0x409CFF): blue for links and small text */
  --pl-button-fill: #0062CC;     /* prominent button: accentText fill so white labels pass AA */
  --pl-on-accent: #FFFFFF;       /* onAccent */
  --pl-separator: rgba(60, 60, 67, 0.29);   /* separator = .separator, separatorWidth 0.5 */
  --pl-fill: rgba(118, 118, 128, 0.12);     /* .tertiarySystemFill (selected nav item, hover) */
  --pl-chrome: rgba(249, 249, 249, 0.78);   /* chromeFill .material(.bar) */
  --pl-chrome-solid: #F9F9F9;    /* .bar without blur (fallback) */
  --pl-tint: rgba(0, 122, 255, 0.08);       /* systemBlue wash for call-outs */
  --pl-placeholder: #E5E5EA;     /* .systemGray5: empty video frame */
  --pl-placeholder-text: #515154; /* secondary text on the placeholder: >= 4.5:1 on .systemGray5 (secondaryLabel is 4.0) */

  /* Shape: ThemeTokens+Deep.swift `radii` (.native: control 9, panel 14, card 14, selection 10) and
     ThemeTokens+Layout.swift (capsules stay capsules in native). */
  --pl-radius-control: 9px;
  --pl-radius-panel: 14px;
  --pl-radius-card: 14px;
  --pl-radius-selection: 10px;
  --pl-radius-capsule: 999px;
  --pl-hairline: 0.5px;

  /* Shadows: nativeTokens.shadow = black 0.2, radius 16, y 6 (floating chrome). SwiftUI radius = CSS blur / 2
     (ThemeTokens+Deep.swift note), so blur 32px. Cards use a quieter version of the same shadow. */
  --pl-shadow-float: 0 6px 32px rgba(0, 0, 0, 0.2);
  --pl-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 32px rgba(0, 0, 0, 0.06);

  /* Motion: app/PaperProto/Theme/Motion.swift. Springs as `.spring(duration:bounce:)`, damping ratio 1 - bounce;
     sampled into CSS linear() until within 0.2 % of rest (no visible bounce), cubic-bezier fallback below.
       standard  .spring(0.5, 0.15)  -> 0.65 s     window .spring(0.35, 0.2) -> 0.45 s
       quick     .spring(0.2, 0.15)  -> 0.26 s     toggle .easeInOut(0.2)    -> 0.2 s */
  --pl-motion-standard-dur: 0.65s;
  --pl-motion-window-dur: 0.45s;
  --pl-motion-quick-dur: 0.26s;
  --pl-motion-toggle-dur: 0.2s;
  --pl-motion-standard-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pl-motion-window-ease: cubic-bezier(0.2, 0.85, 0.25, 1.02);
  --pl-motion-quick-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pl-motion-toggle-ease: cubic-bezier(0.42, 0, 0.58, 1);

  /* Black stage (promo/DESIGN_SYSTEM.md 1.2 and 7): shared with the promo film; the same in light and dark. */
  --pl-stage: #000000;           /* stage-void */
  --pl-stage-ink: #F5F5F7;       /* titles on the stage */
  --pl-stage-ink-2: #A1A1A6;     /* sub lines on the stage */
  --pl-stage-ink-3: #8E8E93;     /* notes on the stage (5.9:1 on black; the film's #6E6E73 is too dim for body text) */
  --pl-stage-key: #EAF1FF;       /* stage-key: the cool edge light */
  --pl-stage-edge: rgba(234, 241, 255, 0.2);  /* resting hairline lit by the edge light */
  --pl-capture: #FF9500;         /* ThemeTokens+Layout.swift:56 capture orange (wand ring, card frame) */
  --pl-capture-deep: #C25C00;    /* PaperPalette.swift:15 */
  --pl-wand-gold: #F5C542;       /* WandIcon.swift:53 */
  --pl-wand-ink: #CC991A;        /* WandInkStyle.swift:21 */
  --pl-wand-glow: #FFCC40;       /* WandInkStyle.swift:30 */

  /* Shared named curves (DESIGN_SYSTEM.md 3.1): magic = wand only; reveal = titles; sweep = light passes once. */
  --pl-motion-magic-dur: 0.55s;
  --pl-motion-magic-ease: cubic-bezier(0.3, 1.36, 0.5, 1);
  --pl-motion-reveal-dur: 0.9s;
  --pl-motion-reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pl-motion-sweep-dur: 1.2s;

  --pl-font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --pl-motion-standard-ease: linear(0, 0.048, 0.157, 0.292, 0.43, 0.556, 0.666, 0.757, 0.829, 0.884, 0.925, 0.955, 0.975, 0.989, 0.997, 1.003, 1.005, 1.006, 1.006, 1.006, 1.005, 1.004, 1.003, 1.002, 1);
    --pl-motion-window-ease: linear(0, 0.047, 0.158, 0.295, 0.436, 0.568, 0.682, 0.776, 0.851, 0.907, 0.948, 0.976, 0.995, 1.006, 1.012, 1.015, 1.015, 1.014, 1.012, 1.01, 1.008, 1.006, 1.004, 1.003, 1);
    --pl-motion-quick-ease: linear(0, 0.048, 0.157, 0.292, 0.43, 0.556, 0.666, 0.757, 0.829, 0.884, 0.925, 0.955, 0.975, 0.989, 0.997, 1.003, 1.005, 1.006, 1.006, 1.006, 1.005, 1.004, 1.003, 1.002, 1);
  }
}

/* ---------- Theme tokens (dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --pl-bg: #1C1C1E;              /* .secondarySystemBackground (dark) */
    --pl-card: #2C2C2E;            /* .material(.regular) over the backdrop, opaque approximation */
    --pl-label: #FFFFFF;           /* .label (dark) */
    --pl-secondary-label: #98989F; /* .secondaryLabel (dark): #EBEBF5 at 60 % over the card, opaque */
    --pl-accent: #0A84FF;          /* .systemBlue (dark) */
    --pl-accent-text: #409CFF;     /* accentText dark */
    --pl-button-fill: #0064D2;     /* darker system blue so the white label passes AA */
    --pl-on-accent: #FFFFFF;
    --pl-separator: rgba(84, 84, 88, 0.6);
    --pl-fill: rgba(118, 118, 128, 0.24);
    --pl-chrome: rgba(30, 30, 30, 0.75);
    --pl-chrome-solid: #1E1E1E;
    --pl-tint: rgba(10, 132, 255, 0.16);
    --pl-placeholder: #3A3A3C;     /* .systemGray5 (dark) */
    --pl-placeholder-text: #C7C7CC; /* .systemGray4 (light value): >= 4.5:1 on dark .systemGray5 */
    --pl-shadow-float: 0 6px 32px rgba(0, 0, 0, 0.2);
    --pl-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 32px rgba(0, 0, 0, 0.2);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; --pl-scroll-pad: 88px; scroll-padding-top: var(--pl-scroll-pad); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--pl-bg);
  color: var(--pl-label);
  font-family: var(--pl-font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--pl-motion-toggle-dur) var(--pl-motion-toggle-ease),
              color var(--pl-motion-toggle-dur) var(--pl-motion-toggle-ease);
}
a { color: var(--pl-accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--pl-accent); outline-offset: 2px; border-radius: var(--pl-radius-control);
}
/* Links inside a sentence: a 44 px tall touch area without moving any line (vertical padding on an inline box takes
   no room); the focus ring stays close to the words. */
main p a:not(.btn), .site-footer a:not(.home-link) { padding: 14px 0; }
main p a:not(.btn):focus-visible, .site-footer a:not(.home-link):focus-visible { outline-offset: -12px; }
img { max-width: 100%; height: auto; }

/* ---------- Capsule top bar (the app toolbar's floating capsule: glass, no outline, no shadow,
   ToolbarCapsuleStyle.swift) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 6px;
  transition: transform var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
/* site.js moves the bar out of the way while the pinned story plays (back on any scroll up, or when focused) */
.site-header.is-away { transform: translateY(-120%); }
.site-header.is-away:focus-within { transform: none; }
.site-header__inner {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between;
  padding: 4px 6px;
  background: var(--pl-chrome-solid);
  border-radius: var(--pl-radius-capsule);
  transition: background-color var(--pl-motion-toggle-dur) var(--pl-motion-toggle-ease);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header__inner {
    background: var(--pl-chrome);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 12px 0 6px;
  color: var(--pl-label); font-weight: 600; font-size: 17px;
  border-radius: var(--pl-radius-capsule);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 0.5px var(--pl-separator), 0 1px 3px rgba(0, 0, 0, 0.22); }
.nav { display: flex; flex-wrap: wrap; gap: 2px; font-size: 15px; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  color: var(--pl-label);
  border-radius: var(--pl-radius-capsule);
  transition: background-color var(--pl-motion-quick-dur) var(--pl-motion-quick-ease),
              color var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
.nav a:hover { background: var(--pl-fill); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--pl-button-fill); color: var(--pl-on-accent); font-weight: 600; }
/* English labels while the English part of the page is under the bar (site.js sets .is-en) */
.nav--en { display: none; }
.site-header.is-en .nav--zh { display: none; }
.site-header.is-en .nav--en { display: flex; }
@media (max-width: 560px) {
  /* one row: the icon alone is the brand, and the page you are on is not listed */
  .site-header { padding: 8px 8px 4px; }
  .site-header__inner { flex-wrap: nowrap; gap: 2px; padding: 4px; }
  .brand { min-width: 44px; padding: 0 7px; }
  .brand__name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav { flex-wrap: nowrap; gap: 0; font-size: 14px; }
  .nav a { padding: 0 9px; white-space: nowrap; }
  .nav a[aria-current="page"] { display: none; }
  html { --pl-scroll-pad: 72px; }
}
@media (max-width: 359.98px) { .nav { font-size: 13px; } .nav a { padding: 0 5px; } }

/* ---------- Layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.card {
  background: var(--pl-card);
  border: var(--pl-hairline) solid var(--pl-separator);
  border-radius: var(--pl-radius-panel);
  box-shadow: var(--pl-shadow-card);
  padding: 22px 24px; margin: 0 0 20px;
  transition: filter var(--pl-motion-quick-dur) var(--pl-motion-quick-ease),
              background-color var(--pl-motion-toggle-dur) var(--pl-motion-toggle-ease);
}
/* Content cards never lift (nothing in the app lifts a panel on hover): only a slight brighten. */
@media (hover: hover) {
  .card:hover { filter: brightness(1.03); }
}
@media (max-width: 560px) { .card { padding: 18px 18px; } }

h1, h2, h3 { font-weight: 600; line-height: 1.3; margin: 0 0 12px; }
/* Tighter tracking only for Latin headings; CJK keeps the native tracking 0 (ThemeTokens+Deep.swift). */
:lang(en) h1, :lang(en) h2, :lang(en) h3, h1:lang(en), h2:lang(en), h3:lang(en) { letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 700; }
@media (min-width: 768px) { h1 { font-size: 40px; } }
h2 { font-size: 22px; margin-top: 4px; }
.card > h2:not(:first-child) { margin-top: 28px; padding-top: 20px; border-top: var(--pl-hairline) solid var(--pl-separator); }
p, ul, ol { margin: 0 0 14px; }
ul { padding-left: 1.3em; }
li { margin-bottom: 6px; }
.lead { color: var(--pl-secondary-label); font-size: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  background: var(--pl-button-fill); color: var(--pl-on-accent);
  font-size: 17px; font-weight: 600;
  border-radius: var(--pl-radius-capsule);
  transition: transform var(--pl-motion-quick-dur) var(--pl-motion-quick-ease),
              box-shadow var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
.btn:hover { text-decoration: none; color: var(--pl-on-accent); }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 98, 204, 0.3); } }
.btn:active { transform: scale(0.97); }
blockquote {
  margin: 0 0 18px; padding: 14px 18px;
  background: var(--pl-tint);
  border-radius: var(--pl-radius-control);
}
blockquote p { margin: 0; font-weight: 600; }
.lang-sep { border: 0; border-top: var(--pl-hairline) solid var(--pl-separator); margin: 32px 8px; }

/* ---------- Landing page shell: the stage is full bleed, prose stays in the 760 px column ---------- */
.landing main { max-width: none; padding: 0; }
.landing .site-header { position: fixed; left: 0; right: 0; }
.page { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.br { display: block; text-wrap: pretty; }

/* Capsule top bar while it floats over the stage: the app's dark bar material. site.js clears .is-on-stage once
   the stage has scrolled past; without JS it stays dark, which reads on both. */
.site-header.is-on-stage .site-header__inner {
  background: rgba(30, 30, 30, 0.72);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16);
}
.site-header.is-on-stage .brand,
.site-header.is-on-stage .nav a { color: var(--pl-stage-ink); }
.site-header.is-on-stage .nav a:hover { background: rgba(118, 118, 128, 0.3); }
.site-header.is-on-stage .nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }

/* ---------- The stage (promo/DESIGN_SYSTEM.md 1.2, 7): true black; light only on edges; the screens are the
   brightest things. Same in light and dark mode. ---------- */
.stage {
  position: relative; overflow-x: clip;
  background: var(--pl-stage); color: var(--pl-stage-ink); color-scheme: dark;
  --pl-label: var(--pl-stage-ink);
  --pl-secondary-label: var(--pl-stage-ink-2);
  --pl-accent: #0A84FF;
  --pl-accent-text: #409CFF;
  --pl-button-fill: #0064D2;
  --pl-separator: rgba(255, 255, 255, 0.16);
}
.stage h1, .stage h2, .stage h3 { font-weight: 700; margin: 0; color: var(--pl-stage-ink); letter-spacing: 0.012em; line-height: 1.2; }
.stage:lang(en) h1, .stage:lang(en) h2, .stage:lang(en) h3 { letter-spacing: -0.022em; line-height: 1.12; }
/* Film title treatment: white falling to light grey. Gold is for the wand line only. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .display {
    background: linear-gradient(180deg, #FFFFFF 30%, #B4B8C4);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .display .gold {
    background: linear-gradient(180deg, #FFE9A6, var(--pl-wand-gold) 55%, var(--pl-wand-ink));
    -webkit-background-clip: text; background-clip: text;
  }
}
@media (forced-colors: active) {
  .display, .display .gold { background: none; -webkit-text-fill-color: currentColor; }
}
.stage .lead { color: var(--pl-stage-ink-2); font-size: clamp(1.0625rem, 1.55vw, 1.3125rem); line-height: 1.5; margin: 0; }
.stage .note { color: var(--pl-stage-ink-3); font-size: 15px; line-height: 1.65; margin: 14px 0 0; }
.stage .lead, .stage .note { text-wrap: pretty; }

.btn--stage { background: var(--pl-stage-ink); color: #000000; }
.btn--stage:hover { color: #000000; }
.btn--ghost { background: transparent; color: var(--pl-stage-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42); }
.btn--ghost:hover { color: var(--pl-stage-ink); }
@media (hover: hover) {
  .btn--stage:hover { box-shadow: 0 0 0 1px rgba(234, 241, 255, 0.5), 0 0 28px rgba(234, 241, 255, 0.28); }
  .btn--ghost:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
}
button.btn { border: 0; cursor: pointer; font-family: inherit; }
.btn[hidden] { display: none; }
/* The price line, word for word the film's end card. */
.hero__price, .endcard__price { margin: 0; color: var(--pl-stage-ink); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.02em; }
.hero__price:lang(en), .endcard__price:lang(en) { letter-spacing: 0; }

/* ---------- Hero: the film's frame. Wide: the copy sits in the black left half of the frame (the device is on the
   right). Narrow, or once the real video plays (its titles are burned in): copy and frame stack. ---------- */
.hero__frame { position: relative; max-width: 1920px; margin: 0 auto; display: flex; flex-direction: column; }
.hero__copy { position: relative; z-index: 2; padding: calc(96px + env(safe-area-inset-top, 0px)) 24px 12px; }   /* clear of the fixed bar */
@media (min-width: 561px) { .hero__copy { padding-top: calc(112px + env(safe-area-inset-top, 0px)); } }
/* "English" lands with the black stage flush to the top of the window, bar already in its English, on-stage state */
#en { scroll-margin-top: calc(-1 * var(--pl-scroll-pad)); }
.hero__title { font-size: clamp(2.5rem, 7vw, 7.5rem); margin: 0 0 0.3em; }
.hero .lead { max-width: 30em; margin-top: 0.6em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 20px; }

.promo { position: relative; margin: 0; }
.promo__frame { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: var(--pl-stage); }
.promo__placeholder { position: absolute; inset: 0; }
/* the still is the film's own frame on pure black, so it needs no mask: the device stands on the page's black */
.promo__placeholder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Ignition (film shot 2): the screen is dark for a moment, comes on a little too bright, and settles. Once, on
   load; the English hero does it when it is first seen (.is-in). The title's light sweep follows. */
@keyframes pl-ignite {
  0%, 28% { filter: brightness(0.05); }
  72% { filter: brightness(1.15); }
  100% { filter: brightness(1); }
}
html.js .hero[data-ignite] .promo__placeholder img { animation: pl-ignite calc(var(--pl-motion-sweep-dur) * 1.2) var(--pl-motion-toggle-ease) both; }
html.js .hero--en[data-ignite]:not(.is-in) .promo__placeholder img { animation: none; filter: brightness(0.05); }
.promo__soon-row {
  position: absolute; left: 0; right: 0; bottom: 3%; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0 10px; justify-content: center; align-items: center;
  color: var(--pl-stage-ink-3); font-size: 13px; letter-spacing: 0.04em;
}
/* scripts off, film delivered: the still stays, without a line that says the film is yet to come */
html:not(.js) .promo[data-promo-video="on"] .promo__soon-row { display: none; }
.promo__soon-row::before {
  content: ""; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.promo__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
@media (min-width: 600px) {
  /* the film's floor glow ends at the frame's sides: fade them into the black page so no rectangle shows */
  .promo__video, .promo__placeholder img {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  }
}
.promo[data-state="placeholder"] .promo__video,
.promo[data-state="placeholder"] .promo__controls,
.promo[data-state="placeholder"] .promo__big-play { display: none; }
.promo[data-state="video"] .promo__placeholder { display: none; }
.promo__video::cue {
  font-family: var(--pl-font); font-size: 17px; line-height: 1.4;
  color: #FFFFFF; background: rgba(0, 0, 0, 0.72);
}
/* Large centred play button: only over a real video, only while it is paused (Reduce Motion, autoplay blocked,
   click-to-play slot, or paused by the visitor). */
.promo__big-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border: 0; padding: 0; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  color: #FFFFFF; background: rgba(30, 30, 30, 0.6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(234, 241, 255, 0.35);
  border-radius: var(--pl-radius-capsule);
  transition: background-color var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
.promo__big-play svg { width: 36px; height: 36px; margin-left: 4px; }
.promo__big-play:hover { background: rgba(30, 30, 30, 0.75); }
.promo[data-state="video"][data-playing="false"] .promo__big-play { display: inline-flex; }
/* before the first play there is one play button (the large one): the control pill comes with the film */
.promo[data-state="video"][data-playing="false"]:not([data-started]) .promo__controls { display: none; }
@media (max-width: 599.98px) {
  /* phones: one play button while paused (the large one), not two */
  .promo[data-playing="false"] .promo__btn[data-action="play"] { display: none; }
}
/* phones after the first play: the browser's own controls (video.js), so no pill over the film's closing line */
.promo[data-native] .promo__controls, .promo[data-native] .promo__big-play { display: none !important; }
@media (min-width: 960px) {
  .scene--split:lang(en) h2 { font-size: clamp(1.75rem, 2.35vw, 2.125rem); }   /* stacked scenes: each English headline line fits the four-column copy */
  /* the scene after the story fits one screen: picture, headline and lead together */
  .scene--sync { padding-top: clamp(24px, 4vw, 56px); }
  .scene--sync .scene__media img { width: min(100%, calc(54vh * 16 / 9)); height: auto; margin: 0 auto; }   /* a width, so the lazy picture keeps its place before it loads */
}
@media (min-width: 860px) and (max-width: 1279.98px) and (min-aspect-ratio: 7/5) {
  html.flow-on .flow .scene .lead { font-size: 1rem; }       /* small laptops: the copy column is narrow */
}
.promo__controls {
  position: absolute; right: 12px; bottom: 12px;
  display: flex; gap: 4px; padding: 4px;
  background: rgba(30, 30, 30, 0.6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-radius: var(--pl-radius-capsule);
}
.promo__btn {
  width: 44px; height: 44px; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #FFFFFF;
  border-radius: var(--pl-radius-capsule);
  transition: background-color var(--pl-motion-quick-dur) var(--pl-motion-quick-ease),
              transform var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
.promo__btn:hover { background: rgba(255, 255, 255, 0.18); }
.promo__btn:active { transform: scale(0.94); }
.promo__btn svg { width: 22px; height: 22px; }
.promo__btn [data-when] { display: none; }
.promo__btn[hidden] { display: none; }
.promo__btn[aria-pressed="false"][data-action="captions"] { opacity: 0.6; }
.promo[data-playing="true"] .promo__btn [data-when="playing"],
.promo[data-playing="false"] .promo__btn [data-when="paused"],
.promo[data-muted="true"] .promo__btn [data-when="muted"],
.promo[data-muted="false"] .promo__btn [data-when="sound"] { display: inline; }

@media (max-width: 599.98px) {
  /* phones: the slot is the film's whole 16:9 frame at the page's width from the first paint (the still is the
     film's poster), so nothing is cropped and nothing changes size when the film is found or played */
  .promo { padding: 0 16px; }
  .promo .promo__frame { border-radius: var(--pl-radius-panel); }
}
@media (max-width: 959.98px) {
  /* stacked: copy first, the frame under it; a real video gets the card radius */
  .hero__copy { padding-bottom: 20px; }
  .promo[data-state="video"] { padding: 0 16px; }
  .promo[data-state="video"] .promo__frame { border-radius: var(--pl-radius-panel); }
  .promo__soon-row { bottom: 2%; }
}
@media (min-width: 960px) {
  .hero__frame { display: block; }
  /* the still's device begins 46 % across: the copy column and its headline end before it */
  .hero__copy, .hero.hero--en .hero__copy { position: absolute; left: 7.1%; bottom: 14%; width: 37.5%; padding: 0; }
  .hero:not([data-promo-state="video"]) .hero__title { font-size: clamp(2.5rem, 5.6vw, 6rem); }
  .promo__soon-row { left: 7.1%; right: auto; bottom: 5.5%; justify-content: flex-start; }
  .hero[data-promo-state="video"] .hero__frame { display: flex; flex-direction: column-reverse; }
  .hero[data-promo-state="video"] .hero__copy {
    position: relative; left: auto; bottom: auto; width: auto; padding: 40px 7.1% 0;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 48px; align-items: end;
  }
  /* keep the headline row in the first screen: the film never grows taller than the viewport minus that row */
  /* the film starts under the floating header (its device reaches the top of the frame) */
  .hero[data-promo-state="video"] .promo { width: min(100%, calc((100svh - 372px) * 16 / 9)); min-width: 720px; margin: 76px auto 0; }
  .hero[data-promo-state="video"] .hero__title { grid-row: 1 / span 3; margin: 0; }
  .hero[data-promo-state="video"] .hero__actions { margin: 18px 0 16px; }
}

/* ---------- Scenes: one film beat per row, in the film's order. This is the plain layout (no JS, or Reduce
   Motion); with motion allowed the same scenes play on one pinned stage (see "Scroll story"). The pictures are
   frames of the film's fixed-camera pass on pure black, so they stand on the stage without a card, a mask or a
   frame: the landscape device on the right, the copy on the left. Phones get the one-pane framing of the same
   frame (the <picture>'s narrow source). ---------- */
.wrap { max-width: 1248px; margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.scene { position: relative; }
.scene--split {
  max-width: 1248px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center;
  padding: clamp(16px, 3vw, 40px) 24px;
}
/* Edge light: a resting hairline above each scene, and one glint that crosses it the first time it is seen (sweep). */
.scene::before, .endcard::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--pl-stage-edge) 18%, var(--pl-stage-edge) 82%, transparent);
}
.scene::after, .endcard::after {
  content: ""; position: absolute; top: 0; left: 0; width: 30%; height: 1px; opacity: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--pl-stage-key) 60%, #FFFFFF 85%, transparent);
  box-shadow: 0 0 14px 1px rgba(234, 241, 255, 0.45);
}
html.js .sweep.is-in::after {
  animation: pl-sweep var(--pl-motion-sweep-dur) var(--pl-motion-reveal-ease) 0.1s both;
}
.scene--wand::after {
  background: linear-gradient(90deg, transparent, var(--pl-wand-glow) 60%, #FFE9A6 85%, transparent);
  box-shadow: 0 0 14px 1px rgba(255, 204, 64, 0.45);
}
@keyframes pl-sweep {
  0% { transform: translateX(-100%); opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(334%); opacity: 0; }
}
.scene__media { margin: 0; }
.scene__media img { display: block; width: 100%; height: auto; }
.scene--split .scene__media { grid-column: 5 / span 8; grid-row: 1; }
.scene--split .scene__copy { grid-column: 1 / span 4; grid-row: 1; }
/* After the story: the film's "any device" shot, as wide as the column, its copy centred under it. The still has
   a floor reflection and side light that run to its edge, so it is feathered into the stage. */
.scene--sync { max-width: 1248px; margin: 0 auto; padding: clamp(40px, 7vw, 96px) 24px clamp(24px, 4vw, 48px); }
.scene--sync .scene__media img {
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 98%), linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 80%, transparent 98%), linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}
@media (max-width: 599.98px) {   /* the phone's tall arrangement is already feathered tile by tile */
  .scene--sync .scene__media img { -webkit-mask-image: none; mask-image: none; }
}
.scene--sync .scene__copy { max-width: 760px; margin: -3% auto 0; text-align: center; position: relative; }
.scene--sync .kicker { justify-content: center; }
.scene--sync .lead, .scene--sync .note { margin-left: auto; margin-right: auto; }
.scene--sync .note { max-width: 36em; }
/* beat 06 on wide screens: the Pin's one-line label and the back button, enlarged from the same frames */
.scene .inset { display: none; margin: 16px 0 0; gap: 10px; flex-wrap: wrap; }
.scene .inset img { display: block; height: 44px; width: auto; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }
@media (min-width: 860px) and (min-aspect-ratio: 7/5) { .scene .inset { display: flex; } }
/* "The wand also reads": every handwritten wand command, grouped like the app's symbol card (Settings › Wand).
   Gold is the wand's colour; the glyph is what you write. One row per command: glyph | where you write it / what it does. */
.more { position: relative; text-align: center; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(16px, 3vw, 32px); }
.more .kicker { justify-content: center; margin-bottom: 26px; }
.more__groups { max-width: 1040px; margin: 0 auto; display: grid; gap: clamp(22px, 3vw, 32px); text-align: left; }
.more__group { min-width: 0; }
.stage .more__head {
  margin: 0 0 10px; padding-left: 4px; color: var(--pl-stage-ink-2); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; line-height: 1.4;
}
.more__list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.more__list li {
  margin: 0; padding: 10px 14px 10px 8px; min-width: 0;
  display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); column-gap: 10px; align-items: center; align-content: center;
  border-radius: var(--pl-radius-panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.07), transparent 60%);
}
.more__glyph {
  grid-row: 1 / span 2; justify-self: center; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3125rem; line-height: 1.2; font-style: italic; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
  color: var(--pl-wand-gold); text-shadow: 0 0 18px rgba(255, 204, 64, 0.4);
}
.more__glyph--svg svg { display: block; width: auto; height: 1.2em; filter: drop-shadow(0 0 6px rgba(255, 204, 64, 0.4)); }
.more__glyph--upright { font-style: normal; }   /* drawn strokes (a vertical line, a bracket, curved arrows) stay upright */
.more__glyph--sel { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.more__say { grid-column: 2; color: var(--pl-stage-ink-3); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.more__does { grid-column: 2; color: var(--pl-stage-ink); font-size: 1rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.more__note { max-width: 42em; margin: clamp(18px, 2.5vw, 26px) auto 0; color: var(--pl-stage-ink-3); font-size: 13px; line-height: 1.6; }

.scene h2 { font-size: clamp(2rem, 4vw, 3.75rem); margin: 0 0 0.4em; }
.scene--split h2 { font-size: clamp(1.75rem, 2.9vw, 2.625rem); }   /* a four-column copy beside the picture */
.scene .lead { max-width: 24em; }
.scene .note { max-width: 30em; }
/* the mark on scenes whose picture shows a demo web page: never hidden, also when the notes are (short phones) */
.stage .sim { margin: 10px 0 0; font-size: 12px; line-height: 1.4; letter-spacing: 0.04em; color: var(--pl-stage-ink-3); }
.stage .sim::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 0; border-radius: 50%; background: currentColor; opacity: 0.7; }
.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  color: var(--pl-stage-ink-2); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.kicker__no { color: var(--pl-stage-ink); }
.kicker__no::after { content: ""; display: inline-block; vertical-align: middle; width: 28px; height: 1px; margin-left: 10px; background: currentColor; opacity: 0.5; }
.kicker--wand, .kicker--wand .kicker__no { color: var(--pl-wand-glow); }
/* Wand badge (V3 "the wand lights up"): the app's own wand button, ring in capture orange. */
.wand-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 0 22px; border-radius: 50%;
  color: #1D1D1F; background: #FFF4E0;
  box-shadow: 0 0 0 3px var(--pl-capture), 0 0 26px rgba(255, 204, 64, 0.5);
}
.wand-badge svg { height: 36px; width: auto; }
html.js .wand-badge.reveal { opacity: 1; transform: none; box-shadow: 0 0 0 2px var(--pl-capture), 0 0 0 rgba(255, 204, 64, 0); filter: saturate(0.15) brightness(0.6); }
html.js .wand-badge.reveal.is-in {
  filter: none; box-shadow: 0 0 0 3px var(--pl-capture), 0 0 26px rgba(255, 204, 64, 0.5);
  animation: pl-magic var(--pl-motion-magic-dur) var(--pl-motion-magic-ease) 0.15s both;
  transition: filter var(--pl-motion-magic-dur) var(--pl-motion-toggle-ease) 0.15s, box-shadow var(--pl-motion-magic-dur) var(--pl-motion-toggle-ease) 0.15s;
}
@keyframes pl-magic { 0% { transform: scale(1); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* The English summary line: after the English end card, a quiet closing paragraph. */
.stage__intro { max-width: 808px; padding-top: 8px; padding-bottom: clamp(24px, 4vw, 48px); text-align: center; color: var(--pl-stage-ink-3); font-size: 15px; }
.stage__intro p { margin: 0; }
.hero[data-promo-state="video"] [data-promo-how] { background: transparent; color: var(--pl-stage-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42); }
.hero[data-promo-state="video"] [data-promo-how] + .btn--ghost { display: none; }

/* End card (film shot 12): mark, wordmark, the line. */
.endcard { position: relative; text-align: center; padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(24px, 4vw, 48px); }
.endcard img { width: 92px; height: 92px; border-radius: 21px; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.3), 0 0 70px rgba(120, 130, 160, 0.45); }
.endcard h2 { margin: 22px 0 18px; }
.endcard__name { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.022em; line-height: 1.1; }
.endcard__line { font-size: clamp(1.25rem, 2.4vw, 1.75rem); font-weight: 600; margin-top: 10px; }
.endcard__price { font-size: clamp(1.0625rem, 2vw, 1.3125rem); margin: 0 0 14px; }
.stage .endcard .note { margin: 0 0 22px; font-size: 15px; text-wrap: balance; color: var(--pl-stage-ink-3); }

/* Leaving the theatre: black falls to the paper backdrop, short and steep (promo/SITE_PLAN.md). Fine noise keeps the
   ramp from banding. */
.stage__exit, .stage__enter { position: relative; height: clamp(64px, 11vh, 112px); }
.stage__exit { background: linear-gradient(to bottom, #000000, color-mix(in srgb, var(--pl-bg) 22%, #000) 30%, color-mix(in srgb, var(--pl-bg) 78%, #000) 70%, var(--pl-bg)); }
.stage__enter { background: linear-gradient(to top, #000000, color-mix(in srgb, var(--pl-bg) 22%, #000) 30%, color-mix(in srgb, var(--pl-bg) 78%, #000) 70%, var(--pl-bg)); }
.stage__exit::after, .stage__enter::after {
  content: ""; position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay; 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='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 959.98px) {
  /* stacked: the device first, the copy under it (its floor light falls behind the first lines) */
  .scene--split { display: block; padding: 8px 0 48px; }
  .scene--split .scene__media { max-width: 760px; margin: 0 auto; }
  .scene--split .scene__copy { position: relative; max-width: 608px; margin: 0 auto; padding: 0 24px; text-align: left; }
}
@media (max-width: 599.98px) {
  .scene--split { padding-top: 20px; }
  .scene--split .scene__media { max-width: min(100%, 420px); margin-bottom: 14px; }
  .scene--sync .scene__copy { margin-top: 8px; text-align: left; }
  .scene--sync .kicker { justify-content: flex-start; }
  .scene--sync .lead, .scene--sync .note { margin-left: 0; }
}

/* ---------- Scroll reveals (site.js adds .is-in once; without JS, or with Reduce Motion, everything is simply
   there). Titles use `reveal`, pictures `standard`. ---------- */
html.js .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--pl-motion-reveal-dur) var(--pl-motion-reveal-ease), transform var(--pl-motion-reveal-dur) var(--pl-motion-reveal-ease);
}
html.js .reveal--late { transition-delay: 0.12s; }
html.js .reveal--later { transition-delay: 0.2s; }
html.js .reveal--media {
  transform: scale(0.98);
  transition: opacity var(--pl-motion-standard-dur) var(--pl-motion-toggle-ease), transform var(--pl-motion-standard-dur) var(--pl-motion-standard-ease);
}
html.js .reveal.is-in { opacity: 1; transform: none; }
/* Hero title: light crosses the words once and leaves them lit (sweep). */
html.js .hero__title.reveal {
  opacity: 1; transform: none;
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 45%, rgba(0, 0, 0, 0.12) 56%, rgba(0, 0, 0, 0.12) 100%);
  mask-image: linear-gradient(100deg, #000 0%, #000 45%, rgba(0, 0, 0, 0.12) 56%, rgba(0, 0, 0, 0.12) 100%);
  -webkit-mask-size: 320% 100%; mask-size: 320% 100%;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
}
html.js .hero__title.reveal.is-in { animation: pl-title-sweep var(--pl-motion-sweep-dur) var(--pl-motion-reveal-ease) 0.95s both; }
@keyframes pl-title-sweep {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
/* Depth: the stills drift a few pixels against the scroll (CSS scroll-driven, no JS; browsers without it show the
   still at rest). */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .scene__media img {
      animation-name: pl-drift; animation-timing-function: linear; animation-fill-mode: both;
      animation-timeline: view(); animation-range: entry 0% exit 100%;
    }
  }
}
@keyframes pl-drift { from { transform: translateY(26px); } to { transform: translateY(-26px); } }

/* Screenshots inside an FAQ answer */
details .shots { margin-top: 4px; }

/* ---------- Screenshots ---------- */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; margin: 0 0 14px;
}
.shots picture { display: block; scroll-snap-align: start; }
.shots img {
  display: block; width: 100%; height: auto; scroll-snap-align: start;
  border-radius: var(--pl-radius-control);
  border: var(--pl-hairline) solid var(--pl-separator);
}
@media (max-width: 560px) { .shots { grid-auto-columns: 72%; } }

/* ---------- FAQ cards (floating cards that open) ---------- */
details {
  background: var(--pl-card);
  border: var(--pl-hairline) solid var(--pl-separator);
  border-radius: var(--pl-radius-card);
  box-shadow: var(--pl-shadow-card);
  margin: 0 0 10px; padding: 0 18px;
  interpolate-size: allow-keywords;
  transition: filter var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
@media (hover: hover) { details:hover { filter: brightness(1.03); } }
.card details { box-shadow: none; background: var(--pl-bg); border-color: transparent; }
details::details-content {
  height: 0; overflow: clip; opacity: 0;
  transition: height var(--pl-motion-window-dur) var(--pl-motion-window-ease),
              opacity var(--pl-motion-toggle-dur) var(--pl-motion-toggle-ease),
              content-visibility var(--pl-motion-window-dur) allow-discrete;
}
details[open]::details-content { height: auto; opacity: 1; }
summary {
  cursor: pointer; list-style: none;
  min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; padding: 8px 0;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--pl-secondary-label); border-bottom: 2px solid var(--pl-secondary-label);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--pl-motion-quick-dur) var(--pl-motion-quick-ease);
}
details[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
details > p { padding-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { color: var(--pl-secondary-label); font-size: 14px; line-height: 1.7; }
.site-footer__inner {
  max-width: 760px; margin: 0 auto; padding: 8px 24px 40px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: var(--pl-hairline) solid var(--pl-separator);
  padding-top: 20px;
}
.site-footer a { color: var(--pl-accent-text); }
.home-link { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }

/* ---------- Scroll story (html.flow-on: set in the head when motion is allowed; site.js drives the variables).
   One stage stays pinned while the scenes scroll past as copy only. Picture and copy run on ONE clock, the scroll
   position inside each scene ("beat", 0 to 1): the beat's copy holds to 0.72 and fades by 0.82, the next copy
   arrives from 0.92. The picture is the film's fixed-camera pass (the device never moves; only its screen, the
   pencil and the floating windows change), drawn on a canvas one frame per scroll position, as tall as the stage.
   A point of light travels down the rail and turns gold while the wand is on. The stage fades before it lets go.
   Only opacity and transform change while scrolling.
   Variables: --in (stage arrives) and --out (stage leaves), --rp (rail), --g (gold) on .flow; --f (copy opacity) and
   --ty (keeps the copy in place once its scene's own stickiness ends) on each scene; --o on each plate.
   Without the class (no JS, Reduce Motion) the scenes above are the layout. ---------- */
.flow {
  position: relative; --g: 0; --rp: 0; --in: 0; --out: 1;
  --flow-vh: 1vh;
  --flow-edge: clamp(24px, 4vw, 96px);
  /* The frame (16:9; the device with its rim light is 95 % of the frame height wide, the frame ends 49.8 % of its
     height right of the device's centre) is as tall as the stage on very wide screens; on others it shrinks so the
     device keeps to 58 % of the width, and the device's centre line moves left so that the frame's right edge, and
     with it the whole device, stays 3 % inside the screen. site.js reads both from .flow__probe. */
  --flow-fh: min(calc(100 * var(--flow-vh)), 60.5vw);
  --flow-cx: min(72vw, calc(97vw - 0.5 * var(--flow-fh)));
  --flow-copy-left: calc(var(--flow-edge) + 56px);
  /* the copy column ends well before the landscape device (46.3 % of the stage height to each side of its centre)
     and the float that leaves the glass on its left in the wand scene (to about 52 %) */
  --flow-copy-w: min(var(--flow-copy-max, 700px), calc(var(--flow-cx) - 0.53 * var(--flow-fh) - var(--flow-copy-left) - 1vw));
}
@supports (height: 1svh) { .flow { --flow-vh: 1svh; } }
html.flow-on .flow { scroll-margin-top: calc(-1 * var(--pl-scroll-pad)); }   /* "how it works" lands exactly where the stage pins */
.flow__pin { display: none; }
html.flow-on .flow__pin {
  display: block; position: sticky; top: 0; height: calc(100 * var(--flow-vh)); overflow: hidden; pointer-events: none;
  opacity: calc(var(--in) * var(--out));
}
html.flow-on .flow__beats { position: relative; margin-top: calc(-100 * var(--flow-vh)); }
/* the light behind the device: cool, warming to gold through the wand scenes */
.flow__light {
  position: absolute; inset: 0;
  background:
    radial-gradient(42% 46% at var(--flow-cx) 48%, rgba(234, 241, 255, 0.10), transparent 70%),
    radial-gradient(60% 30% at var(--flow-cx) 100%, rgba(234, 241, 255, 0.05), transparent 70%);
}
.flow__light::after {
  content: ""; position: absolute; inset: 0; opacity: var(--g);
  background:
    radial-gradient(44% 48% at var(--flow-cx) 50%, rgba(245, 197, 66, 0.14), transparent 70%),
    radial-gradient(60% 30% at var(--flow-cx) 100%, rgba(255, 149, 0, 0.07), transparent 70%);
}
/* The plates (only when the frame sequence is not shown): the same frames as the canvas draws, cut to the device
   (79.63 % of the frame height, starting 8.33 % down, with room on the left for the passage the wand lifts), so they are placed to land exactly where the canvas has it.
   Their black is the page's black (`screen` lets the light behind show through), so there is nothing to feather. */
.flow__visual {
  position: absolute; left: 0; right: 0; top: 0; height: var(--flow-pic, 100%); overflow: hidden; mix-blend-mode: screen;
  transition: opacity var(--pl-motion-quick-dur) var(--pl-motion-toggle-ease);
}
.flow__probe { position: absolute; left: var(--flow-cx); top: 0; width: 0; height: var(--flow-fh); visibility: hidden; }
.flow__layer {   /* a plate starts 0.5579 frame heights left of the device's centre (room for the lifted passage) */
  position: absolute; left: calc(var(--flow-cx) - 0.5579 * var(--flow-fh)); aspect-ratio: 2280 / 1720;
  top: calc(50% - 0.5 * var(--flow-fh) + 0.08333 * var(--flow-fh)); height: calc(0.7963 * var(--flow-fh));
  opacity: var(--o, 0); will-change: opacity;
}
.flow__layer img { display: block; width: 100%; height: 100%; max-width: none; }
/* frame sequence (data-flow-sequence="on"): a canvas over the whole stage takes over from the plates once its key
   frames are in. site.js draws each frame as tall as the stage with the device on the same centre line. */
.flow__canvas {
  position: absolute; left: 0; top: 0; width: 100%; height: var(--flow-pic, 100%); display: block; opacity: 0; mix-blend-mode: screen;
  /* when the frame is shorter than the stage, a pencil that leaves the frame fades out instead of ending on a line */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  transition: opacity var(--pl-motion-quick-dur) var(--pl-motion-toggle-ease);
}
.flow.is-seq .flow__canvas { opacity: 1; transition: none; }
.flow.is-seq .flow__layer { opacity: 0; }
/* chapter rail: the light that travels down the story; it carries the scene numbers */
.flow__rail {
  position: absolute; left: var(--flow-edge); top: 48.5%; width: 40px; height: min(52vh, 440px); transform: translateY(-50%);
}
.flow__rail::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.14); }
.flow__rail-fill {
  position: absolute; left: 4px; top: 0; width: 1px; height: 100%; transform-origin: 50% 0; transform: scaleY(var(--rp));
  background: linear-gradient(transparent, var(--pl-stage-key));
}
.flow__rail-dot {
  position: absolute; left: 0; top: 0; width: 9px; height: 100%; transform: translateY(calc(var(--rp) * 100%));
}
.flow__rail-dot::before, .flow__rail-dot::after {
  content: ""; position: absolute; left: 0; top: -4.5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--pl-stage-key); box-shadow: 0 0 12px 2px rgba(234, 241, 255, 0.5);
}
.flow__rail-dot::after { background: var(--pl-wand-gold); box-shadow: 0 0 14px 3px rgba(245, 197, 66, 0.75); opacity: var(--g); }
.flow__tick {
  position: absolute; left: 18px; top: calc(var(--at) * 100%); transform: translateY(-50%);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  color: var(--pl-stage-ink-2); opacity: calc(0.74 + var(--f, 0) * 0.26);
}
.flow__tick::before { content: ""; position: absolute; left: -15px; top: 50%; width: 5px; height: 1px; background: currentColor; }

/* The beats: a scene's height is how long its beat lasts. The copy is a full-stage panel that sticks at the top, its
   lines centred on the device's centre. */
/* A beat lasts 125 screen heights of scroll (--flow-beat). The scene's box is one screen taller than that and the
   next scene is pulled up over the extra screen, so the sticky copy stays pinned by CSS alone for the whole beat.
   (Holding it with a scroll-driven transform instead makes it shake on phones, where scrolling runs ahead of scripts.) */
html.flow-on .flow .scene {
  display: block; max-width: none; margin: 0 0 calc(-100 * var(--flow-vh)); padding: 0;
  height: calc((var(--flow-beat, 125) + 100) * var(--flow-vh));
}
html.flow-on .flow .scene--source { --flow-beat: 145; }                                 /* the longest beat: fold, jump, and back */
html.flow-on .flow .scene:last-child { height: calc(225 * var(--flow-vh)); margin-bottom: 0; }   /* its beat plus the screen the stage lets go on */
html.flow-on .flow .scene::before, html.flow-on .flow .scene::after { display: none; }
html.flow-on .flow .scene .scene__media { display: none; }   /* the picture plays on the pinned stage instead */
html.flow-on .flow .scene .scene__copy {
  position: sticky; top: 0; box-sizing: border-box; height: calc(100 * var(--flow-vh));
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  width: var(--flow-copy-w); max-width: none; margin: 0 0 0 var(--flow-copy-left); padding: 0 0 calc(3 * var(--flow-vh));
  text-align: left; opacity: var(--f, 0); transform: translate3d(0, var(--ty, 0px), 0); will-change: opacity, transform;
}
html.flow-on .flow .flow__beats .scene .scene__copy > * { opacity: 1; transform: none; transition: none; animation: none; filter: none; }
html.flow-on .flow .flow__beats .scene .scene__copy > .wand-badge { box-shadow: 0 0 0 3px var(--pl-capture), 0 0 26px rgba(255, 204, 64, 0.5); }
html.flow-on .flow .scene h2 { font-size: clamp(1.75rem, min(5vw, calc(var(--flow-copy-w) * 0.092)), 5rem); }
html.flow-on .flow .scene:lang(zh-Hant) h2 { font-size: clamp(1.75rem, min(5vw, calc(var(--flow-copy-w) * 0.118)), 5rem); }
html.flow-on .flow .scene .kicker { justify-content: flex-start; }
html.flow-on .flow .scene .lead, html.flow-on .flow .scene .note { margin-left: 0; margin-right: 0; }
@media (min-width: 1800px) {
  /* very wide screens: the column moves out and the headings get more room */
  .flow { --flow-copy-max: 860px; }
  html.flow-on .flow .scene h2, html.flow-on .flow .scene:lang(zh-Hant) h2 { font-size: clamp(2rem, min(5vw, calc(var(--flow-copy-w) * 0.118)), 6rem); }
  html.flow-on .flow .scene:lang(en) h2 { font-size: clamp(2rem, min(5vw, calc(var(--flow-copy-w) * 0.092)), 6rem); }
}
@media (min-width: 860px) and (min-aspect-ratio: 7/5) {
  html.flow-on .flow .kicker__no { display: none; }          /* the rail carries the numbers here */
}

@media (max-width: 859.98px), (max-aspect-ratio: 7/5) {
  /* portrait tablets (and phones, refined below): the whole device is pinned in the upper part, centred, as tall
     as that part allows; the copy's first line sits just under the device */
  /* the device is 2 % right of the square frame's centre: the frame's centre line sits at 48vw so both bezels keep the same gutter */
  .flow { --flow-pic: min(calc(70 * var(--flow-vh)), 94vw); --flow-fh: var(--flow-pic); --flow-cx: calc(50vw - 0.0204 * var(--flow-pic)); --flow-line: calc(var(--flow-pic) * 0.9); }
  /* the square frame ends right at the device's right bezel: fade that side so the rim light is not cut in a straight line */
  .flow__visual, .flow__canvas {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent), linear-gradient(to right, #000 calc(var(--flow-cx) + 0.478 * var(--flow-pic)), transparent calc(var(--flow-cx) + 0.5 * var(--flow-pic)));
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent), linear-gradient(to right, #000 calc(var(--flow-cx) + 0.478 * var(--flow-pic)), transparent calc(var(--flow-cx) + 0.5 * var(--flow-pic)));
    mask-composite: intersect;
  }
  .flow__light { background: radial-gradient(80% 34% at 50% 30%, rgba(234, 241, 255, 0.10), transparent 70%); }
  .flow__light::after { background: radial-gradient(84% 36% at 50% 32%, rgba(245, 197, 66, 0.14), transparent 70%); }
  .flow__rail { left: max(14px, calc(50vw - 316px)); top: calc(var(--flow-line) + 4px); width: 10px; height: calc(26 * var(--flow-vh)); transform: none; }
  .flow__tick { display: none; }
  html.flow-on .flow .scene .scene__copy {
    justify-content: flex-start; align-items: stretch; width: auto; margin: 0;
    padding: var(--flow-line) max(24px, calc(50vw - 280px)) 0 max(44px, calc(50vw - 280px));
  }
  html.flow-on .flow .scene h2, html.flow-on .flow .scene:lang(zh-Hant) h2 { font-size: clamp(2rem, 6vw, 3.25rem); margin-bottom: 0.3em; }
  html.flow-on .flow .scene .kicker { margin-bottom: 10px; }
  html.flow-on .flow .scene .lead { font-size: 1.0625rem; line-height: 1.45; }
  html.flow-on .flow .scene .note { font-size: 14px; line-height: 1.55; margin-top: 10px; }
  html.flow-on .flow .scene .wand-badge { position: absolute; right: max(24px, calc(50vw - 280px)); top: calc(var(--flow-line) - 8px); width: 40px; height: 40px; margin: 0; }
  html.flow-on .flow .scene .wand-badge svg { height: 26px; }
}
@media (max-width: 599.98px) {
  /* phones: one pane of the device at a time (a 3:4 picture, as wide as the screen when the height allows); the
     copy starts right under it */
  .flow { --flow-pic: min(calc(60 * var(--flow-vh)), 133.34vw); --flow-line: calc(var(--flow-pic) + 14px); --flow-half: calc(0.375 * var(--flow-pic)); --flow-cx: 50vw; }   /* a phone frame is drawn whole in the middle, where its soft edges are */
  /* the picture fades out at the bottom and at its two sides, so where a short screen leaves it narrower than the
     screen there is no hard cut through the device */
  .flow__visual, .flow__canvas {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 2.5%, #000 97.5%, transparent), linear-gradient(to right, transparent calc(50% - var(--flow-half)), #000 calc(50% - var(--flow-half) + 16px), #000 calc(50% + var(--flow-half) - 16px), transparent calc(50% + var(--flow-half)));
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent, #000 2.5%, #000 97.5%, transparent), linear-gradient(to right, transparent calc(50% - var(--flow-half)), #000 calc(50% - var(--flow-half) + 16px), #000 calc(50% + var(--flow-half) - 16px), transparent calc(50% + var(--flow-half)));
    mask-composite: intersect;
  }
  .flow__layer { top: 0; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 3 / 4; }
  html.flow-on .flow .scene h2, html.flow-on .flow .scene:lang(zh-Hant) h2 { font-size: clamp(1.625rem, 7.2vw, 2.25rem); }
  html.flow-on .flow .scene .lead { font-size: 1rem; }
  html.flow-on .flow .scene .note { font-size: 13px; line-height: 1.5; margin-top: 8px; }
  html.flow-on .flow .scene .wand-badge { top: var(--flow-line); }
}
/* Phones: the story is a deck, not a long scroll. The story box is one screen tall and scrolls inside itself with
   mandatory snap, one beat per screen, so one swipe moves exactly one beat (snap-stop: no flick skips one). The
   stage stays pinned inside the box, each beat's copy too (as on wide screens), and site.js plays the beat's frames
   over time when it arrives. Snap marks are separate one-screen elements (site.js adds them): the scenes
   themselves are taller than the box, and an area taller than the box would allow free scrolling inside it.
   The page around the box scrolls normally; near the box it settles with the box filling the screen (proximity),
   and a swipe at the first or last beat goes on to the page. */
.flow__snap { display: none; }
@media (max-width: 599.98px) {
  html.flow-on { scroll-snap-type: y proximity; }
  html.flow-on .flow {
    height: calc(100 * var(--flow-vh)); overflow: hidden auto; scroll-snap-type: y mandatory; pointer-events: none;
    scroll-snap-align: start; overscroll-behavior-y: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
  }
  /* the box takes swipes only while it fills the screen (site.js: is-live); otherwise they go through it and scroll
     the page. (Switching its overflow instead leaves Mobile Safari with a box that looks scrollable and is not.) */
  html.flow-on .flow.is-live { pointer-events: auto; }
  html.flow-on .flow::-webkit-scrollbar { display: none; }
  html.flow-on .flow .scene, html.flow-on .flow .scene--source { --flow-beat: 100; }
  html.flow-on .flow .scene:last-child { height: calc(100 * var(--flow-vh)); }
  html.flow-on .flow .flow__snap {
    display: block; position: absolute; left: 0; top: calc(var(--k) * 100 * var(--flow-vh)); width: 1px;
    height: calc(100 * var(--flow-vh)); pointer-events: none; scroll-snap-align: start; scroll-snap-stop: always;
  }
  /* where in the nine: a small count under the picture, right side (the wand badge sits there on wand beats) */
  html.flow-on .flow .flow__count {
    position: absolute; left: max(14px, calc(50vw - 316px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); margin: 0;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: rgba(245, 245, 247, 0.55); font-variant-numeric: tabular-nums;
  }
}
.flow__clip { display: none; }
@media (max-width: 599.98px) {
  /* the deck's film (site.js "Phone deck film") lies exactly where the canvas draws a phone frame, with the same
     soft edges; it is only visible while it plays a beat or rests on the beat's last picture, and the canvas is
     hidden then. Hidden is 1 % and not 0: Safari stops presenting the pictures of a fully transparent film, and
     the film is only swapped in once a picture of the beat has been presented */
  html.flow-on .flow .flow__clip {
    display: block; position: absolute; top: 0; left: calc(var(--flow-cx) - 0.375 * var(--flow-fh));
    width: calc(0.75 * var(--flow-fh)); height: var(--flow-fh); object-fit: fill; opacity: 0.01; mix-blend-mode: screen; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 2.5%, #000 97.5%, transparent), linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, transparent, #000 2.5%, #000 97.5%, transparent), linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    mask-composite: intersect;
  }
  html.flow-on .flow .flow__clip.is-on { opacity: 1; }
  /* (not 0: Safari drops a fully transparent layer and needs a frame to bring it back, which showed as one blank
     picture when a swipe took the clip away) */
  html.flow-on .flow.is-clip .flow__canvas, html.flow-on .flow.is-clip .flow__visual { opacity: 0.01; }
}
@media (min-width: 600px) { .flow__count { display: none; } }
html:not(.flow-on) .flow__count { display: none; }
@media (max-width: 599.98px) and (max-height: 739.98px) {
  /* short phones: the picture takes more of the height so it nearly fills the width */
  .flow { --flow-pic: min(calc(68 * var(--flow-vh)), 133.34vw); }
  html.flow-on .flow .scene h2, html.flow-on .flow .scene:lang(zh-Hant) h2 { font-size: clamp(1.375rem, 6.4vw, 1.75rem); }
  html.flow-on .flow .scene .lead { font-size: 0.875rem; line-height: 1.4; margin-top: 6px; }
  html.flow-on .flow .scene .sim { margin-top: 6px; }
  html.flow-on .flow .scene .note { display: none; }           /* short phones: headline and lead only */
}

@media (max-width: 599.98px) and (max-height: 599.98px) {
  .flow { --flow-pic: min(calc(63 * var(--flow-vh)), 133.34vw); }      /* the smallest phones: room for three lines of lead */
}

/* ---------- Reduced motion: every transition and animation off; reveals, sweeps and drift show their end state ---------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --pl-motion-standard-dur: 0s;
    --pl-motion-window-dur: 0s;
    --pl-motion-quick-dur: 0s;
    --pl-motion-toggle-dur: 0s;
    --pl-motion-magic-dur: 0s;
    --pl-motion-reveal-dur: 0s;
    --pl-motion-sweep-dur: 0s;
  }
  *, *::before, *::after, ::details-content { animation: none !important; transition: none !important; }
  .btn:hover, .btn:active, .promo__btn:active { transform: none; }
  html.js .reveal, html.js .reveal--media { opacity: 1; transform: none; }
  html.js .hero__title.reveal { -webkit-mask-image: none; mask-image: none; }
  html.js .hero[data-ignite] .promo__placeholder img { filter: none; }
  html.js .wand-badge.reveal { filter: none; box-shadow: 0 0 0 3px var(--pl-capture), 0 0 26px rgba(255, 204, 64, 0.5); }
}
