/* ============================================================
   Simply Spread — design system
   Premium, earthy, technical. A soil scientist who owns a truck.

   Two colours plus neutrals: one confident green, one clay accent
   (the literal colour of the Triangle subsoil this business exists
   to fix). No gradients.
   ============================================================ */

/* ---- Fonts. Self-hosted variable faces, swap so text paints on
   the first frame rather than waiting on the font. ---- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/source-serif-4-var.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Soil — the dark anchor */
  --soil-900: #15110D;
  --soil-800: #221B14;
  --soil-700: #34291F;
  --soil-600: #4C3D2E;
  --soil-500: #6E5B47;
  --soil-400: #94826D;

  /* Bone — warm off-white ground */
  --bone:     #F9F6F0;
  --bone-2:   #F1ECE1;
  --bone-3:   #E4DCCC;

  /* One confident green */
  --green:      #4E9A44;
  --green-deep: #3A7433;
  --green-dark: #2A5626;
  --green-tint: #EDF4EB;

  /* One accent — Triangle clay */
  --clay:      #BE6538;
  --clay-deep: #9C4F29;
  --clay-tint: #FAEFE8;

  --ink:       var(--soil-900);
  --ink-2:     var(--soil-600);
  --ink-3:     var(--soil-500);
  --rule:      #DED5C4;
  --rule-soft: #EAE3D5;

  --ok:   #3A7433;
  --warn: #B4761C;
  --bad:  #B23A2B;

  /* Type */
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui:      'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing — em/rem throughout so a larger user font scales the
     layout with the text instead of breaking it. */
  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;

  --wrap:    76rem;
  --wrap-nar: 46rem;

  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px;

  --shadow-1: 0 1px 2px rgba(21,17,13,.06), 0 2px 8px rgba(21,17,13,.04);
  --shadow-2: 0 2px 6px rgba(21,17,13,.07), 0 12px 32px rgba(21,17,13,.08);
  --shadow-3: 0 6px 18px rgba(21,17,13,.10), 0 28px 64px rgba(21,17,13,.14);

  /* Motion.
     These are the sanctioned curves, not hand-rolled approximations — the
     built-in CSS easings are too weak to read as intentional. There is
     deliberately no --ease-in: ease-in delays the first frame, which is the
     exact moment the user is watching, and makes an interface feel sluggish.
     Exits use ease-out too, just faster than the entrance. */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);        /* entrances, exits, most UI */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);       /* movement across the screen */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);        /* sheets and drawers */

  --t-press: 140ms;   /* button press feedback */
  --t-fast:  160ms;   /* hover, colour */
  --t-base:  220ms;   /* dropdowns, small reveals */
  --t-slow:  300ms;   /* the ceiling for anything in the UI */
  --t-sheet: 420ms;   /* modals and drawers only */
}

/* Every hover that MOVES something is wrapped in
   @media (hover: hover) and (pointer: fine) at its definition. A touch device
   fires :hover on tap and then leaves it stuck on, so an ungated hover
   transform reads as a stuck card on every phone. Colour-only hovers are left
   ungated — a colour that lingers for a moment after a tap is harmless. */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;          /* generous — this site has technical copy */
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-7) 0; }

/* ---- Type scale ------------------------------------------------
   Tracking is size-specific, never one value for everything: large
   display text reads too loose as it grows, so it tightens; small
   UI text opens up slightly for legibility. Leading moves inversely
   to size. ---------------------------------------------------- */
h1, h2, h3, h4, h5, h6, .ss-display {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 .5em;
  font-weight: 700;
  text-wrap: balance;
}

.ss-display {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-weight: 800;
}
h1 {
  font-size: clamp(2.125rem, 4.6vw, 3.375rem);
  line-height: 1.06;
  letter-spacing: -0.026em;
}
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
}
h4 {
  font-size: 1.125rem;
  line-height: 1.32;
  letter-spacing: -0.006em;
}

/* Eyebrow: small, so it needs positive tracking to stay legible. */
.ss-eyebrow {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--s-3);
  line-height: 1.4;
}
.ss-eyebrow--green { color: var(--green-deep); }

.ss-lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.ss-small { font-size: .9375rem; line-height: 1.55; }
.ss-fine  { font-family: var(--font-ui); font-size: .8125rem; line-height: 1.5; color: var(--ink-3); letter-spacing: .002em; }

a { color: var(--green-deep); text-underline-offset: .18em; text-decoration-thickness: from-font; }
a:hover { color: var(--green-dark); }

.ss-skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--soil-900); color: var(--bone);
  padding: var(--s-3) var(--s-4); border-radius: 0 0 var(--r-md) 0;
  font-family: var(--font-ui); font-size: .9375rem;
}
.ss-skip:focus { left: 0; }

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

/* ---- Layout ---- */
.ss-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-5); }
.ss-wrap--narrow { max-width: var(--wrap-nar); }
.ss-section { padding-block: clamp(var(--s-7), 8vw, var(--s-9)); }
.ss-section--tight { padding-block: clamp(var(--s-6), 5vw, var(--s-7)); }
.ss-section--dark { background: var(--soil-900); color: var(--bone-2); }
.ss-section--dark h1, .ss-section--dark h2, .ss-section--dark h3 { color: var(--bone); }
.ss-section--dark .ss-lead { color: var(--soil-400); }
.ss-section--dark .ss-eyebrow { color: var(--soil-400); }
.ss-section--tinted { background: var(--bone-2); }

.ss-grid { display: grid; gap: var(--s-5); }
@media (min-width: 48rem) {
  .ss-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .ss-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 62rem) {
  .ss-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .ss-grid--split { grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; }
}
@media (max-width: 61.99rem) {
  .ss-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 34rem) {
  .ss-grid--4 { grid-template-columns: 1fr; }
}

.ss-section-head { max-width: 44rem; margin-bottom: var(--s-6); }
.ss-center { text-align: center; margin-inline: auto; }

/* ---- Buttons ---------------------------------------------------
   Feedback lives on the press, not the release. ---------------- */
.ss-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-ui);
  font-size: 1rem; font-weight: 600; letter-spacing: -.004em;
  padding: .875em 1.5em;
  border-radius: var(--r-md);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out),
              color var(--t-base) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
  will-change: transform;
}
.ss-btn:active { transform: scale(.975); }

.ss-btn--primary { background: var(--clay); color: #fff; }
.ss-btn--primary:hover { background: var(--clay-deep); color: #fff; }

.ss-btn--green { background: var(--green-deep); color: #fff; }
.ss-btn--green:hover { background: var(--green-dark); color: #fff; }

.ss-btn--ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.ss-btn--ghost:hover { border-color: var(--soil-600); background: rgba(21,17,13,.03); color: var(--ink); }

.ss-btn--on-dark { border-color: rgba(249,246,240,.28); color: var(--bone); }
.ss-btn--on-dark:hover { border-color: var(--bone); background: rgba(249,246,240,.08); color: var(--bone); }

.ss-btn--lg { font-size: 1.0625rem; padding: 1em 1.75em; }
.ss-btn--block { display: flex; width: 100%; }
.ss-btn[disabled], .ss-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Quantifying the effort next to the CTA is a real conversion lever. */
.ss-cta-note {
  font-family: var(--font-ui); font-size: .875rem; color: var(--ink-3);
  margin-top: var(--s-3);
}
.ss-section--dark .ss-cta-note { color: var(--soil-400); }

/* ---- Cards ---- */
.ss-card {
  background: #fff;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
}
a.ss-card, .ss-card--link { text-decoration: none; color: inherit; display: block; }
/* The lift lives in site.css behind (hover: hover) and (pointer: fine).
   It must not be duplicated here ungated — on a phone :hover latches on after
   a tap and the card stays raised until you touch something else. Colour and
   shadow are safe to leave ungated; a moved element is not. */
a.ss-card:hover, .ss-card--link:hover {
  border-color: var(--bone-3);
  box-shadow: var(--shadow-2);
}
.ss-card h3 { margin-bottom: var(--s-2); }
.ss-card p:last-child { margin-bottom: 0; }

/* ---- Forms ---- */
.ss-field { margin-bottom: var(--s-4); }
.ss-label {
  display: block;
  font-family: var(--font-ui); font-size: .9375rem; font-weight: 600;
  margin-bottom: var(--s-2); color: var(--ink);
}
.ss-label .ss-req { color: var(--clay); font-weight: 500; }
.ss-hint { font-family: var(--font-ui); font-size: .8125rem; color: var(--ink-3); margin-top: var(--s-2); }

.ss-input, .ss-select, .ss-textarea {
  width: 100%;
  font-family: var(--font-ui); font-size: 1rem;
  padding: .8em .9em;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.ss-textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
.ss-input:focus, .ss-select:focus, .ss-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(78,154,68,.18);
}
.ss-input[aria-invalid="true"], .ss-textarea[aria-invalid="true"] {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(178,58,43,.14);
}
.ss-error {
  font-family: var(--font-ui); font-size: .8125rem; color: var(--bad);
  margin-top: var(--s-2); display: block;
}

/* Choice tiles — the multi-select on step 2 and the radio groups. */
.ss-choices { display: grid; gap: var(--s-3); }
@media (min-width: 34rem) { .ss-choices--2 { grid-template-columns: 1fr 1fr; } }

.ss-choice {
  position: relative;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: border-color var(--t-fast) var(--ease-out),
              background-color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.ss-choice:active { transform: scale(.99); }
.ss-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ss-choice .ss-choice-box {
  flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin-top: .1rem;
  border: 1.5px solid var(--rule); border-radius: 5px; background: #fff;
  display: grid; place-items: center;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.ss-choice[data-type="radio"] .ss-choice-box { border-radius: 50%; }
.ss-choice .ss-choice-box svg { width: .8rem; height: .8rem; opacity: 0; transform: scale(.7); transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.ss-choice input:checked ~ .ss-choice-box { border-color: var(--green-deep); background: var(--green-deep); }
.ss-choice input:checked ~ .ss-choice-box svg { opacity: 1; transform: scale(1); color: #fff; }
.ss-choice:has(input:checked) { border-color: var(--green-deep); background: var(--green-tint); }
.ss-choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.ss-choice-body { min-width: 0; }
.ss-choice-title { font-weight: 600; font-size: .9375rem; display: block; }
.ss-choice-sub { font-size: .8125rem; color: var(--ink-3); display: block; margin-top: .15em; line-height: 1.45; }

/* ---- Pills & marks ---- */
.ss-pill {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-ui); font-size: .75rem; font-weight: 600;
  letter-spacing: .02em;
  padding: .35em .7em; border-radius: 999px;
  background: var(--bone-2); color: var(--ink-2);
  border: 1px solid var(--rule-soft);
}
.ss-pill--green { background: var(--green-tint); color: var(--green-dark); border-color: rgba(78,154,68,.25); }
.ss-pill--clay  { background: var(--clay-tint); color: var(--clay-deep); border-color: rgba(190,101,56,.25); }

/* Unconfirmed facts show as a loud marker for admins and print nothing
   for the public — no invented claim ever ships. */
.ss-token {
  background: #FFF3B0; color: #6B4E00; font-family: var(--font-ui);
  font-size: .8em; padding: .1em .35em; border-radius: 4px;
  border: 1px dashed #C9A400;
}

/* ---- Icons: thin-stroke inline SVG, never emoji ---- */
.ss-icon { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ss-icon--lg { width: 1.75rem; height: 1.75rem; stroke-width: 1.4; }

/* ---- Scroll reveal --------------------------------------------
   Default state is VISIBLE. motion.js opts elements into the hidden
   start state only once GSAP has actually loaded, so a blocked or
   failed script leaves a fully readable page rather than a blank one. */
.ss-reveal { opacity: 1; }
html.ss-motion .ss-reveal { opacity: 0; will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) {
  html.ss-motion .ss-reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Utilities ---- */
.ss-vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ss-mt-0 { margin-top: 0; } .ss-mb-0 { margin-bottom: 0; }
.ss-mt-4 { margin-top: var(--s-4); } .ss-mt-5 { margin-top: var(--s-5); }
.ss-mt-6 { margin-top: var(--s-6); } .ss-mt-7 { margin-top: var(--s-7); }
.ss-stack > * + * { margin-top: var(--s-4); }
.ss-flow > * + * { margin-top: var(--s-5); }
.ss-nowrap { white-space: nowrap; }

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