/* Buyers Concierge — global styles
   Brand tokens:
   ink green  #0E2620   brass  #B8893A   brass text  #7D5A1A
   paper      #F7F5EF   slate  #55635E   rule        #DCD8CC
   Most page layout is written inline in each page; this file holds the
   shared base, the header/footer, grids and the small-screen overrides. */

:root {
  --ink: #0E2620;
  --brass: #B8893A;
  --brass-text: #7D5A1A;
  --paper: #F7F5EF;
  --slate: #55635E;
  --rule: #DCD8CC;
  --text: #1C2926;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--ink); }
a:hover { color: var(--brass-text); }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 100;
}
.skip-link:focus { left: 8px; color: var(--paper); }

[id] { scroll-margin-top: 16px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }

/* Smart sticky header: stays at the top, slides away when the reader scrolls
   down and comes back when they scroll up (js/nav.js sets the attributes). */
.js-nav .site-header {
  position: sticky; top: 0; z-index: 50;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.js-nav .site-header[data-scrolled] { box-shadow: 0 2px 12px rgba(14, 38, 32, 0.08); }
.js-nav .site-header[data-hidden] { transform: translateY(-100%); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .js-nav .site-header { transition: none; }
}
.site-header__inner {
  max-width: 1240px; margin: 0 auto; padding: 18px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__text { display: flex; flex-direction: column; gap: 6px; line-height: 1.05; }
.brand__name { font-family: Fraunces, Georgia, serif; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.brand__tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-text); font-weight: 600; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; font-weight: 500; margin-left: auto; }
.site-nav a { text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.header-actions__phone { text-decoration: none; font-weight: 600; font-size: 15px; }
.btn-brass {
  text-decoration: none; background: var(--brass); color: var(--ink);
  padding: 12px 20px; border-radius: 6px; font-weight: 600; font-size: 15px;
}
.btn-brass:hover { background: #C99A4A; color: var(--ink); }

/* Mobile menu button and the "Book a call" item inside the menu:
   hidden on desktop, shown by the small-screen rules below. */
.nav-toggle { display: none; }
.site-nav__cta { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open,
.nav-toggle[aria-expanded="false"] .nav-toggle__close { display: none; }

/* ---------- Grids (converted from the design's fixed column grids) ---------- */
.g2, .g3, .g4 { display: grid; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 960px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below 1181px the full menu, phone number and "Book a call" no longer fit on
   one row, so the menu collapses behind the menu button. Keep in step with the
   matchMedia width in js/nav.js. */
@media (max-width: 1180px) {
  .site-header__inner { gap: 12px 16px; }
  .header-actions { order: 1; margin-left: auto; }
  .nav-toggle { order: 2; }

  /* Without JavaScript the menu stays visible as a row that scrolls sideways. */
  .site-nav {
    order: 3; width: 100%; margin-left: 0;
    flex-wrap: nowrap; overflow-x: auto; gap: 22px;
    border-top: 1px solid var(--rule); padding-top: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav a { white-space: nowrap; }

  /* With JavaScript: a menu button that opens a stacked list. */
  .js-nav .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    border: 1.5px solid var(--ink); border-radius: 6px;
    background: transparent; color: var(--ink); cursor: pointer;
  }
  .js-nav .site-nav {
    display: none; flex-direction: column; gap: 0;
    overflow: visible; padding: 4px 0 12px;
  }
  .js-nav .site-nav[data-open] { display: flex; }
  .js-nav .site-nav a {
    padding: 14px 0; font-size: 17px;
    border-bottom: 1px solid var(--rule);
  }
  .js-nav .site-nav a[aria-current="page"] {
    border-bottom-color: var(--rule); color: var(--brass-text); font-weight: 600;
  }
}

/* Narrow phones: the logo, "Book a call" and the menu button don't fit on one
   row, so "Book a call" moves to the end of the menu. */
@media (max-width: 480px) {
  .js-nav .header-actions { display: none; }
  .js-nav .nav-toggle { margin-left: auto; }
  .js-nav .site-nav .site-nav__cta {
    display: block; margin-top: 16px; border-bottom: 0;
    background: var(--brass); color: var(--ink);
    text-align: center; border-radius: 6px; font-weight: 600;
  }
}

@media (max-width: 640px) {
  .case-card { padding: 20px !important; gap: 24px !important; }
  .case-plan { padding: 12px 6px 4px !important; }
  .audit-bar > span:first-child { flex-basis: 100% !important; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  dl.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main h1 { font-size: 40px !important; line-height: 1.08 !important; }
  main h2 { font-size: 30px !important; }
  main section[style*="padding: 96px"] { padding-top: 64px !important; padding-bottom: 56px !important; }
  .header-actions__phone { display: none; }
  .brand__tag { display: none; }
  .site-header__inner { padding: 14px 16px; flex-wrap: wrap; }
  .brand { gap: 10px; }
  .brand svg { width: 32px; height: 32px; }
  .brand__name { font-size: 19px; }
  .btn-brass { padding: 10px 14px; font-size: 14px; }
}

/* ---------- FAQ (How it works) ---------- */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] .faq-sign { transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
