/* ==========================================================================
   LMS Garage Doors — design tokens
   Direction: Option A (warm/editorial). Charcoal + warm gold + cream + rust.
   ========================================================================== */

:root {
  /* — Color ————————————————————————————————————— */
  --ink:        #1a1a1a;     /* primary text, dark backgrounds */
  --ink-soft:   #2a2723;     /* dark-but-warmer for sections */
  --ink-mute:   #5b5751;     /* muted body text on cream */
  --ink-line:   #e6dfd2;     /* hairlines on cream */
  --ink-line-2: #2f2b25;     /* hairlines on dark */

  --cream:      #f3f1ec;     /* bone — neutral parchment, no peach undertone */
  --cream-deep: #e8e5dd;     /* slightly deeper bone for cards */
  --paper:      #faf9f5;     /* lightest paper */

  --gold:       #c89a3c;     /* warm gold — bourbon, not highlighter */
  --gold-deep:  #7a5a1c;     /* deepened for WCAG AA on small text (was #a47d2a) */
  --rust:       #a8431f;     /* deepened for WCAG AA on small text (was #c8552c) */
  --rust-deep:  #8a361a;     /* shifted darker now that --rust took the old --rust-deep value */

  --green-ok:   #4a6b3a;

  /* — Type ————————————————————————————————————— */
  --display: 'Roboto Slab', 'Rockwell', 'Iowan Old Style', Georgia, serif;
  --serif:   'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:    'Inter', -apple-system, 'Segoe UI', sans-serif;

  /* — Rhythm ——————————————————————————————————— */
  --container: 1240px;
  --gutter: 24px;
  --section-y: 120px;
  --section-y-tight: 80px;

  /* — Surfaces ————————————————————————————————— */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
}

/* ——— Reset / base ——— */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

/* ——— Type scale ——— */
.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow.on-dark { color: var(--gold); }

.h-display { font-size: clamp(48px, 6.4vw, 92px); font-weight: 450; letter-spacing: -0.025em; }
.h-1       { font-size: clamp(40px, 4.6vw, 68px);  font-weight: 460; letter-spacing: -0.02em; }
.h-2       { font-size: clamp(32px, 3.4vw, 48px);  font-weight: 480; }
.h-3       { font-size: clamp(22px, 2vw, 28px);    font-weight: 520; font-family: var(--body); letter-spacing: -0.01em; }

.lede { font-size: 20px; line-height: 1.55; color: var(--ink-soft); max-width: 56ch; }
.muted { color: var(--ink-mute); }
.small { font-size: 14px; }

/* ——— Layout helpers ——— */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: var(--section-y) 0; }
.section-tight { padding: var(--section-y-tight) 0; }

.rule {
  height: 1px;
  background: var(--ink-line);
  border: 0;
  margin: 0;
}
.rule.on-dark { background: var(--ink-line-2); }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--rust); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-on-dark {
  background: var(--paper);
  color: var(--ink);
}
.btn-on-dark:hover { background: var(--gold); }
.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost-light:hover { border-color: var(--paper); }
.btn-rust { background: var(--rust); color: var(--paper); }
.btn-rust:hover { background: var(--rust-deep); }

.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ——— Header / Footer ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--cream);
  border-bottom: 1px solid var(--ink-line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo { height: 52px; width: auto; display: block; }
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav > a,
.nav-item > a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav > a:hover,
.nav-item > a:hover { color: var(--rust); }

/* Dropdown menu */
.nav-item {
  position: relative;
  /* Make .nav-item a flex container so the <a> inside aligns the same way
     the bare <a> items do as direct children of .nav (otherwise the block
     wrapper's default line-height pushes the inline-flex <a> ~0.6px down). */
  display: flex;
  align-items: center;
}
.nav-item .caret {
  font-size: 10px;
  color: var(--ink-mute);
  transition: transform .2s ease, color .2s ease;
}
.nav-item:hover .caret,
.nav-item:focus-within .caret { color: var(--rust); transform: translateY(2px); }
.nav-menu {
  position: absolute;
  top: 100%;
  left: -8px;
  min-width: 220px;
  padding: 8px 0;
  background: var(--paper);
  border: 1px solid var(--ink-line);
  box-shadow: 0 12px 32px -10px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
  z-index: 50;
}
.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s;
}
.nav-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.nav-menu a:hover,
.nav-menu a:focus { background: var(--cream); color: var(--rust); outline: none; }
/* "View all" link at the bottom of a dropdown — visually separates from
   the per-city/per-service items above it. */
.nav-menu a.nav-menu-all {
  border-top: 1px solid var(--ink-line);
  margin-top: 6px;
  padding-top: 12px;
  font-size: 13px;
  color: var(--gold-deep);
}
.header-cta {
  display: flex; align-items: center; gap: 18px;
}
.header-phone {
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header-phone .dot { width: 6px; height: 6px; background: var(--green-ok); border-radius: 50%; box-shadow: 0 0 0 4px rgba(74,107,58,0.18); }

.site-footer {
  background: var(--ink);
  color: #d4ccbd;
  padding: 80px 0 40px;
}
.site-footer h3 {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.site-footer a { text-decoration: none; color: #d4ccbd; }
.site-footer a:hover { color: var(--paper); }

/* ——— Mobile sticky CTA bar (shows on narrow viewports) ——— */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--ink-line-2);
}
.mobile-cta-bar a { text-decoration: none; }
/* ============= MOBILE NAV DRAWER + HAMBURGER =============
   Hamburger is hidden on desktop; appears on mobile (≤760px). Drawer
   slides down from under the sticky header. See scripts/site-nav.js. */
.nav-toggle {
  display: none;            /* visible only on mobile — see media query below */
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle-bar {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-toggle-bar:nth-child(1) { top: 15px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 27px; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Drawer panel — hidden by default; slide-down animation when .is-open */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;             /* below sticky header (z:30) so header stays clickable */
  pointer-events: none;
}
.nav-drawer[hidden] { display: none; }
.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.42);
  opacity: 0;
  pointer-events: auto;
  transition: opacity .25s ease;
}
.nav-drawer.is-open .nav-drawer-backdrop { opacity: 1; }
.nav-drawer-panel {
  position: absolute;
  top: 64px;               /* header height on mobile (matches site-header-inner h) */
  left: 0;
  right: 0;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--cream);
  border-bottom: 1px solid var(--ink-line);
  pointer-events: auto;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .26s ease, opacity .22s ease;
  padding: 14px 0 18px;
}
.nav-drawer.is-open .nav-drawer-panel {
  transform: translateY(0);
  opacity: 1;
}

.nav-drawer-nav {
  display: flex;
  flex-direction: column;
}
.nav-drawer-group {
  border-bottom: 1px solid var(--ink-line);
  padding: 0 var(--gutter);
}
.nav-drawer-group:last-of-type { border-bottom: 0; }
.nav-drawer-parent {
  display: block;
  padding: 18px 0 14px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.nav-drawer-group--flat .nav-drawer-parent {
  padding: 18px 0;
}
.nav-drawer-sub {
  list-style: none;
  padding: 0 0 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-drawer-sub a {
  display: block;
  padding: 9px 0 9px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-drawer-sub a:hover,
.nav-drawer-sub a:focus { color: var(--rust); outline: none; }
.nav-drawer-sub a.is-all {
  color: var(--gold-deep);
  font-weight: 600;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-line);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav-drawer-cta {
  margin-top: 14px;
  padding: 18px var(--gutter) 0;
  border-top: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-drawer-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}
.nav-drawer-phone .dot {
  width: 8px; height: 8px;
  background: var(--green-ok);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(74,107,58,0.18);
  flex-shrink: 0;
}
.nav-drawer-phone-num {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
}
.nav-drawer-phone-meta {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.nav-drawer-quote {
  justify-content: center;
  padding: 14px 20px;
  font-size: 15px;
  min-height: 48px;
}
/* Lock body scroll when drawer is open */
body.nav-is-open { overflow: hidden; }

@media (max-width: 760px) {
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 72px; }
  .nav { display: none; }
  .nav-toggle { display: block; }
  /* Free space for the hamburger by dropping the in-header quote button on
     mobile — the bottom sticky CTA bar still covers that action. */
  .header-quote-btn { display: none; }
  /* Slim the header on phones */
  .site-header-inner { height: 64px; gap: 10px; }
  .brand-logo { height: 40px; }
  .header-cta { gap: 6px; }
  .header-phone { font-size: 14px; gap: 6px; white-space: nowrap; padding: 8px 4px; }
  .header-phone .dot { width: 5px; height: 5px; box-shadow: 0 0 0 3px rgba(74,107,58,0.18); }
  :root { --section-y: 72px; --section-y-tight: 56px; }
}

/* Tiny phones — drop the header phone text further so the hamburger
   has room without wrapping. Phone remains accessible via drawer + sticky CTA. */
@media (max-width: 380px) {
  .header-phone { font-size: 13px; }
  .brand-logo { height: 36px; }
}

/* ——— Utility ——— */
.flex { display: flex; }
.grid { display: grid; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.center { text-align: center; }
.dark-bg { background: var(--ink); color: var(--paper); }
.cream-deep-bg { background: var(--cream-deep); }
.paper-bg { background: var(--paper); }
