/* ==========================================================================
   Fixso, landing page
   Concept: "Workdays, side by side". Width is the motif: time spans are
   drawn as bars, and the display type stretches open along its width axis.

   Palette
     cobalt  #2B3BFF  brand field, hero and contact
     amber   #FFB21E  shared hours, calls to action
     ink     #0A1033  deep navy text and dark sections
     paper   #EEF0F4  cool light background
     mist    #D6DAFF  secondary text on cobalt
   Type
     Anybody (variable width 50-150%, weight 100-900): display
     Schibsted Grotesk (weight 400-900): text and interface
   ========================================================================== */

@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --cobalt: #2b3bff;
  --cobalt-deep: #1f2cd9;
  --amber: #ffb21e;
  --ink: #0a1033;
  --paper: #eef0f4;
  --white: #fff;
  --mist: #d6daff;
  --error: #b3261e;
  --success: #0f7b3f;
  --field-border: #6b7190;

  --font-display: "Anybody", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 88rem;
  --header-h: 4.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --text-sm: 0.9375rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.04rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.35rem, 1.15rem + 0.9vw, 1.875rem);
  --display-sm: clamp(1.6rem, 1.05rem + 2.1vw, 3rem);
  --display: clamp(2.4rem, 0.9rem + 4.4vw, 5.75rem);

  color-scheme: light;
}

/* ---------- Reset and base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text-base);
  font-size-adjust: from-font;
  line-height: 1.55;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  padding: 0;
}

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

a {
  color: inherit;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.5rem;
  translate: 0 -200%;

  &:focus-visible {
    translate: 0 0;
    outline-color: var(--ink);
  }
}

/* ---------- Tones ---------- */

.tone-cobalt {
  --focus: var(--amber);
  --muted: var(--mist);
  --rule: rgb(255 255 255 / 0.28);
  background: var(--cobalt);
  color: var(--white);
}

.tone-paper {
  --focus: var(--cobalt);
  --muted: #4a5070;
  --rule: #c5cad8;
  background: var(--paper);
  color: var(--ink);
}

.tone-ink {
  --focus: var(--amber);
  --muted: #a9b0d6;
  --rule: rgb(255 255 255 / 0.16);
  background: var(--ink);
  color: var(--white);
}

/* ---------- Buttons and links ---------- */

.btn {
  --sweep: var(--white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 3rem;
  padding: 0.8rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  font: 600 1rem/1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--sweep);
    scale: 0 1;
    transform-origin: left center;
  }

  &:hover::before {
    scale: 1 1;
  }

  @media (prefers-reduced-motion: no-preference) {
    &::before {
      transition: scale 0.45s var(--ease-out);
    }
  }
}

.btn--amber {
  background: var(--amber);
  color: var(--ink);
}

.btn--ink {
  --sweep: var(--cobalt);
  background: var(--ink);
  color: var(--white);
}

.btn--small {
  min-block-size: 2.75rem;
  padding: 0.55rem 1.05rem;
  font-size: var(--text-sm);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.7;
}

.text-link {
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: currentColor;
  transition: text-decoration-color 0.2s, text-underline-offset 0.2s;

  &:hover {
    text-decoration-color: var(--amber);
    text-underline-offset: 0.42em;
  }
}

/* ---------- Header ---------- */

.site-header {
  --focus: var(--amber);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cobalt);
  color: var(--white);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-block-size: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-inline-end: auto;
  text-decoration: none;
}

.brand__mark {
  inline-size: 2.4rem;
  block-size: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  overflow: visible;
}

.brand__lens {
  fill: var(--amber);
  stroke: none;
}

.brand__word {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 850;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.site-nav {
  display: none;

  & ul {
    display: flex;
    gap: 1.75rem;
    list-style: none;
  }

  & a {
    color: var(--mist);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;

    &:hover {
      color: var(--white);
      text-decoration: underline;
      text-decoration-color: var(--amber);
      text-decoration-thickness: 2px;
      text-underline-offset: 0.35em;
    }
  }

  @media (min-width: 56rem) {
    display: block;
  }
}

.site-header__progress {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 3px;
  background: var(--amber);
  transform-origin: left center;
  scale: 0 1;
}

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

.hero {
  container: hero / inline-size;
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(2.5rem, 4vw, 3.5rem);
}

.hero__inner {
  container-type: inline-size;
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
  min-block-size: calc(100svh - var(--header-h) - clamp(4.5rem, 9vw, 8rem));
  align-content: space-between;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 0.4rem + 7.7cqi, 7.25rem);
  font-weight: 820;
  font-stretch: 112%;
  line-height: 0.9;
  letter-spacing: -0.015em;
}

.hero__line {
  display: block;
}

@container (max-width: 40rem) {
  .hero__title {
    font-size: clamp(2.6rem, 13.5cqi, 4.5rem);
  }
}

.hero__break {
  display: block;

  @container (min-width: 40rem) {
    display: inline;
  }
}

.hero__intro {
  display: grid;
  gap: 1.5rem;
  max-inline-size: 38rem;
}

/* Wide screens: the intro tucks in beside the short second and third
   headline lines, so the overlap chart stays above the fold. */
@container hero (min-width: 76rem) {
  .hero__lede {
    font-size: var(--text-base);
  }

  .hero__inner {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .hero__title,
  .overlap {
    grid-column: 1 / -1;
  }

  .hero__title {
    grid-row: 1;
  }

  .hero__intro {
    grid-column: 8 / -1;
    grid-row: 1;
    align-self: end;
  }
}

.hero__lede {
  color: var(--mist);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

/* Overlap chart */

.overlap {
  --label: 0rem;
  --axis-start: 8;
  border-block-start: 1px solid var(--rule);
  padding-block-start: 1.25rem;

  @container (min-width: 44rem) {
    --label: 13.5rem;
  }
}

.overlap__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  font-size: var(--text-sm);
}

.overlap__title {
  font-weight: 700;
}

.overlap__summary {
  color: var(--mist);

  & strong {
    color: var(--white);
    font-weight: 700;
  }
}

.overlap__chart {
  position: relative;
  margin-block: 1rem 0.9rem;
  padding-block-start: 1.9rem;
}

.overlap__band,
.overlap__now {
  position: absolute;
  inset-block: 0;
  pointer-events: none;
}

.overlap__band {
  inset-inline-start: calc(var(--label) + (100% - var(--label)) * var(--band-start, 0.375));
  inline-size: calc((100% - var(--label)) * var(--band-width, 0.1667));
  background: rgb(255 178 30 / 0.16);
  border-inline: 1px dashed rgb(255 178 30 / 0.85);
}

.overlap__now {
  z-index: 2;
  inset-inline-start: calc(var(--label) + (100% - var(--label)) * var(--now, 0.5));
  inline-size: 2px;
  margin-inline-start: -1px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--ink);

  & span {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 50%;
    translate: -50% 0;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
  }
}

.overlap__rows {
  position: relative;
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.overlap__row {
  --bar-start: 0.375;
  --hl-a: 0;
  --hl-b: 0.444;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.2rem 1rem;
  font-size: var(--text-sm);

  @container (min-width: 44rem) {
    grid-template-columns: calc(var(--label) - 6.5rem) 5.5rem 1fr;
    gap: 1rem;
    margin-inline-end: 0;
  }
}

.overlap__row:nth-child(2),
.overlap__row:nth-child(3) {
  --bar-start: 0.25;
  --hl-a: 0.333;
  --hl-b: 0.778;
}

.overlap__row:nth-child(4) {
  --bar-start: 0.1667;
  --hl-a: 0.556;
  --hl-b: 1;
}

.overlap__row:not(.overlap__row--team) + .overlap__row--team {
  margin-block-start: 0.6rem;
}

.overlap__city {
  font-weight: 600;
}

.overlap__time {
  color: var(--mist);
  font-variant-numeric: tabular-nums;
  text-align: end;

  @container (min-width: 44rem) {
    text-align: start;
  }
}

.overlap__track {
  position: relative;
  grid-column: 1 / -1;
  block-size: 1.6rem;
  border-radius: 999px;
  background:
    repeating-linear-gradient(to right, rgb(255 255 255 / 0.14) 0 1px, transparent 1px calc(100% / 24)),
    rgb(255 255 255 / 0.07);

  @container (min-width: 44rem) {
    grid-column: auto;
  }
}

/* Small screens: labels sit above each bar, so the shared window and the
   "now" marker are drawn inside each track instead of across the labels. */
.overlap__track::before,
.overlap__track::after {
  content: "";
  position: absolute;
  inset-block: 0;
  pointer-events: none;
}

.overlap__track::before {
  inset-inline-start: calc(var(--band-start, 0.375) * 100%);
  inline-size: calc(var(--band-width, 0.1667) * 100%);
  background: rgb(255 178 30 / 0.22);
  border-inline: 1px dashed rgb(255 178 30 / 0.85);
}

.overlap__track::after {
  z-index: 2;
  inset-inline-start: calc(var(--now, 0.5) * 100%);
  inline-size: 2px;
  margin-inline-start: -1px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--ink);
}

.overlap__band {
  display: none;
}

.overlap__now {
  inset-block-end: auto;
  block-size: 1.6rem;
}

@container (min-width: 44rem) {
  .overlap__track::before,
  .overlap__track::after {
    display: none;
  }

  .overlap__band {
    display: block;
  }

  .overlap__now {
    inset-block-end: 0;
    block-size: auto;
  }
}

.overlap__bar {
  position: absolute;
  inset-block: 3px;
  inset-inline-start: calc(var(--bar-start) * 100%);
  inline-size: calc(100% * 9 / 24);
  border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(
    to right,
    var(--white) calc(var(--hl-a) * 100%),
    var(--amber) calc(var(--hl-a) * 100%) calc(var(--hl-b) * 100%),
    var(--white) calc(var(--hl-b) * 100%)
  );
}

.overlap__caption {
  color: var(--mist);
  font-size: 0.875rem;
  max-inline-size: 60ch;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4.5rem, 10vw, 9rem);
}

.display {
  font-family: var(--font-display);
  font-size: var(--display);
  font-weight: 780;
  font-stretch: 108%;
  line-height: 0.95;
  letter-spacing: -0.012em;
  margin-block-end: clamp(2.5rem, 5vw, 4.5rem);
}

.display__line {
  display: block;
}

.split {
  display: grid;
  gap: 1.5rem 3rem;
  margin-block-end: clamp(2.5rem, 5vw, 4.5rem);

  & .display {
    margin-block-end: 0;
  }

  @media (min-width: 64rem) {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: end;
  }
}

.split__aside {
  color: var(--muted);
  font-size: var(--text-lg);
  max-inline-size: 30rem;
}

/* Services */

.services {
  position: relative;
  display: grid;

  &::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    block-size: 2px;
    background: var(--ink);
    transform-origin: left center;
  }

  @media (min-width: 56rem) {
    grid-template-columns: 1fr 1fr;
  }
}

.service {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding-block: clamp(1.75rem, 3vw, 2.5rem);

  & > p:not(.service__fit) {
    max-inline-size: 36rem;
  }

  & + & {
    border-block-start: 1px solid var(--rule);
  }

  @media (min-width: 56rem) {
    padding-inline-end: clamp(2rem, 4vw, 4rem);

    & + & {
      border-block-start: 0;
      border-inline-start: 1px solid var(--rule);
      padding-inline: clamp(2rem, 4vw, 4rem) 0;
    }
  }
}

.service__name {
  font-family: var(--font-display);
  font-size: var(--display-sm);
  font-weight: 760;
  font-stretch: 112%;
  line-height: 1;
  letter-spacing: -0.01em;
}

.service__fit {
  color: var(--cobalt-deep);
  font-weight: 650;
  font-size: var(--text-lg);
  line-height: 1.35;
  max-inline-size: 30rem;
}

.ticks {
  display: grid;
  gap: 0.65rem;
  margin-block-start: 0.5rem;
  list-style: none;

  & li {
    position: relative;
    padding-inline-start: 1.6rem;
  }

  & li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0.62em;
    inline-size: 0.8rem;
    block-size: 2px;
    background: var(--cobalt);
  }
}

/* Process timeline */

.timeline {
  --track-y: 0.6rem;
  position: relative;
  display: grid;
  gap: 2.25rem;
  list-style: none;
  padding-inline-start: 2.5rem;

  &::before,
  &::after {
    content: "";
    position: absolute;
    inset-inline-start: calc(0.6rem - 1px);
    inset-block: 0.35rem 0.35rem;
    inline-size: 2px;
    background: var(--rule);
  }

  &::after {
    background: var(--amber);
    transform-origin: center top;
  }

  @media (min-width: 56rem) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    padding-inline-start: 0;
    padding-block-start: 3rem;

    &::before,
    &::after {
      inset-inline: 0;
      inset-block: var(--track-y) auto;
      inline-size: auto;
      block-size: 2px;
    }

    &::after {
      transform-origin: left center;
    }
  }
}

.timeline__step {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.5rem;

  &::before {
    content: "";
    position: absolute;
    inset-inline-start: -2.5rem;
    inset-block-start: 0.3rem;
    inline-size: 1.2rem;
    block-size: 1.2rem;
    border-radius: 50%;
    border: 2px solid var(--amber);
    background: var(--amber);
    box-shadow: 0 0 0 6px var(--ink);
  }

  & p {
    color: var(--muted);
    max-inline-size: 22rem;
  }

  @media (min-width: 56rem) {
    padding-inline-end: 1rem;

    &::before {
      inset-inline-start: 0;
      inset-block-start: calc(-3rem + var(--track-y) - 0.6rem + 1px);
    }
  }
}

.timeline__day {
  color: var(--amber);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  font-stretch: 112%;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 720;
  font-stretch: 104%;
  line-height: 1.1;
}

/* Stack */

.stack {
  border-block-start: 1px solid var(--rule);
}

.stack__group {
  overflow: clip;
  padding-block: 1.1rem 1.35rem;
  border-block-end: 1px solid var(--rule);
}

.stack__label {
  color: var(--muted);
  font-family: var(--font-text);
  font-size: var(--text-sm);
  font-weight: 650;
  margin-block-end: 0.35rem;
}

.stack__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.05em 0.5em;
  padding-inline: max(var(--pad), (100% - var(--max)) / 2);
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1rem + 4vw, 5rem);
  font-stretch: 118%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;

  & li:nth-child(even) {
    font-weight: 300;
  }
}

/* Reasons */

.reasons {
  list-style: none;
  border-block-start: 1px solid var(--rule);
}

.reason {
  display: grid;
  gap: 0.75rem 3rem;
  padding-block: clamp(1.5rem, 3vw, 2.4rem);
  border-block-end: 1px solid var(--rule);

  & p {
    color: var(--muted);
    max-inline-size: 34rem;
  }

  @media (min-width: 56rem) {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: baseline;
  }
}

.reason__title {
  font-family: var(--font-display);
  font-size: var(--display-sm);
  font-weight: 760;
  font-stretch: 110%;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* FAQ */

.faq {
  display: grid;
  gap: 1rem 4rem;

  @media (min-width: 64rem) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: start;

    & .faq__title {
      position: sticky;
      inset-block-start: calc(var(--header-h) + 2rem);
    }
  }
}

.faq__list {
  border-block-end: 1px solid var(--rule);
}

.faq__item {
  border-block-start: 1px solid var(--rule);

  & summary {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    padding-block: 1.35rem;
    list-style: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 680;
    font-stretch: 100%;
    line-height: 1.2;
    transition: color 0.2s;

    &::-webkit-details-marker {
      display: none;
    }

    &::before {
      content: "+";
      flex-shrink: 0;
      inline-size: 0.8em;
      color: var(--cobalt);
      font-family: var(--font-text);
      font-size: 1.45em;
      font-weight: 400;
      line-height: 0.7;
      text-align: center;
      translate: 0 0.06em;
    }

    &:hover {
      color: var(--cobalt-deep);
    }

    @media (prefers-reduced-motion: no-preference) {
      &::before {
        transition: rotate 0.3s var(--ease-out);
      }
    }
  }

  &[open] > summary::before {
    rotate: 45deg;
  }

  &::details-content {
    interpolate-size: allow-keywords;
    overflow: clip;
    contain: layout;
  }

  &:not([open])::details-content {
    block-size: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    &::details-content {
      transition: block-size, content-visibility;
      transition-duration: 0.35s;
      transition-timing-function: var(--ease-in-out);
      transition-behavior: allow-discrete;
    }
  }
}

.faq__answer {
  padding: 0 0 1.6rem calc(var(--text-xl) * 1.16 + 0.85rem);

  & p {
    color: var(--muted);
    max-inline-size: 40rem;
  }
}

/* Contact */

.contact {
  display: grid;
  gap: 2.5rem 5rem;

  @media (min-width: 64rem) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.contact__intro .display {
  margin-block-end: 1.5rem;
}

.contact__lede {
  color: var(--muted);
  font-size: var(--text-lg);
  max-inline-size: 28rem;
}

.form {
  --focus: var(--cobalt);
  position: relative;
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2.5rem);
  border-radius: 1.25rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgb(10 16 51 / 0.55);
}

.form__trap {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.field {
  display: grid;
  align-content: start;
  gap: 0.4rem;

  & label {
    font-weight: 650;
    font-size: var(--text-sm);
  }
}

.field-row {
  display: grid;
  gap: 1.4rem 1rem;

  @media (min-width: 40rem) {
    grid-template-columns: 1fr 1fr;
  }
}

.field__optional {
  color: #4a5070;
  font-weight: 450;
}

.field input,
.field textarea {
  inline-size: 100%;
  min-block-size: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--field-border);
  border-radius: 0.6rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: max(1rem, 1em);
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;

  &:hover {
    border-color: var(--ink);
  }

  &:focus-visible {
    outline: 3px solid var(--cobalt);
    outline-offset: 1px;
    border-color: var(--cobalt);
  }

  @media (pointer: coarse) {
    min-block-size: 3.25rem;
  }
}

.field textarea {
  resize: vertical;
  min-block-size: 8rem;
}

.field__hint {
  color: #4a5070;
  font-size: 0.875rem;
}

.field__error {
  display: none;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;

  &::before {
    content: "! ";
    display: inline-grid;
    place-items: center;
    inline-size: 1.15em;
    block-size: 1.15em;
    margin-inline-end: 0.35em;
    border-radius: 50%;
    background: var(--error);
    color: var(--white);
    font-size: 0.8em;
    line-height: 1;
  }
}

.field :is(input, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--error);
  background: #fff6f5;
}

:is(.field, .choices):has(:is(:user-invalid, .user-invalid-fallback)) .field__error {
  display: block;
}

.choices {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;

  & legend {
    padding: 0;
    margin-block-end: 0.55rem;
    font-weight: 650;
    font-size: var(--text-sm);
  }

  & .field__error {
    margin-block-start: 0.5rem;
  }
}

.choices__options {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice__input {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-block-size: 3rem;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--field-border);
  border-radius: 999px;
  background: var(--white);
  font-size: var(--text-sm);
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;

  &::before {
    content: "";
    inline-size: 0.95rem;
    block-size: 0.95rem;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0;
  }

  &:hover {
    border-color: var(--ink);
  }
}

.choice__input:checked + .choice {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);

  &::before {
    border-color: var(--amber);
    background: radial-gradient(circle, var(--amber) 0 45%, transparent 50%);
  }
}

.choice__input:focus-visible + .choice {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
}

.choice__input:is(:user-invalid, .user-invalid-fallback) + .choice {
  border-color: var(--error);
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-block-start: 0.25rem;
}

.form__status {
  font-weight: 600;
  font-size: var(--text-sm);

  &:empty {
    display: none;
  }

  &[data-state="success"] {
    color: var(--success);
  }

  &[data-state="error"] {
    color: var(--error);
  }

  &[data-state="success"]::before {
    content: "\2713  ";
  }

  &[data-state="error"]::before {
    content: "! ";
  }
}

/* Footer */

.site-footer {
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem;
  overflow: clip;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-block-end: 2rem;
  border-block-end: 1px solid var(--rule);
}

.site-footer__line {
  color: var(--muted);
  max-inline-size: 22rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  list-style: none;

  & a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;

    &:hover {
      color: var(--white);
    }
  }
}

.site-footer__mark {
  container-type: inline-size;
  margin-block: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
  padding-inline: var(--pad);
  color: var(--cobalt);
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 150%;
  line-height: 0.78;
  letter-spacing: -0.03em;
  text-align: center;
  user-select: none;

  & span {
    display: block;
    font-size: 22.5cqi;
  }
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: var(--text-sm);

  & .text-link {
    color: var(--white);
  }
}

/* ==========================================================================
   Motion
   One page-load sequence in the hero, then motion that follows scroll.
   Everything is opt-in: with reduced motion, or without scroll-driven
   animation support, every element simply sits in its final state.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  /* Page load: the headline stretches open, then the chart draws in */
  @keyframes stretch-open {
    from {
      font-stretch: 50%;
      opacity: 0;
      translate: 0 0.12em;
    }
    45% {
      opacity: 1;
    }
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      translate: 0 1.25rem;
    }
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
  }

  @keyframes bar-in {
    from {
      scale: 0 1;
    }
  }

  @keyframes now-in {
    from {
      opacity: 0;
      scale: 1 0;
    }
  }

  .hero__line {
    animation: stretch-open 1.35s var(--ease-out) backwards;
    animation-delay: calc(0.1s + var(--i, 0) * 0.11s);
  }

  .hero__line:nth-child(2) { --i: 1; }
  .hero__line:nth-child(3) { --i: 2; }

  .hero__intro {
    animation: rise-in 0.9s var(--ease-out) 0.6s backwards;
  }

  .overlap {
    animation: fade-in 0.6s ease 0.8s backwards;
  }

  .overlap__bar {
    animation: bar-in 1.1s var(--ease-out) backwards;
    animation-delay: calc(1s + var(--i, 0) * 0.09s);
  }

  .overlap__row:nth-child(2) { --i: 1; }
  .overlap__row:nth-child(3) { --i: 2; }
  .overlap__row:nth-child(4) { --i: 3; }

  .overlap__band {
    animation: fade-in 0.9s ease 1.55s backwards;
  }

  .overlap__now {
    animation: now-in 0.7s var(--ease-out) 1.85s backwards;
    transform-origin: center top;
  }

  .overlap__time {
    transition: color 0.3s;
  }

  /* Hover on the chart rows lifts the row you point at */
  .overlap__row:hover .overlap__city {
    color: var(--amber);
  }
}

/* Scroll-driven motion */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0px 100px)) {
    @keyframes progress-grow {
      from { scale: 0 1; }
      to { scale: 1 1; }
    }

    @keyframes header-lift {
      to { box-shadow: 0 10px 30px -12px rgb(10 16 51 / 0.45); }
    }

    .site-header__progress {
      animation: progress-grow linear both;
      animation-timeline: scroll(root);
    }

    .site-header {
      animation: header-lift linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 160px;
    }
  }

  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* The headline squeezes shut as it leaves the screen */
    @keyframes squeeze-out {
      to {
        font-stretch: 62%;
        opacity: 0.25;
      }
    }

    .hero__title {
      animation: squeeze-out linear both;
      animation-timeline: view();
      animation-range: exit 10% exit 100%;
    }

    /* Section headlines stretch open as they arrive (wide screens) */
    @keyframes stretch-in-view {
      from {
        font-stretch: 58%;
        opacity: 0.1;
      }
    }

    @keyframes rise-in-view {
      from {
        opacity: 0;
        translate: 0 0.35em;
      }
    }

    .display__line {
      animation: rise-in-view linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;

      @media (min-width: 56rem) {
        animation-name: stretch-in-view;
        animation-range: entry 0% cover 38%;
      }
    }

    /* Services: the top rule draws across */
    @keyframes rule-draw {
      from { scale: 0 1; }
    }

    .services::before {
      animation: rule-draw linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }

    /* Process: the timeline fills as you read down */
    @keyframes track-fill-x {
      from { scale: 0 1; }
    }

    @keyframes track-fill-y {
      from { scale: 1 0; }
    }

    @keyframes dot-light {
      from {
        background: var(--ink);
        border-color: rgb(255 255 255 / 0.35);
        scale: 0.7;
      }
    }

    .timeline {
      view-timeline: --timeline block;
    }

    .timeline::after {
      animation: track-fill-y linear both;
      animation-timeline: --timeline;
      animation-range: cover 18% cover 62%;
    }

    .timeline__step {
      --at: 18%;
    }

    .timeline__step:nth-child(2) { --at: 30%; }
    .timeline__step:nth-child(3) { --at: 44%; }
    .timeline__step:nth-child(4) { --at: 58%; }

    .timeline__step::before {
      animation: dot-light linear both;
      animation-timeline: --timeline;
      animation-range: cover var(--at) cover calc(var(--at) + 3%);
    }

    @media (min-width: 56rem) {
      .timeline::after {
        animation-name: track-fill-x;
        animation-range: cover 22% cover 52%;
      }

      .timeline__step:nth-child(1) { --at: 22%; }
      .timeline__step:nth-child(2) { --at: 29.5%; }
      .timeline__step:nth-child(3) { --at: 37%; }
      .timeline__step:nth-child(4) { --at: 44.5%; }
    }

    /* Stack: each row drifts sideways with the page (enabled by main.js,
       which measures how far each row can travel) */
    @keyframes drift-left {
      from { translate: 0 0; }
      to { translate: var(--shift, 0px) 0; }
    }

    @keyframes drift-right {
      from { translate: var(--shift, 0px) 0; }
      to { translate: 0 0; }
    }

    .is-drifting .stack__row {
      flex-wrap: nowrap;
      inline-size: max-content;
      white-space: nowrap;
      animation: drift-left linear both;
      animation-timeline: view();
      animation-range: cover 5% cover 95%;
    }

    .is-drifting .stack__row[data-drift="right"] {
      animation-name: drift-right;
    }

    /* Reasons: each title wipes in from the left */
    @keyframes wipe-in {
      from { clip-path: inset(0 100% 0 0); }
      to { clip-path: inset(0 0 0 0); }
    }

    .reason__title {
      animation: wipe-in linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 45%;
    }

    .reason p {
      animation: rise-in-view linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 35%;
    }

    /* Contact form slides up into place (no fade: it must never look
       disabled while someone is filling it in) */
    @keyframes slide-up-view {
      from { translate: 0 4rem; }
    }

    .form {
      animation: slide-up-view linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }

    /* Footer: the wordmark stretches open as you reach the end */
    @keyframes mark-open {
      from {
        font-stretch: 50%;
        letter-spacing: 0.04em;
      }
    }

    .site-footer__mark span {
      animation: mark-open linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}

/* ---------- Forced colors ---------- */

@media (forced-colors: active) {
  .overlap__track,
  .overlap__bar {
    border: 1px solid CanvasText;
  }

  .overlap__band {
    border-inline: 1px dashed Highlight;
  }

  .overlap__now {
    background: Highlight;
  }

  .btn {
    border-color: ButtonText;
  }

  .choice__input:checked + .choice {
    border-color: Highlight;
    outline: 2px solid Highlight;
  }

  .timeline__step::before {
    border-color: CanvasText;
  }
}
