@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --blue-50:  oklch(0.97 0.02 260);
  --blue-100: oklch(0.93 0.04 260);
  --blue-200: oklch(0.85 0.09 260);
  --blue-300: oklch(0.72 0.14 260);
  --blue-400: oklch(0.50 0.20 260);
  --blue-500: oklch(0.40 0.21 260);
  --blue-600: oklch(0.34 0.20 260);
  --blue-700: oklch(0.26 0.16 260);
  --blue-800: oklch(0.19 0.10 260);
  --blue-900: oklch(0.13 0.06 260);

  --red-50:  oklch(0.97 0.02 25);
  --red-100: oklch(0.93 0.05 25);
  --red-200: oklch(0.84 0.10 25);
  --red-300: oklch(0.74 0.15 25);
  --red-400: oklch(0.62 0.21 25);
  --red-500: oklch(0.54 0.22 25);
  --red-600: oklch(0.48 0.21 25);
  --red-700: oklch(0.40 0.18 25);
  --red-800: oklch(0.32 0.14 25);
  --red-900: oklch(0.22 0.08 25);

  --cream-50:  #FBF8F1;
  --cream-100: #F7F1E6;
  --cream-200: #EFE7D6;
  --cream-300: #E4D8C0;
  --cream-400: #D2C2A2;

  --ink:   oklch(0.18 0.02 260);
  --ink-2: oklch(0.40 0.02 260);
  --ink-3: oklch(0.56 0.01 260);
  --line:  oklch(0.92 0.01 80);
  --line-2:oklch(0.86 0.015 80);
  --paper: #FFFFFF;

  --bg:           var(--cream-100);
  --bg-paper:     var(--paper);
  --bg-soft:      var(--cream-50);
  --bg-warm:      var(--cream-200);
  --bg-deep:      var(--blue-800);
  --bg-deepest:   var(--blue-900);

  --fg:           var(--ink);
  --fg-muted:     var(--ink-2);
  --fg-faint:     var(--ink-3);
  --fg-on-deep:   var(--cream-100);

  --primary:       var(--blue-600);
  --primary-hover: var(--blue-700);
  --primary-fg:    var(--cream-50);
  --accent:        var(--red-600);
  --accent-hover:  var(--red-700);
  --accent-fg:     var(--cream-50);

  --link:       var(--blue-600);
  --link-hover: var(--blue-800);

  --success: oklch(0.62 0.14 150);
  --warning: oklch(0.78 0.15 75);
  --danger:  var(--red-500);

  --ring: oklch(0.50 0.20 260 / 0.55);

  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-sans:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --t-display-xl: clamp(56px, 7.2vw, 96px);
  --t-display-lg: clamp(40px, 5vw, 72px);
  --t-display-md: clamp(32px, 3.4vw, 48px);
  --t-h1: 56px;
  --t-h2: 40px;
  --t-h3: 28px;
  --t-h4: 22px;
  --t-h5: 18px;
  --t-body-lg: 18px;
  --t-body:    16px;
  --t-body-sm: 14px;
  --t-caption: 12px;
  --t-eyebrow: 12px;

  --lh-tight: 1.04;
  --lh-snug:  1.18;
  --lh-body:  1.55;
  --lh-loose: 1.7;

  --tr-display: -0.02em;
  --tr-eyebrow: 0.14em;

  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px oklch(0.18 0.02 260 / 0.04), 0 4px 12px oklch(0.18 0.02 260 / 0.06);
  --shadow-2: 0 2px 4px oklch(0.18 0.02 260 / 0.05), 0 8px 24px oklch(0.18 0.02 260 / 0.10);
  --shadow-3: 0 4px 8px oklch(0.18 0.02 260 / 0.08), 0 24px 60px oklch(0.18 0.02 260 / 0.18);
  --shadow-inner: inset 0 1px 2px oklch(0.18 0.02 260 / 0.07);

  --ease:   cubic-bezier(.2, .8, .2, 1);
  --t-fast: 160ms;
  --t-mid:  240ms;
  --t-slow: 480ms;

  --container:      1200px;
  --container-wide: 1400px;
  --gutter:         24px;
}

/* ── Reset & base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--fg);
  font-weight: 600;
  line-height: var(--lh-snug);
}
h1 { font-size: var(--t-h1); line-height: var(--lh-tight); letter-spacing: var(--tr-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); }
h5 { font-size: var(--t-h5); font-weight: 500; }

.display-xl { font-family: var(--font-display); font-weight: 500; font-size: var(--t-display-xl); letter-spacing: var(--tr-display); line-height: var(--lh-tight); }
.display-lg { font-family: var(--font-display); font-weight: 500; font-size: var(--t-display-lg); letter-spacing: var(--tr-display); line-height: var(--lh-tight); }
.display-md { font-family: var(--font-display); font-weight: 500; font-size: var(--t-display-md); letter-spacing: var(--tr-display); line-height: var(--lh-tight); }
.display em, .display-xl em, .display-lg em, .display-md em,
h1.serif em, h2.serif em { font-style: italic; color: var(--accent); font-feature-settings: "ss01"; }

.serif { font-family: var(--font-display); font-weight: 500; }
.mono  { font-family: var(--font-mono); font-size: 13px; }

.eyebrow {
  font-size: var(--t-eyebrow);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  font-weight: 600;
  color: var(--accent);
  display: block;
}

p { margin: 0; }
.body-lg { font-size: var(--t-body-lg); line-height: var(--lh-body); }
.body    { font-size: var(--t-body);    line-height: var(--lh-body); }
.body-sm { font-size: var(--t-body-sm); line-height: var(--lh-body); color: var(--fg-muted); }
.caption { font-size: var(--t-caption); color: var(--fg-muted); }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-thickness var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font-sans); cursor: pointer; }
input, textarea, select { font-family: var(--font-sans); }

::selection { background: var(--blue-200); color: var(--ink); }

/* ── Layout helpers ──────────────────────────────────────────────────── */
.container      { max-width: var(--container);      margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 15px; line-height: 1;
  border-radius: var(--r-md); padding: 12px 20px; cursor: pointer;
  transition: all var(--t-fast) var(--ease); text-decoration: none;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.985); }
.btn-sm  { font-size: 13px; padding: 8px 14px; }
.btn-lg  { font-size: 17px; padding: 16px 26px; }

.btn-primary  { background: var(--blue-500); color: var(--cream-50); }
.btn-primary:hover { background: var(--blue-600); color: var(--cream-50); text-decoration: none; }
.btn-accent   { background: var(--red-500); color: var(--cream-50); }
.btn-accent:hover { background: var(--red-600); color: var(--cream-50); text-decoration: none; }
.btn-outline  { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-ghost    { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(27,45,91,0.06); text-decoration: none; }
.btn-on-deep  { background: var(--cream-50); color: var(--blue-800); }
.btn-on-deep:hover { background: var(--cream-100); text-decoration: none; }
.btn-deep-outline { background: transparent; color: var(--cream-100); border-color: rgba(247,241,230,0.25); }
.btn-deep-outline:hover { border-color: rgba(247,241,230,0.5); color: var(--cream-50); text-decoration: none; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
}
.card:hover { box-shadow: var(--shadow-1); border-color: var(--line-2); }

/* ── Chips / tags ────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center;
  font-size: 11px; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--cream-100); color: var(--ink); font-weight: 500;
}

/* ── Section headers ─────────────────────────────────────────────────── */
.section-header { max-width: 720px; }
.section-header h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 14px 0 18px; color: var(--ink);
}
.section-header h2 em { font-style: italic; color: var(--accent); }
.section-header p { font-size: 18px; line-height: var(--lh-body); color: var(--ink-2); max-width: 600px; }
.section-header.center { margin: 0 auto; text-align: center; }
.section-header.center p { margin: 0 auto; }

/* ── Verified badge ──────────────────────────────────────────────────── */
.badge-verified {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: #dcfce7; color: #15803d;
}
.badge-gold {
  background: oklch(0.88 0.10 75); color: oklch(0.38 0.10 60);
}
.badge-unclaimed {
  background: oklch(0.94 0.08 75); color: oklch(0.45 0.10 60);
}

/* ── Nav ─────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 32px;
  background: rgba(247, 241, 230, 0.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  transition: background var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.site-nav.scrolled {
  background: rgba(247, 241, 230, 0.95);
  box-shadow: var(--shadow-1);
}
.site-nav__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.site-nav__brand:hover { text-decoration: none; }
.site-nav__links { display: flex; gap: 2px; font-size: 14px; font-weight: 500; }
.site-nav__links a {
  padding: 8px 12px; border-radius: 10px; color: var(--ink);
  text-decoration: none; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.site-nav__links a:hover { background: rgba(27,45,91,0.06); color: var(--blue-700); }
.site-nav__links a.active { color: var(--blue-700); background: rgba(27,45,91,0.06); }
.site-nav__actions { display: flex; align-items: center; gap: 8px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--blue-800); color: var(--cream-200);
  padding: 72px 32px 36px; margin-top: 96px;
}
.site-footer__grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40;
}
.site-footer__col-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--red-400); font-weight: 600; margin-bottom: 14px;
}
.site-footer__col ul { display: grid; gap: 10; }
.site-footer__col a { color: var(--cream-100); text-decoration: none; font-size: 14px; }
.site-footer__col a:hover { color: var(--cream-50); text-decoration: underline; }
.site-footer__bottom {
  max-width: var(--container); margin: 48px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(247,241,230,0.10);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--cream-300);
}

/* ── Intake modal ────────────────────────────────────────────────────── */
.intake-modal-scrim {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 20, 35, 0.6);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  align-items: center; justify-content: center; padding: 24px;
}
.intake-modal-scrim.open { display: flex; }
.intake-modal {
  background: var(--paper); border-radius: var(--r-xl);
  width: 100%; max-width: 700px; max-height: 90vh;
  overflow-y: auto; padding: 40px;
  box-shadow: var(--shadow-3); position: relative;
}
.intake-modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  background: var(--cream-100); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; font-size: 18px; color: var(--ink-2);
}

/* ── FAQ accordion ───────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  width: 100%; text-align: left; padding: 24px 28px;
  background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-sans); font-size: 17px; font-weight: 600; color: var(--ink);
}
.faq-icon {
  width: 28px; height: 28px; border-radius: var(--r-pill); flex-shrink: 0;
  background: var(--cream-200); color: var(--ink); display: grid; place-items: center;
  transition: all var(--t-mid) var(--ease);
}
.faq-question.open .faq-icon { background: var(--blue-500); color: var(--cream-50); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 320ms var(--ease);
}
.faq-answer p { padding: 0 28px 24px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 720px; }

/* ── Directory search/filter bar ─────────────────────────────────────── */
.filter-bar {
  position: sticky; top: 64px; z-index: 20;
  background: rgba(247,241,230,0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 32px;
}
.filter-bar__inner {
  max-width: var(--container-wide); margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.search-input {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px;
  flex: 1 1 280px; max-width: 380px;
}
.search-input input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 14px; color: var(--ink);
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-pill {
  padding: 8px 14px; border-radius: var(--r-pill); font-size: 13px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-2);
  font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.filter-pill.active { background: var(--ink); color: var(--cream-50); border-color: var(--ink); font-weight: 600; }
.filter-pill:hover:not(.active) { border-color: var(--ink-2); }

/* ── Firm cards (directory) ──────────────────────────────────────────── */
.firm-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
  text-decoration: none; color: inherit;
}
.firm-card:hover { border-color: var(--ink); box-shadow: var(--shadow-1); text-decoration: none; color: inherit; }
.firm-card__footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto;
}

/* ── Profile page ────────────────────────────────────────────────────── */
.profile-layout {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start;
}
.profile-main { display: grid; gap: 24px; }
.profile-sidebar { display: grid; gap: 24px; position: sticky; top: 88px; }
.profile-hero {
  padding: 40px var(--gutter) 32px; border-bottom: 1px solid var(--line);
}
.profile-hero__inner { max-width: var(--container); margin: 0 auto; }
.profile-section { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px; }
.profile-section + .profile-section { margin-top: 0; }
.profile-section h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

.claim-banner {
  background: oklch(0.94 0.08 75); border: 1px solid oklch(0.85 0.10 75);
  border-radius: var(--r-md); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
}

/* ── Star rating ─────────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 1px; }
.star-filled   { color: var(--red-600); }
.star-empty    { color: var(--cream-300); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-nav__links { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .site-nav { padding: 12px 16px; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .intake-modal { padding: 24px 20px; }
}
