/* ==========================================================================
   Tonic & Root — Landing Page Design System
   "No straight lines in nature." Every shape here is curved: pill buttons,
   blob-clipped photography, wave dividers, rounded type. This stylesheet is
   independent from css/style.css (the retired Vine & Sunset design system)
   so the legacy pages keep working untouched if visited directly.
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Design Tokens — palette pulled from the Tonic & Root forest/river hero
   ------------------------------------------------------------------------- */
:root {
  --forest-deep: #122a22;
  --forest: #1e4635;
  --forest-mid: #2e5d45;
  --moss: #4f7a54;
  --moss-light: #79a06b;
  --water-deep: #164c44;
  --water: #2c8577;
  --water-light: #6fbdac;
  --stone: #a79274;
  --stone-light: #c4b291;
  --cream: #f6f1e4;
  --cream-dim: #ece3cd;
  --gold: #d9b26b;
  --ink: #132019;
  --ink-soft: #3c4a3f;

  --color-bg: var(--cream);
  --color-surface: #ffffff;
  --color-primary: var(--forest);
  --color-accent: var(--water);

  --font-script: "Kaushan Script", cursive;
  --font-display: "Quicksand", "Nunito", sans-serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-pill: 999px;
  --radius-organic: 63% 37% 54% 46% / 43% 51% 49% 57%;
  --radius-organic-alt: 42% 58% 61% 39% / 51% 44% 56% 49%;
  --radius-soft: 2.5rem;

  --shadow-sm: 0 4px 16px rgba(18, 42, 34, 0.1);
  --shadow-md: 0 16px 40px rgba(18, 42, 34, 0.16);
  --shadow-lg: 0 28px 70px rgba(18, 42, 34, 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 340ms;
  --dur-slow: 700ms;
}

/* -------------------------------------------------------------------------
   2. Reset
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* -------------------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------------------- */
h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--forest-deep);
  letter-spacing: -0.01em;
}

.wordmark {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

h1.hero-title {
  font-size: clamp(3.5rem, 8vw + 1rem, 7.5rem);
}

h2 {
  font-size: clamp(2rem, 2.5vw + 1rem, 2.85rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  max-width: 62ch;
}

.lede {
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.3rem);
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--water);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 3px;
  background: var(--gold);
  border-radius: var(--radius-pill);
}

.text-center {
  text-align: center;
}

.text-cream {
  color: var(--cream);
}

a.link-underline {
  font-weight: 700;
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  transition: color var(--dur-fast) var(--ease);
}

a.link-underline:hover {
  color: var(--water);
}

/* -------------------------------------------------------------------------
   4. Layout
   ------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container--narrow {
  max-width: 760px;
}

.section {
  padding-block: var(--space-2xl);
  position: relative;
}

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

.section--forest {
  background: var(--forest-deep);
  color: var(--cream);
}

.section--forest h2,
.section--forest h3 {
  color: var(--cream);
}

.section--surface {
  background: var(--color-surface);
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-xl);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split-reverse .split-media {
  order: 2;
}

@media (max-width: 880px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split-reverse .split-media {
    order: 0;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

/* -------------------------------------------------------------------------
   5. Skip link & focus states
   ------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--water);
  color: var(--cream);
  padding: 0.8em 1.4em;
  border-radius: var(--radius-pill);
  z-index: 1000;
  font-weight: 700;
  transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
  top: var(--space-sm);
}

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

/* -------------------------------------------------------------------------
   6. Buttons — always pills, never a sharp corner
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 1em 2.1em;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px) rotate(-0.3deg);
}

.btn-primary {
  background: var(--water);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--water-deep);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: rgba(246, 241, 228, 0.6);
}

.btn-secondary:hover {
  background: rgba(246, 241, 228, 0.14);
  border-color: var(--cream);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-outline:hover {
  background: var(--forest);
  color: var(--cream);
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
}

/* -------------------------------------------------------------------------
   7. Header & nav
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(246, 241, 228, 0.97);
  /* No backdrop-filter here on purpose: filter/backdrop-filter makes an
     element a CSS containing block for position:fixed descendants, which
     would trap the off-canvas .main-nav inside this header's small box
     instead of the full viewport. */
  transition: box-shadow var(--dur-med) var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(18, 42, 34, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-xs);
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-word {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--forest-deep);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4em 0.1em;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -3px;
  height: 3px;
  background: var(--gold);
  border-radius: var(--radius-pill);
  transition: right var(--dur-med) var(--ease);
}

.nav-links a:hover::after {
  right: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4em;
  color: var(--forest-deep);
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 86vw);
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl) var(--space-lg);
    gap: var(--space-lg);
    transform: translateX(100%);
    transition: transform var(--dur-med) var(--ease);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    border-radius: var(--radius-soft) 0 0 var(--radius-soft);
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 42, 34, 0.45);
    z-index: 400;
  }

  .nav-backdrop.is-open {
    display: block;
  }
}

/* -------------------------------------------------------------------------
   8. Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(94vh, 940px);
  display: flex;
  align-items: center;
  color: var(--cream);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 42, 34, 0.25) 0%, rgba(18, 42, 34, 0.55) 100%);
}

.hero-content {
  max-width: 46rem;
  text-align: center;
  margin-inline: auto;
  padding-block: var(--space-2xl);
}

.hero-content .eyebrow {
  justify-content: center;
  color: var(--gold);
}

.hero-content .wordmark {
  color: var(--cream);
  text-shadow: 0 2px 24px rgba(18, 42, 34, 0.5);
  margin-bottom: var(--space-xs);
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.5rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: var(--space-md);
}

.hero-content p.lede {
  color: rgba(246, 241, 228, 0.92);
  margin-inline: auto;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

/* -------------------------------------------------------------------------
   9. Wave divider — the seam between sections is always a curve
   ------------------------------------------------------------------------- */
.wave-divider {
  display: block;
  line-height: 0;
  margin-top: -1px;
}

.wave-divider svg {
  width: 100%;
  height: clamp(40px, 8vw, 100px);
  display: block;
}

/* -------------------------------------------------------------------------
   10. Blob-framed photography
   ------------------------------------------------------------------------- */
.blob-media {
  border-radius: var(--radius-organic);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-radius var(--dur-slow) var(--ease);
}

.blob-media.alt {
  border-radius: var(--radius-organic-alt);
}

.blob-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blob-media:hover {
  border-radius: var(--radius-organic-alt);
}

/* -------------------------------------------------------------------------
   10b. Amy portrait — scroll-scrubbed photo fade
   Photo opacity is driven by a scroll-progress value computed in
   tonic-root.js (how close this block is to viewport center). The default
   below (full opacity) is the no-JS / prefers-reduced-motion fallback; JS
   overrides it once it runs.
   ------------------------------------------------------------------------- */
.amy-portrait {
  position: relative;
}

.amy-photo-frame {
  background: linear-gradient(135deg, var(--water-deep), var(--forest));
}

.amy-photo-frame img {
  opacity: 1;
  transition: opacity 200ms linear;
}

/* -------------------------------------------------------------------------
   11. Cards
   ------------------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-soft);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-organic);
  background: var(--cream-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--forest);
}

.card-icon svg {
  width: 30px;
  height: 30px;
}

.card h3 {
  margin-bottom: var(--space-2xs);
}

/* -------------------------------------------------------------------------
   12. Reveal-on-scroll
   ------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------------
   13. Footer
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--forest-deep);
  color: rgba(246, 241, 228, 0.85);
  padding-block: var(--space-2xl) var(--space-lg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
}

.footer-inner .brand-word {
  color: var(--cream);
  font-size: 2rem;
}

.footer-tagline {
  max-width: 30rem;
  color: rgba(246, 241, 228, 0.75);
}

.footer-nonprofit {
  font-size: 0.95rem;
}

.footer-nonprofit a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.social-links {
  display: flex;
  gap: 0.7em;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(246, 241, 228, 0.3);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.social-links a:hover {
  background: var(--water);
  border-color: var(--water);
}

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

.footer-bottom {
  font-size: 0.85rem;
  color: rgba(246, 241, 228, 0.55);
  margin-top: var(--space-md);
}

.footer-bottom a {
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
   14. External-link affordance
   ------------------------------------------------------------------------- */
.ext-icon {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
}

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

/* -------------------------------------------------------------------------
   15. Newsletter signup
   ------------------------------------------------------------------------- */
.newsletter-form {
  margin-top: var(--space-lg);
  max-width: 30rem;
  margin-inline: auto;
}

.newsletter-form-row {
  display: flex;
  gap: var(--space-2xs);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: var(--space-3xs);
  box-shadow: var(--shadow-sm);
}

.newsletter-form-row input[type="email"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.85em 1.25em;
  border-radius: var(--radius-pill);
  font-size: 1rem;
}

.newsletter-form-row input[type="email"]::placeholder {
  color: var(--ink-soft);
  opacity: 0.6;
}

.newsletter-form-row .btn {
  flex-shrink: 0;
  padding: 0.85em 1.75em;
}

.newsletter-status {
  margin-top: var(--space-sm);
  min-height: 1.4em;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--water-deep);
}

.newsletter-status.is-error {
  color: #a8502f;
}

/* Honeypot: pulled off-canvas rather than display:none, since some bots skip
   display:none fields. Real visitors never see it; aria-hidden + tabindex=-1
   on the input keep screen-reader and keyboard users from ever landing on it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .newsletter-form-row {
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: var(--space-xs);
  }

  .newsletter-form-row input[type="email"] {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
  }

  .newsletter-form-row .btn {
    width: 100%;
  }
}
