/* ============================================================================
   Timberlea Consulting: Basic package demo ($1,000 tier)
   Coastal (light) theme only. No dark-mode toggle, no motion (tier boundary).
   Tokens are the canonical brand tokens (BRAND_GUIDELINES.md v2.4 sections 5-8).
   ========================================================================== */

:root {
  /* Coastal (light): the page */
  --bg-primary: #F8F4EE;
  --bg-secondary: #EFE9E0;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F5F0E8;
  --accent: #1A6B5C;
  --accent-2: #25927E;
  --accent-glow: rgba(26, 107, 92, 0.12);
  --text-primary: #0D0D0D;
  --text-secondary: #404040;
  --text-muted: #6A7A88;   /* captions/placeholders only; ~4.0:1 on cream, never for small body text */
  --border: #D8D2C8;

  /* Midnight Coastal: dark surfaces only (hero gradient, footer, closing band) */
  --dk-bg: #02111E;
  --dk-bg-2: #061F33;
  --dk-text: #EAF7F3;
  --dk-text-2: #B8D4CC;
  --dk-accent: #25C9B0;      /* bright teal for links/wordmark on dark */
  --dk-accent-2: #7DE8D4;    /* seafoam: the hero H1 italic accent word */
  --dk-border: #123048;

  /* The brand hero gradient (flat background on the demos). The -safe variant lays
     a light scrim of the brand's darkest token over the coastal gradient so every
     text pixel clears WCAG AA 4.5:1 even over the gradient's lightest teal corner
     (the light accent #7DE8D4 and secondary #B8D4CC otherwise dip to ~4.1-4.4:1
     against #1A6B5C). Mirrors how the live hero sits under darkening media. */
  --hero-gradient: linear-gradient(135deg, #061E2C 0%, #0C3547 50%, #1A6B5C 100%);
  --hero-gradient-safe:
    linear-gradient(rgba(2, 17, 30, 0.34), rgba(2, 17, 30, 0.34)),
    linear-gradient(135deg, #061E2C 0%, #0C3547 50%, #1A6B5C 100%);

  --font-display: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --maxw: 1200px;
  --radius-btn: 8px;
  --radius-card: 12px;
  --shadow-e1: 0 1px 2px rgba(13, 13, 13, 0.05);
  --shadow-e2: 0 4px 12px rgba(13, 13, 13, 0.08);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); }

/* Respect users who prefer no motion (the smooth scroll is the only motion here) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.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;
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--text-primary); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.2; }
h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--accent); font-weight: inherit; }
strong { font-weight: 600; }

.micro-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

/* ---------- Buttons (no motion on Basic: color feedback only) ---------- */
.btn-primary, .btn-secondary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg-primary);
}
.btn-primary:hover { background: linear-gradient(135deg, #175f52, #1f8270); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* On the dark hero, the secondary button reads light and brightens on hover */
.hero .btn-secondary { color: var(--dk-text); border-color: rgba(184, 212, 204, 0.5); }
.hero .btn-secondary:hover { color: var(--dk-accent); border-color: var(--dk-accent); }

/* ---------- Demo banner (top of every page, scrolls away) ---------- */
.demo-banner {
  background: var(--accent-glow);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 10px 24px;
}
.demo-banner strong { color: var(--text-primary); font-weight: 600; }
.demo-banner a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.demo-banner a:hover { color: var(--accent-2); }

/* ---------- Nav (static: no blur, no scroll effects) ---------- */
.site-nav { background: var(--bg-primary); border-bottom: 1px solid var(--border); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { width: 156px; height: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg-primary) !important;
  padding: 9px 18px;
  border-radius: var(--radius-btn);
  font-weight: 600 !important;
}
.nav-cta:hover { background: linear-gradient(135deg, #175f52, #1f8270); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--text-primary); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head .micro-label { margin-bottom: 12px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 1.05rem; }
.section-alt { background: var(--bg-secondary); }

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-gradient-safe);
  color: var(--dk-text);
  padding: clamp(64px, 12vw, 120px) 0;
}
.hero-inner { max-width: 860px; margin: 0 auto; padding: 0 24px; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--dk-text-2);
  border: 1px solid rgba(184, 212, 204, 0.35);
  border-radius: 9999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}
.hero h1 { color: var(--dk-text); font-size: clamp(2.2rem, 5.5vw, 3.5rem); }
.hero h1 em { color: var(--dk-accent-2); }
.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--dk-text-2);
  margin: 18px 0 20px;
}
.hero .subhead {
  color: var(--dk-text);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 30px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Cards (plain; no hover lift on Basic) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-e1);
}
.card .card-icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 14px; }
.card .card-icon svg { width: 100%; height: 100%; stroke: var(--accent); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-secondary); margin-bottom: 0; }

/* ---------- How we work (numbered steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; max-width: 980px; margin: 0 auto; }
.step { text-align: center; }
.step .num {
  width: 48px; height: 48px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.3rem;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-secondary); margin-bottom: 0; }

/* ---------- About blurb ---------- */
.about-blurb { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; max-width: 980px; margin: 0 auto; }
.about-blurb .photo img {
  /* height:auto beats the img tag's height attribute, so the aspect-ratio crop
     governs instead of the raw 800px attribute height (which stretched the box) */
  width: 100%; height: auto; border-radius: var(--radius-card);
  border: 1px solid var(--border); display: block;
  aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;
}
.about-blurb .about-text p { color: var(--text-secondary); }
.about-blurb .about-text p:last-child { margin-bottom: 0; }

/* ---------- Closing warm CTA band (dark) ---------- */
.warm-cta { background: var(--hero-gradient-safe); color: var(--dk-text); text-align: center; }
.warm-cta .warm-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.warm-cta h2 { color: var(--dk-text); margin-bottom: 16px; }
.warm-cta p { color: var(--dk-text); font-size: 1.08rem; }
.warm-cta .ngo-line {
  font-style: italic;
  color: var(--dk-text-2);
  font-size: 0.95rem;
  margin: 6px auto 26px;
  max-width: 600px;
}
.warm-cta .btn-primary { background: #fff; color: var(--accent); }
.warm-cta .btn-primary:hover { background: #eef7f4; }

/* ---------- Services / generic prose blocks ---------- */
.service-block { max-width: 760px; margin: 0 auto 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.service-block:last-of-type { border-bottom: none; }
.service-block h2 { font-size: 1.5rem; margin-bottom: 12px; }
.service-block p { color: var(--text-secondary); margin-bottom: 0; }
.lead { max-width: 720px; margin: 0 auto 48px; text-align: center; color: var(--text-secondary); font-size: 1.15rem; }
.page-hero { background: var(--bg-secondary); text-align: center; padding: 64px 0; }
.page-hero .micro-label { margin-bottom: 12px; }
.page-hero h1 { max-width: 820px; margin: 0 auto 14px; }
.page-hero p { max-width: 620px; margin: 0 auto; color: var(--text-secondary); font-size: 1.1rem; }
.ngo-note {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 680px;
  margin: 18px auto 0;
  text-align: center;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; max-width: 1000px; margin: 0 auto; align-items: start; }
.contact-info h2 { font-size: 1.4rem; margin-bottom: 16px; }
.contact-info .info-row { margin-bottom: 20px; }
.contact-info .info-row .label { font-weight: 600; color: var(--text-primary); display: block; margin-bottom: 2px; }
.contact-info .info-row a { color: var(--accent); text-decoration: none; }
.contact-info .info-row a:hover { text-decoration: underline; }
.contact-info .info-row p { color: var(--text-secondary); margin: 0; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-e1);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-consent { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin: 4px 0 16px; }
.form-consent a { color: var(--accent); }
.form-status { margin-top: 14px; font-size: 0.95rem; line-height: 1.5; min-height: 1.2em; }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #B84545; font-weight: 600; }
.cf-turnstile { margin-bottom: 16px; }
.btn-primary[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Footer (always dark) ---------- */
.site-footer { background: var(--dk-bg); color: var(--dk-text-2); padding: 56px 0 32px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand .footer-wordmark { width: 210px; height: auto; display: block; margin-bottom: 16px; }
.footer-brand p { color: var(--dk-text-2); max-width: 420px; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--dk-text); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--dk-accent); }
.footer-note {
  border-top: 1px solid var(--dk-border);
  padding-top: 24px;
  color: var(--dk-text-2);
  font-size: 0.9rem;
  line-height: 1.6;
}
.footer-note .example-note { font-style: italic; margin: 0 0 12px; max-width: 720px; }
.footer-note .copyright { margin: 0; color: var(--dk-text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-blurb { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .about-blurb .photo { max-width: 260px; margin: 0 auto; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 18px;
    box-shadow: var(--shadow-e2);
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { text-align: center; margin-top: 8px; }
  .site-nav { position: relative; }
  .nav-toggle { display: inline-flex; }
  section { padding: 56px 0; }
}
@media (max-width: 380px) {
  .wrap, .nav-inner, .hero-inner, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .card { padding: 24px; }
}
