/* Lanes — site styles, shared by the landing page and the privacy policy. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --bg-raised: #11151a;
  --surface: #151a20;
  --line: rgba(236, 238, 242, 0.08);
  --line-strong: rgba(236, 238, 242, 0.14);
  --fg: #eceef2;
  --fg-2: #a3abb6;
  --fg-3: #6b7480;
  --accent: #3fa7d6;

  /* The app's lane palette (Sources/Graph/LanePalette.swift). */
  --lane-0: #3fa7d6;
  --lane-1: #9b6dea;
  --lane-2: #f15bb5;
  --lane-3: #ee6352;
  --lane-4: #f4a259;
  --lane-5: #43c59e;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(96px, 12vw, 168px);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font: 0.88em var(--mono); }
em { font-style: italic; }
img { max-width: 100%; }

.wrap {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  font: 400 26px/1 var(--serif);
  letter-spacing: 0;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 22.37%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
}
.nav-links a { color: var(--fg-2); }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-links .get {
  color: var(--bg);
  background: var(--fg);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 550;
}
.nav-links .get:hover { color: var(--bg); background: #fff; }
@media (max-width: 720px) {
  .nav-links a:not(.get) { display: none; }
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.eyebrow .num { color: var(--c, var(--accent)); }
.display {
  font: 400 clamp(52px, 8.4vw, 112px)/0.95 var(--serif);
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.display em, .h2 em { color: var(--fg-2); }
.h2 {
  font: 400 clamp(40px, 5.2vw, 64px)/1.02 var(--serif);
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.lede {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0;
  max-width: 34em;
  text-wrap: pretty;
}
.lede strong { color: var(--fg); font-weight: 500; }

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

.hero {
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 6vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px 64px;
  align-items: end;
}
.hero-side { padding-bottom: 10px; }
.cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  text-decoration: none;
}
.badge svg { display: block; }
.cta .meta {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-3);
}
.cta .meta strong { color: var(--fg-2); font-weight: 500; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { padding-bottom: 0; }
}

/* ---------- Showcase (screenshots of the app) ---------- */

.showcase {
  position: relative;
  padding: 0 0 clamp(72px, 9vw, 120px);
  overflow-x: clip;
}
.showcase::before {
  /* Lane-coloured light behind the devices. */
  content: "";
  position: absolute;
  inset: -12% -10% 10%;
  background:
    radial-gradient(40% 45% at 30% 45%, rgba(63, 167, 214, 0.16), transparent 70%),
    radial-gradient(30% 40% at 78% 60%, rgba(241, 91, 181, 0.11), transparent 70%),
    radial-gradient(35% 35% at 55% 85%, rgba(155, 109, 234, 0.10), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.stage-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(20px, 3vw, 44px);
  margin: 0 auto;
}
.shot { margin: 0; min-width: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot.mac { flex: 0 1 860px; }
.shot.mac img { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35)); }
.shot.phone { flex: 0 1 300px; }
.shot.phone img {
  border-radius: 13.7% / 6.3%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 8px 20px rgba(0, 0, 0, 0.35);
}
.stage-wrap[data-single="phone"] .shot.mac,
.stage-wrap[data-single="mac"] .shot.phone { display: none; }
.stage-wrap[data-single="phone"] .shot.phone { flex-basis: 300px; }

.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: clamp(40px, 5vw, 56px) auto 0;
  padding: 0 var(--gutter);
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex-shrink: 0;
  font: 500 14px/1 var(--sans);
  color: var(--fg-2);
  background: none;
  border: 0;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.09);
}
.tab .bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.tab.playing .bar {
  opacity: 0.9;
  animation: tab-progress var(--dur, 7s) linear forwards;
}
@keyframes tab-progress { to { transform: scaleX(1); } }
.arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--fg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.arrow:hover { color: var(--fg); border-color: var(--fg-3); }
.arrow svg { width: 18px; height: 18px; }
.caption {
  max-width: 620px;
  min-height: 3.3em;
  margin: 20px auto 0;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg-2);
  text-wrap: balance;
}
.caption b { color: var(--fg); font-weight: 500; }
.stage-opts {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.switch button {
  font: 500 12.5px/1 var(--sans);
  color: var(--fg-3);
  background: none;
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.switch button[aria-pressed="true"] {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
}
.switch.devices { display: none; }
.stage-wrap[data-single] ~ .stage-opts .switch.devices { display: inline-flex; }
@media (max-width: 560px) {
  .carousel .arrow { display: none; }
  .carousel { justify-content: flex-start; }
  .tabs { margin: 0 auto; }
}

/* ---------- Chapters ---------- */

.chapters {
  position: relative;
  padding-top: 0;
}
.chapters::before {
  /* One lane running down the page; each chapter forks off it. */
  content: "";
  position: absolute;
  left: calc(var(--gutter) + 5px);
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--lane-0) 8%,
    var(--lane-1) 34%,
    var(--lane-2) 60%,
    var(--lane-5) 86%,
    transparent
  );
  opacity: 0.45;
}
.chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 80px;
  padding: var(--section) 0 0 48px;
}
.chapter::before {
  /* The commit where this chapter sits on the lane. */
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--section) - 3px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--c);
  box-shadow: 0 0 0 6px var(--bg), 0 0 24px var(--c);
}
.ch-head { align-self: start; position: sticky; top: 112px; }
.ch-head .lede { font-size: 17.5px; }
.see {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font: 500 14.5px/1 var(--sans);
  color: var(--fg);
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.see:hover {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, transparent);
}
.see svg { width: 16px; height: 16px; color: var(--c); }
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}
.features li {
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.features h3 {
  margin: 0 0 8px;
  font: 600 16.5px/1.4 var(--sans);
  letter-spacing: -0.01em;
  color: var(--fg);
}
.features p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg-2);
  text-wrap: pretty;
}
.features code {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 5px;
}
@media (max-width: 980px) {
  .chapter { grid-template-columns: 1fr; gap: 40px; }
  .ch-head { position: static; }
}
@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
  .chapter { padding-left: 36px; }
}

/* ---------- Tenets ("what's not in the box") ---------- */

.tenets-section { padding: var(--section) 0 0; }
.tenets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 80px;
  margin-top: 48px;
}
.tenet {
  padding: 36px 0 40px;
  border-top: 1px solid var(--line);
}
.tenet h3 {
  margin: 0 0 12px;
  font: 400 clamp(30px, 3.2vw, 40px)/1.08 var(--serif);
  letter-spacing: -0.005em;
}
.tenet p {
  margin: 0;
  max-width: 30em;
  font-size: 15.5px;
  color: var(--fg-2);
}
@media (max-width: 760px) {
  .tenets { grid-template-columns: 1fr; }
}

/* ---------- Facts (requirements, privacy, support) ---------- */

.facts-section { padding: var(--section) 0 0; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.fact {
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}
.fact .eyebrow { margin-bottom: 16px; }
.fact h3 {
  margin: 0 0 12px;
  font: 400 28px/1.15 var(--serif);
}
.fact p {
  margin: 0 0 12px;
  font-size: 15.5px;
  color: var(--fg-2);
}
.fact p strong { color: var(--fg); font-weight: 500; }
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .fact { padding-bottom: 32px; }
}

/* ---------- Closing ---------- */

.closing {
  padding: var(--section) 0;
  text-align: center;
}
.closing .display { font-size: clamp(48px, 7vw, 96px); }
.closing .cta { justify-content: center; margin-top: 40px; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: 13.5px;
  color: var(--fg-3);
}
.footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer nav { display: flex; gap: 28px; }
.footer nav a { color: var(--fg-2); }
.footer .brand { font-size: 22px; }
.footer .brand img { width: 24px; height: 24px; }

/* ---------- Prose (privacy policy) ---------- */

.doc {
  padding: clamp(56px, 8vw, 104px) 0 var(--section);
}
.doc-head {
  max-width: 760px;
  margin: 0 auto 56px;
}
.doc-head .display { font-size: clamp(52px, 7vw, 88px); }
.doc-head .updated {
  margin: 20px 0 0;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose .headline {
  font: 400 clamp(26px, 3vw, 34px)/1.3 var(--serif);
  margin: 0 0 56px;
  color: var(--fg);
  text-wrap: pretty;
}
.prose .headline strong { color: var(--accent); font-weight: 400; font-style: italic; }
.prose h2 {
  margin: 56px 0 16px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.prose p {
  margin: 0 0 18px;
  color: var(--fg-2);
}
.prose p em { color: var(--fg); }
.prose code {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 5px;
}
.prose ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.prose li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--fg-2);
}
.prose li:last-child { border-bottom: 1px solid var(--line); }
.prose li strong {
  display: block;
  margin-bottom: 4px;
  color: var(--fg);
  font-weight: 600;
}
