/*
 * Beetroot Lab, modern theme (SITE_THEME=modern). Hand-written, no build step.
 * Order: tokens, base, shared components, header, hero, games, our story, roadmap,
 * contact, footer, cookie notice, 404, motion preferences.
 */

/* Tokens ---------------------------------------------------------------------------------- */

:root {
  /* Beetroot: dark skin, magenta flesh, pale rings. */
  --night: #1b1420;
  --night-raised: #241b29;
  --night-high: #2f2436;
  --night-deep: #150f19;
  --line: #3c2f44;
  --line-strong: #574663;
  --beet: #d2007d;
  --beet-hover: #e5168f;
  --beet-shade: #6e0a45;
  --ring: #f59ac9;
  --milk: #f7eef4;
  --mist: #bcaab7;
  --leaf: #9bd889;
  --error: #ff8597;

  --font-display: 'Outfit', 'Source Sans 3', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --heading-3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --heading-2: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  --heading-1: clamp(2.75rem, 1.6rem + 5vw, 5.75rem);
  --lead: clamp(1.5rem, 1.1rem + 1.6vw, 2.375rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 80rem;
  --header-h: 4.5rem;
  --section-space: clamp(4.5rem, 3rem + 6vw, 8rem);
  --radius-sm: 0.875rem;
  --radius-md: 1.25rem;
  --radius-lg: 2rem;

  /* Motion: ease-out for things entering, ease-in for leaving; exits run shorter than entrances. */
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --ease-pop: cubic-bezier(0.3, 1.45, 0.55, 1);
  --fast: 160ms;
  --slow: 280ms;
  --exit: 180ms;

  color-scheme: dark;
}

/* Base ------------------------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: var(--line-strong) var(--night);
  background: var(--night);
}

html.has-menu-open {
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--night);
  color: var(--milk);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

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

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

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

button {
  font: inherit;
}

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

::selection {
  background: var(--beet);
  color: #fff;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--milk);
  color: var(--night);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--fast) var(--ease);
}

.skip-link:focus {
  transform: none;
}

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

.section {
  padding-block: var(--section-space);
}

.section-title {
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
  font-size: var(--heading-2);
}

.icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 var(--text-base) / 1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.button:active {
  transform: scale(0.97);
}

.button--primary {
  background: var(--beet);
  color: #fff;
}

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

.button--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--milk);
}

.button--ghost:hover {
  border-color: var(--mist);
  background: var(--night-high);
}

.button--small {
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  font-size: var(--text-sm);
}

.button[aria-busy='true'] {
  cursor: progress;
}

.button[aria-busy='true']::before {
  content: '';
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(255 255 255 / 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.button:disabled {
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.icon-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--mist);
  transition:
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    background-color var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--night-high);
  color: var(--milk);
}

.icon-button:active,
.hero__arrow:active,
.store-badge:active {
  transform: scale(0.95);
}

.icon-button--large {
  width: 3.5rem;
  height: 3.5rem;
}

.icon-button--large .icon {
  width: 1.375rem;
  height: 1.375rem;
}

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

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
}

/* The blur sits on a pseudo-element: on the header itself it would trap the fixed mobile menu. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-bottom: 1px solid transparent;
  background: rgb(27 20 32 / 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  transition:
    background-color var(--slow) var(--ease),
    border-color var(--slow) var(--ease);
}

.site-header.is-scrolled::before {
  border-bottom-color: var(--line);
  background: rgb(27 20 32 / 0.9);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: min(100% - 2 * var(--gutter), var(--max));
  height: var(--header-h);
  margin-inline: auto;
}

.site-header__logo {
  position: relative;
  z-index: 1;
  flex: none;
  border-radius: 0.5rem;
}

.site-header__logo svg {
  width: 8.75rem;
  height: auto;
  fill: var(--milk);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--mist);
  font-weight: 600;
  text-decoration: none;
  transition:
    color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
}

.site-nav__link:hover {
  background: var(--night-high);
  color: var(--milk);
}

.site-nav__link.is-active {
  color: var(--milk);
}

.site-nav__link.is-active::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--beet);
}

.site-nav__social {
  display: flex;
  gap: 0.5rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.menu-toggle {
  display: none;
}

@media (max-width: 63.99rem) {
  .menu-toggle {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--milk);
    cursor: pointer;
  }

  .menu-toggle__bars,
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    display: block;
    width: 1.125rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition:
      transform var(--slow) var(--ease),
      background-color var(--fast) var(--ease);
  }

  .menu-toggle__bars {
    position: relative;
  }

  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .menu-toggle__bars::before {
    top: -6px;
  }

  .menu-toggle__bars::after {
    top: 6px;
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle__bars {
    background-color: transparent;
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle__bars::before {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-toggle[aria-expanded='true'] .menu-toggle__bars::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    margin: 0;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter)
      calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--night);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.75rem);
    transition:
      opacity var(--exit) var(--ease-in),
      transform var(--exit) var(--ease-in),
      visibility 0s linear var(--exit);
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity var(--slow) var(--ease),
      transform var(--slow) var(--ease),
      visibility 0s;
  }

  /* Links rise in one after another (--i is the position, set in the template). */
  .site-nav__list > li,
  .site-nav__social {
    opacity: 0;
    transform: translateY(0.75rem);
    transition:
      opacity var(--exit) var(--ease-in),
      transform var(--exit) var(--ease-in);
  }

  .site-nav.is-open .site-nav__list > li,
  .site-nav.is-open .site-nav__social {
    opacity: 1;
    transform: none;
    transition:
      opacity var(--slow) var(--ease),
      transform var(--slow) var(--ease);
    transition-delay: calc(60ms + var(--i, 0) * 40ms);
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__link {
    min-height: 4rem;
    padding: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--milk);
    font: 600 2rem / 1.1 var(--font-display);
    letter-spacing: -0.02em;
  }

  .site-nav__link:hover {
    background: none;
    color: var(--ring);
  }

  .site-nav__link.is-active::before {
    width: 0.625rem;
    height: 0.625rem;
    margin-right: 0.875rem;
  }

  .site-nav__social {
    padding-left: 0;
    border-left: 0;
  }
}

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

.hero {
  padding-top: 0.5rem;
}

.hero__frame {
  position: relative;
  isolation: isolate;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--night-raised);
}

.hero__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  pointer-events: none;
}

.hero__track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hero__track::-webkit-scrollbar {
  display: none;
}

.hero__slide {
  position: relative;
  flex: 0 0 100%;
  height: clamp(24rem, 68vh, 44rem);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__caption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding: clamp(1.25rem, 0.5rem + 3vw, 3.5rem);
  padding-top: 6rem;
  background: linear-gradient(
    to top,
    rgb(20 13 24 / 0.9),
    rgb(20 13 24 / 0.55) 55%,
    transparent
  );
}

.hero__text {
  max-width: 15ch;
  margin: 0;
  font: 700 clamp(2.125rem, 1.4rem + 3vw, 4rem) / 1 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero__controls {
  position: absolute;
  z-index: 1;
  right: clamp(1rem, 0.5rem + 2vw, 2rem);
  bottom: clamp(1rem, 0.5rem + 2vw, 2rem);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 999px;
  background: rgb(20 13 24 / 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero__controls[hidden] {
  display: none;
}

.hero__arrow {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--milk);
  cursor: pointer;
  transition:
    background-color var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.hero__arrow:hover {
  background: rgb(255 255 255 / 0.12);
}

.hero__arrow .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.hero__arrow--prev .icon {
  transform: scaleX(-1);
}

.hero__dots {
  display: flex;
}

.hero__dot {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* The current dot stretches into a bar; clip-path animates without triggering layout. */
.hero__dot::before {
  content: '';
  width: 1.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.45);
  clip-path: inset(0 0.5rem round 999px);
  transition:
    clip-path var(--slow) var(--ease),
    background-color var(--slow) var(--ease);
}

.hero__dot[aria-current='true']::before {
  background: #fff;
  clip-path: inset(0 0 round 999px);
}

@media (max-width: 47.99rem) {
  .hero__slide {
    height: min(70svh, 34rem);
  }

  .hero__frame {
    border-radius: var(--radius-md);
  }

  .hero__caption {
    padding-bottom: 5.25rem;
  }
}

/* Games: the first one is featured; character art breaks out of each frame ---------------- */

/* Characters stick out sideways a little; on narrow screens that must never scroll the page. */
.games {
  overflow-x: clip;
}

.games__list {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(3.5rem, 2.5rem + 3vw, 5.5rem) clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
}

.game {
  display: flex;
  flex: 1 1 21rem;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.game__art {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1462 / 700;
}

.game__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--night-raised);
}

.game__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  pointer-events: none;
}

.game__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Character art standing over the frame's edges; it stays still. */
.game__overlay {
  position: absolute;
  bottom: 0;
  left: -4%;
  width: 108%;
  max-width: none;
  pointer-events: none;
  filter: drop-shadow(0 1.25rem 1.25rem rgb(10 5 14 / 0.45));
}

.game__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.game__heading {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game__icon {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12);
}

.game__name {
  font-size: var(--heading-3);
}

.game__text {
  max-width: 62ch;
  color: var(--mist);
}

.game__text p {
  margin-bottom: 0.75em;
}

.game__text p:last-child {
  margin-bottom: 0;
}

.game__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-badge {
  display: block;
  width: 7.5rem;
  border-radius: 0.625rem;
  background: #000;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22);
  transition:
    box-shadow var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.store-badge:hover {
  box-shadow: 0 0 0 2px var(--ring);
}

.store-badge svg {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.game--featured {
  display: grid;
  flex-basis: 100%;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}

.game--featured .game__art {
  aspect-ratio: 16 / 10;
}

/* A soft beet glow under the featured artwork, the one spotlight on the page. */
.game--featured .game__art::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 12% 10% -10%;
  border-radius: 50%;
  background: rgb(210 0 125 / 0.45);
  filter: blur(64px);
}

.game--featured .game__frame {
  border-radius: var(--radius-lg);
}

.game--featured .game__heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.game--featured .game__icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.125rem;
}

.game--featured .game__name {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
}

.game--featured .game__text {
  font-size: var(--text-lg);
}

/* Stacked: stretch the art to full width (centring would shrink it to nothing). */
@media (max-width: 63.99rem) {
  .game--featured {
    display: flex;
    align-items: stretch;
  }
}

/* Our story ------------------------------------------------------------------------------- */

.story {
  padding-block: clamp(3rem, 2rem + 5vw, 7rem) var(--section-space);
}

.story__title {
  font-size: var(--heading-1);
  letter-spacing: -0.035em;
}

.story__lead {
  max-width: 50rem;
  margin-top: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.story__lead p {
  color: var(--milk);
  font: 500 var(--lead) / 1.2 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/*
 * The 3D illustrations are square PNGs whose artwork fills only the top ~57-63%, centred with ~20%
 * empty on either side. --fact-art is the PNG's size: lifting it by 30% puts the artwork astride
 * the card's top edge, like the game characters on their art, and the number starts just below
 * where the lowest artwork (the headphone cable) ends.
 */
.facts {
  --fact-art: clamp(11rem, 6rem + 10vw, 17rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 0.5rem + 2vw, 2rem);
  margin: calc(var(--fact-art) * 0.3 + clamp(3rem, 2rem + 3vw, 5rem)) 0
    clamp(3.5rem, 2.5rem + 4vw, 6rem);
  padding: 0;
  list-style: none;
}

.fact {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--fact-art) * 0.33 + 1rem) 1.5rem
    clamp(1.5rem, 1rem + 1vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--night-raised);
  text-align: center;
}

.fact__image {
  position: absolute;
  top: calc(var(--fact-art) * -0.3);
  right: 0;
  left: 0;
  width: var(--fact-art);
  margin-inline: auto;
  filter: drop-shadow(0 1rem 1.25rem rgb(10 5 14 / 0.5));
  transform-origin: 50% 57%;
  transition:
    transform var(--slow) var(--ease-pop),
    opacity var(--fast) var(--ease);
}

/*
 * Each illustration waits inside its card until the card first scrolls into view, then pops up.
 * site.js sets and clears .is-waiting; without JS or with reduced motion they just stand there.
 */
.is-waiting .fact__image {
  opacity: 0;
  transform: translateY(14%) scale(0.9);
}

.fact__number {
  font: 800 clamp(3.25rem, 2rem + 4vw, 5.25rem) / 0.9 var(--font-display);
  letter-spacing: -0.04em;
}

.fact__name {
  margin-top: 0.625rem;
  color: var(--mist);
  font-size: var(--text-lg);
  font-weight: 600;
}

.story__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  max-width: 68rem;
  color: var(--mist);
  font-size: var(--text-lg);
  line-height: 1.65;
}

.story__column {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}

@media (max-width: 47.99rem) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: calc(var(--fact-art) * 0.3 + 1.5rem);
  }

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

/* Roadmap: a spine through the years, each year marked by a beet slice ------------------ */

.roadmap {
  --spine: 50%;
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
  background: var(--night-deep);
}

.roadmap__head {
  max-width: 44rem;
  margin: 0 auto clamp(3rem, 2rem + 4vw, 5.5rem);
  text-align: center;
}

.roadmap__head .section-title {
  margin-bottom: 1.25rem;
}

.roadmap__intro p {
  color: var(--mist);
  font-size: var(--text-lg);
}

.timeline {
  position: relative;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  bottom: 2rem;
  left: var(--spine);
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(var(--beet), rgb(210 0 125 / 0.3));
}

.timeline__year {
  position: relative;
  padding-bottom: 3rem;
}

.timeline__label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  margin: 0 auto 1.75rem;
  padding: 0.375rem 1.25rem 0.375rem 0.375rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--night-deep);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.timeline__rings {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    var(--beet) 0 2px,
    var(--beet-shade) 2px 4.5px
  );
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.15);
}

.timeline__events {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__event {
  --reach: 2.5rem;
  position: relative;
  align-self: flex-end;
  width: calc(50% - var(--reach));
}

.timeline__event--left {
  align-self: flex-start;
}

/* Consecutive events on opposite sides overlap vertically, so the two columns interleave. */
.timeline__event--left + .timeline__event:not(.timeline__event--left),
.timeline__event:not(.timeline__event--left) + .timeline__event--left {
  margin-top: -2.5rem;
}

.timeline__event::before,
.timeline__event::after {
  content: '';
  position: absolute;
}

/* Dot on the spine. */
.timeline__event::before {
  top: 1.3rem;
  left: calc(-1 * var(--reach) - 0.4375rem);
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: var(--beet);
  box-shadow: 0 0 0 4px var(--night-deep);
}

/* Connector from the dot to the card. */
.timeline__event::after {
  top: calc(1.3rem + 0.4375rem - 1px);
  left: calc(-1 * var(--reach));
  width: var(--reach);
  height: 2px;
  background: var(--line-strong);
}

.timeline__event--left::before {
  right: calc(-1 * var(--reach) - 0.4375rem);
  left: auto;
}

.timeline__event--left::after {
  right: calc(-1 * var(--reach));
  left: auto;
}

.event {
  display: grid;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--night-raised);
}

.event--icon {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.event__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.5rem;
  object-fit: cover;
}

.event__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

.event__text {
  line-height: 1.5;
}

.event__text .color-main-text {
  color: var(--ring);
}

.event__text strong {
  font-weight: 600;
}

.timeline__end {
  position: relative;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--beet);
  box-shadow: 0 0 0 6px var(--night-deep);
}

.timeline__end svg {
  width: 2.125rem;
  fill: #fff;
}

@media (max-width: 47.99rem) {
  .roadmap {
    --spine: 1.5rem;
  }

  .roadmap__head {
    text-align: left;
  }

  .roadmap__intro p {
    text-align: left !important;
  }

  .timeline__label {
    margin-left: calc(var(--spine) - 1.5rem);
  }

  .timeline__event,
  .timeline__event--left {
    --reach: 1.75rem;
    align-self: stretch;
    width: auto;
    margin-left: calc(var(--spine) + var(--reach));
  }

  .timeline__event--left + .timeline__event:not(.timeline__event--left),
  .timeline__event:not(.timeline__event--left) + .timeline__event--left {
    margin-top: 0;
  }

  .timeline__event--left::before {
    right: auto;
    left: calc(-1 * var(--reach) - 0.4375rem);
  }

  .timeline__event--left::after {
    right: auto;
    left: calc(-1 * var(--reach));
  }

  .timeline__end {
    margin-left: calc(var(--spine) - 2rem);
  }
}

/* Contact and newsletter ------------------------------------------------------------------ */

.contact__panels {
  display: grid;
  gap: clamp(1.25rem, 0.75rem + 2vw, 2rem);
}

.contact--standalone {
  padding-top: clamp(2rem, 1.5rem + 3vw, 4.5rem);
}

.panel {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--night-raised);
}

.contact__title {
  margin-bottom: 2rem;
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
}

.contact__title--small {
  margin-bottom: 1.5rem;
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
}

.form {
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

/* Name and e-mail side by side; one column on phones. */
.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 47.99rem) {
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.field__input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: var(--night);
  color: var(--milk);
  font: inherit;
  line-height: 1.4;
  transition:
    border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.field__input:hover {
  border-color: #6c5878;
}

.field__input:focus {
  border-color: var(--ring);
  outline: none;
  box-shadow: 0 0 0 3px rgb(245 154 201 / 0.28);
}

textarea.field__input {
  min-height: 9.5rem;
  resize: vertical;
}

.field.is-invalid .field__input {
  border-color: var(--error);
}

.field.is-invalid .field__input:focus {
  box-shadow: 0 0 0 3px rgb(255 133 151 / 0.25);
}

.field__error {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  color: var(--error);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
}

.field__error:empty {
  display: none;
}

.field__error:not(:empty) {
  animation: drop-in var(--fast) var(--ease) both;
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
}

/* An icon as well as the colour, so the error doesn't rely on colour alone. */
.field__error::before {
  content: '';
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm-.9 3.5h1.8l-.3 6H7.4l-.3-6ZM8 12.6a1.1 1.1 0 1 1 0-2.2 1.1 1.1 0 0 1 0 2.2Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm-.9 3.5h1.8l-.3 6H7.4l-.3-6ZM8 12.6a1.1 1.1 0 1 1 0-2.2 1.1 1.1 0 0 1 0 2.2Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.field--captcha {
  min-height: 78px;
}

@media (max-width: 22.5rem) {
  .g-recaptcha {
    transform: scale(0.86);
    transform-origin: 0 0;
  }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--mist);
  font-size: var(--text-sm);
  line-height: 1.45;
  cursor: pointer;
}

.check__input {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 0.375rem;
  background: var(--night);
  cursor: pointer;
  appearance: none;
  transition:
    background-color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}

.check__input::after {
  content: '';
  width: 0.75rem;
  height: 0.75rem;
  background: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  transform: scale(0);
  transition: transform var(--fast) var(--ease);
}

.check__input:checked {
  border-color: var(--beet);
  background: var(--beet);
}

.check__input:checked::after {
  transform: scale(1);
}

.check__input:focus-visible {
  outline-offset: 2px;
}

.field.is-invalid .check__input {
  border-color: var(--error);
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.form__footer .field {
  flex: 1 1 16rem;
}

.form__status {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgb(255 133 151 / 0.1);
  color: var(--error);
  font-size: var(--text-sm);
  font-weight: 600;
}

.form__status:empty {
  display: none;
}

/* The server's success message (src/forms/form-messages.ts) replaces the form. */
.form-success {
  padding: 1.5rem;
  border: 1px solid rgb(155 216 137 / 0.35);
  border-radius: var(--radius-sm);
  background: rgb(155 216 137 / 0.08);
  animation: rise var(--slow) var(--ease) both;
}

.form-success:focus {
  outline: none;
}

.form-success .contacts__title {
  margin-bottom: 0.5rem;
  color: var(--leaf);
  font: 700 1.5rem / 1.2 var(--font-display);
}

/* Privacy policy: long-form text with a contents list ------------------------------------ */

.policy {
  padding-block: clamp(3rem, 2rem + 5vw, 7rem) var(--section-space);
}

.policy__header {
  max-width: 50rem;
  margin-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.policy__title {
  font-size: var(--heading-2);
  letter-spacing: -0.03em;
}

.policy__intro {
  margin-top: 1.5rem;
  color: var(--mist);
  font-size: var(--text-lg);
}

.policy__layout {
  display: grid;
  grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}

.policy__contents {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100svh - var(--header-h) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.contents__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--night-raised);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease);
}

.contents__title:hover {
  border-color: var(--line-strong);
}

.contents__title::-webkit-details-marker {
  display: none;
}

.contents__title::after {
  content: '';
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform var(--slow) var(--ease);
}

.contents[open] .contents__title::after {
  transform: translateY(25%) rotate(-135deg);
}

.contents__list {
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: var(--text-sm);
  list-style: none;
}

.contents[open] .contents__list {
  animation: drop-in var(--slow) var(--ease) both;
}

.contents__item a {
  display: flex;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--mist);
  line-height: 1.35;
  text-decoration: none;
  transition:
    color var(--fast) var(--ease),
    background-color var(--fast) var(--ease);
}

.contents__item a:hover {
  background: var(--night-high);
  color: var(--milk);
}

.contents__item--3 a {
  padding-left: 1.5rem;
}

.contents__item--4 a {
  padding-left: 2.5rem;
}

.contents__number {
  flex: none;
  min-width: 2.75em;
  color: var(--ring);
  font-variant-numeric: tabular-nums;
}

.policy__body {
  max-width: 46rem;
  color: var(--mist);
  line-height: 1.7;
}

.policy__section--2 {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.policy__section--2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.policy__section--3 {
  margin-top: 2.25rem;
}

.policy__section--4 {
  margin-top: 1.75rem;
}

.policy__heading {
  margin-bottom: 1rem;
  color: var(--milk);
}

h2.policy__heading {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

h3.policy__heading {
  font-size: 1.3125rem;
  letter-spacing: -0.015em;
}

h4.policy__heading {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.policy__number {
  margin-right: 0.25em;
  color: var(--ring);
  font-variant-numeric: tabular-nums;
}

.policy__body ul,
.policy__body ol {
  margin: 0 0 1em;
  padding-left: 1.375rem;
}

.policy__body li {
  margin-bottom: 0.375em;
  padding-left: 0.25rem;
}

.policy__body ul > li::marker {
  color: var(--beet);
}

.policy__body ol {
  margin-top: 0.5em;
}

.policy__body a,
.policy__intro a {
  color: var(--ring);
}

.policy-table {
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.policy-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.policy-table th,
.policy-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  background: var(--night-raised);
  color: var(--milk);
  font-weight: 600;
}

.policy-table tr:last-child td {
  border-bottom: 0;
}

.policy-table td:first-child {
  width: 34%;
  color: var(--milk);
  font-weight: 600;
}

@media (max-width: 63.99rem) {
  .policy__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .policy__contents {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

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

.site-footer {
  padding-block: 2rem calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: var(--text-sm);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__logo svg {
  width: 7rem;
  fill: var(--mist);
}

.site-footer__follow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-footer__follow-title {
  margin: 0;
}

.site-footer__social {
  display: flex;
  gap: 0.5rem;
}

.site-footer__legal {
  margin: 0;
}

@media (max-width: 47.99rem) {
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

.site-footer__legal a {
  margin-left: 0.5rem;
  color: var(--milk);
}

/* Cookie notice --------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  z-index: 50;
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  left: var(--gutter);
  width: min(26rem, 100% - 2 * var(--gutter));
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--night-high);
  box-shadow: 0 1.5rem 3rem rgb(8 4 10 / 0.5);
  animation: rise var(--slow) var(--ease) both;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner.is-leaving {
  animation: sink var(--exit) var(--ease-in) forwards;
}

.cookie-banner p {
  margin-bottom: 1rem;
  font-size: var(--text-sm);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
}

@keyframes sink {
  to {
    opacity: 0;
    transform: translateY(1rem);
  }
}

/* Page not found -------------------------------------------------------------------------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: 60svh;
  padding-block: var(--section-space);
}

.not-found__inner {
  display: grid;
  justify-items: center;
  gap: 1.75rem;
  text-align: center;
}

.not-found__mark {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: var(--beet);
}

.not-found__mark svg {
  width: 2.75rem;
  fill: #fff;
}

.not-found__title {
  font-size: var(--heading-2);
}

/* Motion preferences ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html,
  .hero__track {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
