/* ==========================================================================
   VANGUARD LEGAL — DESIGN SYSTEM (DESIGN.MD TOKEN CONTRACT)
   Institutional, print-inspired law firm aesthetic
   ========================================================================== */

:root {
  /* COLOR TOKENS — REVISED TOKEN CONTRACT */
  --color-ink:            #141210;   /* near-black with warm brown undertone. Replaces hero and nav background. NOT #000, NOT #111. */
  --color-ink-muted:      #2A2620;   /* secondary dark surface — inside hero for image frame treatment */
  --color-on-ink:         #F0EBE1;   /* text on dark backgrounds — warm off-white, not pure white */
  --color-on-ink-sec:     #9C9186;   /* secondary text on dark — warm stone */
  --color-accent:         #A07830;   /* gold deepened by one stop. Clear contrast on dark and light surfaces. */

  /* UNCHANGED */
  --color-base:           #F2EFE9;   /* 60% — natural parchment */
  --color-surface:        #E8E4DC;   /* 30% — section surfaces, footer */
  --color-text-primary:   #18160F;   /* near-black, warm-amber tinted */
  --color-text-secondary: #5C5646;   /* warm mid-grey for body copy */
  --color-divider:        #D4CEBF;   /* hairline rules, borders */
  --color-accent-light:   #F0E8D0;   /* accent tint for subtle hover states */

  /* TYPOGRAPHY TOKENS */
  --font-heading: 'EB Garamond', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* TYPE SCALE */
  --text-display:  clamp(2.75rem, 5.5vw, 4.5rem);        /* hero H1 */
  --text-h2:       clamp(2rem, 3.8vw, 3.25rem);          /* section heads */
  --text-h3:       clamp(1.375rem, 2.2vw, 1.875rem);     /* practice area headings */
  --text-body:     clamp(1rem, 1.2vw, 1.125rem);         /* body copy */
  --text-small:    clamp(0.8125rem, 1vw, 0.9375rem);     /* captions, labels */
  --text-nav:      clamp(0.875rem, 1vw, 1rem);           /* nav items */
  --text-stat:     clamp(2rem, 3.5vw, 3rem);

  /* LAYOUT TOKENS */
  --space-section:  clamp(5rem, 9vw, 8rem);
  --space-block:    clamp(2.5rem, 4.5vw, 4rem);
  --space-inset:    clamp(1.5rem, 2.5vw, 2.25rem);
  --radius-card:    4px;
  --radius-button:  4px;
  --radius-pill:    9999px;
  --max-width:      1200px;
  --col-gap:        clamp(2rem, 3.5vw, 3rem);
}

/* --- BASE RESETS --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-base);
}

body {
  background-color: var(--color-base);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- TYPOGRAPHY BASE --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

p {
  max-width: 65ch;
  color: var(--color-text-secondary);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 1.75rem;
  border-radius: var(--radius-button);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-ink);
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background-color: #b88d3b;
  border-color: #b88d3b;
  color: var(--color-ink);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-ghost:hover {
  background-color: var(--color-accent);
  color: var(--color-ink);
}

/* Legacy button mapping */
.btn-gold {
  background-color: var(--color-accent);
  color: var(--color-base);
  border: 1px solid var(--color-accent);
}
.btn-gold:hover {
  background-color: #725510;
  border-color: #725510;
}
.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.btn-outline:hover {
  background-color: var(--color-accent-light);
}

/* --- SITE NAVIGATION --- */
nav.navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transition: border-color 180ms ease;
}

html.has-siteready-bar nav.navbar {
  top: 56px !important;
}

html.has-siteready-bar body {
  padding-top: 56px !important;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  line-height: 1;
}

.brand-logo .logo-primary {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-on-ink);
  margin-right: 0.35rem;
}

.brand-logo .logo-secondary {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-on-ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: var(--text-nav);
  font-weight: 400;
  color: var(--color-on-ink-sec);
  transition: color 150ms ease;
}

.nav-link:hover {
  color: var(--color-on-ink);
}

.nav-link.active {
  color: var(--color-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.lang-toggle {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-on-ink-sec);
  text-decoration: none;
  transition: color 150ms ease;
}

.lang-toggle:hover,
.lang-toggle.active {
  color: var(--color-on-ink);
}

.nav-cta {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-style: italic;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-button);
  color: var(--color-accent);
  background: transparent;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-cta:hover {
  background-color: var(--color-accent);
  color: var(--color-ink);
}

.mobile-toggle {
  display: none;
  color: var(--color-on-ink);
}

/* --- HERO SECTION --- */
.hero-section {
  min-height: 90vh;
  background-color: var(--color-ink);
  display: flex;
  align-items: center;
  padding: 3rem 1.5rem;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: var(--col-gap);
}

/* LEFT COLUMN — specific typographic changes & L-frame */
.hero-content {
  position: relative;
  border-left: 2px solid rgba(160, 120, 48, 0.2); /* 2px wide vertical line in --color-accent at 20% opacity */
  padding-left: 2rem;
  padding-right: 1.5rem;
}

.hero-accent-rule {
  width: 48px;
  height: 2px;
  background-color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-on-ink);
  margin-bottom: 0;
}

.hero-title .hero-title-italic {
  display: block;
  font-style: italic;
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-on-ink);
}

.hero-description {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-on-ink-sec);
  max-width: 60ch;
  margin-top: 1.75rem;
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* RIGHT COLUMN — image treatment */
.hero-image-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 16px -16px -16px 16px;  /* offset: right and bottom */
  border: 1px solid var(--color-accent);
  pointer-events: none;
  z-index: 1;
}

.hero-image-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-ink-muted);
  border-radius: 0;
  border: none;
  z-index: 2;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: none;
  display: block;
}

/* Inset bottom bar credential caption */
.hero-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: rgba(20, 18, 16, 0.85); /* --color-ink at 85% opacity */
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-on-ink-sec);
  z-index: 3;
  line-height: 1;
}

/* --- STATS FOOTNOTE SECTION --- */
.stats-footnote-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  background-color: var(--color-ink);
  padding: 3rem 1.5rem;
}

.stats-footnote-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.stat-footnote-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.stat-footnote-num {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1;
  color: var(--color-on-ink);
  margin-bottom: 8px;
}

.stat-footnote-label {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-on-ink-sec);
  line-height: 1.35;
}

.stat-footnote-divider {
  width: 1px;
  height: 32px;
  background-color: rgba(160, 120, 48, 0.4); /* 1px x 32px vertical line in --color-accent at 40% opacity */
  flex-shrink: 0;
}

/* --- PRACTICE AREAS SECTION --- */
.practice-section {
  padding: var(--space-section) 1.5rem;
  background-color: var(--color-base);
}

.practice-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.practice-header {
  margin-bottom: var(--space-block);
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  display: block;
}

.practice-title {
  font-family: var(--font-heading);
  font-size: var(--text-h2);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text-primary);
  max-width: 34ch;
  margin-bottom: 1rem;
}

.practice-title .title-italic {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
}

.practice-subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  max-width: 55ch;
  line-height: 1.65;
}

/* Strict 3-Column Practice Grid */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Tier A: Standard Cards */
.practice-card {
  background-color: var(--color-base);
  border: 1px solid var(--color-divider);
  border-left: 3px solid var(--color-accent);
  border-radius: 4px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.practice-card:hover {
  background-color: var(--color-accent-light);
  border-left-color: var(--color-accent);
}

.practice-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 500;
  font-style: italic;
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.practice-card-desc {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Tier B: Featured Card (4th card, wide) */
.practice-card.practice-card-featured {
  background-color: var(--color-ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--color-accent);
}

.practice-card.practice-card-featured:hover {
  background-color: var(--color-ink-muted);
  border-left-color: var(--color-accent);
}

.practice-card.practice-card-featured .practice-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 500;
  font-style: italic;
  color: var(--color-on-ink);
}

.practice-card.practice-card-featured .practice-card-desc {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-on-ink-sec);
}

/* 4th card spans row 2, columns 1-2 */
.practice-card.card-span-2 {
  grid-column: 1 / span 2;
}

/* --- CONFIDENTIAL CONSULTATION MODAL --- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(24, 22, 15, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background: var(--color-base);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-card);
  max-width: 540px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 180ms ease;
}

.modal-close:hover {
  color: var(--color-text-primary);
}

.modal-title {
  font-size: 1.85rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.modal-desc {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: var(--text-small);
  color: var(--color-text-primary);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-button);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 180ms ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* --- FOOTER --- */
footer.footer {
  background-color: var(--color-surface);
  border-top: 3px solid var(--color-accent);
  padding: var(--space-block) 1.5rem 2.5rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .brand-logo .logo-primary,
.footer-brand .brand-logo .logo-secondary {
  color: var(--color-text-primary);
}

.footer-brand p {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col-title {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
  letter-spacing: 0;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  transition: color 180ms ease;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-contact-item {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.footer-email-link {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-email-link:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 50% 50%;
  }
  .practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .practice-card.card-span-2 {
    grid-column: auto;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .nav-cta {
    display: none;
  }
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-ink);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-ink-border);
    gap: 1.25rem;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-content {
    padding-left: 1.25rem;
    padding-right: 0;
  }
  .hero-image-wrapper {
    order: 2;
    max-width: 440px;
  }
  .hero-image-wrapper::after {
    inset: 12px -12px -12px 12px;
  }
  .stats-footnote-container {
    flex-direction: column;
    gap: 1.75rem;
  }
  .stat-footnote-divider {
    display: none;
  }
  .stat-footnote-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
    width: 100%;
  }
  .practice-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
