:root {
  --ink: #0E0E12;
  --paper: #F4F2EE;
  --muted: #A9A6A0;
  --line: #2A2A31;
  --surface: #18181E;
  --indigo: #5B4DFF;
  --indigo-hover: #4C3EF0;
  --lime: #C8F560;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Landing page ---------- */

/* Phones (under 640px): one column in page order:
   label, headline, subhead, Kit form, video, what's inside. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

h1 {
  margin: 10px 0 0;
  font-size: 2.125rem;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.free { color: var(--lime); }

.sub {
  margin: 12px 0 0;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--muted);
}

.demo {
  justify-self: center;
  /* Vertical 9:16 video: full column width, capped so the whole video fits on screen */
  height: calc((100vw - 40px) * 16 / 9);
  height: min(calc((100vw - 40px) * 16 / 9), 80svh);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.demo[hidden] { display: none; }

.demo video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Kit draws the form in .signup-slot. The min-height reserves its space so the page
   doesn't jump while it loads. Kit's form is 220px tall when narrower than 400px and
   154-164px when wider, so the slot follows the same 400px switch.
   If you change the form in Kit, re-measure these two numbers. */
.signup { container-type: inline-size; }

.signup-slot { min-height: 220px; }

@container (min-width: 400px) {
  .signup-slot { min-height: 164px; }
}

.inside ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.inside li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.inside .num {
  padding-top: 0.2em;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.inside strong { font-weight: 700; }

/* Tablets (640-859px): headline and subhead beside the video, form full width below */
@media (min-width: 640px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy   demo"
      "signup signup"
      "inside inside";
    column-gap: 16px;
  }

  .copy { grid-area: copy; }
  .signup { grid-area: signup; }
  .inside { grid-area: inside; }

  h1 { font-size: clamp(1.5rem, 6.6vw, 3.75rem); }

  .sub { font-size: 0.95rem; }

  .demo {
    grid-area: demo;
    justify-self: end;
    height: calc(38vw * 16 / 9);
    height: min(calc(38vw * 16 / 9), 46svh);
  }
}

/* Desktop */
@media (min-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "copy   demo"
      "signup demo"
      "inside demo";
    column-gap: 64px;
    row-gap: 32px;
    padding: 56px 40px 72px;
  }

  .copy, .signup, .inside { align-self: start; }

  .sub { max-width: 34ch; font-size: 1.2rem; }

  .demo { height: clamp(420px, calc(100svh - 112px), 660px); }

  .inside li { padding: 16px 0; font-size: 1.0625rem; }
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

@media (min-width: 860px) {
  .site-footer { padding-left: 40px; padding-right: 40px; }
}

/* ---------- Thanks page ---------- */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.thanks {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px;
}

.thanks h1 { font-size: clamp(2.125rem, 10vw, 3.5rem); }

.thanks p:not(.label) {
  margin: 16px 0 0;
  font-size: 1.0625rem;
  color: var(--muted);
}

.thanks p.confirm { color: var(--paper); }

.button {
  display: block;
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--indigo);
  color: var(--paper);
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.button:hover { background: var(--indigo-hover); }

.page .site-footer { width: 100%; }

/* ---------- Privacy page ---------- */

.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.prose h1 { margin-top: 24px; font-size: clamp(2rem, 8vw, 2.75rem); }

.prose h2 {
  margin: 36px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.prose p, .prose li { color: #D9D6D0; }
.prose p { margin: 10px 0 0; }
.prose ul { margin: 10px 0 0; padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--paper); }
.prose .label { margin-top: 12px; }
