@font-face {
  font-family: "Kerf Display";
  src: url("fonts/archivo-expanded-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #05060b;
  --s1: #0f0f10;
  --s2: #18181a;
  --s3: #232326;
  --seam: #2c2c30;
  --text: #ffffff;
  --text-2: #a1a1a6;
  --text-3: #8a8a90;
  --tint: #ffc93c;
  --gold: linear-gradient(135deg, #ffe27a, #ffc93c 52%, #f2a516);
  --gold-pressed: linear-gradient(135deg, #f2d063, #f0b92a 52%, #d99410);
  --display: "Kerf Display", "Arial Black", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-tag: 4px;
  --r-clip: 6px;
  --r-tile: 10px;
  --r-group: 14px;
  --r-button: 18px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 220ms;
  --gutter: 16px;
  --max: 1200px;
  --nav-h: 56px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  scrollbar-color: var(--seam) var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 201, 60, 0.32); color: var(--text); }

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(255, 255, 255, 0.35); }
a:hover { text-decoration-color: currentColor; }

a, button, summary { cursor: pointer; -webkit-tap-highlight-color: transparent; }

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

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: var(--r-tile);
  background: var(--s2);
  color: var(--text);
}
.skip:focus-visible { top: 8px; }

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

/* Navigation: the one bar that floats over the sky, so it gets the glass. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  background: rgba(15, 15, 16, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.1875rem;
  letter-spacing: 0.01em;
}
.brand img { width: 28px; height: 28px; }

.nav-links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-tile);
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-links a[aria-current="page"] { color: var(--text); }

/* The one gold action per screen. */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: var(--r-button);
  background: var(--gold);
  color: #000;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
  transition: transform var(--dur) var(--ease);
}
.cta:active { background: var(--gold-pressed); transform: none; }

.fine { margin: 12px 0 0; color: var(--text-3); font-size: 0.875rem; }

h1, h2, .display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.125rem, 4.7vw, 4rem);
  line-height: 1.04;
}

.hero h1 { max-width: 10.5em; font-size: clamp(2.125rem, 5.2vw, 4.75rem); }

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.1vw, 2.625rem);
  line-height: 1.08;
}

.lede {
  max-width: 34em;
  margin: 24px 0 0;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.55;
}

/* Apple's iPhone 18 Pro bezel, unmodified, over the recording: the screen fills the
   bezel's 1206 x 2622 hole and its corners follow the display curve under the frame. */
.screen {
  position: relative;
  aspect-ratio: 1350 / 2760;
  border-radius: 15% / 7.3%;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.screen img, .screen video {
  position: absolute;
  left: 5.3333%;
  top: 2.5%;
  width: 89.3333%;
  height: 95%;
  object-fit: cover;
  border-radius: 12% / 5.53%;
  background: #000;
}
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("media/iphone-18-pro-black.png") center / 100% 100% no-repeat;
  pointer-events: none;
}

/* Hero */
.hero { padding: clamp(32px, 6vh, 72px) 0 clamp(64px, 10vh, 112px); }
.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}
.hero-copy .cta { margin-top: 32px; }

.demo {
  --phone-w: min(280px, 72vw);
  justify-self: center;
  width: 100%;
  max-width: 420px;
}
.demo .screen { width: var(--phone-w); margin: 0 auto; }

@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; }
  .demo { --phone-w: clamp(230px, calc((100svh - 330px) * 0.489), 320px); width: max(var(--phone-w), 280px); }
}

.transport { margin-top: 12px; }

.transport-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.clock {
  margin: 0;
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-size: 1.375rem;
  letter-spacing: 0;
  white-space: nowrap;
}
.clock small { color: var(--text-3); font-family: var(--body); font-size: 0.8125rem; font-weight: 500; }

.round {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(35, 35, 38, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--text);
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.round:active { transform: scale(0.94); }
.round svg { width: 18px; height: 18px; fill: currentColor; }
.round .i-pause { display: none; }
.round[aria-pressed="true"] .i-play { display: none; }
.round[aria-pressed="true"] .i-pause { display: block; }

/* Lower-third: the selected chapter's tag, wiped in from the left like a selected clip in the app. */
.lower-third {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  margin: 10px 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.lower-third .index {
  display: grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  padding: 0 5px;
  border-radius: var(--r-tag);
  background: var(--gold);
  color: #000;
  font-family: var(--display);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}
.lower-third .len { color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.lower-third.wipe { animation: wipe var(--dur) var(--ease); }

@keyframes wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.track { position: relative; display: flex; gap: 2px; height: 44px; }

/* Each chapter shows a frame of itself, like a clip on the app's timeline. */
.seg {
  position: relative;
  flex: var(--len) 1 0;
  min-width: 24px;
  padding: 0;
  border: 0;
  border-radius: var(--r-clip);
  background-color: var(--s3);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}
.seg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(5, 6, 11, 0.5);
  transition: background-color var(--dur) var(--ease);
}
@media (pointer: coarse) {
  .track { gap: 6px; }
  .seg { min-width: 44px; }
}
.seg[aria-current="true"]::after {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--tint), inset 4px 0 0 0 var(--tint), inset -4px 0 0 0 var(--tint);
}

.playhead {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 0;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  will-change: transform;
}

/* Sections */
.section { padding: 64px 0; }
@media (min-width: 960px) {
  .section { padding: clamp(88px, 12vh, 140px) 0; }
}

.split {
  display: grid;
  gap: 40px;
  align-items: center;
}
.split figure { justify-self: center; }
.split .screen { width: min(300px, 76vw); }
.split p { max-width: 30em; margin: 20px 0 0; color: var(--text-2); }

@media (max-width: 959px) {
  .split > div:last-child { order: -1; }
}

@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: 64px; }
  .split .screen { width: 320px; }
}

.finish-head { display: grid; gap: 20px; align-items: end; }
.finish-head p { max-width: 32em; margin: 0; color: var(--text-2); }

@media (min-width: 960px) {
  .finish-head { grid-template-columns: 5fr 7fr; gap: 64px; }
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(240px, 64vw);
  gap: 16px;
  margin: 48px calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  list-style: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots li { scroll-snap-align: start; }
figure { margin: 0; }
figcaption.lower-third { margin: 16px 0 0; }

@media (min-width: 960px) {
  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(24px, 4vw, 64px);
    margin: 64px 0 0;
    padding: 0;
    overflow: visible;
  }
  .shots li:nth-child(2) { margin-top: 48px; }
  .shots li:nth-child(3) { margin-top: 96px; }
  .shots .screen { width: min(100%, 300px); }
}

/* FAQ */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .faq-grid { grid-template-columns: 4fr 8fr; gap: 64px; }
}

.faq-list { border-top: 1px solid var(--seam); }
.faq-list details { border-bottom: 1px solid var(--seam); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  transition: color var(--dur) var(--ease);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary svg {
  flex: none;
  width: 14px;
  height: 14px;
  stroke: var(--text-3);
  transition: transform var(--dur) var(--ease);
}
.faq-list details[open] summary svg { transform: rotate(180deg); }
.faq-list details p { max-width: 38em; margin: 0 0 24px; color: var(--text-2); }

/* Footer */
.foot { border-top: 1px solid var(--seam); padding: 28px 0 40px; color: var(--text-3); font-size: 0.875rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; }
.foot ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; }

/* Reading pages */
.doc { padding: clamp(40px, 8vh, 88px) 0 clamp(72px, 10vh, 120px); }
.doc .wrap { max-width: calc(44em + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); }
.doc .updated { margin: 16px 0 40px; color: var(--text-3); font-size: 0.9375rem; }
.doc h2 {
  margin: 48px 0 12px;
  font-family: var(--body);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
.doc p, .doc li { color: rgba(255, 255, 255, 0.86); }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 1.2em; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--text-3); }
.doc .summary {
  margin: 0 0 8px;
  padding: 20px 24px;
  border-radius: var(--r-group);
  background: rgba(15, 15, 16, 0.8);
  box-shadow: inset 0 0 0 1px var(--seam);
}
.doc .summary ul { margin: 0; }
.doc .summary li:last-child { margin-bottom: 0; }

/* Hover only where there is a pointer, so a tap does not leave a control lit. */
@media (hover: hover) {
  .nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
  .cta:hover { transform: translateY(-1px); }
  .round:hover { background: rgba(60, 60, 66, 0.7); }
  .seg:hover::after { background: rgba(5, 6, 11, 0.25); }
  .faq-list summary:hover { color: var(--tint); }
  .foot a:hover { color: var(--text); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lower-third.wipe { animation: fade var(--dur) linear; }
  .cta:hover { transform: none; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Reduce Transparency and browsers without blur get the opaque surfaces. */
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--s1); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .round { background: var(--s2); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sky { display: none; }
  body { background: #000; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: var(--s1); }
  .round { background: var(--s2); }
}
