/* ==========================================================
BASE.CSS
Loaded on every page, first. Reset + design tokens + type +
layout utilities. Nothing page-specific lives here.
========================================================== */

/* ----------------------------------------------------------
01. RESET
---------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button {
  font-family: inherit;
}

/* Lock scroll while the mobile nav is open */
html.nav-open,
body.nav-open {
  overflow: hidden;
}

/* Respect reduced-motion preferences everywhere */
@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;
  }
}

/* Visible keyboard focus everywhere, no exceptions */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------
02. DESIGN TOKENS
---------------------------------------------------------- */
:root {
  /* Palette — deep pine, cream, bright leaf-green highlight */
  --bg: #f9f7f2;
  --text: #2c2824;
  --heading: #16281c;
  --text-muted: rgba(28, 26, 22, 0.64);

  --accent: #2d5537;          /* pine green */
  --accent-hover: #234628;
  --accent-dark: #16281c;     /* deepest pine, used for footer/overlays */

  --accent-light: #7bab5c;    /* bright leaf-green highlight — used sparingly */
  --accent-light-soft: #d9e8cd;

  --white: #ffffff;

  --header-height: 82px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --transition: all 0.3s ease;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;

  --max: 1200px;
}

/* ----------------------------------------------------------
03. LAYOUT UTILITIES
---------------------------------------------------------- */
.container {
  width: min(92%, var(--max));
  margin: 0 auto;
}

.section {
  padding: var(--space-6) 0;
}

/* Each section's own padding is deliberate breathing room, but
   two of them stacked back-to-back doubles up into a much
   bigger gap than intended — this trims the seam between them
   without touching the padding above the first section or
   below the last one */
.section + .section {
  padding-top: calc(var(--space-6) / 2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

/* ----------------------------------------------------------
04. TYPOGRAPHY
---------------------------------------------------------- */
h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--heading);
  line-height: 1.2;
  font-weight: 700;
}

p {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: var(--space-5);
  position: relative;
  padding-bottom: var(--space-3);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--accent-light);
  border-radius: 2px;
}

.section-title:has(+ .section-description) {
  margin-bottom: var(--space-2);
}

.section-description {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-5);
  font-size: 1.05rem;
}

/* ----------------------------------------------------------
05. CTA BAND
Solid dark-green closing band, shared across home, about, and
process. Same component everywhere — a heading, a short line
of copy, and usually a button.
---------------------------------------------------------- */
.cta-band {
  text-align: center;
  background: var(--accent-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: var(--space-2);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
  margin: 0 auto var(--space-3);
}

/* Reusable layout for two or more buttons sitting together —
   centers them, wraps on narrow screens, consistent gap */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* ----------------------------------------------------------
05. MOBILE STICKY CALL BUTTON
Shared across any page that includes the markup (currently
home and contact). :has() scopes the body padding so pages
without the button aren't affected.
---------------------------------------------------------- */
.mobile-call-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-call-btn {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    text-align: center;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 14px 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  body:has(.mobile-call-btn) {
    padding-bottom: 52px;
  }
}
