/* Rollmark: the dark contact sheet from the app icon and welcome screen. One look, SF Pro via the system stack. */
:root {
  color-scheme: dark;
  --ground: #121214;
  --ground-raised: #1b1b1f;
  --line: #2c2c31;
  --ink: #f5f5f7;
  --ink-2: #a1a1a8;
  --ink-3: #6e6e76;
  --paper: #ffffff;
  --paper-ink: #26262b;
  --chip: #ebebee;
  --chip-ink: #5a5a61;
  --sun: #ffb347;      /* golden hour, from the icon's scenes */
  --sky: #7ec8f0;
  --leaf: #3fa34d;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
}

* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }

/* Nav floats over the hero. */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(18px + env(safe-area-inset-top)) var(--gutter) 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; }
.brand img { width: 32px; height: 32px; }
.nav-status { color: var(--ink-2); font-size: 14px; }

/* ---------------------------------------------------------------------------------------- Hero */
.hero {
  position: relative;
  min-height: min(100svh, 1000px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.backdrop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Top layer first: the fade into the page, then the dimming toward the centre. */
  background:
    linear-gradient(to bottom, transparent 72%, var(--ground)),
    radial-gradient(ellipse 62% 58% at 50% 52%, rgba(0,0,0,.86), rgba(0,0,0,.62) 55%, rgba(0,0,0,.35) 100%),
    linear-gradient(rgba(18,18,20,.55), rgba(18,18,20,.55));
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  max-width: 780px;
  padding: 120px var(--gutter) 88px;
}
.eyebrow { color: var(--sun); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; margin-top: 18px; }
h1 { font-size: clamp(36px, 6.2vw, 64px); line-height: 1.05; font-weight: 700; }
.lede { color: var(--ink-2); font-size: clamp(17px, 2vw, 20px); max-width: 60ch; }
.badge {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-weight: 600;
  font-size: 15px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(255,179,71,.6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,179,71,0); } 100% { box-shadow: 0 0 0 0 rgba(255,179,71,0); } }

/* The lifted print, as on the welcome screen. */
.print {
  margin: 0;
  width: 232px;
  padding: 11px;
  background: var(--paper);
  border-radius: 13px;
  box-shadow: 0 14px 44px rgba(0,0,0,.6);
  text-align: left;
  display: grid;
  gap: 8px;
  transition: opacity .45s ease, transform .45s ease;
}
.print.is-leaving { opacity: 0; transform: translateY(-8px) scale(.98); }
.print-photo { width: 100%; aspect-ratio: 3 / 2; border-radius: 6px; display: block; }
.print-caption { position: relative; color: var(--paper-ink); font-size: 12px; font-weight: 500; line-height: 1.35; }
.print-caption-sizer { visibility: hidden; }
.print-caption-text { position: absolute; inset: 0; }
.print-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; opacity: 0; transition: opacity .4s ease; }
.print-tags.is-shown { opacity: 1; }
.print-tags span { font-size: 10px; font-weight: 500; color: var(--chip-ink); background: var(--chip); border-radius: 999px; padding: 3px 7px; }

/* ---------------------------------------------------------------------------------------- Sections */
.section { padding: 96px var(--gutter); max-width: 1120px; margin: 0 auto; display: grid; gap: 28px; }
.section h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; font-weight: 700; }
.section-lede { color: var(--ink-2); font-size: 19px; max-width: 62ch; }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.point { background: var(--ground-raised); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: grid; gap: 10px; align-content: start; }
.point svg, .privacy-mark svg { width: 30px; height: 30px; fill: none; stroke: var(--sun); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.point:nth-child(2) svg { stroke: var(--sky); }
.point:nth-child(3) svg { stroke: var(--leaf); }
.point h3 { font-size: 19px; }
.point p { color: var(--ink-2); font-size: 16px; }

/* Styles marquee: three short rows drifting, fading at the edges. Short rows keep each animated layer small. */
.styles { max-width: none; padding-left: 0; padding-right: 0; }
.styles h2, .styles .section-lede { padding: 0 var(--gutter); max-width: 1120px; margin: 0 auto; width: 100%; }
.marquee { position: relative; display: grid; gap: 12px; overflow: hidden; }
/* Edge fades as overlays, not a mask: a mask makes Safari composite the whole (very wide) row as one layer,
   which iOS stops painting past its texture size limit, cutting the row off. */
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(to right, var(--ground), transparent); }
.marquee::after { right: 0; background: linear-gradient(to left, var(--ground), transparent); }
.marquee-row { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; width: max-content; animation: drift 45s linear infinite; }
.marquee-row--reverse { animation-direction: reverse; animation-duration: 52s; }
.marquee-row--slow { animation-duration: 58s; }
.marquee-row li {
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ground-raised);
  border: 1px solid var(--line);
  font-size: 17px;
  font-weight: 500;
}
.marquee-row li:nth-child(4n+1) { color: var(--sun); }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.privacy { grid-template-columns: 1fr; justify-items: start; }
.privacy-mark { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: rgba(63,163,77,.14); }
.privacy-mark svg { stroke: #5fd06f; width: 34px; height: 34px; }
.rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; width: 100%; border-top: 1px solid var(--line); padding-top: 28px; }
.row { display: grid; gap: 8px; align-content: start; }
.row h3 { font-size: 18px; }
.row p { color: var(--ink-2); font-size: 16px; }

.speed { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.speed-copy { display: grid; gap: 18px; }
.run-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.run-cell { width: 100%; aspect-ratio: 3 / 2; border-radius: 4px; transition: filter .5s ease, opacity .5s ease; }
.run-cell.is-waiting { filter: grayscale(1) brightness(.45); }

.closing { justify-items: center; text-align: center; padding-top: 72px; padding-bottom: 120px; }
.closing img { width: 112px; height: 112px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-3);
  font-size: 14px;
}
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .points, .rows { grid-template-columns: 1fr; }
  .speed { grid-template-columns: 1fr; }
  .run-grid { grid-template-columns: repeat(6, 1fr); }
  .run-cell:nth-child(n+37) { display: none; }
  .marquee-row { gap: 8px; }
  .marquee-row li { font-size: 15px; padding: 8px 14px; }
}
@media (max-width: 520px) {
  .nav-status { display: none; }
  .section { padding-top: 72px; padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-row, .badge-dot { animation: none; }
  .marquee { overflow-x: auto; }
}

/* The social preview frame (?og): title and print only. */
.og .lede, .og .badge { display: none; }
.og .hero { min-height: 100vh; }

/* ---------------------------------------------------------------------------------------- Privacy page */
.doc { max-width: 720px; margin: 0 auto; padding: 120px var(--gutter) 96px; display: grid; gap: 20px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc h2 { font-size: 22px; margin-top: 16px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.doc .updated { color: var(--ink-3); font-size: 15px; }
