/* ==================================================================
   GrowSync landing page
   Plain CSS, no build step. Sections, in order:
     1. Fonts            5. Navigation (top bar, dock, sheet)
     2. Design tokens    6. Page sections
     3. Base             7. Loader, cursor, reveal
     4. Shared pieces    8. Reduced motion
================================================================== */

/* ------------------------------ 1. Fonts ------------------------ */
/* Self-hosted, two families, two weights at most per family. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/fraunces-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-latin-600-normal.woff2') format('woff2');
}

/* --------------------------- 2. Design tokens ------------------- */
:root {
  /* The whole palette. No other colour is used anywhere below. */
  --mocha: #493124; /* Deep Mocha: primary, headings, dark surfaces */
  --walnut: #76543f; /* Walnut Brown: secondary, buttons, active nav */
  --taupe: #b58d72; /* Mushroom Taupe: accent, icons */
  --sand: #d8c2ac; /* Warm Sand: borders, card accents */
  --oat: #f2e9df; /* Oat Cream: page background */
  --ivory: #fffdf8; /* Soft Ivory: cards, content surfaces */
  --sage: #68765b; /* Botanical Sage: healthy status, growth */

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  /* Spacing scale: 4, 8, 16, 24, 48, 96. Nothing in between. */
  --s-1: 4px;
  --s-2: 8px;
  --s-4: 16px;
  --s-6: 24px;
  --s-12: 48px;
  --s-24: 96px;

  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(73, 49, 36, 0.08), 0 8px 24px rgba(73, 49, 36, 0.08);
  --shadow-sm: 0 1px 2px rgba(73, 49, 36, 0.08);
  --max-width: 1100px;

  /* Roles: the same seven colours, assigned per theme. */
  color-scheme: light;
  --page: var(--oat);
  --surface: var(--ivory);
  --ink: var(--mocha);
  --ink-soft: var(--walnut);
  --line: var(--sand);
  --line-strong: var(--walnut);
  --cta: var(--walnut);
  --cta-ink: var(--ivory);
  --cta-hover: var(--mocha);
  --focus: var(--walnut);
  --hover-wash: color-mix(in srgb, var(--sand) 50%, transparent);

  /* Drawing colours */
  --dw-frame: var(--walnut);
  --dw-cap: var(--taupe);
  --dw-stem: var(--ivory);
  --dw-growth: var(--sage);
  --dw-water: var(--sage);
  --dw-fog: var(--taupe);
  --dw-glass: color-mix(in srgb, var(--sand) 35%, transparent);
  --dw-panel: var(--oat);
  --dw-bag: var(--oat);
}

.dark,
.on-dark {
  --surface: color-mix(in srgb, var(--walnut) 30%, var(--mocha));
  --ink: var(--oat);
  --ink-soft: var(--sand);
  --line: color-mix(in srgb, var(--sand) 28%, transparent);
  --line-strong: var(--sand);
  --cta: var(--oat);
  --cta-ink: var(--mocha);
  --cta-hover: var(--ivory);
  --focus: var(--sand);
  --hover-wash: color-mix(in srgb, var(--sand) 16%, transparent);
}

.dark {
  color-scheme: dark;
  --page: var(--mocha);
  --dw-frame: var(--sand);
  --dw-stem: var(--oat);
  --dw-water: var(--taupe);
  --dw-fog: var(--sand);
  --dw-glass: color-mix(in srgb, var(--sand) 10%, transparent);
  --dw-panel: var(--mocha);
  --dw-bag: var(--mocha);
}

/* ------------------------------ 3. Base ------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

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

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a,
button,
select {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--sand);
  color: var(--mocha);
}

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

/* Anchored sections stop below the sticky bar on phones. */
section[id],
footer[id],
#privacy {
  scroll-margin-top: var(--s-24);
}

@media (min-width: 768px) {
  section[id],
  footer[id],
  #privacy {
    scroll-margin-top: var(--s-6);
  }
}

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

/* -------------------------- 4. Shared pieces -------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--s-4);
}

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

@media (min-width: 768px) {
  .container {
    padding-inline: var(--s-6);
  }

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

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

/* The theme buttons hold both icons; the theme picks one. */
.icon--sun,
.dark .icon--moon {
  display: none;
}

.dark .icon--sun {
  display: block;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow::before {
  content: '';
  width: var(--s-6);
  height: 1px;
  background: var(--taupe);
}

.display {
  font-size: clamp(2.5rem, 1.55rem + 4.2vw, 4.25rem);
  line-height: 1.04;
}

.title {
  font-size: clamp(1.875rem, 1.45rem + 1.9vw, 2.75rem);
  line-height: 1.12;
}

.lead {
  font-size: 1.25rem;
  color: var(--ink-soft);
}

.lead--sm {
  font-size: 1.125rem;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 1rem;
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 48rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--s-6);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: var(--s-2) var(--s-6);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--cta);
  color: var(--cta-ink);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 200ms;
}

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

.button[aria-disabled='true'] {
  cursor: progress;
  opacity: 0.8;
}

.button--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

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

.text-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--taupe);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.text-link--plain {
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-card);
}

.logo__mark {
  width: 2rem;
  height: 2rem;
}

.logo__box {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.logo__cap {
  fill: var(--taupe);
}

.logo__shine {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.logo__stem {
  fill: currentColor;
}

.logo__word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.skip-link {
  position: fixed;
  top: var(--s-4);
  left: var(--s-4);
  z-index: 90;
  padding: var(--s-2) var(--s-6);
  border-radius: var(--radius-pill);
  background: var(--cta);
  color: var(--cta-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

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

/* Oyster mushroom and chamber drawing parts */
.dw-face {
  fill: var(--dw-glass);
  stroke: var(--dw-frame);
  stroke-width: 2;
  stroke-linejoin: round;
}

.dw-front {
  fill: var(--surface);
  stroke: var(--dw-frame);
  stroke-width: 2.5;
}

.dw-door {
  fill: var(--dw-glass);
  stroke: var(--dw-frame);
  stroke-width: 1.5;
}

.dw-line {
  fill: none;
  stroke: var(--dw-frame);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dw-line--2 {
  stroke-width: 2;
}

.dw-tray {
  fill: var(--dw-panel);
  stroke: var(--dw-frame);
  stroke-width: 1.5;
}

.dw-bag {
  fill: var(--dw-bag);
  stroke: var(--dw-frame);
  stroke-width: 1.5;
}

.dw-dust {
  fill: none;
  stroke: var(--dw-cap);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.dw-water {
  fill: none;
  stroke: var(--dw-water);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dw-water--3 {
  stroke-width: 3;
}

.dw-nozzle {
  fill: var(--dw-water);
}

.dw-spray {
  fill: none;
  stroke: var(--dw-water);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 2 3;
}

.dw-fog {
  fill: none;
  stroke: var(--dw-fog);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dw-puff {
  fill: none;
  stroke: var(--dw-fog);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 2 3;
}

.dw-fan {
  fill: var(--dw-frame);
}

.dw-fan-hub {
  fill: var(--surface);
}

.dw-box {
  fill: var(--dw-panel);
  stroke: var(--dw-frame);
  stroke-width: 1.5;
}

.dw-screen {
  fill: var(--dw-growth);
}

.dw-knob {
  fill: var(--dw-frame);
}

.dw-valve {
  fill: var(--dw-frame);
}

.dw-filter {
  fill: var(--surface);
  stroke: var(--dw-water);
  stroke-width: 2;
}

.dw-pump {
  fill: var(--dw-water);
  stroke: var(--dw-frame);
  stroke-width: 1.5;
}

.dw-tank {
  fill: var(--surface);
  stroke: var(--dw-frame);
  stroke-width: 1.5;
}

.dw-tank-water {
  fill: var(--dw-water);
  fill-opacity: 0.3;
}

.dw-sensor {
  fill: var(--dw-growth);
}

.dw-stem {
  fill: var(--dw-stem);
  stroke: var(--dw-frame);
  stroke-width: 1;
  stroke-linejoin: round;
}

.dw-gills {
  fill: none;
  stroke: var(--dw-frame);
  stroke-width: 0.6;
  stroke-linecap: round;
}

.dw-cap {
  fill: var(--dw-cap);
  stroke: var(--dw-frame);
  stroke-width: 1;
  stroke-linejoin: round;
}

.dw-shine {
  fill: none;
  stroke: var(--dw-growth);
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* ---------------------------- 5. Navigation --------------------- */
/* Phones and small tablets: sticky top bar. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding-inline: var(--s-4);
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

/* The sticky bar needs its parent to span the page. */
.site-header {
  display: contents;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.wordmark-row,
.dock-nav {
  display: none;
}

@media (min-width: 768px) {
  .topbar {
    display: none;
  }

  .wordmark-row {
    display: block;
    padding-top: var(--s-6);
  }

  .dock-nav {
    display: block;
    position: fixed;
    bottom: var(--s-4);
    left: 50%;
    z-index: 40;
    transform: translateX(-50%);
  }
}

/* Dock: items grow as the pointer nears them (see js/main.js). */
.dock {
  display: flex;
  align-items: flex-end;
  gap: var(--s-2);
  height: 60px;
  padding: var(--s-2);
  background: var(--ivory);
  border: 1px solid var(--sand);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

.dark .dock {
  background: var(--mocha);
  border-color: color-mix(in srgb, var(--sand) 30%, transparent);
}

.dock__item {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}

.dock__item > a,
.dock__item > button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--oat);
  color: var(--walnut);
  transition: background-color 200ms, color 200ms;
}

.dock__item > a:hover,
.dock__item > button:hover {
  background: var(--sand);
}

.dock__item > a[aria-current] {
  background: var(--walnut);
  color: var(--ivory);
}

.dock__item .icon {
  width: 45%;
  height: 45%;
}

.dock__label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-bottom: var(--s-4);
  padding: var(--s-1) var(--s-4);
  border-radius: var(--radius-pill);
  background: var(--sand);
  color: var(--mocha);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 150ms, transform 150ms;
}

.dock__item:hover .dock__label,
.dock__item:focus-within .dock__label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dock__separator {
  flex: none;
  align-self: center;
  width: 1px;
  height: var(--s-6);
  margin-inline: var(--s-1);
  background: var(--sand);
}

.dark .dock__separator {
  background: color-mix(in srgb, var(--sand) 30%, transparent);
}

/* Menu sheet (native dialog) */
.sheet {
  position: fixed;
  inset: 0 0 0 auto;
  width: 80%;
  max-width: 24rem;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--s-6);
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--page);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.sheet::backdrop {
  background: color-mix(in srgb, var(--mocha) 60%, transparent);
}

.sheet[open] {
  animation: sheet-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet[open]::backdrop {
  animation: fade-in 200ms ease-out;
}

html:has(.sheet[open]) {
  overflow: hidden;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-6);
}

.sheet__title {
  font-size: 1.25rem;
}

.sheet__list {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.sheet__list a {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 48px;
  padding-inline: var(--s-4);
  border-radius: var(--radius-pill);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.sheet__list a:hover {
  background: var(--hover-wash);
}

.sheet__list a[aria-current] {
  background: var(--walnut);
  color: var(--ivory);
}

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

@keyframes sheet-in {
  from {
    transform: translateX(100%);
  }
}

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

/* --------------------------- 6. Page sections ------------------- */
/* Hero */
.section--hero {
  padding-top: var(--s-12);
}

.hero {
  display: grid;
  gap: var(--s-12);
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-6);
}

.hero__lead {
  max-width: 36rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-6);
}

/* Explore the cabinet: hotspot dots over the drawing, and a card that
   names the part under the pointer. The stage is exactly the size of the
   drawing, so the dots' percentage positions line up with it. */
.explore__stage {
  position: relative;
  max-width: 20rem;
  margin-inline: auto;
}

.chamber {
  width: 100%;
  height: auto;
}

/* Fade everything except the part being explored. */
.chamber [data-frame],
.chamber [data-part] {
  transition: opacity 200ms ease;
}

.explore.is-exploring .chamber [data-frame] {
  opacity: 0.45;
}

.explore.is-exploring .chamber [data-part]:not(.is-active) {
  opacity: 0.2;
}

.explore.is-interactive .chamber [data-part] {
  cursor: pointer;
}

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid var(--surface);
  border-radius: var(--radius-pill);
  background: var(--walnut);
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, -50%);
  transition: transform 150ms ease, background-color 150ms ease;
}

/* A larger, invisible hit area for fingers. */
.hotspot::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: inherit;
}

/* A soft ring that pulses outwards so the dots are easy to notice. */
.hotspot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--walnut);
  border-radius: inherit;
  opacity: 0;
  animation: hotspot-pulse 2.4s ease-out infinite;
  animation-delay: calc(var(--y) * 0.02s);
}

.hotspot:hover,
.hotspot.is-active {
  background: var(--mocha);
  transform: translate(-50%, -50%) scale(1.15);
}

.hotspot.is-active::after {
  animation: none;
}

.dark .hotspot {
  background: var(--sand);
}

.dark .hotspot::after {
  border-color: var(--sand);
}

.dark .hotspot:hover,
.dark .hotspot.is-active {
  background: var(--ivory);
}

@keyframes hotspot-pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

.explore__card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 12.5rem;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  pointer-events: none;
  animation: fade-in 150ms ease-out;
}

.explore__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
}

.explore__text {
  margin-top: var(--s-1);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.explore__caption {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink-soft);
}

/* The hint only makes sense once the dots are working. */
.explore__hint,
.explore.is-interactive .explore__static {
  display: none;
}

.explore.is-interactive .explore__hint {
  display: inline;
}

/* Details shown in the caption instead of the card, on narrow drawings. */
.explore__detail {
  display: block;
  animation: fade-in 150ms ease-out;
}

.explore__detail .explore__name,
.explore__detail .explore__text {
  display: block;
}

.explore__detail .explore__name {
  color: var(--ink);
}

.explore.is-detailing .explore__hint {
  display: none;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6);
  margin-top: var(--s-12);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}

.facts div {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--s-1);
}

.facts dt {
  color: var(--ink-soft);
}

.facts dd {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero {
    grid-template-columns: 7fr 5fr;
    gap: var(--s-6);
  }

  .hero__copy {
    padding-right: var(--s-6);
  }

  .explore__stage {
    max-width: none;
  }

  .facts {
    grid-template-columns: repeat(4, 1fr);
    margin-top: var(--s-24);
  }
}

/* The problem */
.pairs {
  margin-top: var(--s-12);
}

.pairs__head {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-12);
  padding-bottom: var(--s-4);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pairs__head-ours {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
}

.dot {
  width: var(--s-2);
  height: var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--sage);
}

.pairs__list {
  border-top: 1px solid var(--line-strong);
}

.pair {
  display: grid;
  gap: var(--s-4);
  padding-block: var(--s-6);
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
}

.pair__today {
  color: var(--ink-soft);
}

.pair__ours {
  padding-left: var(--s-4);
  border-left: 2px solid var(--sage);
  font-weight: 600;
}

.pair__label {
  display: block;
  margin-bottom: var(--s-1);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .pairs__head {
    display: grid;
  }

  .pair {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-12);
  }

  /* The column headings do this job on wide screens; keep it for screen readers. */
  .pair__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Key features: an uneven grid, so no two neighbours match. */
.features {
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-12);
}

.feature {
  display: flex;
}

.feature__card {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  width: 100%;
}

.feature__text {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.feature__text h3 {
  font-size: 1.5rem;
}

.feature__text p {
  color: var(--ink-soft);
}

.feature__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--oat);
  color: var(--walnut);
}

.dark .feature__icon {
  background: var(--mocha);
  color: var(--taupe);
}

.feature__shot {
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--dw-bag);
}

.feature__shot--phone {
  flex: none;
  align-self: center;
  width: 160px;
}

.feature__shot--photo {
  width: 100%;
}

.feature--narrow .feature__card {
  justify-content: space-between;
}

@media (min-width: 640px) {
  .feature--wide .feature__card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .feature--wide .feature__text {
    max-width: 24rem;
  }

  .feature--wide .feature__shot--phone {
    width: 192px;
  }
}

@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(6, 1fr);
  }

  .feature--wide {
    grid-column: span 4;
  }

  .feature--narrow {
    grid-column: span 2;
  }

  .feature--full {
    grid-column: span 6;
  }

  .feature--narrow .feature__shot--phone {
    width: 144px;
  }

  .feature--full .feature__card {
    flex-direction: row;
    align-items: center;
  }

  .feature--full .feature__text {
    width: 40%;
  }

  .feature--full .feature__shot--photo {
    width: 60%;
  }
}

@media (min-width: 1024px) {
  .feature--wide .feature__text h3,
  .feature--full .feature__text h3 {
    font-size: 1.875rem;
  }
}

/* How it's built: a dark band on the light theme. */
.band {
  background: var(--mocha);
  color: var(--ink);
}

.dark .band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.built {
  display: grid;
  gap: var(--s-12);
}

.built__copy {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.stack li {
  position: relative;
  display: flex;
  gap: var(--s-4);
  padding-bottom: var(--s-6);
}

.stack li:last-child {
  padding-bottom: 0;
}

/* The line that joins one step to the next. */
.stack li:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 24px;
  width: 1px;
  background: var(--taupe);
}

.stack__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--taupe);
  border-radius: var(--radius-pill);
  color: var(--sand);
}

.stack h3 {
  padding-top: var(--s-2);
  font-size: 1.25rem;
}

.stack p {
  margin-top: var(--s-1);
  color: var(--ink-soft);
}

@media (min-width: 768px) {
  .built {
    grid-template-columns: 6fr 1fr 5fr;
    gap: var(--s-6);
  }

  .built__copy {
    padding-right: var(--s-6);
  }

  .stack {
    grid-column: 3;
  }
}

/* Team */
.team {
  display: grid;
  gap: var(--s-12);
}

.roster {
  border-top: 1px solid var(--line-strong);
}

.roster li {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}

.roster__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.roster__role {
  color: var(--ink-soft);
}

@media (min-width: 640px) {
  .roster li {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-6);
  }

  .roster__role {
    text-align: right;
  }
}

@media (min-width: 768px) {
  .team {
    grid-template-columns: 4fr 8fr;
    gap: var(--s-6);
  }
}

/* Waitlist */
.waitlist {
  display: grid;
  gap: var(--s-12);
}

@media (min-width: 768px) {
  .waitlist {
    grid-template-columns: 5fr 7fr;
    gap: var(--s-6);
  }

  .waitlist .section__head {
    padding-right: var(--s-6);
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form__grid {
  display: grid;
  gap: var(--s-6);
}

@media (min-width: 640px) {
  .form__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.field label {
  font-weight: 600;
}

.field__hint {
  font-size: 1rem;
  color: var(--ink-soft);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
}

.field [aria-invalid='true'] {
  border-width: 2px;
}

.field__error {
  font-size: 1rem;
  font-weight: 600;
}

/* A small warning mark before each message, drawn in CSS. */
.field__error::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-right: var(--s-1);
  border: 1.5px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  line-height: 1;
}

.form-alert {
  padding: var(--s-4);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-card);
  font-weight: 600;
}

.form__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}

.spinner {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}

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

.form-success h3 {
  font-size: 1.5rem;
}

.form-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--sage);
  color: var(--ivory);
}

/* Contact and footer */
.footer {
  border-top: 1px solid var(--line);
}

.footer__grid {
  display: grid;
  gap: var(--s-12);
  padding-block: var(--s-12);
}

.footer__about,
.footer__contact,
.footer__privacy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}

.footer h2 {
  font-size: 1.25rem;
}

.footer__mail {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}

.footer__privacy {
  gap: var(--s-2);
}

.footer__privacy h2 {
  margin-bottom: var(--s-2);
}

.footer__privacy p {
  font-size: 1rem;
  color: var(--ink-soft);
}

.footer__base {
  border-top: 1px solid var(--line);
}

.footer__base p {
  padding-block: var(--s-6);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 4fr 3fr 5fr;
    gap: var(--s-6);
  }

  /* Leave room for the dock at the very bottom of the page. */
  .footer__base p {
    padding-bottom: var(--s-24);
  }
}

/* ---------------------- 7. Loader, cursor, reveal --------------- */
/* Loader timeline (1.8s in total):
     0.00 to 1.00s  the chamber draws itself, edge by edge
     0.85 to 1.40s  the oyster cluster grows
     1.40 to 1.80s  the veil fades into the hero                     */
.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page);
  pointer-events: none;
  animation: loader-out 400ms ease-in 1400ms forwards;
}

.loader svg {
  width: 12rem;
  height: auto;
  overflow: visible;
  animation: loader-zoom 400ms ease-in 1400ms forwards;
}

.loader__edge {
  fill: none;
  stroke: var(--dw-frame);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  animation: loader-draw 340ms ease-in-out forwards;
  animation-delay: calc(var(--i) * 70ms);
}

.loader__grow {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scale(0);
  animation: loader-grow 420ms cubic-bezier(0.34, 1.4, 0.64, 1) var(--d) forwards;
}

@keyframes loader-draw {
  from {
    opacity: 1;
    stroke-dashoffset: 1;
  }
  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes loader-grow {
  to {
    transform: scale(1);
  }
}

@keyframes loader-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes loader-zoom {
  to {
    transform: scale(1.12);
  }
}

/* Magnetic cursor. Warm blends keep it inside the palette:
   it darkens what it covers on light, and lightens it on dark. */
.cursor {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--taupe);
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms;
  will-change: transform;
}

.dark .cursor {
  background: var(--walnut);
  mix-blend-mode: screen;
}

.has-cursor .cursor {
  display: block;
}

.cursor.is-visible {
  opacity: 1;
}

/* Scroll reveal. Only active once the script has started, so the
   page is fully visible without JavaScript. */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1), transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------- 8. Reduced motion ------------------ */
@media (prefers-reduced-motion: reduce) {
  .loader,
  .cursor {
    display: none !important;
  }

  .reveal-on .reveal {
    opacity: 1;
    transform: none;
  }

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