@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --navy: #0b2550;
  --blue: #1488ff;
  --sky: #8cc4ff;
  --mist: #eef5ff;
  --white: #ffffff;
  --ink-soft: #44587a;
  --error: #b42318;

  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);

  --radius-field: 999px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  font-optical-sizing: auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */

.site-header {
  padding-block: 1.5rem;
}

.brand {
  display: inline-block;
}

.brand img {
  width: clamp(150px, 30vw, 200px);
  height: auto;
}

/* Hero */

.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: clamp(1.5rem, 5vw, 4.5rem) clamp(3rem, 8vw, 6rem);
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

.hero h1 {
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 85%;
  letter-spacing: -0.03em;
  max-width: 17ch;
}

.lede {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Hero scene (main.js). With JS the mark and the steps leave the flow and sit fixed on the
   screen: the mark follows its slot until it is centred, then zooms in while the copy fades out,
   the steps appear on it and, at the end, the sheet (professionals and footer) slides over it. */
/* Chrome's scroll anchoring reacts to the mark redrawing on every frame and cuts smooth scrolls
   short, so the hero opts out of it. */
.hero-track {
  overflow-anchor: none;
}

/* The scene plays over this much scroll; the sheet then slides over it. */
.scene .scene-length {
  height: 230vh;
}

.sheet {
  position: relative;
  z-index: 1;
  background: var(--white);
}

/* The scene is fixed to the screen, so when the browser bounces past the end of the page it shows
   through the gap the bounce opens under the footer. Clipping it to the page keeps that gap white.
   Safari ignores this clip on fixed things, so main.js also cuts the scene off behind the sheet. */
.scene body {
  clip-path: inset(0);
}

.hero-copy {
  opacity: calc(1 - var(--fade, 0));
  translate: 0 calc(var(--fade, 0) * -3rem);
}

.hero-copy.faded {
  visibility: hidden;
}

.mark-slot {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  aspect-ratio: 520 / 360;
}

.mark {
  display: block;
  width: 100%;
  height: auto;
}

.scene .mark {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* On a phone (one-column hero) the mark does not sit under the form: it appears in the room that
   opens below the copy as it scrolls away (main.js), so its slot takes no room. (Not
   display: none, which would hide the fixed mark inside it too.) */
@media (width < 60rem) {
  .scene .mark-slot {
    display: contents;
  }
}

/* Form */

.waitlist {
  margin-top: 2.5rem;
  max-width: 34rem;
}

.waitlist-title {
  font-size: var(--step-1);
  font-weight: 700;
}

.profile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.profile legend {
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.profile label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1.5px solid var(--sky);
  border-radius: var(--radius-field);
  cursor: pointer;
  font-size: var(--step--1);
  font-weight: 600;
}

.profile label:has(input:checked) {
  background: var(--mist);
  border-color: var(--blue);
}

.profile input {
  accent-color: var(--blue);
  margin: 0;
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.email-row input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.9rem 1.25rem;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-field);
  background: var(--white);
  color: var(--navy);
  font: inherit;
}

.email-row input::placeholder {
  color: #7d8ca6;
}

.email-row input[aria-invalid='true'] {
  border-color: var(--error);
}

.email-row button {
  flex: 0 0 auto;
  padding: 0.9rem 1.75rem;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.email-row button:hover {
  background: #0a74e0;
}

.email-row button:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 30rem) {
  .email-row button {
    flex-basis: 100%;
  }
}

.consent {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-top: 1rem;
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.1rem 0 0;
  accent-color: var(--blue);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1rem;
  font-size: var(--step--1);
  font-weight: 600;
  min-height: 1.45em;
}

.form-status[data-kind='error'] {
  color: var(--error);
}

.waitlist[data-state='done'] .waitlist-title,
.waitlist[data-state='done'] .profile,
.waitlist[data-state='done'] .email-row,
.waitlist[data-state='done'] .consent {
  display: none;
}

.waitlist[data-state='done'] .form-status {
  margin-top: 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--blue);
  background: var(--mist);
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--navy);
}

/* How it works. A normal section, in the light blue of the mark's overlap; in the scene it sits
   fixed over the zoomed mark instead and main.js reveals its heading and steps one by one. */

.how {
  padding-block: clamp(3rem, 8vw, 5.5rem);
  background: var(--sky);
  color: var(--navy);
}

.how h2 {
  font-size: var(--step-2);
  font-weight: 750;
}

.scene .how {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  pointer-events: none;
  opacity: calc(1 - var(--exit, 0));
  translate: 0 calc(var(--exit, 0) * -2rem);
}

.scene .how-inner {
  width: min(32rem, 42vw);
  padding: 0;
}

.scene .how h2,
.scene .steps li {
  opacity: var(--reveal, 0);
  translate: 0 calc((1 - var(--reveal, 0)) * 2rem);
}

.scene .steps {
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.scene .steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: start;
}

.scene .steps li::before {
  grid-row: 1 / span 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
}

.scene .steps p {
  margin-top: 0.2rem;
}

/* On a phone the overlap is a narrow upright lens, so the column is wider and the type smaller. */
@media (max-width: 40rem) {
  .scene .how-inner {
    width: 78vw;
  }

  .scene .how h2 {
    font-size: var(--step-1);
  }

  .scene .steps {
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .scene .steps li {
    column-gap: 0.75rem;
  }

  .scene .steps li::before {
    width: 2rem;
    height: 2rem;
    font-size: var(--step-0);
  }

  .scene .steps h3 {
    font-size: var(--step-0);
  }

  .scene .steps p {
    font-size: var(--step--1);
  }
}

.steps {
  display: grid;
  gap: 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 3rem;
  }
}

@media (min-width: 68rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 750;
  font-size: var(--step-1);
}

.steps li:last-child::before {
  background: var(--blue);
}

.steps h3 {
  font-size: var(--step-1);
  font-weight: 700;
}

.steps p {
  margin-top: 0.5rem;
  color: #1e3a66;
  max-width: 32ch;
}

/* Professionals */

.pro {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

@media (min-width: 48rem) {
  .pro {
    grid-template-columns: auto minmax(0, 40rem);
    justify-content: start;
    gap: 3rem;
  }
}

.pro-mark {
  width: clamp(80px, 14vw, 140px);
  height: auto;
}

.pro h2 {
  font-size: var(--step-2);
  font-weight: 750;
}

.pro p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.pro-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-weight: 700;
  color: var(--blue);
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 2rem;
  border-top: 1px solid var(--mist);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.social svg {
  width: 1.2em;
  height: 1.2em;
}

/* Simple pages (privacy, confirmation) */

.page {
  max-width: 44rem;
  padding-block: 2rem 4rem;
}

.page h1 {
  font-size: var(--step-2);
  font-weight: 800;
}

.page h2 {
  margin-top: 2.25rem;
  font-size: var(--step-1);
  font-weight: 700;
}

.page p,
.page ul {
  margin-top: 0.75rem;
}

.page ul {
  padding-left: 1.25rem;
}

.page .back {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 700;
  color: var(--blue);
}

.confirmed {
  display: grid;
  justify-items: start;
  gap: 1.25rem;
  padding-block: clamp(3rem, 10vw, 7rem);
}

.confirmed img {
  width: 96px;
  height: auto;
}

.confirmed h1 {
  font-size: var(--step-3);
  font-weight: 800;
  font-stretch: 85%;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.confirmed p {
  max-width: 36rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
}
