* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
  color: var(--text);
  color-scheme: dark light;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
}

.site {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-3);
}

.frame {
  position: relative;
  width: min(100%, 64ch);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.main {
  flex: 1;
  min-width: 0;
  padding-bottom: var(--space-4);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  list-style: none;
  margin: 0;
  padding: var(--space-3) 0;
}

.skip {
  position: absolute;
  top: var(--space-1\.5);
  left: var(--space-1\.5);
  padding: var(--space-1\.5) var(--space-2);
  transform: translateY(-160%);
  background: var(--surface);
  color: var(--text);
  z-index: 3;
}

.skip:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip:focus-visible,
.brand:focus-visible {
  outline: 1.5px solid var(--ink-strong);
  outline-offset: 2px;
}

/* ---- Landing ----
   The home page is wider than the reading pages, and its top sits on the app's own backdrop
   photo, fading into the ground by the time the hero ends. */

.site-home {
  --gap-section: calc(var(--space-4) * 4);
  --display: var(--font-display);
}

.site-home > .frame {
  width: min(100%, 1120px);
}

.site-home::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(100svh, 980px);
  background:
    linear-gradient(
      to bottom,
      color-mix(in oklab, var(--surface) 30%, transparent) 0%,
      color-mix(in oklab, var(--surface) 55%, transparent) 55%,
      var(--surface) 100%
    ),
    url("/img/bg-dark.webp") center 28% / cover no-repeat;
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .site-home::before {
    background:
      linear-gradient(
        to bottom,
        color-mix(in oklab, var(--surface) 10%, transparent) 0%,
        color-mix(in oklab, var(--surface) 45%, transparent) 55%,
        var(--surface) 100%
      ),
      url("/img/bg-light.webp") center / cover no-repeat;
  }
}

.landing {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  padding-bottom: calc(var(--space-4) * 2);
}

.landing h2,
.landing h3,
.landing p,
.landing ul,
.landing ol,
.landing figure {
  margin: 0;
}

.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 1.25rem + 2.4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* Hero: the claim on the left, the app doing it on the right. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: calc(var(--space-4) * 2);
  min-height: min(calc(100svh - 96px), 760px);
  padding: var(--space-4) 0 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.75rem, 1.2rem + 5.2vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.lede {
  max-width: 46ch;
  font-size: clamp(14px, 12.5px + 0.3vw, 16px);
  line-height: 1.65;
  color: var(--text-subtle);
}

.stores {
  display: flex;
  flex-direction: column;
  gap: var(--space-1\.5);
}

.stores-label {
  font: inherit;
  color: var(--text-subtle);
}

.store-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
}

.store {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 164px;
  padding: var(--space-1\.5) var(--space-2) var(--space-1\.5) calc(var(--space-2) + 2px);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: var(--raised);
}

.store-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.store-status {
  color: var(--text-subtle);
}

/* The device: a plain bezel around the real screen recording. */

.device {
  justify-self: center;
  width: min(100%, 300px);
  padding: 9px;
  border-radius: 52px;
  background: #050505;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.6),
    var(--floating);
}

.device-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 540 / 1174;
  border-radius: 43px;
  background: #111111;
}

.device-poster,
.device-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .device-video {
    display: none;
  }
}

/* How a check works: three steps in order, the example result beside them. */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "title title"
    "steps example";
  column-gap: calc(var(--space-4) * 2);
  row-gap: calc(var(--space-4) * 1.5);
  align-items: start;
}

.how > .section-title {
  grid-area: title;
  max-width: 14ch;
}

.steps {
  grid-area: steps;
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--space-2);
  row-gap: var(--space-1\.5);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.step::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-family: var(--display);
  font-weight: 400;
  font-size: 44px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text-subtle);
}

.step-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.step-body {
  max-width: 44ch;
  line-height: 1.6;
  color: var(--text-subtle);
}

.example {
  grid-area: example;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  position: sticky;
  top: var(--space-4);
}

.example-caption {
  color: var(--text-subtle);
}

/* Free and Pro. Pro is drawn in the Gold theme it unlocks. */

.plans {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-4) * 1.5);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.plan {
  display: flex;
  min-width: 0;
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.plan-free {
  background: color-mix(in oklab, var(--surface-raised) 80%, transparent);
  box-shadow: var(--raised);
}

.plan-pro {
  box-shadow: 0 30px 60px -30px rgba(136, 97, 46, 0.6);
}

.plan-gold {
  flex: 1;
  border-radius: inherit;
}

.plan-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: calc(var(--space-4) + var(--space-1\.5));
}

.plan-name {
  font: inherit;
  color: var(--text-subtle);
}

.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
  row-gap: var(--space-1);
}

.plan-amount {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.9rem + 1.6vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--text);
}

.plan-period {
  color: var(--text-subtle);
}

.plan-items {
  list-style: none;
  padding: var(--space-3) 0 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-1\.5);
  border-top: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--highlight);
}

.plan-items li::before {
  content: "— ";
  color: var(--text-subtle);
}

.advice {
  max-width: 64ch;
  color: var(--text-subtle);
}

/* Narrow screens: one column, the device under the claim. */

@media (max-width: 860px) {
  .site-home {
    --gap-section: calc(var(--space-4) * 2.5);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: calc(var(--space-4) * 1.5);
  }

  .device {
    width: min(78%, 280px);
  }

  .how {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "steps"
      "example";
  }

  .example {
    position: static;
  }

  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
