/* Law Office of Patrick Smith — design system
   Navy/charcoal base, single brass accent. Serif headlines (Fraunces) + sans body (Inter). */

:root {
  --base:        #0E1320;
  --surface:     #141B2D;
  --surface-2:   #1B2438;
  --brass:       #C8A24B;
  --brass-light: #E4C97A;
  --ink:         #EAECEF;
  --muted:       #9AA3B2;
  --line:        rgba(200, 162, 75, 0.18);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --display: "Cinzel", "Fraunces", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 500; }

p { margin: 0 0 1.1em; color: #D4D8E0; }
a { color: var(--brass-light); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brass); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brass);
  margin: 0 0 1rem;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { position: relative; padding: clamp(4.5rem, 12vh, 9rem) 0; z-index: 2; }
.section + .section { border-top: 1px solid var(--line); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 42ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 19, 32, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand:hover .brand-mark { transform: rotate(-8deg); }
.brand-mark { width: 38px; height: 38px; flex: 0 0 auto; transition: transform .3s var(--ease); }
.brand-name { font-family: var(--display); text-transform: uppercase; line-height: 1.04; }
.brand-name .l1 { display: block; font-size: 0.6rem; letter-spacing: 0.2em; color: var(--muted); font-weight: 500; }
.brand-name .l2 { display: block; font-size: 1.0rem; letter-spacing: 0.07em; color: var(--ink); font-weight: 600; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav a { font-family: var(--sans); font-size: 0.92rem; color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }

/* Practice Areas dropdown */
.nav-item { position: relative; display: flex; align-items: center; }
.dropdown-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 500; color: var(--muted);
  padding: 0; transition: color .2s var(--ease);
}
.dropdown-toggle:hover, .nav-item:hover .dropdown-toggle, .dropdown-toggle[aria-expanded="true"] { color: var(--ink); }
.dropdown-toggle .caret { font-size: 0.7em; transition: transform .25s var(--ease); }
.dropdown-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 0.6rem); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 230px; background: rgba(20, 27, 45, 0.98); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 12px; padding: 0.5rem;
  display: flex; flex-direction: column; gap: 0.1rem;
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), transform .2s var(--ease);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4); z-index: 60;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown, .dropdown.open {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
/* Invisible bridge across the gap so hover doesn't drop while the cursor
   travels from the button down to the menu items. */
.dropdown::before { content: ''; position: absolute; top: -0.6rem; left: 0; right: 0; height: 0.6rem; }
.dropdown a { padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: rgba(200,162,75,0.1); color: var(--brass-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--brass);
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  cursor: pointer;
}
.btn-primary { background: var(--brass); color: #1a1405; border-color: var(--brass); }
.btn-primary:hover { background: var(--brass-light); color: #1a1405; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--brass-light); }
.btn-ghost:hover { background: rgba(200,162,75,0.1); color: var(--brass-light); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

/* ---------- Hero ---------- */
.hero { min-height: 92vh; display: flex; align-items: center; padding-top: 4rem; position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }

/* Hero ambient video (lazy-loaded by JS; never on mobile / reduced-motion / save-data) */
.hero-media { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-media.in { opacity: 1; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: opacity 0.85s var(--ease); }
.hero-veil { position: absolute; inset: 0; background:
    linear-gradient(90deg, var(--base) 0%, rgba(14,19,32,0.93) 30%, rgba(14,19,32,0.60) 62%, rgba(14,19,32,0.22) 100%),
    linear-gradient(0deg, var(--base) 0%, rgba(14,19,32,0) 46%); }
@media (max-width: 880px) { .hero-veil { background: linear-gradient(0deg, var(--base) 6%, rgba(14,19,32,0.55) 60%, rgba(14,19,32,0.78) 100%); } }
.hero h1 { max-width: 16ch; }
.hero h1 .accent { color: var(--brass-light); }
.hero .lead { max-width: 46ch; margin-top: 1.2rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(200,162,75,0.4); }
.card h3 { color: var(--brass-light); }
.card p { color: var(--muted); margin-bottom: 0; font-size: 0.97rem; }
.card-link { display: block; }
.card-link:hover { color: inherit; }

.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature .ico { flex: 0 0 auto; width: 38px; height: 38px; color: var(--brass); }

/* unlock badge that "clicks" as section enters */
.unlock {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 1rem;
}
.unlock svg { width: 20px; height: 20px; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 0.95rem;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--sans); font-size: 1rem;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--brass); border-color: var(--brass); }
.placeholder-note { color: var(--brass); font-size: 0.82rem; font-style: italic; }

/* contact info rows */
.info-row { display: flex; gap: 0.75rem; align-items: baseline; margin-bottom: 0.9rem; }
.info-row .lbl { color: var(--brass); font-weight: 600; min-width: 84px; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 2;
  background: #0A0E18; border-top: 1px solid var(--line);
  padding: 3rem 0 2rem; margin-top: 2rem;
  font-size: 0.9rem; color: var(--muted);
}
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 2rem; }
.site-footer h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; color: var(--ink); margin: 0 0 0.9rem; }
.site-footer a { display: block; color: var(--muted); margin-bottom: 0.5rem; }
.site-footer a:hover { color: var(--brass-light); }
.disclaimer {
  border-top: 1px solid var(--line); padding-top: 1.5rem;
  font-size: 0.82rem; line-height: 1.6; color: #7A8294;
}
.disclaimer strong { color: var(--muted); }

/* ---------- Scroll-reveal (JS adds .in) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile nav ---------- */
@media (max-width: 760px) {
  .nav { position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
         background: rgba(14,19,32,0.98); border-bottom: 1px solid var(--line);
         padding: 1rem var(--pad) 1.5rem; gap: 0.25rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-toggle { display: block; }

  /* Dropdown collapses inline on mobile */
  .nav-item { display: block; }
  .dropdown-toggle { width: 100%; justify-content: space-between; padding: 0.7rem 0; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .dropdown {
    position: static; transform: none; min-width: 0; width: 100%;
    background: none; border: 0; box-shadow: none; backdrop-filter: none;
    padding: 0 0 0 0.8rem; border-radius: 0;
    display: none; opacity: 1; visibility: visible;
  }
  .dropdown::before { display: none; }
  /* Override the desktop open-state transform that would otherwise shove the
     inline menu half its width off the left edge. */
  .dropdown.open { display: flex; transform: none; }
  .nav-item:hover .dropdown:not(.open), .nav-item:focus-within .dropdown:not(.open) { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
