/* ============================================================
   The Firm — main stylesheet
   Brand tokens are defined in :root, then used everywhere below.
   ============================================================ */

:root {
  --navy:        #164A7E;   /* primary — from FIRM mark */
  --navy-deep:   #0F3760;   /* hover / depth */
  --navy-soft:   #2A6AA8;   /* accents */
  --gray:        #6E7378;   /* secondary — from THE & mark (decorative / large text) */
  --gray-text:   #63686E;   /* body-copy gray — darkened for WCAG AA contrast on cream */
  --charcoal:    #2C3338;   /* body text */
  --cream:       #FAF7F2;   /* warm page background */
  --cream-2:     #F2EDE4;   /* alt section background */
  --line:        #E5DFD5;   /* dividers */
  --white:       #FFFFFF;
  --shadow-sm:   0 1px 2px rgba(15,55,96,.06), 0 4px 16px rgba(15,55,96,.04);
  --shadow-md:   0 4px 24px rgba(15,55,96,.08), 0 18px 48px rgba(15,55,96,.06);

  --f-display: "Cinzel", "Trajan Pro", "Cormorant Garamond", Georgia, serif;
  --f-serif:   "Lora", Georgia, "Times New Roman", serif;
  --f-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw: 1180px;
  --pad-x: clamp(20px, 4vw, 56px);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* keep anchor targets clear of the fixed nav */
}
body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--f-serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* Visible keyboard focus everywhere */
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.approach :focus-visible,
footer.site :focus-visible { outline-color: var(--white); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 16px;
  font-family: var(--f-sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--navy);
  vertical-align: middle;
  margin-right: 14px;
  transform: translateY(-2px);
}
h1, h2, h3, h4 { color: var(--navy-deep); margin: 0 0 .4em; font-weight: 500; }
h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(40px, 6.4vw, 84px);
  letter-spacing: .02em;
  line-height: 1.05;
  text-transform: uppercase;
}
h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: .04em;
  line-height: 1.15;
  text-transform: uppercase;
}
h3 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .005em;
  line-height: 1.3;
}
p { margin: 0 0 1em; }
.lede {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 22px);
  color: var(--gray-text);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.btn--solid { background: var(--navy); color: var(--white); }
.btn--solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(250,247,242,.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.nav.is-scrolled { background: rgba(250,247,242,.96); border-bottom-color: var(--line); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
}
.nav__logo img { height: 44px; width: auto; }
.nav__links {
  display: flex; gap: 36px;
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.nav__links a { position: relative; padding: 6px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--navy);
  transition: right .3s ease;
}
.nav__links a:hover { color: var(--navy); }
.nav__links a:hover::after { right: 0; }
.nav__cta { display: inline-flex; }
.nav__toggle { display: none; }
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: 1px solid var(--line); background: transparent; cursor: pointer;
  }
  .nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
    content: ""; display: block; width: 18px; height: 1px; background: var(--navy);
    position: relative;
    transition: transform .25s ease, background .25s ease;
  }
  .nav__toggle span::before { position: absolute; top: -6px; left: 0; right: 0; }
  .nav__toggle span::after  { position: absolute; top:  6px; left: 0; right: 0; }
  .nav.is-open .nav__toggle span { background: transparent; }
  .nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
  .nav.is-open .nav__toggle span::after  { transform: translateY(-6px) rotate(-45deg); }
  .nav.is-open { background: var(--cream); }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 80px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 12px var(--pad-x) 24px;
  }
  .nav.is-open .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* stable height on mobile browsers with dynamic UI chrome */
  padding-top: 140px;
  padding-bottom: 100px;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(22,74,126,.06), transparent 60%),
    linear-gradient(180deg, var(--cream) 0%, #F4EFE4 100%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -160px; bottom: -120px;
  width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(22,74,126,.07), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
  align-items: center;
  min-height: calc(100vh - 240px);
  min-height: calc(100svh - 240px);
}
.hero__copy .eyebrow { margin-bottom: 28px; display: inline-block; }
.hero__title em {
  font-style: italic;
  font-family: var(--f-serif);
  font-weight: 500;
  color: var(--gray);
  text-transform: none;
  letter-spacing: 0;
}
.hero__sub {
  margin-top: 28px;
  font-size: clamp(17px, 1.4vw, 19px);
  max-width: 52ch;
  color: #4A5057;
}
.hero__cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__mark {
  position: relative;
  aspect-ratio: 1 / 1.1;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #F7F2E8 100%);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  overflow: hidden;
}
.hero__mark::before, .hero__mark::after {
  content: ""; position: absolute; inset: 18px;
  border: 1px solid rgba(22,74,126,.18);
  pointer-events: none;
}
.hero__mark::after { inset: 30px; border-color: rgba(110,115,120,.18); }
.hero__mark img { width: 62%; height: auto; }
.hero__meta {
  position: absolute; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-sans); font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gray-text);
  padding: 0 28px;
}
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; min-height: auto; }
  .hero__mark { max-width: 380px; margin: 0 auto; }
}

/* ---------- Section base ---------- */
section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section-head {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px;
  margin-bottom: 64px; align-items: end;
}
.section-head .eyebrow { margin-bottom: 16px; display: inline-block; }
.section-head h2 { margin: 0; }
.section-head .lede { margin: 0; }
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- About ---------- */
.about { background: var(--cream); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.about__statement p { font-size: 19px; }
.about__statement p strong { color: var(--navy-deep); font-weight: 600; }
/* The three marks of the firm — diamond medallions joined by a hairline */
.about__marks {
  margin-top: clamp(64px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
  position: relative;
}
.about__marks::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 14%;
  right: 14%;
  height: 1px;
  background: var(--line);
}
.medallion__mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy);
  background: var(--cream);
  transform: rotate(45deg);
  position: relative;
  z-index: 1;
}
.medallion__mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(22, 74, 126, .35);
}
.medallion__mark span {
  transform: rotate(-45deg);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: .08em;
  color: var(--navy);
}
.medallion h3 { margin: 0 0 8px; }
.medallion p {
  margin: 0 auto;
  color: var(--gray-text);
  font-size: 16px;
  max-width: 300px;
}
@media (max-width: 800px) {
  .about__grid { grid-template-columns: 1fr; gap: 24px; }
  .about__marks { grid-template-columns: 1fr; gap: 48px; }
  .about__marks::before { display: none; }
}

/* ---------- Services ---------- */
.services { background: var(--cream-2); }
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.svc {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 36px 32px 32px;
  position: relative;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(22,74,126,.25); }
.svc__num {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--navy);
  margin-bottom: 18px;
}
.svc h3 { color: var(--navy-deep); margin-bottom: 10px; }
.svc p { color: var(--gray-text); margin: 0 0 22px; font-size: 16px; }
.svc__more {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex; gap: 8px; align-items: center;
}
.svc__more:hover { color: var(--navy-deep); }
@media (max-width: 900px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- Approach ---------- */
.approach { background: var(--navy-deep); color: rgba(255,255,255,.86); position: relative; overflow: hidden; }
.approach::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 400px at 10% 0%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(42,106,168,.35), transparent 60%);
  pointer-events: none;
}
.approach .wrap { position: relative; }
.approach .eyebrow { color: #B8D2EC; }
.approach .eyebrow::before { background: #B8D2EC; }
.approach h2 { color: var(--white); }
.approach .lede { color: rgba(255,255,255,.7); }
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 32px;
}
.principle h3 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
  font-size: 22px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.principle p { color: rgba(255,255,255,.72); font-size: 16px; margin: 8px 0 0; }
@media (max-width: 800px) { .principles { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Stats / proof strip ---------- */
.proof {
  background: var(--cream);
  padding: 80px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat__num {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px); color: var(--navy-deep); line-height: 1;
}
.stat__num--word {
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: .06em;
  padding-top: 10px;
}
.stat__label {
  font-family: var(--f-sans); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gray-text); margin-top: 12px;
}
@media (max-width: 700px) { .proof__grid { grid-template-columns: 1fr 1fr; row-gap: 36px; } }

/* ---------- Contact ---------- */
.contact { background: var(--cream); }
.contact__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
}
.contact-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 40px;
}
.contact-card h3 { color: var(--navy-deep); }
.contact-card a:hover { color: var(--navy); }
.contact-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border: 0; }
.contact-row .lbl {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gray-text); width: 88px; flex: none; padding-top: 4px;
}
.contact-row .val { font-family: var(--f-serif); font-size: 17px; color: var(--charcoal); }
.form-row { display: grid; gap: 6px; margin-bottom: 18px; }
.form-row label {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gray-text);
}
.form-row input, .form-row textarea {
  font-family: var(--f-serif); font-size: 16px; color: var(--charcoal);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-row input:focus, .form-row textarea:focus {
  border-bottom-color: var(--navy);
  box-shadow: 0 1px 0 0 var(--navy); /* thickens the underline so focus is clearly visible */
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-status { font-family: var(--f-sans); font-size: 13px; color: var(--gray-text); margin-top: 10px; }
@media (max-width: 800px) { .contact__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Footer ---------- */
footer.site {
  background: #0B2A4D;
  color: rgba(255,255,255,.7);
  padding: 80px 0 40px;
}
.footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer__brand img { height: 64px; width: auto; margin-bottom: 18px; }
.footer__brand p { font-family: var(--f-serif); font-style: italic; color: rgba(255,255,255,.6); max-width: 32ch; }
.footer__col h4 {
  font-family: var(--f-sans); font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.95); margin: 0 0 18px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { padding: 6px 0; font-family: var(--f-sans); font-size: 14px; }
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  font-family: var(--f-sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.62);
}
@media (max-width: 800px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 12px; }
}
@media (max-width: 480px) {
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
