/* The Combo Notch 3D page (test site only, /notch-3d): website/notch3d. A near-black stage: purple only in the UI
   (buttons, HUD bar, ruler tick, loader dot, label pill); every other colour comes from the recordings, the LED wall
   and the painting. Headings in Archivo ExtraCondensed capitals, words in Poppins.
   3D (html.n3-3d): layers, back to front: the big type, the canvas, the words, the HUD and ruler, the header, the loader.
   Flat (html.n3-flat, or no script): the brief's flat design, the words in order, each beside its recording in a screen
   frame. Rules without .n3-3d are the flat page's. */

/* No one-word last lines in the paragraphs. */
.theme-3d p { text-wrap: pretty; }

/* The display face: Archivo ExtraCondensed ExtraBold, a subset of the page's own headings (fonts/, OFL). The 3D path
   loads it before the reveal (main.js), so headings never change typeface on screen; the flat page doesn't use it. */
@font-face {
  font-family: "Archivo ExtraCondensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/archivo-extracondensed-800.04a2bc7d81.woff2") format("woff2");
}

/* Poppins as small woff2 subsets of this page's text. Declared after the site's TTF faces, so these win and the TTFs
   are never fetched here. While they load, a metric-matched Arial stands in, so the swap moves nothing. */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/poppins-400.1b7ad036f0.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/poppins-600.82587df645.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/poppins-700.23a99a0059.woff2") format("woff2"); }
@font-face {
  font-family: "Poppins Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  ascent-override: 93.62%; descent-override: 31.21%; line-gap-override: 8.92%; size-adjust: 112.16%;
}
body.theme-3d, .theme-3d button, .theme-3d input, .theme-3d .button { font-family: Poppins, "Poppins Fallback", "Segoe UI", system-ui, sans-serif; }

/* One neutral pool of light behind the laptop; nothing purple or orange in the air. */
/* (Under a faint grain, 0 to 2 levels of white: on its own the glow banded into rings on good screens.) */
body.theme-3d::before {
  background: url(/assets/grain.b13f8425f5.png), radial-gradient(46vmax 34vmax at 50% 40%, rgba(255, 255, 255, 0.035), transparent 70%);
  animation: none;
  opacity: var(--glow, 1);
}

html.n3-3d, html.n3-3d body { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
/* hidden, not clip: the page can still be moved to a #link under the loader. */
.lenis.lenis-stopped { overflow: hidden; }

.theme-3d .site-header {
  position: fixed; left: 0; right: 0;
  /* No repeat: the gradient would start again in the 1 px border row and draw a dark line across the picture. */
  background: linear-gradient(rgba(13, 13, 20, 0.72), rgba(13, 13, 20, 0)) no-repeat border-box;
  border-bottom-color: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
/* In the story the menu bar slides away while scrolling down, so the notch hangs from the top of the browser like on
   a real Mac (story.js). It comes back on scrolling up, at the top edge, and for the keyboard. */
.theme-3d .site-header.n3-nav-hidden { transform: translateY(-130%); opacity: 0; }
/* Over the 3D nothing blurs what's behind it: the glass buttons and the floating menu pill are solid instead.
   (As heavy as site.css's glass buttons, (0,5,0), plus the page's own class, so these win.) */
.n3-3d :is(.n3-hero, .n3-end, .site-header) .button:not(.primary):not(.premium):not(.plus):not(.soon) { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: rgba(13, 13, 20, 0.9); }
.n3-3d :is(.n3-hero, .n3-end, .site-header) .button:not(.primary):not(.premium):not(.plus):not(.soon):hover { background-color: rgba(30, 30, 46, 0.95); }
@supports (animation-timeline: scroll()) {
  @media (min-width: 761px) {
    .n3-3d .site-header .page { animation-name: n3-header-float; }
  }
}
@keyframes n3-header-float {
  from {
    max-width: var(--page); min-height: var(--header-height); margin-top: 0; padding-left: 20px; padding-right: 20px;
    background-color: rgba(13, 13, 20, 0); border-color: rgba(255, 255, 255, 0);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0), inset 0 1px 0 rgba(255, 255, 255, 0);
  }
  to {
    max-width: min(1000px, calc(100% - 32px)); min-height: 52px; margin-top: 6px; padding-left: 16px; padding-right: 7px;
    background-color: rgba(13, 13, 20, 0.9); border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}
.theme-3d .site-header.n3-nav-hidden:focus-within { transform: none; opacity: 1; }
/* Once the hero's words have gone, the menu bar's button is the solid purple one. */
/* (Heavier than the solid buttons rule above, so it stays purple.) */
.theme-3d .site-header.n3-nav-solid .button.small:not(.primary):not(.premium):not(.plus):not(.soon) { color: #fff; background: #7c3aed; border-color: transparent; box-shadow: none; }
.theme-3d .site-header.n3-nav-solid .button.small:not(.primary):not(.premium):not(.plus):not(.soon):hover { background: #8b5cf6; }
.theme-3d .site-footer { position: relative; z-index: 3; margin-top: 0; }

/* ---------------------------------------------------------------- the loader: the closed notch, counting */

.n3-loader { position: fixed; inset: 0; z-index: 100; animation: n3-give-up 0.4s ease 7s forwards; }
.n3-3d .n3-loader { animation: none; }
.n3-flat .n3-loader { display: none; }
@keyframes n3-give-up { to { opacity: 0; visibility: hidden; } }
/* The site turns animations off for reduced motion, which would cancel the give-up: never a stuck black screen. */
@media (prefers-reduced-motion: reduce) { html:not(.n3-3d) .n3-loader { display: none; } }

/* Centred with a transform, so as it opens only its size changes (its edge moving would count as a layout shift). */
.n3-pill {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 196px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  border-radius: 0 0 18px 18px;
  /* Everything outside the notch is the page's colour: as the notch opens, the page appears inside it. */
  box-shadow: 0 0 0 200vmax #0d0d14;
}
.n3-count {
  display: inline-flex; align-items: center; gap: 10px;
  /* The app's own notch text size, in the same monospace. */
  font: 600 13.5px/1 ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace;
  letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.9);
  font-variant-numeric: tabular-nums;
}
.n3-count::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #8b5cf6; box-shadow: 0 0 10px #8b5cf6;
}

/* ---------------------------------------------------------------- the big type (under the canvas) */

.n3-type { display: none; }
.n3-3d .n3-type {
  position: fixed; inset: 0; z-index: 0;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 17vh;
  pointer-events: none; will-change: transform, opacity;
}
.n3-type-line {
  display: flex; overflow: hidden; padding: 0 0.04em;
  font: 700 12.4vw/0.85 Poppins, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.04em; text-transform: uppercase; white-space: nowrap;
}
/* The logotype: one quiet solid tone with crisp edges (decorative, so it doesn't need text contrast). */
.n3-type .ch { display: inline-block; padding-bottom: 0.06em; color: #29263d; }
.n3-type .sp { width: 0.24em; }

/* ---------------------------------------------------------------- the canvas, the HUD and the ruler */

.n3-canvas { display: none; }
.n3-3d .n3-canvas {
  display: block; position: fixed; left: 0; top: 0; width: 100%; z-index: 1; pointer-events: none;
  /* The large viewport: a phone's toolbar coming and going doesn't resize it. */
  height: 100vh; height: 100lvh;
}

.n3-hud, .n3-ruler { display: none; }
/* The recordings live in the page (hidden): Safari plays them more reliably there. */
.n3-videos { position: fixed; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.n3-videos video { width: 1px; height: 1px; }
/* Pause / Play for the moving pictures (3D only; the flat page has one per recording). */
.n3-pause { display: none; }
.n3-3d .n3-pause {
  display: inline-flex; align-items: center; position: fixed; z-index: 4;
  right: calc(clamp(20px, 4vw, 64px) + env(safe-area-inset-right)); bottom: calc(76px + env(safe-area-inset-bottom));
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 10, 16, 0.72); color: #fff; font: 600 13px/1 Poppins, "Poppins Fallback", system-ui, sans-serif; cursor: pointer;
}
.n3-3d .n3-pause:hover { background: rgba(30, 30, 46, 0.9); }
.n3-3d:not(.n3-ready) .n3-pause, .n3-3d.n3-below-top .n3-pause { visibility: hidden; }
.n3-3d .n3-hud {
  position: fixed; right: clamp(20px, 4vw, 64px); bottom: 28px; z-index: 3;
  display: flex; align-items: center; gap: 14px; opacity: 0; pointer-events: none;
  padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(13, 13, 20, 0.7);
  font: 600 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text3);
}
.n3-3d .n3-hud-label { color: rgba(255, 255, 255, 0.78); }
.n3-hud-num { color: #fff; font-size: 28px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.n3-hud-bar { width: 120px; height: 2px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.n3-hud-bar i { display: block; height: 100%; background: var(--accent-text); transform-origin: left center; transform: scaleX(0); }

/* A thin progress ruler at the right while the feature arc turns. */
.n3-3d .n3-ruler {
  display: block; position: fixed; right: clamp(20px, 4vw, 64px); bottom: calc(156px + env(safe-area-inset-bottom)); z-index: 3;
  opacity: 0; pointer-events: none;
}
.n3-ruler ol { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid rgba(255, 255, 255, 0.16); display: grid; gap: 18px; }
.n3-ruler li {
  position: relative; font: 600 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); transition: color 0.4s var(--spring);
}
.n3-ruler li::before {
  content: ""; position: absolute; left: -17px; top: -4px; width: 1px; height: 19px;
  background: var(--accent-text); transform: scaleY(0); transition: transform 0.4s var(--spring);
}
.n3-ruler li.on { color: #fff; }
.n3-ruler li.on::before { transform: scaleY(1); }

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

.n3-runway { position: relative; z-index: 2; }
.n3-3d .n3-runway { height: 1518vh; } /* story.js sets it: 1012 story vh (the page below from 945) at 1.5 vh of scroll each (PACE) */
.n3-wide { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 64px); }

.n3-hero { position: relative; isolation: isolate; padding: calc(var(--header-height) + 48px) 0 24px; }
/* In the 3D the hero's words are held on the screen, like the chapters': they don't scroll into the laptop, they
   leave on their own clock at 30 (story.js). */
.n3-3d .n3-hero { position: fixed; left: 0; right: 0; top: 0; height: 100vh; min-height: 0; display: flex; align-items: flex-end; padding-bottom: 6vh; }
/* The condensed capitals get a little more room between words. */
.n3-3d .n3-hero h1, .n3-3d .n3-chapter h2, .n3-3d .n3-after h2 { word-spacing: 0.06em; }
.n3-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px min(6vw, 96px); align-items: end; }
.n3-hero-more { max-width: 560px; justify-self: end; }
/* The hero's words leave as the laptop opens (story.js): then they can't be clicked where they were. Keyboard focus
   on a hero button brings them all back, even after they've gone. */
.n3-3d .n3-hero-grid.n3-hero-out { pointer-events: none; }
.n3-3d .n3-hero-grid:focus-within { pointer-events: auto; }
.n3-3d .n3-hero-grid:focus-within [data-reveal] { opacity: 1 !important; visibility: visible !important; transform: none !important; }
.n3-3d .n3-hero-grid:focus-within .line > span { transform: none !important; }
.n3-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--accent-text);
  background: rgba(124, 58, 237, 0.12); border: 1px solid rgba(183, 156, 255, 0.28);
}
.n3-hero h1 {
  margin: 18px 0 0; max-width: 13em; color: #fff;
  font-size: clamp(32px, 3.6vw, 60px); font-weight: 600; line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance;
}
.n3-3d .n3-hero h1 {
  max-width: 11em;
  /* (0.94, not 0.88: at 0.88 the comma after MUSIC hung just over the I of FILES on the next line.) */
  font: 800 clamp(40px, 5.2vw, 92px)/0.94 "Archivo ExtraCondensed", Poppins, sans-serif;
  letter-spacing: -0.005em; text-transform: uppercase;
}
.n3-lead { max-width: 34em; font-size: clamp(15px, 1.12vw, 18px); color: var(--text2); }
.n3-hero .buttons { margin-top: 24px; }
.n3-small { margin-top: 18px; font-size: 13px; color: var(--text3); }
.n3-3d:not(.n3-ready) [data-reveal] { visibility: hidden; }
/* The 3D hero is laid out only once its fonts are in (main.js): it can't shift under the loader as they arrive. */
.n3-3d:not(.n3-fonts) .n3-hero { display: none; }

/* ---------------------------------------------------------------- the chapters */

.n3-chapter { padding: clamp(48px, 7vw, 104px) 0; }
.n3-chapter h2 { text-wrap: balance; }
.n3-chapter p { max-width: 34em; margin-top: 16px; color: var(--text2); }
.n3-chapter h3 { margin-top: 26px; font-size: 20px; color: #fff; }
.n3-chapter h3 + p { margin-top: 8px; }
.n3-note { font-size: 14px; color: var(--text3) !important; }

/* In the 3D: each chapter sits at its place in the runway (story.js), so #links land on it, and its words are held on
   the screen, at the bottom left: they don't move or fade with the scroll, they arrive and leave on their own clock, line
   by line (story.js), so the words and the 3D always move together. */
.n3-3d .n3-chapter { position: absolute; left: 0; right: 0; padding: 0; opacity: 0; pointer-events: none; }
.n3-3d.n3-ready .n3-chapter { opacity: 1; }
.n3-3d .n3-chapter-in { position: fixed; inset: 0; display: flex; align-items: flex-end; padding-bottom: 9vh; }
/* A soft dark gradient behind the chapters' words, so they read over the picture, the LED wall and the painting: one
   layer under all of them (each chapter's words are a fixed layer of their own), fading with the scroll (story.js). */
.n3-3d .n3-runway::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: var(--scrim, 0);
  background: radial-gradient(82vw 88vh at 0% 100%, rgba(10, 10, 16, 0.95), rgba(10, 10, 16, 0.85) 40%, rgba(10, 10, 16, 0.45) 64%, transparent 82%);
}
.n3-3d .n3-chapter-grid { display: block; }
/* The chapters' words: from 6vw, at most 32vw wide (the arc's front panel takes the rest, 6vw clear of them). */
.n3-3d .n3-chapter-in .n3-wide { max-width: none; padding-left: 6vw; }
.n3-3d .n3-chapter-copy { max-width: min(32vw, 560px); }
/* The LED and wallpaper chapters have no panel beside them: Milestone 4's wider column, so "A MESSAGE / ON THE
   NOTCH" stays two lines. */
@media (min-width: 761px) {
  .n3-3d :is(.n3-ch-message, .n3-ch-wallpapers) .n3-chapter-copy { max-width: min(36vw, 600px); }
  /* The hero's words start where the story's do, 6vw in, and end clear of the Pause pill (its right inset, its width,
     a gap), so the buttons never read as a row of three. */
  .n3-3d .n3-hero .n3-wide { max-width: none; padding-left: 6vw; padding-right: calc(clamp(20px, 4vw, 64px) + 104px); }
}
/* (Narrower, a smaller gap between the heading and the words gives back most of the width the pill takes.) */
@media (min-width: 901px) and (max-width: 1199px) {
  .n3-3d .n3-hero-grid { column-gap: 32px; }
}
.n3-3d .n3-chapter h2 {
  color: #fff; text-transform: uppercase; text-wrap: balance;
  font: 800 clamp(52px, 8vw, 148px)/0.86 "Archivo ExtraCondensed", Poppins, sans-serif; letter-spacing: -0.01em;
}
.n3-3d .n3-chapter h2.long { font-size: clamp(44px, 6.4vw, 120px); }
.n3-3d .n3-chapter p { max-width: 30em; color: #dcd9e8; font: 400 17px/1.6 Poppins, "Segoe UI", system-ui, sans-serif; }
.n3-3d .n3-chapter h3 { font-family: Poppins, "Segoe UI", system-ui, sans-serif; }
.n3-3d .n3-note { color: #b9b4cc !important; font-size: 14px !important; text-wrap: balance; }
/* The timed lines (story.js splits each heading after the fonts load): each line slides up out of its own slot. */
.n3-3d .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.n3-3d .line > span { display: block; }
.n3-3d .n3-chapter-copy > :not(h2) { opacity: 0; }
.n3-3d .n3-shot { display: none; }

/* ---------------------------------------------------------------- the flat page: screen frames */

.n3-chapter-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
html:not(.n3-3d) .n3-chapter:nth-of-type(even) .n3-chapter-copy { order: 2; }
html:not(.n3-3d) .n3-chapter h2 { font-size: clamp(28px, 1.3rem + 1.6vw, 40px); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
html:not(.n3-3d) .n3-hero::before {
  content: ""; position: absolute; z-index: -1; inset: 30% -12% -6%; pointer-events: none;
  background: radial-gradient(50% 55% at 30% 55%, rgba(226, 164, 78, 0.14), transparent 70%), radial-gradient(45% 50% at 72% 45%, rgba(124, 58, 237, 0.2), transparent 70%);
  filter: blur(40px);
}
.n3-shot { position: relative; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.n3-hero .n3-shot { grid-column: 1 / -1; margin-top: clamp(28px, 4vw, 44px); }
/* The same dark bezel for every recording: it fades out at its cut edge, like a slice of the MacBook's screen. */
.n3-bezel {
  background: #050508; padding: clamp(6px, 0.9vw, 12px) clamp(6px, 0.9vw, 12px) 0;
  border-radius: clamp(14px, 2vw, 26px) clamp(14px, 2vw, 26px) 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.n3-bezel video {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; background: #000;
  border-radius: clamp(8px, 1.2vw, 14px) clamp(8px, 1.2vw, 14px) 0 0; object-fit: cover; object-position: 50% 0;
}
.n3-shot.wide .n3-bezel video { aspect-ratio: 12 / 5; }
.n3-shot.strip .n3-bezel video { aspect-ratio: 8 / 1; }
.n3-shot figcaption { font-size: 14px; color: var(--text3); }
.n3-play {
  position: absolute; top: clamp(14px, 1.6vw, 22px); right: clamp(14px, 1.6vw, 22px);
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 10, 16, 0.72); color: #fff; font: 600 12px/1.4 Poppins, system-ui, sans-serif; cursor: pointer;
}
.n3-play:hover { background: rgba(30, 30, 46, 0.9); }
/* At least 44 x 44 px to tap on a phone. */
@media (max-width: 760px) {
  .n3-play { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; }
}
.n3-shot-painting img { width: 100%; height: auto; aspect-ratio: 1200 / 780; border-radius: 16px; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border); }

/* ---------------------------------------------------------------- the page below the story */

.n3-after { position: relative; z-index: 3; background: var(--bg); --smile: 0vh; }
/* The curved wipe: the top edge is a smile that flattens as it comes up (story.js sets --smile, at most 20vh). The
   curve is a deliberate edge: a thin lavender line just outside the cut. The first words start below the deepest
   smile, so no text is ever inside the curve. */
.n3-3d .n3-after {
  background-color: var(--bg);
  /* (And a faint lit band at its top: the same colour as the stage, it otherwise read as a line cutting the laptop.) */
  background-image: url(/assets/grain.b13f8425f5.png),
    radial-gradient(ellipse 74% var(--smile) at 50% 0, transparent 99%, rgba(183, 156, 255, 0.45) 100%, rgba(183, 156, 255, 0.45) 101.4%, transparent 102.6%),
    linear-gradient(to bottom, rgba(183, 156, 255, 0.075), rgba(183, 156, 255, 0) 42vh);
  background-repeat: repeat, no-repeat, no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 74% var(--smile) at 50% 0, transparent 98.6%, #000 100%);
  mask-image: radial-gradient(ellipse 74% var(--smile) at 50% 0, transparent 98.6%, #000 100%);
  padding-top: 24vh;
}
/* The page below's headings, rows and cards. The flat page keeps the site's scroll-triggered entrances, without the
   blur and without the bounce; the 3D page runs its own (story.js): each once, when it's in view, after the page has
   come up. No blur anywhere on this page. */
@keyframes n3-heading-in { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: none; } }
@keyframes n3-pop-in { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: none; } }
.theme-3d .section-head { animation-name: n3-heading-in; }
.theme-3d .helps > *, .theme-3d .faq details { animation-name: n3-pop-in; animation-timing-function: var(--spring); }
.n3-3d .n3-after :is(.section-head, .n3-textrow, .helps > *, .faq details, .n3-plan, .n3-pro) { animation: none; }
.n3-3d.n3-below-wait .n3-after :is(.section-head, .n3-textrow, .helps > *, .faq details, .n3-plan, .n3-pro):not(.n3-in) { opacity: 0; translate: 0 24px; }
.n3-3d .n3-after .n3-in { transition: opacity 900ms var(--spring), translate 900ms var(--spring); }

/* The questions and the footer cost nothing until they're near (both come after Pricing, so #pricing and
   #waiting-list still land exactly; #faq is the section itself). */
.n3-3d #faq, .n3-3d .site-footer { content-visibility: auto; contain-intrinsic-size: auto 1400px; }
.n3-3d .site-footer { contain-intrinsic-size: auto 420px; }

/* One purple below the story (and on the hero's buttons): no pink, no magenta. */
.theme-3d {
  --gradient: linear-gradient(180deg, #8b5cf6, #7c3aed);
  --gradient-outline: linear-gradient(180deg, rgba(183, 156, 255, 0.7), rgba(124, 58, 237, 0.5));
}
.theme-3d .button.primary { background: #7c3aed; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.theme-3d .button.primary:hover { background: #8b5cf6; }

/* The end buttons: the hero's two, back under the closed laptop at the end of the story (story.js times them). */
.n3-end { display: none; }
.n3-3d .n3-end { display: flex; justify-content: center; position: fixed; left: 0; right: 0; top: 76vh; z-index: 2; pointer-events: none; }
.n3-3d .n3-end .button { opacity: 0; }
.n3-3d .n3-end.n3-end-on .button { pointer-events: auto; }
.n3-3d .n3-end .button:focus-visible { opacity: 1 !important; }
/* After the story the page keeps the story's voice: the same condensed capitals for the section headings and prices. */
.n3-3d .n3-after .section { padding-top: 14vh; }
/* The first one starts right below the deepest curve (the page below's own 24vh), not 14vh further down. */
.n3-3d .n3-after .n3-first { padding-top: 0; }
.n3-3d .n3-after .section-head h2, .n3-3d .n3-textrow h2 {
  color: #fff; text-transform: uppercase; text-wrap: balance;
  font: 800 clamp(44px, 5.6vw, 96px)/0.88 "Archivo ExtraCondensed", Poppins, sans-serif; letter-spacing: -0.005em;
}
.n3-3d .n3-pro h3 {
  color: #fff; text-transform: uppercase;
  font: 800 clamp(32px, 3vw, 48px)/0.9 "Archivo ExtraCondensed", Poppins, sans-serif; letter-spacing: 0;
}
.n3-3d .n3-price { font: 800 44px/1 "Archivo ExtraCondensed", Poppins, sans-serif; letter-spacing: 0; }
.n3-3d .n3-price small { font-family: Poppins, "Segoe UI", system-ui, sans-serif; }
.n3-textrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 6vw; align-items: start; }
.n3-textrow p { color: var(--text2); font-size: 18px; }
.n3-full-list > summary, .n3-more > summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--accent-text); padding: 10px 0;
}
.n3-full-list > summary::-webkit-details-marker, .n3-more > summary::-webkit-details-marker { display: none; }
.n3-full-list[open] > summary svg, .n3-more[open] > summary svg { transform: rotate(180deg); }
.n3-full-list .helps { margin-top: 18px; }
.n3-more { margin-top: 18px; }
.n3-more .faq { margin-top: 12px; }
.n3-credit { margin-top: 28px; font-size: 13px; color: var(--text3); }

/* Pricing: three equal cards in the site's purple, the waiting list, the small print, and what Pro unlocks. */
.n3-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.n3-plan {
  display: flex; flex-direction: column; gap: 18px; padding: 26px 24px 24px;
  background: var(--surface1); border: 1px solid var(--border); border-radius: 12px;
}
.n3-plan.featured { border-color: transparent; background: linear-gradient(var(--surface1), var(--surface1)) padding-box, var(--gradient-outline) border-box; }
/* The 3D page's featured card: a quiet violet outline. */
.theme-3d .n3-plan.featured { background: #15131f; border: 1px solid rgba(183, 156, 255, 0.45); }
.n3-plan h3 { font-size: 16px; font-weight: 600; color: var(--text2); }
.n3-price { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.n3-price small { font-size: 15px; font-weight: 500; color: var(--text3); letter-spacing: 0; }
.n3-plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--text2); font-size: 15px; }
.n3-plan li { display: flex; gap: 10px; }
.n3-plan li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.62em; border-radius: 50%; background: var(--accent-text); }
.n3-plan .button { margin-top: auto; width: 100%; justify-content: center; }
#pricing .waiting-list { margin-top: 24px; }
.n3-small-print { margin-top: 20px; display: grid; gap: 8px; font-size: 13px; color: var(--text3); max-width: 80ch; }
.n3-pro { margin-top: 24px; }
.n3-pro h3 { margin-bottom: 12px; }

@media (max-width: 900px) {
  .n3-hero-grid, .n3-textrow, .n3-chapter-grid { grid-template-columns: minmax(0, 1fr); }
  html:not(.n3-3d) .n3-chapter:nth-of-type(even) .n3-chapter-copy { order: 0; }
  .n3-hero-more { justify-self: start; }
  .n3-plans { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  /* On a phone the menu bar is two rows across the full width: give it the site's glass, so words never run through it. */
  .theme-3d .site-header {
    background: rgba(13, 13, 20, 0.86);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  .n3-3d .site-header { animation: none; background: rgba(13, 13, 20, 0.9); -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* (Clear of the Pause pill at the bottom right, like the chapters' words.) */
  .n3-3d .n3-hero { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  /* Below the phone's two-row menu bar, so it never cuts the big type in half. */
  .n3-3d .n3-type { padding-top: calc(112px + 2vh); }
  .n3-3d .n3-hud, .n3-3d .n3-ruler { display: none; }
  /* Bottom right on a phone; the captions and the end buttons sit above it. */
  .n3-3d .n3-pause { right: calc(12px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); }
  /* (--lift: story.js centres each panel chapter, its panel above its words, under the menu bar. --rise: Music's
     words, low for the close-up, rise to that place once the arc has replaced it.) */
  .n3-3d .n3-chapter-in { padding-bottom: calc(64px + var(--lift, 0px) + env(safe-area-inset-bottom)) !important; }
  .n3-3d .n3-chapter-copy { translate: 0 calc(-1 * var(--rise, 0px)); }
  .n3-3d .n3-end { bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
  /* On a phone the words sit at the bottom, full width, under the laptop. */
  .n3-3d .n3-chapter-copy { max-width: none; }
  .n3-3d .n3-chapter-in .n3-wide { padding-left: clamp(16px, 4vw, 64px); }
  .n3-3d .n3-chapter-in { padding-bottom: 6vh; }
  /* From just above where the words start (story.js measures it per chapter), so the picture above them stays bright. */
  .n3-3d .n3-runway::before { background: linear-gradient(to bottom, transparent calc(var(--words, 55vh) - 48px), rgba(10, 10, 16, 0.82) calc(var(--words, 55vh) + 8px), rgba(10, 10, 16, 0.95)); }
  .n3-3d .n3-chapter p { font-size: 16px; line-height: 1.55; }
  .n3-3d .n3-chapter-in { padding-bottom: calc(6vh + env(safe-area-inset-bottom)); }
  /* The menu bar's second row scrolls sideways: its right edge fades, so it reads as more to come. Every link is
     a 44 px tap target. */
  .theme-3d .nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .theme-3d .nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .theme-3d .header-download { min-height: 44px; }
  .theme-3d .site-header .brand { min-height: 44px; }
  /* The end buttons: full width (16 px gutters), stacked, 48 px tall, clear of the home bar. */
  .n3-3d .n3-end { top: auto; bottom: calc(5vh + env(safe-area-inset-bottom)); padding: 0 16px; }
  .n3-3d .n3-end .buttons { flex-direction: column; width: 100%; gap: 10px; margin: 0; }
  .n3-3d .n3-end .button { flex: none; width: 100%; min-height: 48px; justify-content: center; }
}
/* A short phone (an iPhone SE, 375 x 667): the hero's words a little tighter, so they fit under the two-row menu bar
   (else story.js shows the flat page). */
@media (max-width: 760px) and (max-height: 700px) {
  .n3-3d .n3-hero h1 { font-size: 34px; }
  .n3-3d .n3-hero .n3-lead { font-size: 15px; line-height: 1.45; }
  .n3-3d .n3-hero .buttons { margin-top: 14px; }
  .n3-3d .n3-hero-grid { row-gap: 12px; }
}
