/* ============================================================
   Bentwood Contracting — design system
   Single source of truth for typography, color, spacing.
   Customize tokens at :root to rebrand the entire site.
   ============================================================ */

/* Self-hosted font @font-face declarations (Inter + Cormorant Garamond) */
@import url("/_assets/fonts/fonts.css");

:root {
  /* ---- Brand palette ---- */
  --bw-forest:        #0A4D2E;    /* primary brand — deep forest green */
  --bw-forest-dark:   #073820;    /* for hover/active states */
  --bw-forest-light:  #1F6B43;    /* for accents on cream */
  --bw-gold:          #C5A057;    /* warm accent — wood-tone gold */
  --bw-gold-light:    #DCB976;
  --bw-gold-dark:     #9F7E40;

  /* ---- Surfaces ---- */
  --bw-cream:         #F8F4ED;    /* primary background — slightly warm off-white */
  --bw-cream-deep:    #EFE8DA;    /* secondary background (alternating sections) */
  --bw-cream-warm:    #F4ECDC;    /* card backgrounds */
  --bw-white:         #FFFFFF;    /* pure white when needed */

  /* ---- Text ---- */
  --bw-text:          #1A2419;    /* near-black with green undertone */
  --bw-text-muted:    #5A6258;
  --bw-text-faint:    #8A8F86;
  --bw-text-inverse:  #F0EDE6;    /* for dark-section text */

  /* ---- Borders & shadows ---- */
  --bw-border:        #D8D2C5;
  --bw-border-strong: #A6A199;
  --bw-shadow-sm:     0 1px 2px rgba(17, 24, 32, 0.05);
  --bw-shadow-md:     0 4px 12px rgba(17, 24, 32, 0.08);
  --bw-shadow-lg:     0 12px 32px rgba(17, 24, 32, 0.12);

  /* ---- Typography ---- */
  --font-serif:       "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Modular scale, ratio 1.25 */
  --text-xs:   0.75rem;     /* 12px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-lg:   1.125rem;    /* 18px */
  --text-xl:   1.375rem;    /* 22px */
  --text-2xl:  1.75rem;     /* 28px */
  --text-3xl:  2.25rem;     /* 36px */
  --text-4xl:  3rem;        /* 48px */
  --text-5xl:  4rem;        /* 64px */

  /* ---- Spacing ---- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-8:  3rem;
  --space-10: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;
  --space-20: 10rem;

  /* ---- Layout ---- */
  --content-max:    1100px;   /* content-heavy sections */
  --wide-max:       1400px;   /* full-width hero / image bands */
  --narrow-max:     780px;    /* body-prose width */

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;
  --radius-xl:  24px;

  /* ---- Motion ---- */
  --t-fast:   120ms cubic-bezier(.2, .8, .2, 1);
  --t-base:   220ms cubic-bezier(.2, .8, .2, 1);
  --t-slow:   400ms cubic-bezier(.2, .8, .2, 1);
}

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

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--bw-text);
  background: var(--bw-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--bw-forest);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--bw-gold-dark); }
a:focus-visible { outline: 2px solid var(--bw-gold); outline-offset: 2px; border-radius: 2px; }

/* Skip-link for keyboard users */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--bw-forest);
  color: var(--bw-text-inverse);
  padding: var(--space-3) var(--space-5);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--bw-text);
  margin: 0 0 var(--space-4) 0;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-4xl); font-weight: 600; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
h5 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
h6 { font-size: var(--text-sm); font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bw-text-muted); }

p { margin: 0 0 var(--space-4) 0; }
p:last-child { margin-bottom: 0; }

.lede { font-size: var(--text-xl); line-height: 1.55; color: var(--bw-text-muted); font-weight: 400; }

.eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--bw-gold-dark);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--bw-gold);
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--bw-text-muted);
}

/* ============================================================
   Layout containers
   ============================================================ */

.container { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-5); }
.container-wide { width: 100%; max-width: var(--wide-max); margin: 0 auto; padding: 0 var(--space-5); }
.container-narrow { width: 100%; max-width: var(--narrow-max); margin: 0 auto; padding: 0 var(--space-5); }

section { padding: var(--space-12) 0; }
section.section-tight { padding: var(--space-8) 0; }
section.section-wide  { padding: var(--space-16) 0; }

.section-deep { background: var(--bw-cream-deep); }
.section-forest { background: var(--bw-forest); color: var(--bw-text-inverse); }
.section-forest h1, .section-forest h2, .section-forest h3, .section-forest h4 { color: var(--bw-text-inverse); }
.section-forest .eyebrow { color: var(--bw-gold-light); }
.section-forest a { color: var(--bw-gold-light); }
.section-forest a:hover { color: var(--bw-gold); }

/* Grids */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============================================================
   Header / navigation
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 237, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--bw-border);
}

.site-header-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--bw-text);
}
.brand:hover { color: var(--bw-forest); }
.brand:hover .brand-name { color: var(--bw-forest-dark); }

/* Logo: black-on-transparent circle + cityscape, sits cleanly on cream header. */
.brand-logo {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--bw-forest);
  letter-spacing: 0.01em;
  line-height: 1.15;
  transition: color var(--t-fast);
}
.brand-tagline {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bw-text-muted);
  line-height: 1.2;
  margin-top: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.site-nav > a,
.site-nav .nav-dropdown-trigger {
  padding: var(--space-2) var(--space-3);
  color: var(--bw-text);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast);
  display: inline-block;
}
.site-nav > a:hover,
.site-nav .nav-dropdown-trigger:hover { background: var(--bw-cream-deep); color: var(--bw-forest); }
.site-nav > a.is-current,
.site-nav .nav-dropdown-trigger.is-current { color: var(--bw-forest); border-bottom: 2px solid var(--bw-gold); border-radius: 0; }

/* ============================================================
   Services dropdown
   ============================================================ */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger::after {
  content: " \25BE";              /* small down arrow */
  font-size: 0.75em;
  opacity: 0.7;
  margin-left: 2px;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 300px;
  background: var(--bw-cream);
  border: 1px solid var(--bw-border);
  border-radius: var(--radius-md);
  box-shadow: var(--bw-shadow-md);
  padding: var(--space-3);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t-fast), visibility var(--t-fast), transform var(--t-fast);
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu li { margin: 0; padding: 0; }
.nav-dropdown-menu a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--bw-text);
  border-radius: var(--radius-sm);
  text-decoration: none;
  line-height: 1.3;
  transition: background var(--t-fast), color var(--t-fast), padding-left var(--t-fast);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus {
  background: var(--bw-cream-deep);
  color: var(--bw-forest);
  padding-left: calc(var(--space-3) + 4px);
}
.nav-dropdown-menu a small {
  display: block;
  font-size: var(--text-xs);
  color: var(--bw-text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.nav-dropdown-menu a:hover small,
.nav-dropdown-menu a:focus small { color: var(--bw-forest-light); }
.nav-dropdown-menu .dropdown-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bw-text-faint);
  font-weight: 700;
  padding: var(--space-2) var(--space-3) var(--space-1);
  border-bottom: 1px solid var(--bw-border);
  margin-top: var(--space-2);
}
.nav-dropdown-menu .dropdown-section:first-child { margin-top: 0; }
.nav-dropdown-menu .dropdown-cta a {
  background: var(--bw-forest);
  color: var(--bw-text-inverse);
  text-align: center;
  font-weight: 600;
  margin-top: var(--space-2);
}
.nav-dropdown-menu .dropdown-cta a:hover {
  background: var(--bw-forest-dark);
  color: var(--bw-text-inverse);
}

.nav-cta {
  background: var(--bw-forest);
  color: var(--bw-text-inverse) !important;
  padding: var(--space-2) var(--space-4) !important;
  border-radius: var(--radius-md) !important;
  margin-left: var(--space-3);
}
.nav-cta:hover { background: var(--bw-forest-dark) !important; color: var(--bw-text-inverse) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--bw-border);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--bw-text);
}

@media (max-width: 900px) {
  .site-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; padding: var(--space-3) 0; }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  .site-header-inner { flex-wrap: wrap; }

  /* On mobile, dropdown expands inline as a nested list */
  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0 0 0 var(--space-4);
    min-width: 0;
    margin-top: var(--space-2);
  }
  .nav-dropdown-trigger::after { content: ""; }
}

@media (max-width: 600px) {
  .brand-logo { width: 48px; height: 48px; }
  .brand-name { font-size: var(--text-base); }
  .brand-tagline { font-size: 0.65rem; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--bw-forest);
  color: var(--bw-text-inverse);
}
.btn-primary:hover { background: var(--bw-forest-dark); color: var(--bw-text-inverse); transform: translateY(-1px); box-shadow: var(--bw-shadow-md); }

.btn-secondary {
  background: transparent;
  color: var(--bw-forest);
  border-color: var(--bw-forest);
}
.btn-secondary:hover { background: var(--bw-forest); color: var(--bw-text-inverse); }

.btn-ghost {
  background: transparent;
  color: var(--bw-text);
  border-color: var(--bw-border);
}
.btn-ghost:hover { background: var(--bw-cream-deep); border-color: var(--bw-border-strong); color: var(--bw-text); }

.btn-gold {
  background: var(--bw-gold);
  color: var(--bw-text);
}
.btn-gold:hover { background: var(--bw-gold-dark); color: var(--bw-text-inverse); }

.btn-lg { padding: var(--space-4) var(--space-6); font-size: var(--text-base); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: var(--space-16) 0 var(--space-12);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
  text-align: left;
}
.hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
  max-width: 22ch;
}
.hero .lede {
  max-width: 56ch;
  margin-bottom: var(--space-6);
}
.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hero-frame::before {
  content: "";
  position: absolute;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--bw-gold);
}

/* ============================================================
   Card grids
   ============================================================ */

.card {
  background: var(--bw-cream-warm);
  border: 1px solid var(--bw-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--bw-shadow-md); border-color: var(--bw-gold); }

.card h3 { margin-top: 0; }
.card .card-link {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--bw-forest);
  font-weight: 600;
  font-size: var(--text-sm);
}
.card .card-link::after {
  content: " →";
  transition: transform var(--t-fast);
  display: inline-block;
}
.card:hover .card-link::after { transform: translateX(3px); }

/* ============================================================
   Lists
   ============================================================ */

.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}
.feature-list li {
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  position: relative;
  line-height: 1.5;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: var(--space-3);
  height: 2px;
  background: var(--bw-gold);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}
.checklist li {
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  position: relative;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--bw-forest);
  font-weight: 700;
}

/* ============================================================
   Callout band (alternating section style)
   ============================================================ */

.callout {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  background: var(--bw-cream-warm);
  border-left: 4px solid var(--bw-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--bw-forest); }

/* ============================================================
   Stat band
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-6);
  margin: var(--space-8) 0;
}
.stat { text-align: left; }
.stat-num {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: 600;
  color: var(--bw-forest);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: var(--text-sm);
  color: var(--bw-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   Contact form
   ============================================================ */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 560px;
}

.form-field { display: flex; flex-direction: column; gap: var(--space-2); }
.form-field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--bw-text);
}
.form-field .field-hint {
  font-size: var(--text-xs);
  color: var(--bw-text-muted);
}

.form-field input,
.form-field textarea,
.form-field select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--bw-border);
  border-radius: var(--radius-md);
  background: var(--bw-white);
  color: var(--bw-text);
  width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--bw-forest);
  box-shadow: 0 0 0 3px rgba(10, 77, 46, 0.12);
}
.form-field textarea { min-height: 140px; resize: vertical; }

.form-status {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.form-status.is-success { background: rgba(27, 127, 77, 0.1); color: var(--bw-forest); border: 1px solid var(--bw-forest-light); }
.form-status.is-error   { background: rgba(162, 58, 46, 0.08);  color: #A23A2E; border: 1px solid #C66756; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--bw-forest);
  color: var(--bw-text-inverse);
  padding: var(--space-10) 0 var(--space-6);
  margin-top: auto;
}
.site-footer a { color: var(--bw-gold-light); }
.site-footer a:hover { color: var(--bw-gold); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h6 { color: var(--bw-gold-light); margin-bottom: var(--space-3); font-size: var(--text-xs); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: var(--space-1) 0; font-size: var(--text-sm); }
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(240, 237, 230, 0.6);
}

/* ============================================================
   Page-specific overrides — only what each unique page needs
   ============================================================ */

.page-hero-image {
  width: 100%;
  height: clamp(180px, 22vw, 320px);
  background: linear-gradient(135deg, var(--bw-forest) 0%, var(--bw-forest-dark) 100%);
  border-radius: var(--radius-xl);
  margin-top: var(--space-8);
  position: relative;
  overflow: hidden;
}
.page-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(220, 185, 118, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(31, 107, 67, 0.5) 0%, transparent 50%);
}

/* Utility: text muted / center */
.text-muted { color: var(--bw-text-muted); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }

/* Print hides for marketing site */
@media print {
  .site-header, .site-footer, .nav-toggle, .form { display: none !important; }
  body { background: white; color: black; }
}
