/* Product landing pages: the sections every product page shares. Tokens come from site.css;
   the page sets its hue with a .hue-* class on <body>. Product-specific art lives next to the page. */

[id] { scroll-margin-top: 68px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.nw { white-space: nowrap; }

/* ---------- Product bar: stays with the reader under the site header ---------- */
.pbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pbar-row { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.pbar-brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin-right: auto; font: 700 1rem/1 var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
/* App icons are macOS-shaped PNGs that carry the template's transparent margin, so the box is drawn
   larger than the visible tile. .bleed is a full-bleed square that CSS rounds to the same visible size. */
.pbar-brand img { display: block; width: 32px; height: 32px; margin: 0 -3px 0 -4px; }
.pbar-brand img.bleed { width: 26px; height: 26px; margin: 0; border-radius: 22.5%; }
.pbar-links { display: none; list-style: none; margin: 0; padding: 0; gap: 2px; }
.pbar-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px; border-radius: 999px; color: var(--muted); font-size: 0.93rem; font-weight: 500; text-decoration: none; }
.pbar-links a:hover { color: var(--ink); background: var(--surface-2); }
@media (min-width: 900px) { .pbar-links { display: flex; } }
.soon-chip { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-s); font-weight: 600; color: var(--ink); white-space: nowrap; }
.soon-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Section frame ---------- */
.section { padding-top: var(--section); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 56px); }
.eyebrow { font: 600 var(--t-s)/1.3 var(--body); color: var(--accent-ink); margin: 0 0 1rem; }
.section-lead { color: var(--muted); font-size: 1.1rem; margin: 1rem 0 0; max-width: 60ch; }
.meta { color: var(--muted); font-size: var(--t-s); margin: 0; }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 40px; align-items: center; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(32px, 5vw, 72px); }
.hero > * { min-width: 0; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; min-height: min(calc(100vh - 114px), 780px); }
}
/* At the full page width the desktop mock is 600px wide: the width its menu bar needs to show
   every menu and status item. */
@media (min-width: 1160px) {
  .hero { grid-template-columns: minmax(0, 11fr) minmax(0, 15fr); gap: 40px; }
}
.hero h1 { font-size: var(--t-3xl); line-height: 0.98; letter-spacing: -0.04em; font-weight: 800; max-width: 12ch; }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--muted); max-width: 44ch; margin: 1.4rem 0 1.8rem; }
.hero .meta { margin-top: 1rem; text-wrap: balance; }
/* Same inset as the store button, so the two share a left line when the row wraps. */
.hero .actions .btn.ghost { padding-left: 24px; padding-right: 24px; }
/* Phones: full-width buttons; the slimmer store button keeps its label on one line down to 360px. */
@media (max-width: 480px) {
  .hero .actions .btn, .price .actions .btn { width: 100%; }
  .btn.store { padding-left: 16px; padding-right: 16px; font-size: 0.98rem; }
}

/* ---------- Features: bento ---------- */
/* A tile is art, h3, p. Each takes one row of the bento grid (subgrid), so the art boxes, the titles
   and the copy line up across the tiles of a row whatever their lengths. */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); }
.tile { grid-column: span 12; grid-row: span 3; min-width: 0; padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; row-gap: 0; }
.tile p { margin: 0; color: var(--muted); }
.tile-art { min-height: 150px; padding: 16px; border-radius: var(--r-m); background: var(--surface-2); margin-bottom: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
@media (min-width: 720px) {
  .span-7 { grid-column: span 7; }
  .span-5 { grid-column: span 5; }
  .span-4 { grid-column: span 4; }
}
/* Three small tiles share a row only at the full page width: a third of anything narrower
   cannot hold a two-line panel row ("Desk Speakers · USB Microphone") without truncating it. */
@media (min-width: 720px) and (max-width: 1159px) {
  .span-4 { grid-column: span 6; }
  .span-4:last-child { grid-column: span 12; }
}
/* Wide screens: a pair of tiles is two equal halves, so every row of the bento is mirror-symmetric. */
@media (min-width: 1024px) {
  .span-7, .span-5 { grid-column: span 6; }
}
/* Phones: slimmer frames leave the mock inside a tile its full label width. */
@media (max-width: 400px) {
  .tile { padding: 16px; }
  .tile-art { padding-left: 8px; padding-right: 8px; }
}

/* ---------- How to use: a numbered sequence ---------- */
.usage { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0 48px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .usage { grid-template-columns: 1fr 1fr; } }
.usage li { counter-increment: step; position: relative; padding: 18px 0 18px 56px; border-top: 1px solid var(--line); color: var(--muted); }
.usage li strong { color: var(--ink); font-weight: 650; }
.usage li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 20px; font: 600 0.85rem/1 var(--mono); color: var(--accent-ink); letter-spacing: 0.02em; }

/* ---------- Privacy + permissions: two equal cards ---------- */
/* A card is label, title, rows. Side by side the two cards share those three row lines (subgrid),
   so the labels, the titles and the first rows start level and the cards end level. */
.split { display: grid; gap: 16px; }
.perm { min-width: 0; padding: 28px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 0; }
  .perm { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 3; grid-template-rows: subgrid; }
}
.perm .eyebrow { margin-bottom: 0.6rem; }
.perm h3 { font-size: 1.4rem; margin: 0 0 1.2rem; text-wrap: balance; }
.perm dl, .facts { list-style: none; margin: 0; padding: 0; align-self: start; color: var(--muted); }
.perm dl div, .facts li { padding: 14px 0; border-top: 1px solid var(--line); }
.perm dl div:last-child, .facts li:last-child { padding-bottom: 0; }
.perm dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.perm dt, .facts li b { color: var(--ink); font-weight: 650; }
.perm dd { margin: 0; }
/* No lone last words in list copy either (p already has this in site.css). */
.usage li, .pr-note, .perm dd { text-wrap: pretty; }
@media (max-width: 400px) { .perm { padding: 20px; } }

/* ---------- Pricing: one component on every product page ---------- */
/* Two equal columns with one top edge and one bottom edge. Left: the pitch is pinned to the top and
   the call to action to the bottom. Right: a panel of rows stretched to the same height; spare
   height is shared equally between the rows, and every row has the same padding. */
.price { display: grid; gap: 28px; padding: clamp(24px, 4vw, 56px); border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.price > * { min-width: 0; }
@media (min-width: 960px) { .price { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.price-main { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.price-main h2 { text-wrap: balance; }
.price-num { font: 800 clamp(3rem, 2rem + 4vw, 5.5rem)/0.9 var(--display); letter-spacing: -0.05em; color: var(--accent-ink); display: block; margin-bottom: 0.3rem; }
.price-cta { display: grid; gap: 12px; }
/* Phones: the card's inset narrows the store button, so the card and the button give width back
   and the label stays on one line down to 375px. */
@media (max-width: 480px) {
  .price { padding-left: 20px; padding-right: 20px; }
  .price .actions .btn.store { padding-left: 12px; padding-right: 12px; font-size: 0.92rem; }
}
.price-rows { list-style: none; margin: 0; padding: 4px 24px; display: grid; border-radius: var(--r-m); background: var(--surface-2); }
/* A row mirrors itself: name over note on the left, amount over unit on the right, both right-flush.
   A row without a price (no .pr-val) lets its note run the full width. */
.price-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 16px; align-items: baseline; align-content: center; padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-s); }
.price-rows li:first-child { border-top: 0; }
.pr-name { grid-area: 1 / 1; color: var(--ink); font-size: 1rem; font-weight: 650; }
.pr-val { display: contents; }
.pr-val b { grid-area: 1 / 2; justify-self: end; font: 800 1.4rem/1 var(--display); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.pr-unit { grid-area: 2 / 2; justify-self: end; white-space: nowrap; }
/* The price footnote mark: small, raised to the cap height, tight to the digits. */
.ast { display: inline-block; margin-left: 0.06em; font-size: 0.5em; font-weight: 700; line-height: 1; vertical-align: 0.9em; letter-spacing: 0; }
.pr-note { grid-area: 2 / 1; }
.pr-name + .pr-note { grid-column: 1 / -1; }
/* The app's own trial row, drawn by the page, takes a row of the panel at its full width. */
.price-rows .pr-art { display: block; }
.price-rows .pr-art .panel.frag { width: 100%; }
@media (max-width: 400px) { .price-rows { padding-left: 16px; padding-right: 16px; } }

/* ---------- FAQ ---------- */
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 16px 0; font: 600 1.1rem/1.3 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-right: 4px; }
.faq-list details[open] summary::after { transform: rotate(-135deg); }
.faq-list details p { margin: 0 0 20px; color: var(--muted); max-width: 70ch; }
.faq-more { margin: 28px 0 0; color: var(--muted); }

/* ---------- Final call: the last block of <main class="flush"> ---------- */
.final-cta { margin-top: var(--section); padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.final-cta .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.final-ico { display: block; width: 96px; height: 96px; }
.final-ico.bleed { width: 78px; height: 78px; margin: 9px 0; border-radius: 22.5%; box-shadow: var(--shadow); }
.final-cta h2 { max-width: 16ch; }
.final-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; list-style: none; margin: 0; padding: 0; font-size: var(--t-s); }
.final-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.final-links a:hover { color: var(--ink); }

/* ---------- Scene: one mock through its states ----------
   Static by default: the states stand side by side as equal columns; that is what a reader gets
   without JavaScript and under reduced motion. scenes.js adds .live to the track when motion is
   allowed. Only then the stage pins, the states stack in one grid cell (the stage keeps one size
   whatever the state) and .on marks the state the scroll position picks. */
.scene { margin-top: clamp(36px, 5vw, 64px); }
.scene-states { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 24px; }
.scene-state { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; min-width: 0; }
.scene-art { min-width: 0; }
.scene-num { display: block; margin-bottom: 10px; font: 600 0.85rem/1 var(--mono); letter-spacing: 0.02em; }
.scene-copy h3 { margin: 0 0 6px; }
.scene-copy p { margin: 0; max-width: 40ch; }
.scene-rail { display: none; }
@media (min-width: 640px) and (max-width: 959px) {
  .scene:not(.live) .scene-state { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); column-gap: 32px; align-items: center; }
}
@media (min-width: 960px) { .scene-states { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Live: the track is three screens tall; the stage stays in view, centred under the product bar. */
.scene.live { height: 300vh; margin-top: 0; }
.live .scene-stage { position: sticky; top: 0; display: flex; align-items: center; height: 100vh; min-height: 600px; padding-top: 53px; }
.live .scene-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 4vh, 44px); }
/* Every state spans the same tracks (subgrid), so the copy and the art keep their place when the state changes. */
.live .scene-states { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: 20px 48px; }
.live .scene-state { grid-area: 1 / 1 / -1 / -1; grid-template-columns: subgrid; grid-template-rows: subgrid; gap: normal; }
.live .scene-copy { grid-area: 1 / 1; }
/* The rail numbers the steps on a live stage. */
.live .scene-num { display: none; }
.live .scene-art { grid-area: 2 / 1; }
.live .scene-copy h3 { font-size: clamp(1.7rem, 1rem + 3vw, 3.3rem); margin-bottom: 0.7rem; }
.live .scene-copy p { font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem); }
@media (min-width: 900px) {
  .live .scene-states { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; }
  /* One height for the three captions keeps their first lines level while the block is centred. */
  .live .scene-copy { align-self: center; min-height: 17rem; }
  .live .scene-art { grid-area: 1 / 2; align-self: center; }
}
/* Inactive copy stays in the accessibility tree (screen readers read all three steps); only the
   art, which is aria-hidden, is taken out with visibility. */
.live .scene-state > * { opacity: 0; pointer-events: none; user-select: none; }
.live .scene-state > .scene-art { visibility: hidden; }
.live .scene-state.on > * { opacity: 1; pointer-events: auto; user-select: auto; visibility: visible; }
.live .scene-state.on > .scene-art { position: relative; z-index: 1; }
/* The rail: three equal steps under the stage and a line that fills with the scroll. */
.live .scene-rail { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; border-top: 2px solid color-mix(in srgb, currentColor 30%, transparent); font-size: var(--t-s); }
.live .scene-rail::before { content: ""; position: absolute; left: 0; top: -2px; width: 100%; height: 2px; background: currentColor; transform-origin: 0 50%; transform: scaleX(var(--scene-p, 0)); }
.scene-rail li { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 0 0; opacity: 0.8; }
.scene-rail li.now { opacity: 1; font-weight: 600; }
.scene-rail b { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.02em; }

/* ---------- Motion: one entry sequence in the hero; a scene follows the scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* The art that leaves stays opaque under the one fading in, so the mock itself never turns see-through. */
  .live .scene-art { transition: opacity 0s 0.3s, visibility 0s 0.3s; }
  .live .on > .scene-art { transition: opacity 0.3s ease; }
  .live .scene-copy { transition: opacity 0.15s ease, visibility 0s 0.15s; }
  .live .on > .scene-copy { transition: opacity 0.3s ease 0.12s; }
  .scene-rail li { transition: opacity 0.3s; }
  /* From .01, fill both: nothing flashes before its delay. */
  @keyframes rise { from { opacity: 0.01; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  .entry { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-copy .entry:nth-child(1) { animation-delay: 0.05s; }
  .hero-copy .entry:nth-child(2) { animation-delay: 0.12s; }
  .hero-copy .entry:nth-child(3) { animation-delay: 0.2s; }
  .hero-copy .entry:nth-child(4) { animation-delay: 0.28s; }
  .hero-copy .entry:nth-child(5) { animation-delay: 0.34s; }
  .screen.entry { animation-delay: 0.25s; animation-duration: 0.9s; }
  @keyframes drop { from { opacity: 0.01; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
  .screen .panel { animation: drop 0.6s 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; transform-origin: top right; }
  .pbar-links a, .faq-list summary::after { transition: background 0.15s, color 0.15s, transform 0.25s; }
}
