/* Shotory website. One stylesheet for every page.
   The look follows the app (docs/design.md): a metal page, black panels, matte cells, flat screens;
   system fonts, even font sizes, 18 side margins, orange only for the one thing that matters. */

:root {
  --page: #DFDFDD;
  --card: #E9E7E1;
  --metal: #C8C8C6;
  --paper: #EEEEEE;
  --line: #B4B1AA;
  --text: #000000;
  --sub: #555555;
  --primary: #111111;
  --on-primary: #E9E7E1;
  --bar: #000000;
  --gap: #111111;
  --orange: #FF6600;
  --on-orange: #E9E7E1;
  --face-top: #F1EFEA;
  --face-bottom: #EBE9E3;
  --slope-light: #FCFBF9;
  --slope-dark: #BDB9B0;
  --rim: #FFFFFF;
  --edge-dark: #C9C5BC;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #2D2D2F;
    --card: #2D2D2F;
    --metal: #1B1D21;
    --paper: #3A3C42;
    --line: #6A6A6C;
    --text: #FFFFFF;
    --sub: #8A8A8A;
    --primary: #EEEEEE;
    --on-primary: #000000;
    --gap: #000000;
    --face-top: #2B2B2D;
    --face-bottom: #242426;
    --slope-light: #434346;
    --slope-dark: #0B0B0C;
    --rim: #48484B;
    --edge-dark: #161617;
  }
}

@supports (color: color(display-p3 1 0.4 0)) {
  :root { --orange: color(display-p3 1 0.4 0); }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }

/* The bar at the top, on the page's own colour with a thin line under it: the brand on the left, the links and the
   download button on the right. The page you are on has a short orange line under its link. */
.bar { position: sticky; top: 0; z-index: 10; background: var(--page); border-bottom: 1px solid var(--line); }
.strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1040px; height: 60px; margin: 0 auto; padding: 0 18px; }
.home { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.home img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { position: relative; padding: 8px 0; font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 24px; height: 3px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-get { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--text); border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
a.nav-get { background: var(--primary); color: var(--on-primary); text-decoration: none; }

/* Headings and text. */
h1 { font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
.sub { color: var(--sub); }
.small { font-size: 14px; }

/* A section name: small capitals with a thin line to its right, as on the Settings page. */
.label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub);
  margin: 0 0 12px;
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

section { padding: 44px 0 0; scroll-margin-top: 44px; }

/* A card: a matte cell in a thick black frame. */
.card { background: var(--card); border: 2px solid var(--gap); border-radius: 14px; padding: 18px; }

/* A black panel of cells, a hairline of the panel showing between them. */
.panel { background: var(--gap); border: 2px solid var(--gap); border-radius: 14px; overflow: hidden; display: grid; gap: 2px; }
.cell { background: var(--card); padding: 16px 18px; }
.cell h3 { margin: 0 0 4px; font-size: 16px; }
.cell p { margin: 0; font-size: 14px; color: var(--sub); }
.cell .tag { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--sub); text-transform: uppercase; margin-bottom: 6px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* The hero. */
/* Side by side: the app's picture on the left, the stage on the right, its right edge on the page's. Under 860 wide
   they stack, the stage first. */
.hero { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; padding-top: 56px; }
.hero > figure { order: -1; }
.hero > div { justify-self: end; }
/* Both stand on one line: the names under the stage's keys are level with the foot of the devices. The headline's
   place under the stage is kept empty until the end screen, so the devices are lifted by its height. */
.hero > div, .hero > figure { align-self: end; }
.hero > .devices-figure { padding-bottom: calc(min(460px, 100vw - 36px) * .24 + 18px); }   /* the headline's height, and the tenth of its width by which the iPad stands below the group's box */

/* The stage: a block in the logo's proportions (750 wide, 805 tall in the logo's own units; --k is one unit).
   Before a take: the logo's clapper arm, raised; under it the paragraph, beginning with the word "Shotory" where the
   logo's word is; at the foot the take keys in the place of the logo's three keys.
   With .rolling a take is on: the arm has clapped shut and become a solid bar carrying the headline, and the
   paragraph scrolls. With .logo the take is over and it is the whole logo. .played is set from the first press on. */
.stage { --w: min(460px, 100vw - 36px); --k: calc(var(--w) / 750); --ease: cubic-bezier(.5,0,.2,1); position: relative; width: var(--w); height: calc(var(--k) * 805); }

/* The bar's words (Less chaos. More creation.): cut out, in the page's colour, of the solid bar the shut arm becomes (the bar is the
   arm's own outline filled in, drawn with the arm; it is 128 units thick and, shut, lies from 260 to 388). The
   words fill the bar from end to end. The stripes fill in once the arm has landed, the words wipe in from the
   hinge, and both go again when the take is over. */
.bar-words { position: absolute; z-index: 1; left: 0; top: calc(var(--k) * 260 - var(--k) * 135); width: 100%; height: calc(var(--k) * 128); margin: 0; color: var(--page); font-weight: 800; font-size: calc(var(--w) * .078); line-height: calc(var(--k) * 128); letter-spacing: -0.03em; text-align: center; white-space: nowrap; }
.bar-words span { display: block; clip-path: inset(0 100% 0 0); transition: clip-path .2s ease; }
.stage.rolling .bar-words span { clip-path: inset(0 0 0 0); transition: clip-path .45s var(--ease) .68s; }
.mark-bar { opacity: 0; transition: opacity .25s ease; }
.stage.rolling .mark-bar { opacity: 1; transition: opacity .22s ease .5s; }

/* The arm: raised, as in the logo, before a take and in the logo. When a take starts it lifts a little, claps down,
   bounces once and stays shut under the bar. Shut, it is moved 12.8 units to the left, so that its two ends are in
   line with the edges of everything under it (turned level about its hinge it would stand that far to the right).
   When the take is over the bar uncovers it and it springs open. */
.arm-svg, .word-svg { position: absolute; left: 0; pointer-events: none; fill: var(--primary); overflow: visible; }
.arm-svg { top: 0; width: 100%; height: 100%; }
.mark-arm { transform-origin: 178px 388px; }
.stage.rolling .mark-arm { transform: translateX(-12.8px) rotate(10deg); animation: arm-slate .7s linear both; }
.stage.logo .mark-arm { animation: arm-open .85s linear .22s both; }
@keyframes arm-slate {
  0% { transform: translateX(0) rotate(0deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); }
  30% { transform: translateX(0) rotate(-6deg); animation-timing-function: cubic-bezier(.7,0,1,.5); }
  62% { transform: translateX(-12.8px) rotate(10deg); animation-timing-function: cubic-bezier(.2,.7,.4,1); }
  80% { transform: translateX(-12.8px) rotate(5.5deg); animation-timing-function: cubic-bezier(.6,0,1,.6); }
  100% { transform: translateX(-12.8px) rotate(10deg); }
}
@keyframes arm-open {
  0% { transform: translateX(-12.8px) rotate(10deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); }
  50% { transform: translateX(0) rotate(-4deg); animation-timing-function: ease-in-out; }
  76% { transform: translateX(0) rotate(1.2deg); animation-timing-function: ease-in-out; }
  100% { transform: translateX(0) rotate(0deg); }
}

/* The paragraph is a prompter: an orange mark at the reading line, and nothing faded. Rolling, the script scrolls
   up after the clap, going in behind the shut arm's bar at the top and coming out from behind the keys at the
   foot (the prompter reaches from the bar's upper edge down behind the keys, and both lie over it; its upper
   corners are rounded a little more than the bar's, so no text shows past them). Its lines
   are far enough apart that the logo's word starts wholly behind the keys. Its last line is the logo's word, and it stops when that word is at the top. */
.prompter { position: absolute; left: 0; right: 0; top: calc(var(--k) * 127); bottom: calc(var(--k) * 60); padding-top: calc(var(--k) * 169); overflow: hidden; border-radius: calc(var(--k) * 62) calc(var(--k) * 62) 0 0; }
.script { position: relative; }
.stage .lead { margin: 0; max-width: none; font-size: 24px; line-height: 1.7; }
.word-line { display: block; width: 100%; height: calc(var(--k) * 338); margin-top: 48px; fill: var(--primary); visibility: hidden; }
.stage.rolling .word-line { visibility: visible; }
.stage.rolling .script { animation: roll var(--roll-time, 5s) linear .9s both; }
@keyframes roll { to { transform: translateY(var(--roll, -100%)); } }
.read-mark { position: absolute; left: -18px; top: calc(var(--k) * 296 + 12px); border-left: 11px solid var(--orange); border-top: 8px solid transparent; border-bottom: 8px solid transparent; transition: opacity .25s ease .7s; }
.stage.logo .read-mark { opacity: 0; transition-delay: 0s; }

/* The logo's word outside the prompter. As text it is shrunk onto "Shotory" (the page's script sets where) and
   unseen. As the logo it takes over, at full strength, from the copy that has just scrolled into the same place.
   On the way back it shrinks onto "Shotory" again, the two cross-fade, and the rest of the paragraph comes on. */
.brand { display: inline-block; font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; transition: opacity .2s ease .5s; }
.rest { transition: opacity .35s ease .6s; }
.stage.logo .brand, .stage.logo .rest { opacity: 0; transition: none; }
.word-svg { top: calc(var(--k) * 296); width: 100%; height: calc(var(--k) * 338); transform-origin: 0 0; transform: translate(var(--x, 0), var(--y, 0)) scale(var(--sx, .27), var(--sy, .13)); opacity: 0; transition: transform .65s var(--ease), opacity .2s ease .5s; }
.stage.rolling .word-svg { transform: none; transition: none; }
.stage.logo .word-svg { transform: none; opacity: 1; transition: none; animation: lit .4s ease-out both; }
@keyframes lit { from { opacity: .55; } to { opacity: 1; } }

/* The three take keys, as the app draws them, in the exact place and size of the logo's three keys: raised keys on
   matte cells, each with four round corners, in a black panel with a thick frame; START is a plain key with an orange triangle, and while a take rolls its whole cell
   is orange with the stop square. As the logo they are its three flat blocks, two dark and one orange. */
.keys { position: absolute; left: 0; bottom: 0; width: 100%; height: calc(var(--k) * 129); z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; background: var(--gap); border: 5px solid var(--gap); border-radius: 16px; transition: all .5s var(--ease); }
.keys button { position: relative; appearance: none; border: 0; border-radius: 10px; margin: 0; font: inherit; background: var(--card); padding: 6px 12px; transition: all .5s var(--ease), background-color .2s ease; }
.keys .go, .stage.rolling .keys button, .stage.logo .keys button { cursor: pointer; }
.keys .go:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.key {
  position: relative; height: 100%; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--face-top), var(--face-bottom));
  box-shadow: inset 1px 1px 0 var(--rim), inset -1px -1px 0 var(--edge-dark), -3px -3px 6px var(--slope-light), 4px 4px 8px var(--slope-dark);
  transition: opacity .3s ease, transform .1s ease, background .2s ease, box-shadow .2s ease;
}
.key svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }
.go .key svg { fill: var(--orange); stroke: none; }
.go .stop, .stage.rolling .go .play { display: none; }
.stage.rolling .go .stop { display: block; fill: var(--on-orange); }
.stage.rolling .keys .go { background: var(--orange); }
.stage.rolling .go .key { background: var(--orange); box-shadow: inset 1px 1px 0 rgba(255,255,255,0.35), inset -1px -1px 0 rgba(0,0,0,0.18), -3px -3px 6px rgba(255,255,255,0.22), 4px 4px 8px rgba(0,0,0,0.25); }
.keys button:active .key { transform: scale(.94); }
/* Before a take a finger keeps coming up to START and pressing it, and an orange ring leaves the key at each
   press. (Before the first press the word under the key asks for it too.) */
.finger { position: absolute; left: 54%; top: 46%; width: 34px; height: 34px; pointer-events: none; transform-origin: 40% 10%; animation: tap 2.4s ease-in-out infinite; }
.finger svg { display: block; width: 100%; height: 100%; fill: var(--card); stroke: var(--text); stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.stage.rolling .finger, .stage.logo .finger { display: none; }
.stage:not(.rolling):not(.logo) .go .key::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--orange); opacity: 0; animation: ask 2.4s ease-out infinite; }
@keyframes tap {
  0% { transform: translate(12px, 20px); opacity: 0; }
  18% { opacity: 1; }
  42% { transform: translate(0, 0); }
  50% { transform: translate(0, 0) scale(.88); }
  58%, 78% { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(12px, 20px); opacity: 0; }
}
@keyframes ask { 0%, 49% { transform: scale(.85); opacity: 0; } 54% { opacity: .9; } 90%, 100% { transform: scale(1.14, 1.4); opacity: 0; } }
.stage.logo .keys { gap: calc(var(--k) * 54); background: transparent; border-width: 0; }
.stage.logo .keys button { background: var(--primary); border-radius: calc(var(--k) * 26); }
.stage.logo .keys .go { background: var(--orange); }
.stage.logo .key { opacity: 0; }
/* What a block does, written on it. */
.block-word { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-primary); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.go .block-word { color: var(--on-orange); }
.stage.logo .block-word { opacity: 1; transition: opacity .3s ease .4s; }
.stage.logo .keys .soon { cursor: default; }
/* Under the keys, in one place: their names while there are keys, what the app needs once they are the logo's blocks. */
.under { display: grid; width: min(460px, 100vw - 36px); margin-top: 8px; align-items: start; }
.under > * { grid-area: 1 / 1; margin: 0; transition: opacity .3s ease; }
.keys-legend { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--sub); text-align: center; }
.keys-legend .press { color: var(--orange); }
.stage.played ~ .under .press { color: inherit; }
.stage.rolling ~ .under .press { color: var(--orange); }
/* The sound key: a small speaker at the right end of the row under the keys; struck through when the sound is off. */
.under { position: relative; }
.under > .sound { grid-area: auto; position: absolute; right: 0; top: -4px; width: 24px; height: 24px; padding: 0; border: 0; background: none; color: var(--sub); cursor: pointer; }
.sound svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound path:first-child { fill: currentColor; }
.sound .slash, .sound[aria-pressed="false"] .waves { display: none; }
.sound[aria-pressed="false"] .slash { display: block; }
.sound:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.stage.logo ~ .under .sound { opacity: 0; pointer-events: none; }
.needs { font-size: 12px; line-height: 1.3; color: var(--sub); text-align: center; opacity: 0; }
.stage.logo ~ .under .keys-legend { opacity: 0; }
.stage.logo ~ .under .needs { opacity: 1; transition-delay: .4s; }
/* The headline (Your shoot, all set.), there only on the end screen: one line as wide as the stage, typed a letter
   at a time (the page's script gives every letter its turn, --i). */
.hero-close { --w: min(460px, 100vw - 36px); width: var(--w); margin: 18px 0 0; font-size: calc(var(--w) * .127); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; visibility: hidden; }
.hero-close .line { display: block; }
.hero-close .line span { opacity: 0; }
.stage.logo ~ .hero-close { visibility: visible; }
.stage.logo ~ .hero-close .line span { animation: typed .01s linear calc(.7s + var(--i) * 55ms) both; }
@keyframes typed { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .stage *, .stage.logo *, .under *, .leg-word, .mile, .mile::after, .leg-text > *, .finale-words, .finale-get { transition: none !important; animation: none !important; }
  .finger { opacity: 1; }
  .stage.logo ~ .hero-close .line span { animation: none; opacity: 1; }
}

/* The devices beside the stage, still, in space: the whole group (.rig) is tipped towards the eye, and each device
   has its own turn (the MacBook faces front, the iPad turns to the right, the iPhone and, beside it, the watch to the left), so
   they show different sides. A device is a front (.face: the bezel
   and the picture) with copies of its outline behind it, each a step further back (.edge), which read as its
   side. --r is its corner, --step the distance between copies, --side their colour. */
.devices-figure { width: 100%; max-width: 460px; margin: 0 auto; }
body { overflow-x: clip; }   /* the turned devices may reach a point or two past the page's edge */
.devices { position: relative; aspect-ratio: 1 / 1.04; perspective: 1300px; }
.rig { position: absolute; inset: 0; transform-style: preserve-3d; transform: scale(1.12) rotateX(-5deg); }
.dev { position: absolute; transform-style: preserve-3d; --side: #B9B9BB; --step: 2px; }
.dev .face, .dev .edge { position: absolute; inset: 0; border-radius: var(--r); }
.dev .face { background: #000; border: var(--bezel, 5px) solid #0C0C0D; overflow: hidden; }
.dev .face img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.dev .edge { background: var(--side); }
.dev .edge:nth-of-type(1) { transform: translateZ(calc(var(--step) * -1)); }
.dev .edge:nth-of-type(2) { transform: translateZ(calc(var(--step) * -2)); }
.dev .edge:nth-of-type(3) { transform: translateZ(calc(var(--step) * -3)); }
.dev .edge:nth-of-type(4) { transform: translateZ(calc(var(--step) * -4)); }
.dev .edge:nth-of-type(5) { transform: translateZ(calc(var(--step) * -5)); filter: brightness(.8); }
/* The MacBook: a thin lid, and a deck that comes forward from its lower edge with a keyboard and a trackpad on it. */
.dev-mac { --r: 12px; --step: 1.1px; left: 10%; top: 2%; width: 80%; aspect-ratio: 16 / 10.4; transform: translateZ(-110px); }
.dev-mac .deck { position: absolute; left: -1.5%; top: 100%; width: 103%; height: 58%; transform-origin: top; transform: rotateX(78deg); border-radius: 4px 4px 14px 14px; background: linear-gradient(#D2D2D4, #BDBDBF); box-shadow: 0 0 0 1px #A9A9AB inset; }
.dev-mac .deck::before { content: ""; position: absolute; left: 7%; right: 7%; top: 8%; height: 46%; border-radius: 4px; background: #1B1B1D; }
.dev-mac .deck::after { content: ""; position: absolute; left: 34%; right: 34%; top: 62%; height: 30%; border-radius: 5px; background: #C6C6C8; box-shadow: 0 0 0 1px #A9A9AB; }
.dev-pad { --r: 16px; --bezel: 7px; left: 8%; top: 43%; width: 41%; aspect-ratio: 3 / 4; transform: translateZ(110px) rotateY(26deg); }
.dev-pad .face img { object-position: center 88%; }
.dev-phone { --r: 18px; --side: #2B2B2E; left: 67%; top: 29%; width: 21%; aspect-ratio: 598 / 1300; transform: translateZ(110px) rotateY(-26deg); }
/* The watch: a thick little case with a strap going up and down behind it. */
.dev-watch { --r: 24%; --side: #2B2B2E; --step: 3px; left: 55%; top: 58%; width: 12.5%; aspect-ratio: 374 / 446; transform: translateZ(180px) rotateY(-26deg); }
.dev-watch .strap { position: absolute; left: 14%; right: 14%; top: -34%; bottom: -34%; border-radius: 12px; background: linear-gradient(#3A3A3D, #232325 30%, #232325 70%, #3A3A3D); transform: translateZ(-9px); }

/* Three claims in a row under the hero: a short phrase in big type, a line of text under it, a thin rule between
   one and the next. No boxes. */
.claims { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 72px; }
.claims > div { padding: 4px 28px; border-left: 1px solid var(--line); }
.claims > div:first-child { padding-left: 0; border-left: 0; }
.claims > div:last-child { padding-right: 0; }
.claims h2 { margin: 0 0 8px; font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; white-space: nowrap; }
.claims p { margin: 0; font-size: 16px; color: var(--sub); }
/* The three phrases take turns: each is orange for a moment, one after the other, every six seconds. */
.claims h2 { position: relative; padding-bottom: 12px; animation: claim 6s ease-in-out infinite; }
.claims h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; background: var(--orange); transform: scaleX(0); transform-origin: left; animation: claim-line 6s ease-in-out infinite; animation-delay: inherit; }
.claims > div:nth-child(2) h2 { animation-delay: 2s; }
.claims > div:nth-child(3) h2 { animation-delay: 4s; }
@keyframes claim { 0%, 30%, 100% { color: var(--text); } 6%, 24% { color: var(--orange); } }
@keyframes claim-line { 0%, 34%, 100% { transform: scaleX(0); } 8%, 24% { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .claims h2, .claims h2::after { animation: none; } }

/* Plan. Prompt. Shoot. Log.: four legs, words and picture side by side, the sides swapping from leg to leg, and a
   line through them all (an svg laid over the section; the page's script draws it). The line is a grey rail with
   a black one over it that grows as the page is scrolled. A leg's big word is faint until the line reaches it. */
.journey { position: relative; padding-top: 80px; }
.journey-line { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.journey-line path { fill: none; stroke-width: 4; stroke-linecap: round; }
.journey-line .rail { stroke: var(--line); }
.journey-line .fill { stroke: var(--text); }
.leg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 8px 36px; }
/* A leg's milestone: a dot on the line, level with the big word. Grey and hollow until the line reaches it; then
   it fills in, grows a little, and one ring leaves it. */
.mile { position: absolute; left: -7px; top: 42px; width: 18px; height: 18px; border-radius: 50%; background: var(--page); border: 4px solid var(--line); transition: background .2s ease, border-color .2s ease, transform .35s cubic-bezier(.2,.9,.3,1.8); }
.leg:nth-of-type(even) .mile { left: auto; right: -7px; }
.mile::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; }
.leg.on .mile { background: var(--text); border-color: var(--text); transform: scale(1.3); }
.leg.on .mile::after { animation: mile 1.2s ease-out; }
@keyframes mile { from { transform: scale(1); opacity: .8; } to { transform: scale(2.8); opacity: 0; } }
.leg + .leg { margin-top: 96px; }
.leg:nth-of-type(even) .leg-text { order: 2; }
.leg-word { margin: 0 0 6px; font-size: 76px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; opacity: .2; transition: opacity .4s ease; }
.leg.on .leg-word { opacity: 1; animation: reached .5s ease-out; }
@keyframes reached { 0%, 60% { color: var(--orange); } 100% { color: var(--text); } }   /* the same orange turn as the claims above */
/* What is under the big word waits for the word: it fades in, a little from below, once the word has had its
   orange turn (0.5 s), title first, and fades out at once if the line goes back up past the milestone. */
.journey.live .leg-text > :not(.leg-word) { opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease; }
.journey.live .leg.on .leg-text > :not(.leg-word) { opacity: 1; transform: none; transition: opacity .5s ease .5s, transform .5s ease .5s; }
.journey.live .leg.on .leg-text > p:not(.leg-word) { transition-delay: .6s; }
.journey.live .leg.on .leg-text > ul { transition-delay: .7s; }
.leg ul { padding-left: 18px; margin: 0; }
.leg li { margin-bottom: 6px; }
.leg .shot { width: 100%; max-width: 280px; margin: 0 auto; }
/* Where the line ends: its last dot in the middle of the page and the closing words under it, faint until the line
   arrives, with the same orange turn as the legs' words. */
.finale { position: relative; margin-top: 96px; padding: 44px 0 110px; text-align: center; }
.finale .mile { left: calc(50% - 9px); top: 0; }
.finale-words { margin: 0; font-size: 76px; line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; opacity: .2; transition: opacity .4s ease; }
.finale.on .finale-words { opacity: 1; animation: reached .5s ease-out; }
/* The download button under the words comes on after them. */
.finale-get { height: 46px; padding: 0 22px; margin-top: 28px; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.finale.on .finale-get { opacity: 1; transform: none; transition-delay: .5s; }
.finale.on .mile { background: var(--text); border-color: var(--text); transform: scale(1.3); }
.finale.on .mile::after { animation: mile 1.2s ease-out; }
.leg .shot.wide { max-width: none; }
/* An iPad standing upright: three wide to four tall, showing the lower part of a taller picture. */
.leg .shot.pad { max-width: 340px; aspect-ratio: 3 / 4; }
.leg .shot.pad img { height: 100%; object-fit: cover; object-position: center 88%; }

/* Flat capsule buttons. */
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--gap); background: var(--card); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.pill.dark { background: var(--primary); color: var(--on-primary); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Screenshots: the device's own picture in a black frame. */
.shot { background: #000; border: 6px solid #000; border-radius: 28px; overflow: hidden; }
.shot.wide { border-radius: 18px; }
.shot img { width: 100%; border-radius: 22px; }
.shot.wide img { border-radius: 12px; }
figure { margin: 0; }

/* Tables. */
.table-wrap { overflow-x: auto; border: 2px solid var(--gap); border-radius: 14px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); border-bottom: 2px solid var(--gap); }
td:first-child { font-weight: 600; }

/* A key cap in running text. */
kbd {
  display: inline-block; min-width: 24px; padding: 1px 6px; text-align: center;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--paper); border: 1px solid var(--gap); border-radius: 6px;
}
.pro { display: inline-block; padding: 1px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; background: var(--orange); color: var(--on-orange); vertical-align: 2px; }

a.cell { text-decoration: none; }

/* Videos on the Community page: a black screen with a play key, the title and who made it under it. */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.video { display: block; background: var(--card); border: 2px solid var(--gap); border-radius: 14px; overflow: hidden; text-decoration: none; }
.video-screen { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: #000; }
.video-screen .key { width: 84px; aspect-ratio: 3 / 2; background: var(--orange); box-shadow: none; }
.video-screen .key svg { fill: var(--on-orange); stroke: none; }
.video-screen iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-title { display: block; padding: 12px 16px 0; font-size: 16px; font-weight: 700; }
.video-by { display: block; padding: 2px 16px 14px; font-size: 12px; color: var(--sub); }
.video-empty { grid-column: 1 / -1; }

/* The footer. */
footer { margin-top: 64px; background: var(--bar); color: #E9E7E1; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; font-size: 12px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { color: #E9E7E1; }

/* Text pages (User Guide, Privacy Policy, Terms). */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; padding-top: 44px; align-items: start; }
.doc.plain { grid-template-columns: minmax(0, 720px); }
.doc article h1 { margin-bottom: 12px; }
.doc article h2 { margin-top: 44px; padding-top: 18px; border-top: 2px solid var(--gap); scroll-margin-top: 72px; }
.doc article h3 { scroll-margin-top: 72px; }
.doc article ul, .doc article ol { padding-left: 20px; margin: 0 0 12px; }
.doc article li { margin-bottom: 6px; }
.doc article .table-wrap, .doc article .card, .doc article .panel { margin: 12px 0 18px; }
.toc { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; }
.toc ol { list-style: none; padding: 0; margin: 0; border: 2px solid var(--gap); border-radius: 14px; overflow: hidden; background: var(--gap); display: grid; gap: 1px; }
.toc li { display: flex; background: var(--card); }
.toc a { flex: 1; padding: 9px 14px; background: var(--card); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; }
.toc a:hover { background: var(--paper); }
.note { border-left: 4px solid var(--orange); background: var(--card); padding: 12px 16px; margin: 12px 0 18px; font-size: 14px; }
.note p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  h1 { font-size: 34px; }
  h2 { font-size: 24px; }
  .hero, .leg { grid-template-columns: 1fr; gap: 24px; }
  .claims { grid-template-columns: 1fr; padding-top: 48px; }
  .claims > div, .claims > div:first-child, .claims > div:last-child { padding: 18px 0; border-left: 0; border-top: 1px solid var(--line); }
  .claims > div:first-child { border-top: 0; padding-top: 0; }
  .claims h2 { font-size: 34px; }
  .journey { padding-top: 56px; }
  .leg { padding: 4px 0 4px 26px; }
  .leg + .leg { margin-top: 56px; }
  .leg:nth-of-type(even) .leg-text { order: 0; }
  .leg:nth-of-type(even) .mile { left: -7px; right: auto; }
  .finale { margin-top: 56px; padding: 40px 0 72px 26px; text-align: left; }
  .finale .mile { left: -7px; top: 0; }
  .finale-words { font-size: 44px; }
  .mile { top: 24px; }
  .leg-word { font-size: 52px; }
  .hero > figure { order: 0; }
  .hero > .devices-figure { padding-bottom: 0; }
  .hero { padding-top: 18px; }
  .rig { transform: scale(.96) rotateX(-5deg); }
  .hero > div { justify-self: start; }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; max-height: none; }
  .toc ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .nav-links { gap: 18px; }
  .nav-get { display: none; }
  .finale-get { display: inline-flex; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; }
  .stage .lead { font-size: 18px; }
  .brand { font-size: 30px; }
  .block-word { font-size: 10px; }
  .read-mark { left: -14px; top: calc(var(--k) * 296 + 9px); border-left-width: 9px; border-top-width: 6px; border-bottom-width: 6px; }
  .keys button { padding: 6px 10px; }
  .key svg { width: 18px; height: 18px; }
}

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