/* =========================================================
   Stapuit — landing page
   Light theme. Palette and type taken from the main site design.
   ========================================================= */

/* ---------------------------------------------------------
   BRAND TYPEFACE — Helvetica Now Display (Monotype, licensed)

   Not a free font, so the files are not in this repo. To switch the page
   from the fallback to the real thing:

     1. Put the .woff2 files in assets/fonts/
     2. Uncomment the block below and correct the filenames
     3. Nothing else — --font already asks for it first

   Only two weights are used: 500 (Medium) and 700 (Bold).
   Alternatively, if you have a Monotype web project, drop its stylesheet
   <link> into index.html instead and skip this block.
   --------------------------------------------------------- */

/*
@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/HelveticaNowDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/HelveticaNowDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
*/

:root {
  /* Brand */
  --cream:     #f5f4f0;   /* page background of the main site */
  --paper:     #ffffff;
  --ink:       #16211a;   /* near-black green, used for type */
  --muted:     #5c665a;
  --sage:      #7d9a72;   /* the green of the logo mark */
  --sage-soft: #e7ece1;
  --sage-deep: #55703f;   /* dark enough for text on cream */

  /* Roles */
  --bg:        var(--cream);
  --text:      var(--ink);
  --line:      rgba(22, 33, 26, .14);
  --line-soft: rgba(22, 33, 26, .08);

  /* Layout */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --radius: 10px;
  --radius-lg: 18px;

  /* Fallbacks are Helvetica-alikes on purpose — the closest grotesques
     available without the licensed files. Windows lands on Arial. */
  --font: "Helvetica Now Display", "Helvetica Neue", Helvetica, Arial,
          "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset-ish ---------- */

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

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

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

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

:where(a, button, input):focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================
   Page shell
   .wrap holds the readable column; the photo band breaks out of it.
   ========================================================= */

.page {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vh, 4.5rem);
  padding-block: clamp(2rem, 5vh, 3.5rem) clamp(1.5rem, 4vh, 3rem);
  overflow-x: clip;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vh, 3.25rem);
}

/* =========================================================
   Intro — logo and tagline, on cream, above the photo
   ========================================================= */

.intro { text-align: center; }

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(.5rem, 1.2vw, .85rem);
  width: clamp(140px, 16vw, 205px);
  margin-inline: auto;
}

/* NOTE: the mark is only 72px wide inside logo.png, so at this size it is
   scaled up ~1.7x (more on a retina screen) and will look soft. A vector
   logo, or the same PNG exported at 4x, fixes it. */
.lockup__mark {
  width: 46%;
  height: auto;
}

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

.tagline {
  margin-top: clamp(1rem, 2.2vh, 1.5rem);
  /* Deliberately below the logo in scale — the logo leads. */
  font-size: clamp(1.375rem, .95rem + 1.9vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}

/* =========================================================
   Countdown — bare numerals on the cream, no cards
   ========================================================= */

.counter { text-align: center; }

/* The counter sits on the photo, so the numerals need help from the scrim
   below rather than a card of their own. */
.wrap--flush { gap: 0; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: clamp(.85rem, 2vh, 1.35rem);
  font-size: clamp(1rem, .95rem + .3vw, 1.1875rem);
  font-weight: 500;
  color: var(--ink);
}

.soon::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 0 rgba(85, 112, 63, .8);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(85, 112, 63, .8); }
  70%  { box-shadow: 0 0 0 12px rgba(85, 112, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(85, 112, 63, 0); }
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 5vw, 3.5rem);
}

.unit { text-align: center; }

.unit__value {
  display: block;
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--ink);
  /* Keeps 09 -> 10 from shifting the layout */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.unit__label {
  display: block;
  margin-top: .5rem;
  font-size: clamp(.6875rem, .64rem + .2vw, .8125rem);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Launch reached */
.countdown--done .unit__value { color: var(--sage-deep); }

/* =========================================================
   Photo — full-bleed band
   ========================================================= */

.photo {
  position: relative;
  width: 100%;
}

.photo__img {
  width: 100%;
  /* Required: the img carries width/height attributes, which act as CSS
     width/height. Without height:auto the attribute wins and aspect-ratio
     below is ignored entirely. */
  height: auto;
  /* Placeholder tint while the photo loads. It sits on the image, NOT on
     .photo — on phones the counter is a child of .photo and would otherwise
     sit on a green band instead of the page's cream. */
  background: var(--sage-soft);
  /* The ratio lives on the image, not the figure, so that on phones the
     figure can grow to hold the counter underneath it. */
  aspect-ratio: 16 / 9;
  max-height: 620px;
  object-fit: cover;
  /* The group sits at 27-72% of this crop; 45% frames it with sky above
     and grass below at every band ratio. */
  object-position: center 45%;
}

/* Holds the counter against the bottom of the band. The cream gradient is
   painted here rather than on a ::after of .photo — an ::after would be the
   last child and would wash over the numerals instead of sitting under them.
   Cream, not black, so the page stays light. */
.photo__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(1.25rem, 4vh, 2.5rem);
  background: linear-gradient(
    to bottom,
    rgba(245, 244, 240, 0)   38%,
    rgba(245, 244, 240, .45) 62%,
    rgba(245, 244, 240, .82) 82%,
    rgba(245, 244, 240, .95) 100%
  );
}

/* Phones: a 16:9 band is a sliver, and at this width the counter would sit
   straight across the walkers. Drop it under the photo instead — the same
   thing the earlier version did. */
@media (max-width: 700px) {
  .photo__img { aspect-ratio: 4 / 3; }

  .photo__overlay {
    position: static;
    display: block;
    /* Only a little room underneath — .page's own gap supplies most of the
       separation from the signup card below. */
    padding: clamp(1.75rem, 4.5vh, 2.5rem) 0 clamp(.5rem, 1.5vh, 1rem);
    background: none;
  }
}

/* =========================================================
   Signup
   ========================================================= */

.signup {
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--sage-soft);
  border-radius: var(--radius-lg);
}

.signup__title {
  max-width: 42ch;
  margin-bottom: 1.75rem;
  font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem clamp(1rem, 2vw, 1.5rem);
}

/* Row-to-row spacing matches the gap inside a row. */
.form__row + .form__row { margin-top: 1rem; }

.field { display: flex; flex-direction: column; gap: .45rem; }

.field label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
}

.req { color: var(--sage-deep); }
.opt { font-weight: 400; opacity: .75; }

.field input {
  width: 100%;
  padding: .8rem .95rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.field input::placeholder { color: #9aa398; }

.field input:hover { border-color: rgba(22, 33, 26, .3); }

.field input:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(85, 112, 63, .18);
}

.field input[aria-invalid="true"] {
  border-color: #b4472c;
  box-shadow: 0 0 0 3px rgba(180, 71, 44, .14);
}

.field__error {
  font-size: .8125rem;
  color: #9b3c24;
}

/* Honeypot */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.6rem;
  font-weight: 500;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}

.btn svg { width: 20px; height: 20px; transition: transform .18s var(--ease); }

.btn:hover { background: var(--sage-deep); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn[disabled] { opacity: .6; cursor: progress; }

.consent {
  flex: 1 1 22ch;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.consent a { text-decoration-color: var(--sage); text-underline-offset: 3px; }
.consent a:hover { color: var(--sage-deep); }

.form__status {
  margin-top: 1.25rem;
  padding: .85rem 1.1rem;
  font-size: .9375rem;
  border-radius: var(--radius);
  border: 1px solid var(--sage);
  background: var(--paper);
}

.form__status[data-state="error"] {
  border-color: #b4472c;
  color: #7d2e17;
}

/* =========================================================
   Footer
   ========================================================= */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.social { display: flex; gap: .5rem; }

.social a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease);
}

.social svg { width: 18px; height: 18px; }

.social a:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.foot__note {
  font-size: .8125rem;
  color: var(--muted);
}

/* =========================================================
   Motion preferences
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   Small screens
   ========================================================= */

@media (max-width: 560px) {
  .countdown__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { justify-content: center; text-align: center; }
  .btn { width: 100%; justify-content: center; }
}
