/* ==========================================================================
   Elkhorn Law - site stylesheet (hand-written, no framework)
   Sections: 1 tokens | 2 base | 3 buttons | 4 header/nav | 5 hero & bands
             6 sections & cards | 7 title band, article, sidebar | 8 people/contact
             9 footer | 10 mobile nav
   ========================================================================== */

/* 1. TOKENS - the whole palette lives here; tune colors in this block only.
   Slate Forest is dominant. Brown and tawny are sparing accents. */
:root {
  --forest: #344E41;        /* header, primary buttons, CTA bands, links */
  --forest-dark: #26392F;   /* hover states */
  --brown: #5A3E2B;         /* footer, "general civil" card (white text on it) */
  --brown-dark: #46301F;
  --tawny: #A8743A;         /* decorative only: rules, icon strokes (not for small text) */
  --tawny-text: #8A5A24;    /* tawny when used as text on white / off-white */
  --white: #FFFFFF;
  --offwhite: #F7F4EE;      /* alternating section backgrounds */
  --ink: #1B1A18;           /* body text */
  --muted: #5E564D;         /* secondary text (warm gray-brown) */
  --line: #E4DDD2;          /* borders and dividers (light warm tint) */

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: 32px;
  --radius: 10px;
  --nav-break: 1020px;      /* keep in sync with the media queries below */
}

/* 2. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.7 var(--font-body);
}
img { max-width: 100%; height: auto; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-dark); text-decoration-color: var(--tawny); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tawny); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-weight: 700; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.15; }
h2 { font-weight: 700; font-size: clamp(24px, 3vw, 32px); }
h3 { font-weight: 600; font-size: 21px; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--white); color: var(--forest); padding: 10px 16px; border-radius: 6px;
  font-family: var(--font-head); font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* 3. BUTTONS */
.btn {
  display: inline-block; text-align: center; text-decoration: none; cursor: pointer;
  font: 600 16px/1.3 var(--font-head);
  padding: 14px 24px; border-radius: 6px; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--forest); color: var(--white); }
.btn--primary:hover { background: var(--forest-dark); color: var(--white); text-decoration: none; }
.btn--outline { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn--outline:hover { background: var(--forest); color: var(--white); text-decoration: none; }
.btn--light { background: var(--white); color: var(--forest); }
.btn--light:hover { background: var(--offwhite); color: var(--forest-dark); text-decoration: none; }
.btn--outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--forest); text-decoration: none; }
.btn--block { display: block; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* 4. HEADER / NAV (desktop first; mobile rules are in section 10) */
.site-header { background: var(--forest); color: var(--white); position: relative; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); flex: none; }
.brand:hover { color: var(--white); text-decoration: none; }
.brand-logo { width: 58px; height: 38px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font: 700 24px/1.15 var(--font-head); letter-spacing: .02em; }
.brand-sub { font-size: 16px; opacity: .88; }
.header-mobile-actions { display: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 8px; padding: 0;
  border: 1.5px solid rgba(255,255,255,.7); background: transparent; color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.12); color: var(--white); }
.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav { display: flex; align-items: stretch; align-self: stretch; gap: 24px; flex: 1; justify-content: flex-end; }
.nav-list { display: flex; align-items: stretch; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  font: 500 16px/1.3 var(--font-head); color: var(--white); text-decoration: none; padding: 8px 2px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav-link:hover { color: var(--white); border-bottom-color: var(--white); text-decoration: none; }
.nav-item.is-active > .nav-link { border-bottom-color: var(--white); }
.sub-toggle { display: none; }                       /* shown only when JS is on */
.js .sub-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 36px;
  background: transparent; border: 0; color: var(--white); cursor: pointer; padding: 0; margin-left: -2px;
}
.sub-toggle svg { transition: transform .15s; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.dropdown {
  display: none; position: absolute; top: 100%; left: 0; z-index: 60; min-width: 300px;
  margin: 0; padding: 10px 0; list-style: none;
  background: var(--white); color: var(--ink); border-radius: 0 0 8px 8px;
  border-top: 3px solid var(--tawny); box-shadow: 0 12px 28px rgba(27,26,24,.22);
}
.dropdown--wide { left: auto; right: -40px; width: min(600px, 90vw); columns: 2; column-gap: 8px; }
.dropdown li { break-inside: avoid; }
.dropdown a {
  display: block; padding: 9px 20px; color: var(--ink); text-decoration: none;
  font: 500 16px/1.35 var(--font-head);
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--offwhite); color: var(--forest); }
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.is-open > .dropdown { display: block; }

.nav-actions { display: flex; align-items: center; gap: 18px; flex: none; }
.nav-phone { color: var(--white); font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap; }
.nav-phone:hover { color: var(--white); text-decoration: underline; }
.nav-actions .btn { padding: 11px 18px; font-size: 16px; white-space: nowrap; }

/* 5. HERO & BANDS */
.hero { position: relative; display: flex; align-items: flex-end; min-height: 560px; background: var(--forest-dark); color: var(--white); overflow: hidden; }
.hero--short { min-height: 380px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27,26,24,.82) 0%, rgba(27,26,24,.58) 45%, rgba(27,26,24,.08) 85%); }
.hero-inner { position: relative; width: 100%; padding-top: 96px; padding-bottom: 80px; }
.hero--short .hero-inner { padding-top: 64px; padding-bottom: 56px; }
.hero-copy { max-width: 640px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 54px); margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-text { font-size: 19px; line-height: 1.6; margin: 0; }

.band { background: var(--forest); color: var(--white); padding: 64px 0; }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.band h2 { margin: 0; font-size: clamp(26px, 3vw, 32px); }

/* 6. SECTIONS & CARDS */
.section { padding: 80px 0; }
.section--tint { background: var(--offwhite); }
.section-title { position: relative; padding-top: 18px; margin-bottom: 28px; }
.section-title::before { content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 4px; background: var(--tawny); border-radius: 2px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card-grid--areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.area-card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
a.area-card:hover { color: var(--ink); text-decoration: none; border-color: var(--tawny); box-shadow: 0 6px 18px rgba(27,26,24,.08); }
.area-card-icon { color: var(--tawny); display: block; line-height: 0; }
.area-card-name { font: 700 20px/1.25 var(--font-head); }
.area-card-summary::first-letter { text-transform: uppercase; }
.area-card-summary { font-size: 16px; line-height: 1.6; color: var(--muted); flex: 1; }
.area-card-arrow { font: 600 20px/1 var(--font-head); color: var(--forest); }
.area-card--note { background: var(--brown); border-color: var(--brown); color: var(--white); justify-content: center; }
.area-card--note p { margin: 0; font-size: 16px; line-height: 1.65; }

.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split-img { flex: 1 1 420px; min-width: 0; width: 100%; max-width: 560px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.split-copy { flex: 1 1 420px; min-width: 0; }

/* Rich text from the data files (bodyHtml etc.) */
.prose { font-size: 17px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose h2 { font-size: 26px; line-height: 1.3; margin: 1.6em 0 .6em; }
.prose h3 { font-size: 21px; margin: 1.4em 0 .5em; }
.prose h4 { font-size: 18px; margin: 1.2em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--tawny-text); }
.prose img { border-radius: 8px; }
.prose blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--tawny); color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--offwhite); }
.prose--wide { max-width: 860px; }

/* 7. TITLE BAND, ARTICLE LAYOUT, SIDEBAR */
.title-band { background: var(--offwhite); border-bottom: 1px solid var(--line); padding: 48px 0 44px; }
.title-band h1 { margin: 0 0 14px; }
.lede { max-width: 760px; font-size: 19px; line-height: 1.6; color: var(--ink); }
.lede > :last-child { margin-bottom: 0; }
.title-band .btn-row { margin-top: 20px; }
.breadcrumbs { font-size: 16px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 .6em; color: var(--muted); }
.breadcrumbs a { color: var(--forest); }

.layout-two { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.article { flex: 999 1 560px; min-width: 0; max-width: 780px; }
.sidebar { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.body-cta { margin: 2em 0 0; }

.child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 2em; }
.child-card {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  font: 700 17px/1.3 var(--font-head); color: var(--forest); text-decoration: none; background: var(--white);
}
.child-card:hover { border-color: var(--tawny); background: var(--offwhite); text-decoration: none; }

.cta-box { background: var(--forest); color: var(--white); border-radius: var(--radius); padding: 28px; }
.cta-box .btn { padding: 14px 18px; }
.cta-box-call { margin: 14px 0 0; text-align: center; font-size: 16px; font-weight: 600; }
.cta-box-call a { color: var(--white); }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--white); }
.side-box-title { font: 700 17px/1.3 var(--font-head); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 3px solid var(--tawny); display: inline-block; }
.side-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.side-box a { font-size: 16px; line-height: 1.5; }

.pill-list { list-style: none; margin: 0 0 40px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-block; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--forest);
  font: 600 16px/1.3 var(--font-head); color: var(--forest); text-decoration: none; background: var(--white);
}
.pill:hover { background: var(--forest); color: var(--white); text-decoration: none; }

/* 8. WHO WE ARE / CONTACT */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 40px; }
.person { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.person-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 12%; display: block; border-radius: 0; }
.person-body { padding: 28px; }
.person-name { margin: 0; font-size: 26px; }
.person-role { margin: 4px 0 16px; font: 600 16px/1.4 var(--font-head); color: var(--tawny-text); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 32px; margin-bottom: 48px; }
.contact-label { font-size: 17px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 3px solid var(--tawny); display: inline-block; }
.contact-item p, .contact-item ul { margin: 0; }
.contact-item li { margin-bottom: 4px; }
.map-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map-frame iframe { display: block; width: 100%; height: 400px; border: 0; }

/* 9. FOOTER */
.site-footer { background: var(--brown); color: var(--offwhite); padding: 64px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.5fr 1.4fr 1fr; gap: 36px; }
.footer-col p { margin: 0 0 10px; }
.footer-col li { margin-bottom: 6px; }
.footer-title { font: 600 16px/1.4 var(--font-head); color: var(--white); }
.footer-title--brand { font-size: 20px; font-weight: 700; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--white); text-decoration-color: var(--white); }
.footer-legal { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid rgba(247,244,238,.3); font-size: 14px; line-height: 1.6; color: var(--offwhite); }

/* 10. MOBILE / TABLET NAV (below 1020px) */
@media (max-width: 1019.98px) {
  .header-inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; min-height: 0; gap: 12px; }
  .brand-logo { width: 46px; height: 30px; }
  .brand-name { font-size: 19px; }
  .brand-sub { font-size: 16px; }
  .header-mobile-actions { display: flex; gap: 8px; }
  .js .menu-toggle { display: inline-flex; }
  /* No JS: nav is shown stacked below the logo. With JS: hidden until opened. */
  .site-nav { flex: 1 0 100%; flex-direction: column; align-self: auto; gap: 0; border-top: 1px solid rgba(255,255,255,.25); }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.18); }
  .nav-link { flex: 1; padding: 13px 4px; min-height: 48px; display: flex; align-items: center; font-size: 17px; border-bottom: 0; }
  .nav-link:hover { border-bottom: 0; text-decoration: underline; }
  .nav-item.is-active > .nav-link { text-decoration: underline; text-underline-offset: 6px; }
  .js .sub-toggle { width: 48px; height: 48px; margin: 0; }
  .dropdown, .dropdown--wide {
    position: static; display: block; flex: 1 0 100%; columns: 1; width: auto; min-width: 0;
    background: rgba(0,0,0,.14); color: var(--white); border: 0; border-radius: 0; box-shadow: none; padding: 4px 0 8px;
  }
  .js .dropdown { display: none; }
  .js .has-dropdown.is-open > .dropdown { display: block; }
  .has-dropdown:hover > .dropdown, .has-dropdown:focus-within > .dropdown { display: block; }
  .js .has-dropdown:not(.is-open):hover > .dropdown, .js .has-dropdown:not(.is-open):focus-within > .dropdown { display: none; }
  .dropdown a { color: var(--white); padding: 11px 16px 11px 20px; min-height: 44px; font-size: 16px; font-weight: 500; }
  .dropdown a:hover, .dropdown a:focus-visible { background: rgba(255,255,255,.12); color: var(--white); }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 0 8px; }
  .nav-phone { text-align: center; padding: 8px; font-size: 18px; }
}

@media (max-width: 900px) {
  .card-grid--areas { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .section { padding: 48px 0; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; background: var(--forest); }
  .hero-img { position: static; height: 230px; }
  .hero-overlay { display: none; }
  .hero-inner { padding-top: 28px; padding-bottom: 32px; }
  .hero--short .hero-inner { padding-top: 28px; padding-bottom: 32px; }
  .hero-copy { gap: 16px; }
  .hero-text { font-size: 17px; }
  .hero .btn-row, .band .btn-row { flex-direction: column; }
  .hero .btn, .band .btn { display: block; }
  .band { padding: 40px 0; }
  .band-inner { gap: 20px; }
  .title-band { padding: 32px 0 30px; }
  .lede { font-size: 17px; }
  .split { gap: 24px; }
  .area-card { padding: 20px; }
  .area-card-name { font-size: 18px; }
  .layout-two { gap: 36px; }
  .map-frame iframe { height: 320px; }
  .person-body { padding: 22px; }
  .people { grid-template-columns: minmax(0, 1fr); }
  .site-footer { padding: 40px 0 32px; }
  .footer-grid { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Getting Started band copy */
.band-copy { flex: 1 1 520px; min-width: 0; }
.band-copy p { margin: 10px 0 0; max-width: 62ch; font-size: 18px; line-height: 1.6; }
