/* Now Boarding: the site. Layout, copy and values are Figma 2165:11549; tokens mirror docs/design-system.md.
   A length written calc(var(--u) * n) is n points of the 1512 frame: it shrinks with a narrower window and holds above 1512. */

@font-face {
  font-family: "TASA Orbiter";
  src: url("../fonts/TASAOrbiter-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour */
  --ink: 20, 27, 31;
  --background-primary: #f0f3f5;
  --background-secondary: #ffffff;
  --text-primary: rgba(var(--ink), 0.9);
  --text-secondary: rgba(var(--ink), 0.6);
  --text-tertiary: rgba(var(--ink), 0.3);
  --text-inverse-primary: rgba(255, 255, 255, 0.9);
  --text-inverse-secondary: rgba(255, 255, 255, 0.6);
  --text-inverse-tertiary: rgba(255, 255, 255, 0.3);
  --border-subtle: rgba(var(--ink), 0.05);
  --border-moderate: rgba(var(--ink), 0.1);
  --border-intense: rgba(var(--ink), 0.2);
  --gradient-1: #175e82;
  --gradient-2: #0b2f41;
  --black-absolute: #0a0d0f;
  --foot-under: var(--black-absolute);  /* past the page's end, under the sky (Suhail's call) */
  --success: rgba(9, 170, 89, 0.9);
  --danger: rgba(195, 61, 34, 0.9);

  /* The frame's grid: 10 columns, 40 margin, 40 gutter, at most 1600 wide */
  --u: calc(min(100vw, 1512px) / 1512);
  --mar: calc(var(--u) * 40);
  --gut: calc(var(--u) * 40);
  --page: 1600px;

  /* Type: the frame's sizes, with a floor so a narrow window stays readable */
  --h1: max(44px, calc(var(--u) * 70));
  --h2: max(28px, calc(var(--u) * 40));
  --lead: max(18px, calc(var(--u) * 25));
  --body: max(16px, calc(var(--u) * 20));
  --fine: 15px;
  --intro: max(25px, calc(var(--u) * 35));        /* the intro message */
  --split-title: max(20px, calc(var(--u) * 30));  /* the titles of sections 7 and 8 */
  --field-text: 20px;                             /* the footer's email field */

  /* The headers: the logotype is set by its height; the second header's padding above and below its row */
  --logo-height: 40px;
  --bar-pad: 25px;
  --bar-button: 50px;
  /* A full-height part is as tall as the window is at this moment, bars and all (never 100vh) */
  --full: max(100dvh, 560px);
  /* The footer's room is as tall as the window at its tallest, which does not change as Safari's bars show and hide:
     a height that followed the bars changed the page's height under the reader as they scrolled across the footer */
  --room: max(100lvh, 560px);
  /* How much Safari's bars take from the window when they show; the footer's form keeps clear of them */
  --bars: calc(100lvh - 100svh);
  /* The footer: a black room the whole window tall. The window sky fills its top part (--sky-height) and fades into the
     room from --sky-fade-from of its own height (the horizon) to its foot, so it meets the room with no seam */
  --sky-height: 80%;
  --sky-fade-from: 50%;
  --sky-foot: 4px;      /* the fade is whole this far above the sky's edge */

  /* Radius */
  --r-tile: 10px;
  --r-bento: 15px;
  --r-card: 20px;
  --r-pill: 100px;

  /* Shadow, as Figma states them */
  --shadow-s: 0 5px 10px rgba(0, 0, 0, 0.05);
  --shadow-m: 0 5px 20px rgba(0, 0, 0, 0.1);
  --shadow-l: 0 5px 15px rgba(0, 0, 0, 0.15);
  --shadow-i: 0 5px 10px rgba(0, 0, 0, 0.15);

  /* Motion: the app's registers, sampled from their springs */
  --ease-quick: linear(0, 0.094, 0.2734, 0.4546, 0.6073, 0.7252, 0.8117, 0.873, 0.9154, 0.9443, 0.9636, 0.9763, 0.9847, 0.9902, 0.9937, 0.996, 0.9975, 0.9984, 1);
  --dur-quick: 0.367s;
  --ease-standard: linear(0, 0.0333, 0.1132, 0.2165, 0.3279, 0.4373, 0.5387, 0.6291, 0.7071, 0.7728, 0.8269, 0.8706, 0.9052, 0.9322, 0.9529, 0.9684, 0.9798, 0.9881, 0.9938, 0.9977, 1.0002, 1.0017, 1.0026, 1.0029, 1.0029, 1.0028, 1.0025, 1.0022, 1.0019, 1.0015, 1.0013, 1);
  --dur-standard: 0.622s;
  --ease-gentle: linear(0, 0.0127, 0.0459, 0.0937, 0.1512, 0.2145, 0.2807, 0.3473, 0.4127, 0.4756, 0.5352, 0.5908, 0.6421, 0.6889, 0.7314, 0.7695, 0.8034, 0.8335, 0.8599, 0.883, 0.903, 0.9202, 0.935, 0.9476, 0.9582, 0.9672, 0.9746, 0.9808, 0.9859, 0.99, 0.9933, 0.9959, 0.998, 0.9995, 1.0007, 1.0016, 1.0022, 1.0026, 1.0028, 1.003, 1.003, 1.0029, 1.0028, 1.0026, 1.0024, 1.0022, 1.0021, 1.0019, 1.0017, 1.0015, 1.0013, 1.0011, 1);
  --dur-gentle: 1.037s;
  --ease-press: linear(0, 0.0706, 0.2351, 0.4356, 0.632, 0.8002, 0.9292, 1.0174, 1.0691, 1.0917, 1.0936, 1.0825, 1.065, 1.0457, 1.028, 1.0135, 1.0029, 0.996, 0.9923, 0.991, 0.9914, 0.9928, 0.9946, 0.9964, 1);
  --dur-press: 0.469s;
  --stagger: 0.1s;
  --reveal-blur: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

/* The page's own colour is background-primary: Safari tints its bars from it, and a bounce shows it.
   The page does not bounce where the browser allows that. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--background-primary);
  overscroll-behavior: none;
}
/* While the footer shows, the colour past the page's end is the sky's foot: Safari shows it under its toolbar at the
   end of the page, and in a bounce there. Above the page it stays background-primary. */
html.is-at-foot { background: var(--foot-under); }

body {
  margin: 0;
  font-family: "TASA Orbiter", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--body);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  /* No colour of its own: Safari tints its bars from the body's colour before the root's */
  overscroll-behavior: none;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; }
ol, ul { list-style: none; }
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--gradient-1); outline-offset: 3px; border-radius: 4px; }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 10px 15px; font-size: 15px; background: var(--background-secondary); border-radius: var(--r-tile); box-shadow: var(--shadow-m); }

/* ---------- Grid ---------- */

.grid {
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); column-gap: var(--gut);
  width: 100%; max-width: var(--page); margin-inline: auto;
  padding-left: max(var(--mar), env(safe-area-inset-left, 0px)); padding-right: max(var(--mar), env(safe-area-inset-right, 0px));
}

/* ---------- Type ---------- */

h1 { font-size: var(--h1); line-height: 1.143; letter-spacing: -0.05em; }
h2 { font-size: var(--h2); line-height: 1.25; letter-spacing: -0.04em; }
.lead { font-size: var(--lead); line-height: 1.6; font-weight: 400; color: var(--text-secondary); }
.title { font-size: var(--split-title); line-height: 1.333; font-weight: 500; letter-spacing: -0.02em; color: var(--text-primary); }

/* ---------- The page layer, its cover and its header ---------- */

/* A scene may stand a piece outside its stage before it plays; the page never scrolls sideways for it */
/* The page is opaque in its own colour: the fixed cover ends at the window's foot, and Safari shows the page past it,
   under its toolbar; there the footer, waiting under the page, must not show through */
.page { position: relative; z-index: 1; clip-path: inset(0); overflow-x: clip; padding-bottom: calc(var(--u) * 200); background: var(--background-primary); }
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(var(--background-secondary), var(--background-primary)); }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.5s ease; }
.cover.is-live { opacity: 1; }

/* The header: always at the top, the whole window wide whatever the page's width, with the logotype on the app's
   header band (ContrastScrim). Its button comes in when the reader has passed the hero, and leaves on the way back. */
.bar {
  --flat: env(safe-area-inset-top, 0px);
  --at: calc(100% - var(--flat));
  position: fixed; inset: 0 0 auto 0; z-index: 10; pointer-events: none;
  padding-top: calc(var(--bar-pad) + env(safe-area-inset-top, 0px)); padding-bottom: var(--bar-pad);
}
.bar-row.grid { max-width: none; }
.bar-row { position: relative; align-items: center; min-height: var(--bar-button); }
.bar-row > * { pointer-events: auto; }
/* The tint: background-secondary, solid behind the status bar, then easing out down the header along the app's tint
   curve, cubic-bezier(0.5, 0.1, 0.5, 1). It is a solid colour under a mask, so that Safari reads it as the header's
   colour and gives its toolbar the same. */
.bar-band {
  position: absolute; inset: 0; background-color: var(--background-secondary);
  --tint: linear-gradient(
    #000 var(--flat), rgb(0 0 0 / 0.991) calc(var(--flat) + var(--at) * 0.083), rgb(0 0 0 / 0.961) calc(var(--flat) + var(--at) * 0.167),
    rgb(0 0 0 / 0.904) calc(var(--flat) + var(--at) * 0.25), rgb(0 0 0 / 0.814) calc(var(--flat) + var(--at) * 0.333), rgb(0 0 0 / 0.689) calc(var(--flat) + var(--at) * 0.417),
    rgb(0 0 0 / 0.537) calc(var(--flat) + var(--at) * 0.5), rgb(0 0 0 / 0.382) calc(var(--flat) + var(--at) * 0.583), rgb(0 0 0 / 0.248) calc(var(--flat) + var(--at) * 0.667),
    rgb(0 0 0 / 0.144) calc(var(--flat) + var(--at) * 0.75), rgb(0 0 0 / 0.072) calc(var(--flat) + var(--at) * 0.833), rgb(0 0 0 / 0.026) calc(var(--flat) + var(--at) * 0.917),
    transparent);
  -webkit-mask-image: var(--tint); mask-image: var(--tint);
}
/* The blur: the app's two layers (2 and 4 points) folded into one, shown where either layer shows */
.bar-blur {
  position: absolute; inset: 0;
  -webkit-backdrop-filter: blur(4.5px); backdrop-filter: blur(4.5px);
  --fade: linear-gradient(#000 calc(var(--flat) + var(--at) * 0.583), rgb(0 0 0 / 0.965) calc(var(--flat) + var(--at) * 0.667), rgb(0 0 0 / 0.762) calc(var(--flat) + var(--at) * 0.75), rgb(0 0 0 / 0.382) calc(var(--flat) + var(--at) * 0.833), rgb(0 0 0 / 0.105) calc(var(--flat) + var(--at) * 0.917), transparent);
  -webkit-mask-image: var(--fade); mask-image: var(--fade);
}
/* The logotype stands at the top of the row, 25 from the top on the desktop */
.bar-row > .logotype { align-self: start; }
/* The button: the hero's secondary button. Under Reduce Motion it fades without moving. */
.bar-cta {
  grid-column: 7 / span 4; justify-self: end; opacity: 0; visibility: hidden; transform: translate3d(0, -10px, 0);
  transition: opacity var(--dur-standard) var(--ease-standard), transform var(--dur-standard) var(--ease-standard), visibility 0s linear var(--dur-standard);
}
.has-passed-hero .bar-cta { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
/* The header is part of the page layer and lifts away with it; when the page has passed it, it goes */
.is-under-sky .bar, .is-under-sky .backdrop { visibility: hidden; }
.bar-cta.btn-big { height: var(--bar-button); }

.logotype { grid-column: 1 / span 2; justify-self: start; position: relative; display: block; height: var(--logo-height); aspect-ratio: 99.56 / 40; }
.logotype-ink {
  position: absolute; inset: 0;
  -webkit-mask: url("../img/logotype.svg") center / contain no-repeat; mask: url("../img/logotype.svg") center / contain no-repeat;
  /* The Splash logotype's sheen: a highlight crossing right to left */
  background: linear-gradient(90deg, var(--gradient-2) 0, var(--gradient-2) 33.3%, var(--gradient-1) 50%, var(--gradient-2) 66.6%, var(--gradient-2) 100%) 0 0 / 300% 100%;
  animation: sheen 5s linear infinite;
}
@keyframes sheen { from { background-position: 0 0; } to { background-position: 100% 0; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
  border-radius: var(--r-pill);
  transition: transform var(--dur-press) var(--ease-press), box-shadow var(--dur-quick) var(--ease-quick), background-color var(--dur-quick) var(--ease-quick);
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.96); transition-duration: 0.06s; transition-timing-function: ease-out; }
.btn-big { height: 50px; padding: 0 20px; }
.btn-primary { color: #fff; background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2)); box-shadow: var(--shadow-m); }
.btn-light { color: var(--text-primary); background: var(--background-primary); box-shadow: inset 0 0 0 1px var(--border-moderate); }
.btn-outline { color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-moderate); }
@media (hover: hover) {
  .btn-primary:hover { box-shadow: 0 5px 20px rgba(0, 0, 0, 0.18); }
  .btn-light:hover { background: var(--background-secondary); }
  .btn-outline:hover { background: rgba(255, 255, 255, 0.6); }
}

/* An icon takes the colour of the text beside it */
.ic { flex: none; display: inline-block; width: 20px; height: 20px; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.ic-chevron-right { -webkit-mask-image: url("../img/icons/chevron-right-20.svg"); mask-image: url("../img/icons/chevron-right-20.svg"); }
.ic-chevron-down { -webkit-mask-image: url("../img/icons/chevron-down-30.svg"); mask-image: url("../img/icons/chevron-down-30.svg"); }

/* ---------- Entrances ---------- */

[data-enter], [data-reveal] {
  opacity: 0; filter: blur(var(--reveal-blur));
  transition: opacity var(--dur-gentle) var(--ease-gentle), filter var(--dur-gentle) var(--ease-gentle);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.is-ready [data-enter], [data-reveal].is-in { opacity: 1; filter: none; }
/* The first screen arrives in this order, each part fading in on Motion.gentle: the logotype, then the phone,
   the title, its line and the button, at these delays */
[data-enter="logo"] { transition-delay: 0s; }
[data-enter="phone"] { transition-delay: 0.25s; }
[data-enter="title"] { transition-delay: 0.5s; }
[data-enter="line"] { transition-delay: 0.7s; }
[data-enter="button"] { transition-delay: 0.9s; }

/* ---------- Hero ---------- */

/* The words stand where the frame puts them, 300 points down, now that the phone sets the hero's height */
.hero { position: relative; min-height: var(--full); }
.hero-copy { grid-column: 2 / span 3; grid-row: 1; align-self: start; padding-top: calc(var(--u) * 300); will-change: transform; }
.hero-line { margin-top: calc(var(--u) * 20); color: var(--text-secondary); }
.hero-cta { margin-top: calc(var(--u) * 40); }
/* The framed phone: six columns wide, from the hero's top (Figma 2216:14166). It grows with the window's width,
   up to the page's greatest width. The intro starts at the picture's foot, which is empty, as in the frame. */
.hero-phone { grid-column: 5 / span 6; grid-row: 1; align-self: start; position: relative; pointer-events: none; }
.hero-phone img { width: 100%; height: auto; margin-bottom: calc(var(--u) * -80); }

/* ---------- Intro message ---------- */

.intro { padding-top: calc(var(--u) * 130); }
.intro-text { grid-column: 3 / span 6; display: grid; gap: calc(var(--u) * 30); font-size: var(--intro); line-height: 1.43; letter-spacing: -0.04em; }
.intro-text .w { color: var(--text-tertiary); transition: color 0.5s ease; }
.intro-text .w.is-on { color: var(--text-primary); }

/* ---------- Sections 1, 2, 4, 5: text beside a graphic ---------- */

.fold, .states, .vows, .split { margin-top: calc(var(--u) * 200); }
.fold.fold-near { margin-top: calc(var(--u) * 100); }

/* Text stands over a graphic where the two meet: a graphic's light or blur never fades the words */
.fold-side, .states-text, .rows, .vows-text, .pairs, .vows-more { position: relative; z-index: 1; }
.stage, .sync { z-index: 0; }

.fold-side { grid-column: 2 / span 4; grid-row: 1; display: flex; align-items: center; }
.fold > .stage { grid-column: 6 / span 4; grid-row: 1; }
.fold-flip .fold-side { grid-column: 6 / span 4; }
.fold-flip > .stage { grid-column: 2 / span 4; }
.fold-text { width: 100%; }
.fold-text .lead { margin-top: calc(var(--u) * 20); }

/* The third line: hidden; the text side shows it, and the text box grows */
.third { display: grid; grid-template-rows: 0fr; opacity: 0; filter: blur(var(--reveal-blur)); transition: grid-template-rows var(--dur-standard) var(--ease-standard), opacity var(--dur-standard) var(--ease-standard), filter var(--dur-standard) var(--ease-standard); }
.third > p { overflow: hidden; min-height: 0; color: var(--text-tertiary); }
.third > p::before { content: ""; display: block; height: calc(var(--u) * 20); }
.fold-side.is-open .third { grid-template-rows: 1fr; opacity: 1; filter: none; }
@media (hover: hover) {
  .fold-side:hover .third { grid-template-rows: 1fr; opacity: 1; filter: none; }
}

/* A stage: a piece of the app drawn in code, on the frame's own points. It shows --crop-width of the piece's points
   across, from --crop-left (plain numbers: a script reads them). */
.stage { position: relative; width: 100%; aspect-ratio: 402 / 554; --crop-left: 0; --crop-width: 402; }
.stage-wide { aspect-ratio: 696 / 500; --crop-width: 696; }
/* Sections 1, 2, 4 and 5: the stage is 4 columns, 548.8 points of the 1512 frame. The piece keeps a 402-wide
   phone's size, centred: the cards do not stretch, and a map shows more of itself. */
.fold > .stage { aspect-ratio: 548.8 / 554; --crop-left: -73.4; --crop-width: 548.8; }

/* ---------- Section 3: four moments ---------- */

.states-text { grid-column: 3 / span 6; text-align: center; }
.states-text .lead { margin-top: calc(var(--u) * 20); }
.rows { grid-column: 2 / span 3; grid-row: 2; align-self: center; margin-top: calc(var(--u) * 100); }
.states > .stage { grid-column: 5 / span 5; grid-row: 2; margin-top: calc(var(--u) * 100); }
.rows li + li { margin-top: calc(var(--u) * 30); }
.rows button {
  /* The time takes one column of the page's grid (the rows span three) */
  display: grid; grid-template-columns: var(--time-column, calc((100% - 2 * var(--gut)) / 3)) minmax(0, 1fr); column-gap: var(--gut); width: 100%; text-align: left;
  font-size: var(--body); line-height: 1.5; color: var(--text-tertiary); -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-standard) var(--ease-standard);
}
.row-time { font-weight: 500; font-variant-numeric: tabular-nums; }
.rows .is-on button { color: var(--text-primary); }
.rows .is-on .row-time { background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (hover: hover) { .rows li:not(.is-on) button:hover { color: var(--text-secondary); } }
.row-line { display: block; position: relative; height: 1px; margin-top: calc(var(--u) * 30); background: var(--border-moderate); }
.row-line i { position: absolute; inset: 0; background: var(--text-secondary); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); opacity: 0; transition: opacity var(--dur-standard) var(--ease-standard); }
.rows .is-on .row-line i { opacity: 1; }

/* ---------- Section 6: what is promised ---------- */

.sync { grid-column: 3 / span 6; justify-self: center; position: relative; width: 200px; height: 200px; }
.vows-text { grid-column: 3 / span 6; margin-top: calc(var(--u) * 100); text-align: center; }
.vows-text .lead { margin-top: calc(var(--u) * 20); }
.pairs { grid-column: 3 / span 6; margin-top: calc(var(--u) * 100); display: grid; grid-template-columns: subgrid; }
.pairs li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding: calc(var(--u) * 30) 0; border-top: 1px solid var(--border-moderate); }
.pairs li:first-child { padding-top: 0; border-top: 0; }
.pairs li:last-child { padding-bottom: 0; }
.pairs h3 { grid-column: span 2; font-weight: 500; }
.pairs p { grid-column: span 4; color: var(--text-secondary); }
.vows-more { grid-column: 3 / span 6; margin-top: calc(var(--u) * 100); text-align: center; }

/* ---------- Sections 7 and 8: a title beside its text ---------- */

.split-title { grid-column: 2 / span 3; }
.split-body { grid-column: 5 / span 5; }
.byline { margin-top: calc(var(--u) * 20); color: var(--text-secondary); }
.note { display: grid; gap: calc(var(--u) * 20); color: var(--text-secondary); }

.qa { padding-bottom: calc(var(--u) * 30); border-bottom: 1px solid var(--border-moderate); }
.qa + .qa { margin-top: calc(var(--u) * 30); }
.qa button { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--gut); width: 100%; text-align: left; font-weight: 500; -webkit-tap-highlight-color: transparent; }
.qa .ic { width: 30px; height: 30px; color: rgb(var(--ink)); transition: transform var(--dur-standard) var(--ease-standard); }
.qa.is-open .ic { transform: rotate(180deg); }
.qa-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-standard) var(--ease-standard); }
.qa.is-open .qa-body { grid-template-rows: 1fr; }
.qa-body > div { overflow: hidden; min-height: 0; }
.qa-body p { padding-top: calc(var(--u) * 30); color: var(--text-secondary); opacity: 0; filter: blur(var(--reveal-blur)); transition: opacity var(--dur-standard) var(--ease-standard), filter var(--dur-standard) var(--ease-standard); }
.qa.is-open .qa-body p { opacity: 1; filter: none; transition-delay: var(--stagger); }

/* ---------- The footer, on the window sky, behind the page ---------- */

/* The footer is the page's last part, not a fixed layer: Safari tints its bars from fixed parts at the window's edges,
   and a fixed dark footer turned the bottom bar black. It is another card behind the page: it stands half a window
   higher, under the page, and comes back to its place as it is revealed, so it scrolls in at half the scroll's speed.
   The browser runs this from the scroll itself (a view timeline); site.js does it where a browser cannot. */
.sky-room { position: relative; z-index: 0; height: var(--room); view-timeline: --sky-room block; }
.sky {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; isolation: isolate;
  color: var(--text-inverse-primary); background: var(--black-absolute);
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
@supports (animation-timeline: view()) {
  .sky { animation: sky-rise linear both; animation-timeline: --sky-room; animation-range: entry 0% entry 100%; }
}
@keyframes sky-rise { from { transform: translate3d(0, -50%, 0); } to { transform: none; } }
.sky.is-dragging { cursor: grabbing; }
/* The sky fades out from its horizon, so the room's black shows through it: a mask, not a black layer over it. The fade
   is whole --sky-foot before the picture's edge, so the picture's last row never draws, at any height or pixel ratio.
   A centred cover crop keeps the horizon at half the sky's height on every window shape: the recordings and the stills
   are drawn with the horizon at half the frame. The still, the recording and the fade between them all sit in here. */
.sky-view {
  position: absolute; inset: 0 0 auto 0; height: var(--sky-height); z-index: -2;
  -webkit-mask-image: linear-gradient(#000 var(--sky-fade-from), transparent calc(100% - var(--sky-foot)));
  mask-image: linear-gradient(#000 var(--sky-fade-from), transparent calc(100% - var(--sky-foot)));
}
.sky-view video, .sky-view img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; object-fit: cover; }
/* The recording fades in over the still it opens on */
.sky-view video { opacity: 0; transition: opacity 1.5s ease; }
.sky-view.is-live video { opacity: 1; }
/* The sky's grain, laid over the recording: noise that changes every frame cannot be recorded small */
/* The grain lies over the still and the recording, inside the sky's box, so it fades out with the sky and the room
   stays the app's black */
.sky-grain { position: absolute; inset: -64px; z-index: 1; pointer-events: none; background: 0 0 / 128px 128px; /* 384 pixels in 128 points: one grain to a device pixel on a 3x screen, never larger */ mix-blend-mode: overlay; opacity: var(--sky-grain, 0.1); animation: grain 0.4s steps(1) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 17% { transform: translate(-37px, 21px); } 33% { transform: translate(19px, -43px); } 50% { transform: translate(-53px, -11px); } 67% { transform: translate(41px, 33px); } 83% { transform: translate(-9px, 57px); } }

/* The Splash's dial, turned over: its lowest 100 points show, and the time stands under it */
.scrubber { position: absolute; inset: env(safe-area-inset-top, 0px) 0 auto 0; height: 160px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity var(--dur-gentle) var(--ease-gentle); }
.sky.is-live .scrubber { opacity: 1; }
/* The grain's picture is asked for only when the footer comes near, so it never weighs on the first view */
.sky.is-live .sky-grain { background-image: url("../img/grain.png"); }
/* At 09:00, after the hold, the sky and the dial fade out together, and back in at 05:00 */
.sky.is-rewinding .sky-view, .sky.is-rewinding .scrubber { opacity: 0; transition: opacity 0.75s ease; }
.sky-view { transition: opacity 0.75s ease; }
.gauge { position: absolute; left: 50%; top: -900px; width: 1000px; height: 1000px; margin-left: -500px; will-change: transform; }
.gauge svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* Every line of the dial changes with the sky: by day the mark is text-primary, the hours text-secondary and the
   minutes text-tertiary; by night the same three in the inverse set */
.gauge .tick-minute { stroke: var(--text-tertiary); transition: stroke var(--dur-gentle) var(--ease-gentle); }
.gauge .tick-hour { stroke: var(--text-secondary); transition: stroke var(--dur-gentle) var(--ease-gentle); }
.gauge-mark { position: absolute; left: 50%; top: 80px; width: 1px; height: 20px; margin-left: -0.5px; background: var(--text-primary); transition: background-color var(--dur-gentle) var(--ease-gentle); }
.sky.is-dark-sky .gauge .tick-hour { stroke: var(--text-inverse-secondary); }
.sky.is-dark-sky .gauge-mark { background: var(--text-inverse-primary); }
.sky-time {
  position: absolute; inset: 115px 0 auto 0; text-align: center;
  font-size: 25px; line-height: 35px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text-secondary);
  transition: color var(--dur-gentle) var(--ease-gentle);
}
/* Each digit rolls on its own when the time changes (digits.js) */
.sky-time .dg { position: relative; display: inline-block; }
.sky-time .dg-glyph { display: inline-block; }
.sky-time .dg-glyph.is-leaving { position: absolute; left: 0; top: 0; }
/* The inverse ink from 05:00 to 06:00, so the clock and the dial read on the dark sky (Suhail's ruling for this page) */
.sky.is-dark-sky .sky-time { color: var(--text-inverse-secondary); }
.sky.is-dark-sky .gauge .tick-minute { stroke: var(--text-inverse-tertiary); }

/* The field that takes the cursor at a tap on an early-access button, until the page reaches the form (site.js) */
.stand-in { position: fixed; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; background: transparent; font-size: 16px; pointer-events: none; }

/* The form stands clear of the home indicator. It does not move when a keyboard opens: the browser brings the field
   into view by itself */
.sky-foot {
  position: absolute; inset: auto 0 0 0; padding-bottom: calc(min(100px, 11svh) + var(--bars) + env(safe-area-inset-bottom, 0px)); cursor: auto;
}
.invite { grid-column: 3 / span 6; display: flex; flex-direction: column; gap: 20px; text-align: center; }
.invite h2 { color: var(--text-inverse-primary); }
.invite-line { color: var(--text-inverse-secondary); }
.field-check { display: flex; justify-content: center; }
.field-check:empty { display: none; }
.field.is-sending .btn { opacity: 0.6; pointer-events: none; }
.fine { font-size: var(--fine); line-height: 20px; color: var(--text-inverse-tertiary); }
.fine-links { display: flex; justify-content: center; gap: 20px; }
.fine-links a { text-underline-position: from-font; transition: color var(--dur-quick) var(--ease-quick); }
.fine-links a:hover, .fine-links a:focus-visible { color: var(--text-inverse-secondary); }
.sky :focus-visible { outline-color: #fff; }

/* The field: Figma 2231:14174 (entering), 2231:14397 (bad address), 2231:14611 (submitted) */
.field {
  position: relative; display: flex; align-items: center; gap: 30px; height: 62px; padding: 5px 5px 5px 30px; text-align: left;
  background: var(--text-tertiary); border: 1px solid var(--text-inverse-tertiary); border-radius: var(--r-pill);
  transition: border-color var(--dur-standard) var(--ease-standard);
}
.field-slot { position: relative; flex: 1 1 0; min-width: 0; align-self: stretch; display: flex; align-items: center; }
.field input {
  width: 100%; height: 100%; padding: 0; font: inherit; font-size: var(--field-text); line-height: 30px; letter-spacing: -0.02em; color: var(--text-inverse-primary); caret-color: #fff;
  background: none; border: 0; outline: 0; border-radius: 0; user-select: text; -webkit-user-select: text;
  transition: opacity var(--dur-standard) var(--ease-standard);
}
.field input::placeholder { color: var(--text-inverse-tertiary); opacity: 1; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text-inverse-primary); transition: background-color 99999s; }
.field:focus-within { border-color: var(--text-inverse-secondary); }
.field-say {
  position: absolute; inset: 0; display: flex; align-items: center; font-size: var(--field-text); line-height: 30px; color: var(--text-inverse-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-standard) var(--ease-standard);
}
.field .btn { flex: none; transition: transform var(--dur-press) var(--ease-press), background-color var(--dur-quick) var(--ease-quick), opacity var(--dur-standard) var(--ease-standard); }
/* A message stands in the field's text */
.field.is-saying input { opacity: 0; pointer-events: none; }
.field.is-saying .field-say { opacity: 1; }
.field.is-bad, .field.is-failed { border-color: var(--danger); }
/* The message leaves: the gentle register */
.field.is-leaving { transition-duration: var(--dur-gentle); transition-timing-function: var(--ease-gentle); }
.field.is-leaving .field-say { transition-duration: var(--dur-gentle); transition-timing-function: var(--ease-gentle); }
.field.is-done { border-color: var(--success); }
.field.is-done .field-say { position: absolute; inset: 0 -30px 0 0; justify-content: center; }
.field.is-done .field-slot { margin-right: 25px; }
.field.is-done .btn { position: absolute; right: 5px; opacity: 0; pointer-events: none; }

/* ---------- The stacked layout: phones, and tablets in portrait ----------
   Everything is full width with a 20 margin. A section's text stands above its graphic; in section 3 the rows
   stand below the graphic; in sections 6, 7 and 8 the left column stands above the right, as a heading.
   Every value Suhail tunes is one name in the first block. The width at which the page changes to this layout
   is the number in the @media line below, and nowhere else: the scripts read --stacked. */

@media (max-width: 899px) {
  :root {
    --stacked: 1;

    /* Margins and the column */
    --mar: 20px;               /* the side margin */
    --gut: 20px;
    --column-max: 600px;       /* the one column's greatest width; a tablet in portrait shows it centred */
    --u: 0.72px;               /* one design point, for the small spacings inside a text block */

    /* Type */
    --h1: 40px;                /* the hero's title */
    --h2: 30px;                /* a section's title */
    --intro: 20px;             /* the intro message */
    --split-title: 20px;       /* the titles of sections 7 and 8 */
    --lead: 18px;              /* a section's text */
    --body: 16px;              /* rows, promises, the note, questions */
    --fine: 14px;              /* the footer's small print */
    --sky-title: 28px;         /* the footer's title */
    --field-text: 16px;        /* the email field; 16 or more, or Safari zooms the page on focus */

    /* Headers */
    --logo-height: 35px;       /* the logotype, by its height */
    --bar-pad: 20px;           /* above and below the headers' row */
    --bar-button: 40px;        /* the second header's button height */

    /* Vertical spacing */
    --hero-top: 150px;         /* the window's top to the hero's title */
    --gap-hero-line: 15px;     /* the hero's title to its line */
    --gap-hero-button: 30px;   /* the hero's line to its button */
    --gap-hero-phone: 40px;    /* the hero's button to the phone picture's top */
    --hero-phone-shift: -40px; /* the phone moves up by this, and leaves its room behind it */
    --gap-intro: 50px;         /* the hero to the intro message */
    --gap-intro-para: 20px;    /* between the intro's paragraphs */
    --gap-section: 100px;      /* one section to the next */
    --gap-vows: 200px;         /* section 5 to section 6, above the sync pill */
    --gap-title: 15px;         /* a section's title to its text, and to its third line */
    --gap-graphic: 20px;       /* a section's text to its graphic */
    --gap-map3: 40px;          /* section 3: the text to the map, and the map to the rows */
    --time-column: 80px;       /* section 3: the rows' time column */
    --gap-row: 20px;           /* section 3: around each row's line */
    --gap-pill: 100px;         /* section 6: the sync pill to the title */
    --gap-heading: 30px;       /* sections 6, 7 and 8: the heading column to the text under it */
    --gap-promise: 20px;       /* section 6: above and below each promise */
    --gap-note: 15px;          /* section 7: between the note's paragraphs */
    --gap-question: 20px;      /* section 8: around each question */
    --gap-foot: 100px;         /* the last section to the footer */
    --foot-bottom: 30px;       /* the footer's links to the window's foot, where the browser has no bars */
    /* The footer's links to the window's foot, with the bars: the larger of --foot-bottom and the bars' height with the
       safe area, so it is 30 less than the two added together once the bars are 30 or more, and never below 30 */
    --foot-pad: max(var(--foot-bottom), calc(var(--bars) + env(safe-area-inset-bottom, 0px)));

    /* Crops and sizes */
    --hero-phone-width: 150%;  /* the phone picture against the column: its empty margin and shadow pass the edges */
    --hero-phone-cut: 18%;     /* how much of the picture's empty foot the next section covers */
    --map3-left: 147;          /* section 3: the part of the 696 x 500 map that shows, in the map's own points */
    --map3-width: 402;         /* (the tile stands 20 points in from each side, as on a 402-wide phone) */
    --map3-height: 500;
    --cover-fade: 50px;        /* the cover fades out over this at the window's top and foot */
  }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: calc(var(--column-max) + 2 * var(--mar)); }
  .grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .bar-row > .logotype { grid-column: 1 / span 2 !important; grid-row: 1 !important; }  .bar-row > .bar-cta { grid-column: 2 / span 3 !important; grid-row: 1 !important; padding: 0 15px; }
  .page { padding-bottom: var(--gap-foot); }
  .backdrop::before, .backdrop::after { content: ""; position: absolute; inset-inline: 0; z-index: 1; height: calc(var(--cover-fade) + env(safe-area-inset-top, 0px)); }
  .backdrop::before { top: 0; background: linear-gradient(var(--background-secondary), rgb(255 255 255 / 0)); }
  .backdrop::after { bottom: 0; height: calc(var(--cover-fade) + env(safe-area-inset-bottom, 0px)); background: linear-gradient(rgb(240 243 245 / 0), var(--background-primary)); }

  .hero { min-height: 0; padding-top: var(--hero-top); }
  .hero-copy { padding-top: 0; }
  .hero-line { margin-top: var(--gap-hero-line); }
  .hero-cta { margin-top: var(--gap-hero-button); }
  .hero-phone { margin-top: var(--gap-hero-phone); top: var(--hero-phone-shift); }
  .hero-phone img {
    display: block; width: var(--hero-phone-width); max-width: none; height: auto;
    margin: 0 calc((100% - var(--hero-phone-width)) / 2) calc(-1 * var(--hero-phone-cut));
  }
  .intro { padding-top: var(--gap-intro); }
  .intro-text { gap: var(--gap-intro-para); }

  .fold, .states, .vows, .split, .fold.fold-near { margin-top: var(--gap-section); }
  .fold-side { display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .fold-text .lead, .states-text .lead, .vows-text .lead, .byline { margin-top: var(--gap-title); }
  .third > p::before { height: var(--gap-title); }
  .fold > .stage { margin-top: var(--gap-graphic); aspect-ratio: 402 / 554; --crop-left: 0; --crop-width: 402; }
  .states > .stage { margin-top: var(--gap-map3); aspect-ratio: var(--map3-width) / var(--map3-height); --crop-left: var(--map3-left); --crop-width: var(--map3-width); }
  .states-text { text-align: left; }
  .rows { order: 3; margin-top: var(--gap-map3); }
  .rows li + li { margin-top: var(--gap-row); }
  .row-line { margin-top: var(--gap-row); }
  .vows { margin-top: var(--gap-vows); }
  .sync { justify-self: center; height: 40px; }
  .vows-text { text-align: left; margin-top: var(--gap-pill); }
  .pairs { margin-top: var(--gap-heading); grid-template-columns: minmax(0, 1fr); }
  .pairs li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: var(--gap-promise) 0; }
  .vows-more { margin-top: var(--gap-heading); text-align: left; }
  .vows-more .btn { height: var(--bar-button); padding: 0 15px; }
  .split-body { margin-top: var(--gap-heading); }
  .note { gap: var(--gap-note); }
  .qa { padding-bottom: var(--gap-question); }
  .qa + .qa { margin-top: var(--gap-question); }
  .qa-body p { padding-top: var(--gap-question); }

  .sky-foot { padding-bottom: var(--foot-pad); }
  .invite { gap: 15px; }
  .invite h2 { font-size: var(--sky-title); }
  /* The field and the button stand apart: the field's border and fill go to the field alone, never behind the button */
  .field { flex-wrap: wrap; height: auto; padding: 0; border: 0; gap: 10px; background: none; }
  .field-slot { flex: 1 1 100%; height: 50px; padding: 0 20px; background: var(--text-tertiary); border: 1px solid var(--text-inverse-tertiary); border-radius: var(--r-pill); transition: border-color var(--dur-standard) var(--ease-standard); }
  .field-say { inset: 0 20px; }
  /* The button stands under the field, as wide as its words */
  .field .btn { flex: 0 0 auto; margin-inline: auto; }
  .field.is-bad .field-slot, .field.is-failed .field-slot { border-color: var(--danger); }
  .field.is-done .field-slot { border-color: var(--success); margin-right: 0; }
  .field.is-done .field-say { inset: 0 20px; white-space: normal; text-align: center; line-height: 20px; }
  .field.is-done .btn { position: static; display: none; }
}

/* ---------- Reduce Motion: plain fades, nothing drifts ---------- */

@media (prefers-reduced-motion: reduce) {
  :root { --reveal-blur: 0px; }
  .bar-cta { transform: none; }
  /* The footer has no parallax: it scrolls in with the page */
  .sky { animation: none !important; transform: none !important; }
  .sky-grain { animation: none; }
  .logotype-ink { animation: none; background: var(--gradient-2); }
  .btn:active { transform: none; }
}
