/* ==========================================================================
   Genesis CTE — Design Tokens & Base
   Hand-rolled CSS custom properties. No build step (locked decision).
   Brand: therapeutic care company. Tone: modern, calm, trustworthy.
   ========================================================================== */

:root {
  /* --- Brand greens (locked, from Site Brand kit) --- */
  --green-deep:   #49662E;  /* Primary: headings, buttons */
  --green-mid:    #5C7C3A;  /* Mid-tone */
  --green-accent: #98C35A;  /* Highlights, wave, hovers */
  --green-pale:   #E8F1D8;  /* Section washes, pills */
  --ink:          #1C2113;  /* Text, footer bg */
  --paper:        #FCFDF9;  /* Page background */

  /* --- Derived / functional --- */
  --green-deep-hover: #3C5526;  /* darker deep-green for button hover */
  --text:        var(--ink);
  --text-muted:  #5a6452;       /* warm muted grey-green for secondary text */
  --border:      #e2e8d6;       /* hairline borders, in-family with pale */
  --surface:     #ffffff;       /* cards/panels on paper */

  /* --- Semantic (used sparingly; calm by default) --- */
  --ok:      #4f7a2e;
  --warn:    #b8860b;
  --danger:  #a23b2d;

  /* --- Typography --- */
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs:    0.78rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-lg:    1.125rem;
  --fs-xl:    1.375rem;
  --fs-2xl:   clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  --fs-3xl:   clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  --fs-hero:  clamp(2.6rem, 1.6rem + 4.5vw, 4.6rem);

  --lh-tight:  1.12;
  --lh-snug:   1.3;
  --lh-base:   1.62;

  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;

  /* --- Spacing scale --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4rem;
  --space-9:  6rem;
  --space-10: 8rem;

  /* --- Layout --- */
  --container:      1180px;
  --container-narrow: 760px;
  --gutter:         clamp(1.1rem, 0.5rem + 2.5vw, 2.4rem);

  /* --- Radius --- */
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  22px;
  --radius-pill: 999px;

  /* --- Shadows (subtle; borders preferred) --- */
  --shadow-sm:  0 1px 2px rgba(28, 33, 19, 0.05);
  --shadow:     0 6px 22px rgba(28, 33, 19, 0.07);
  --shadow-lg:  0 18px 48px rgba(28, 33, 19, 0.11);

  /* --- Motion (restrained) --- */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast:  0.16s;
  --dur:       0.28s;
  --dur-slow:  0.5s;

  /* --- Z layers --- */
  --z-nav:      1000;
  --z-drawer:   1100;
  --z-overlay:  1090;

  --nav-h: 76px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--green-deep);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { line-height: var(--lh-base); }

a {
  color: var(--green-deep);
  text-decoration-color: var(--green-accent);
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--green-mid); }

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol { padding-left: 1.2em; }

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

/* ==========================================================================
   Layout primitives
   ========================================================================== */

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

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-7); }
.section--pale { background: var(--green-pale); }
.section--ink  { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--paper); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.grid { display: grid; gap: var(--space-5); }
@media (min-width: 720px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--green-deep);
  color: var(--paper);
}
.btn--primary:hover { background: var(--green-deep-hover); color: var(--paper); }

.btn--secondary {
  background: transparent;
  color: var(--green-deep);
  border-color: var(--green-deep);
}
.btn--secondary:hover { background: var(--green-pale); color: var(--green-deep); }

.btn--ghost {
  background: transparent;
  color: var(--green-deep);
}
.btn--ghost:hover { background: var(--green-pale); }

/* ==========================================================================
   Pills / tags
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--green-pale);
  color: var(--green-deep);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__body { padding: var(--space-5); }

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.lead { font-size: var(--fs-lg); color: var(--text-muted); line-height: var(--lh-base); }
.eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-mid);
}
.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;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100%;
  background: var(--green-deep); color: var(--paper);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  z-index: var(--z-drawer);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-4); color: var(--paper); }

/* ==========================================================================
   Accessibility: reduced motion
   ========================================================================== */

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