/* ==========================================================================
   Landing page
   Display: Instrument Sans · Text: Atkinson Hyperlegible Next
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Brand palette (Master Brand Document) */
  --ivory: #F6F1E7;
  --stone: #CFC6B8;
  --forest: #001D00;
  --brown: #291516;
  --oxblood: #6B2234;

  /* Roles */
  --bg: var(--ivory);
  --surface: color-mix(in srgb, var(--stone) 38%, var(--ivory));
  --text: var(--brown);
  --text-muted: color-mix(in srgb, var(--brown) 80%, var(--ivory));
  --heading: var(--brown);
  --accent: var(--oxblood);
  --rule: color-mix(in srgb, var(--brown) 18%, var(--ivory));
  --focus: var(--forest);

  /* Type */
  --font-display: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", "Helvetica Neue", Arial, sans-serif;

  --step-h1: clamp(2.5rem, 1.55rem + 3.9vw, 4.75rem);
  --step-h2: clamp(1.875rem, 1.4rem + 2.2vw, 3.25rem);
  --step-h3: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
  --step-h4: 1.25rem;
  --step-statement: clamp(1.75rem, 1.2rem + 2.3vw, 3.25rem);
  --step-lead: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --step-body: 1.125rem;
  --step-small: 0.9375rem;
  --step-label: 0.875rem;

  /* Line height: tighter as type gets larger */
  --lh-display: 1.04;
  --lh-heading: 1.1;
  --lh-title: 1.25;
  --lh-lead: 1.5;
  --lh-body: 1.6;
  --lh-ui: 1.2;

  /* Tracking: display sizes tighten, small caps labels open up */
  --track-display: -0.025em;
  --track-heading: -0.02em;
  --track-title: -0.01em;
  --track-ui: 0.01em;
  --track-label: 0.12em;

  /* Spacing scale. Small steps separate related items,
     large steps separate groups and sections. */
  --space-3xs: 0.25rem;  /* hint text, tight pairs */
  --space-2xs: 0.5rem;   /* title to its description */
  --space-xs: 0.75rem;   /* label to field, sub-heading to paragraph */
  --space-s: 1rem;       /* eyebrow to heading, between fields */
  --space-m: 1.5rem;     /* heading to lead, between paragraphs groups */
  --space-l: 2.5rem;     /* lead to actions, between related blocks */
  --space-xl: clamp(3rem, 2.25rem + 3vw, 5rem);   /* between groups in a section */
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);     /* between sections */

  /* Layout */
  --max: 80rem;
  --gutter: clamp(1.25rem, 0.75rem + 2.5vw, 3rem);
  --header-h: 4.5rem;
  --measure: 36rem;       /* running text, about 65 characters */
  --measure-lead: 31rem;  /* larger intro text */
  --radius: 6px;
  --radius-lg: 10px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Anchor targets land below the sticky header */
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 500;
  text-wrap: balance;
}
p { text-wrap: pretty; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--forest);
  color: var(--ivory);
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* --- Type styles -------------------------------------------------------- */
.h2,
.section-head__title {
  font-size: var(--step-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--track-heading);
}
.h3 {
  font-size: var(--step-h3);
  line-height: var(--lh-title);
  letter-spacing: var(--track-title);
}
.lead {
  font-size: var(--step-lead);
  line-height: var(--lh-lead);
  max-width: var(--measure-lead);
}
.eyebrow {
  font-family: var(--font-text);
  font-size: var(--step-label);
  font-weight: 700;
  line-height: var(--lh-body);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-s);
}
.eyebrow--on-dark { color: var(--stone); }

.prose > * + * { margin-top: 1em; }
.prose .h3 + p { margin-top: var(--space-xs); }
.prose { max-width: var(--measure); }
.prose__emphasis { font-weight: 700; color: var(--forest); }

/* --- Buttons ------------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: var(--ivory);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: var(--track-ui);
  line-height: var(--lh-ui);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.button:hover {
  background: var(--oxblood);
  border-color: var(--oxblood);
}
.button--quiet {
  background: transparent;
  color: var(--forest);
}
.button--quiet:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--ivory);
}
.button--on-dark {
  background: transparent;
  border-color: var(--ivory);
  color: var(--ivory);
}
.button--on-dark:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--forest);
}
.button--small {
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-s);
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  min-height: var(--header-h);
}

/* OTTAL logo: about 24px tall in the header, a touch larger in the footer */
.wordmark__logo {
  display: block;
  width: auto;
  height: 1.5rem;
}
.site-footer__logo img {
  display: block;
  width: auto;
  height: 1.75rem;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: var(--lh-ui);
  letter-spacing: var(--track-title);
  color: var(--forest);
  text-decoration: none;
  white-space: nowrap;
  padding-block: 0.625rem; /* 44px tap target around the logo */
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-l);
}
.site-nav__list {
  display: flex;
  gap: var(--space-l);
}
.site-nav__list a {
  display: inline-block;
  padding-block: 0.8125rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: var(--lh-ui);
  text-decoration: none;
  color: var(--text);
}
.site-nav__list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.site-nav__list a[aria-current="page"] {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.25rem 0.5rem 1rem;
  border: 0;
  background: none;
  color: var(--forest);
  font: 600 1rem/1 var(--font-text);
  cursor: pointer;
}
.menu-toggle__icon {
  position: relative;
  width: 1.375rem;
  height: 10px;
}
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { top: 4px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { top: 4px; transform: rotate(-45deg); }

@media (max-width: 52.5rem) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    z-index: 5;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-m);
    padding: var(--space-2xs) var(--gutter) var(--space-l);
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .js .site-nav.is-open { display: flex; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a {
    display: block;
    padding-block: var(--space-s);
    font-size: var(--step-h4);
    border-bottom: 1px solid var(--rule);
  }
  /* Without JS the nav simply stacks under the wordmark */
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 1rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 1rem; }
  html:not(.js) .site-nav__list { flex-direction: row; gap: 1.25rem; }
  html:not(.js) .site-nav__list a { border: 0; font-size: 1rem; }
}

/* --- Hero --------------------------------------------------------------- */
/* Text-only and centred. The collection directly below provides the imagery,
   so the hero has no bottom padding of its own. */
.hero {
  padding-block: var(--section) 0;
  padding-inline: var(--gutter);
  text-align: center;
}
.hero__copy {
  max-width: 48rem;
  margin-inline: auto;
}
.hero__title {
  max-width: 18ch;
  margin-inline: auto;
  font-size: var(--step-h1);
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
}
.hero__title-accent {
  display: block;
  margin-top: 0.12em;
  color: var(--forest);
}
.hero__lead {
  max-width: var(--measure-lead);
  margin: var(--space-m) auto 0;
}
.hero .button-row {
  justify-content: center;
  margin-top: var(--space-l);
}

/* --- Sections ----------------------------------------------------------- */
.section {
  padding-block: var(--section);
  /* Navigation lands with the heading just below the header, not the empty padding above it */
  scroll-margin-top: calc(var(--space-l) - var(--section));
}

.section-head {
  display: grid;
  gap: var(--space-m);
  margin-bottom: var(--space-xl);
}
.section-head__intro {
  max-width: var(--measure-lead);
  color: var(--text-muted);
  font-size: var(--step-lead);
  line-height: var(--lh-lead);
}
@media (min-width: 60rem) {
  .section-head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: var(--space-l);
  }
}

/* --- Collection --------------------------------------------------------- */
/* One column on phones, two on tablets (iPad portrait and landscape), four on wide screens */
.product-grid {
  display: grid;
  gap: var(--space-xl) var(--space-m);
}
@media (min-width: 40rem) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 72rem) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl) clamp(var(--space-m), 2vw, var(--space-l)); }
}

/* 4:3 frame: wide enough for the landscape placemat photo, and each portrait
   photo is positioned so the whole product stays in view */
.product__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
}
.product:nth-child(1) .product__media img { object-position: 50% 62%; } /* scoop plate */
.product:nth-child(2) .product__media img { object-position: 50% 86%; } /* cutlery: keep the loops in frame */
.product:nth-child(3) .product__media img { object-position: 100% 50%; } /* placemat: mat centred with space around it */
.product:nth-child(4) .product__media img { object-position: 50% 50%; } /* rocker knife */
.product__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-s);
  padding-top: var(--space-m);
}
.product__index {
  grid-row: span 2;
  padding-top: 0.3rem;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  line-height: var(--lh-ui);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.product__name {
  font-size: var(--step-h4);
  line-height: var(--lh-title);
  letter-spacing: var(--track-title);
}
.product__desc {
  margin-top: var(--space-2xs);
  max-width: 24rem;
  font-size: 1rem;
  line-height: var(--lh-body);
  color: var(--text-muted);
}

/* --- Testimonials ------------------------------------------------------ */
.testimonials { background: var(--surface); }
.testimonials__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}

/* Horizontal carousel: one row of equal cards, the next card peeking in at the edge */
.testimonial-list {
  --card-gap: var(--space-m);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(85%, 24rem);
  gap: var(--card-gap);
  /* Run to the screen edges on small screens while the first card lines up with the page */
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--space-3xs) var(--gutter) var(--space-m);
  scroll-padding-inline: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Thin, quiet scrollbar that is still there to see and drag */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brown) 30%, transparent) transparent;
}
.testimonial-list::-webkit-scrollbar { height: 6px; }
.testimonial-list::-webkit-scrollbar-track { background: transparent; }
.testimonial-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brown) 30%, transparent);
  border-radius: 999px;
}
.testimonial-list:focus-visible { outline-offset: -3px; }
@media (min-width: 48rem) {
  /* Two cards and part of a third */
  .testimonial-list { grid-auto-columns: calc((100% - var(--card-gap) * 2) / 2.3); }
}
@media (min-width: 72rem) {
  /* Three cards and part of a fourth */
  .testimonial-list { grid-auto-columns: calc((100% - var(--card-gap) * 3) / 3.25); margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
}

.testimonial {
  scroll-snap-align: start;
}
.testimonial figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  height: 100%;
  padding: var(--space-l);
  background: var(--bg);
  border-radius: var(--radius);
}
.testimonial blockquote { margin: 0; }
.testimonial blockquote p {
  font-size: var(--step-lead);
  line-height: var(--lh-lead);
  color: var(--text);
  text-wrap: pretty;
}
.testimonial__name {
  margin-top: auto;
  font-size: var(--step-small);
  font-weight: 700;
  line-height: var(--lh-body);
  color: var(--text-muted);
}

/* Previous / next buttons: shown on larger screens once the script is running */
.carousel-controls {
  display: none;
  gap: var(--space-xs);
  flex-shrink: 0;
}
@media (min-width: 48rem) {
  .js .carousel-controls { display: flex; }
}
.carousel-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--brown) 35%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.carousel-button:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--forest);
}
.carousel-button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* --- Story -------------------------------------------------------------- */
.story__grid {
  display: grid;
  gap: var(--space-l);
}
.story__head .lead { margin-top: var(--space-m); }
.story__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
}
@media (min-width: 60rem) {
  .story__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(1.5rem, 2.5vw, 2.5rem);
    row-gap: var(--space-xl);
  }
  .story__head { grid-column: 1 / span 5; }
  /* Top of the sub-heading lines up with the top of the main heading */
  .story__intro { grid-column: 7 / span 6; padding-top: calc(var(--step-label) * var(--lh-body) + var(--space-s)); }
  .story__media { grid-column: 1 / span 7; align-self: start; }
  .story__why { grid-column: 9 / span 4; align-self: center; }
}

/* --- Approach ----------------------------------------------------------- */
.approach {
  --heading: var(--ivory);
  --text: var(--ivory);
  --focus: var(--ivory);
  background: var(--forest);
  color: var(--ivory);
}
.approach .button-row,
.teaser .button-row { margin-top: var(--space-l); }
.approach .lead { margin-top: var(--space-m); color: color-mix(in srgb, var(--ivory) 92%, var(--forest)); }
.approach .button:focus-visible { outline-color: var(--ivory); }

.approach__grid,
.practical__grid {
  display: grid;
  gap: var(--space-xl);
}
.approach__media {
  background: var(--stone);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.approach__media img {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  mix-blend-mode: multiply; /* lets the white product backdrop take on the stone colour */
}
@media (min-width: 60rem) {
  .approach__grid,
  .practical__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(3rem, 6vw, 6rem);
  }
}

/* --- Teaser (home) ------------------------------------------------------ */
.teaser__copy { max-width: 40rem; }
.teaser .lead { margin-top: var(--space-m); }

/* --- Sub-pages ----------------------------------------------------------- */
/* The first section of a page sits closer to the header than sections further down */
main > .section:first-child { padding-top: var(--space-xl); }

.practical__aside {
  margin-top: var(--space-m);
  font-style: italic;
  color: var(--text-muted);
}
.practical__intro {
  margin-top: var(--space-s);
  max-width: var(--measure);
}
.practical__principles {
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--rule);
}
.principles {
  display: grid;
  gap: var(--space-l);
}
.principle {
  padding-left: var(--space-m);
  border-left: 2px solid var(--stone);
}
.principle__title {
  font-size: var(--step-h4);
  line-height: var(--lh-title);
  letter-spacing: var(--track-title);
  margin-bottom: var(--space-2xs);
}
.principle p { max-width: var(--measure); }
@media (min-width: 40rem) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.page-cta {
  padding-block: var(--space-xl);
  background: var(--surface);
}
.page-cta__inner {
  display: grid;
  gap: var(--space-l);
}
.page-cta .lead { margin-top: var(--space-m); color: var(--text-muted); }
@media (min-width: 60rem) {
  .page-cta__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

/* --- Privacy Policy ----------------------------------------------------- */
.policy__inner {
  display: grid;
  gap: var(--space-xl);
}
.policy__head { max-width: var(--measure); }
.policy__dates {
  margin-top: var(--space-xs);
  font-size: var(--step-small);
  color: var(--text-muted);
}
.policy__head .lead { margin-top: var(--space-m); }
.policy__section { scroll-margin-top: var(--space-m); }
.policy__section + .policy__section { margin-top: var(--space-l); }
.policy__section > * + * { margin-top: 1em; }
.policy__section > .h3 + * { margin-top: var(--space-xs); }
.policy__body ul {
  list-style: disc;
  padding-left: var(--space-m);
}
.policy__body li + li { margin-top: var(--space-2xs); }
.policy__contact {
  padding-top: var(--space-l);
  border-top: 1px solid var(--rule);
}

/* --- Waitlist ----------------------------------------------------------- */
.waitlist__grid {
  display: grid;
  gap: var(--space-l);
}
.waitlist__copy .lead { margin-top: var(--space-m); color: var(--text-muted); }
@media (min-width: 60rem) {
  .waitlist__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
    gap: clamp(3rem, 6vw, 6rem);
  }
}

.waitlist-form {
  width: 100%;
  max-width: 36rem;
}
.waitlist-form__label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 700;
  line-height: var(--lh-ui);
}
.waitlist-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.waitlist-form__input {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid color-mix(in srgb, var(--brown) 55%, var(--ivory));
  border-radius: 999px;
  background: #fff;
  color: var(--brown);
  font: inherit;
}
.waitlist-form__input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--forest);
}
.waitlist-form__input[aria-invalid="true"] { border-color: var(--oxblood); }
.waitlist-form .button { flex: 0 0 auto; }
.waitlist-form__status {
  min-height: 1.5em;
  margin-top: var(--space-xs);
  font-size: var(--step-small);
  line-height: var(--lh-lead);
  color: var(--text);
}
.waitlist-form__status:empty { min-height: 0; margin-top: 0; }
.waitlist-form__status[data-tone="error"] { color: var(--oxblood); font-weight: 600; }
.waitlist-form__status[data-tone="success"] { color: var(--forest); font-weight: 600; }

/* Phones: buttons fill the width so they are easy to reach and tap */
@media (max-width: 30rem) {
  .waitlist-form .button,
  .button-row .button { flex: 1 1 100%; }
}

/* --- Waitlist pop-up ---------------------------------------------------- */
.waitlist-modal {
  width: min(calc(100% - var(--gutter) * 2), 30rem);
  max-height: calc(100dvh - var(--space-l));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1.5rem 4rem color-mix(in srgb, var(--brown) 22%, transparent);
  overflow: auto;
  overscroll-behavior: contain;
}
.waitlist-modal::backdrop {
  background: color-mix(in srgb, var(--forest) 55%, transparent);
}
html:has(.waitlist-modal[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .waitlist-modal[open] { animation: modal-in 0.22s ease-out; }
  @keyframes modal-in {
    from { opacity: 0; transform: translateY(0.75rem); }
    to { opacity: 1; transform: none; }
  }
}
.waitlist-modal__body {
  position: relative;
  padding: clamp(1.75rem, 1.25rem + 2.5vw, 2.75rem);
}
.waitlist-modal__close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 400 1.75rem/1 var(--font-text);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.waitlist-modal__close:hover { background: var(--surface); }
.waitlist-modal__title {
  padding-right: var(--space-l); /* clear of the close button */
  font-size: var(--step-h3);
  line-height: var(--lh-title);
  letter-spacing: var(--track-title);
}
.waitlist-modal__title:focus { outline: none; }
.waitlist-modal__intro {
  margin-top: var(--space-xs);
  color: var(--text-muted);
}
.waitlist-modal__view[data-view="success"] .button { margin-top: var(--space-l); }

.waitlist-form--stacked {
  display: grid;
  gap: var(--space-s);
  max-width: none;
  margin-top: var(--space-m);
}
.waitlist-form--stacked .waitlist-form__input { width: 100%; }
.waitlist-form--stacked .button { width: 100%; margin-top: var(--space-2xs); }
.waitlist-form--stacked .waitlist-form__status { margin-top: 0; }
/* No reserved gap under the button until there is a message to show */
.waitlist-form--stacked .waitlist-form__status:empty { min-height: 0; margin-top: calc(var(--space-s) * -1); }
.form-note {
  margin-top: var(--space-xs);
  max-width: var(--measure);
  font-size: var(--step-small);
  line-height: var(--lh-lead);
  color: var(--text-muted);
}
.waitlist-form--stacked .form-note { margin-top: 0; }
@media (max-height: 36rem) {
  .waitlist-modal__body { padding: var(--space-m); }
  .waitlist-modal .eyebrow { display: none; }
  .waitlist-modal__intro { margin-top: var(--space-2xs); font-size: 1rem; }
  .waitlist-form--stacked { gap: var(--space-xs); margin-top: var(--space-s); }
  .waitlist-form--stacked .waitlist-form__label { margin-bottom: var(--space-2xs); }
}
.field__hint { font-weight: 400; color: var(--text-muted); }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  --focus: var(--ivory);
  padding-block: var(--space-xl) var(--space-l);
  background: var(--forest);
  color: var(--ivory);
  font-size: 1rem;
}
.site-footer a {
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ivory) 45%, transparent);
}
.site-footer a:hover { text-decoration-color: currentColor; }
.site-footer__grid {
  display: grid;
  gap: var(--space-l);
}
.site-footer__tagline { margin-top: var(--space-2xs); color: var(--stone); }
.site-footer__heading {
  margin-bottom: var(--space-xs);
  font-family: var(--font-text);
  font-size: var(--step-label);
  font-weight: 700;
  line-height: var(--lh-body);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--stone);
}
.site-footer__list li + li { margin-top: var(--space-2xs); }
.site-footer__list a {
  display: inline-block;
  padding-block: 0.625rem; /* comfortable tap target */
  margin-block: -0.625rem;
}
.site-footer__privacy {
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid color-mix(in srgb, var(--ivory) 22%, var(--forest));
  /* Land the privacy notice just below the sticky header */
  scroll-margin-top: var(--space-m);
}
.site-footer__privacy p {
  max-width: var(--measure);
  color: var(--stone);
}
.site-footer__privacy p + p { margin-top: var(--space-xs); }
.site-footer__base {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid color-mix(in srgb, var(--ivory) 22%, var(--forest));
  font-size: var(--step-small);
  color: var(--stone);
}
@media (min-width: 40rem) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .site-footer__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__brand { grid-column: auto; }
  .site-footer__base { flex-direction: row; justify-content: space-between; gap: var(--space-l); }
}

/* --- Motion ------------------------------------------------------------- */
/* Pages fade into each other while the header stays put */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
