/* =========================================================
   LEE FERRAO & CO. — DESIGN SYSTEM
   Palette:  navy 950 #081226 · navy 900 #0B1E3D · navy 800 #132A4C
             navy 700 #1E3A63 · gold #D9A928 · gold soft #F3CF6B
             off-white #F6F7FA · ink #1A2233 · brand blue #17375E
   Type:     Fraunces (display) / Inter (body) / IBM Plex Mono (ledger data)
   Signature motif: the "ledger rule" — a thin gold double underline,
   plus tabular, right-aligned figures, echoing an accountant's ledger.
   ========================================================= */

:root {
  --navy-950: #081226;
  --navy-900: #0B1E3D;
  --navy-800: #132A4C;
  --navy-700: #1E3A63;
  --navy-600: #2C4A78;
  --gold: #D9A928;
  --gold-soft: #F3CF6B;
  --off-white: #F6F7FA;
  --ink: #1A2233;
  --ink-soft: #5B6478;
  --brand-blue: #17375E;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
}

.text-ink { color: var(--ink); }

#top,
#about,
#services,
#gallery,
#reviews,
#contact {
  scroll-margin-top: 88px;
}

/* ---------- Typography helpers ---------- */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- Ledger rule — the signature element ---------- */
/* A thin gold rule with a fainter twin beneath it, exactly like the
   double-underline an accountant draws beneath a final total. */
.ledger-rule {
  position: relative;
  display: block;
  width: 64px;
  height: 10px;
  margin-top: 0.9rem;
}
.ledger-rule::before,
.ledger-rule::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
}
.ledger-rule::before { top: 0; }
.ledger-rule::after   { top: 6px; opacity: 0.45; }

.ledger-rule--center { margin-left: auto; margin-right: auto; }
.ledger-rule--light::before,
.ledger-rule--light::after { background: var(--gold-soft); }

/* Ledger figure: tabular numerals, right-aligned, mono */
.ledger-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-gold {
  background: linear-gradient(180deg, #F6D56D 0%, #D9A928 100%);
  color: var(--navy-950);
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: 0 10px 24px rgba(217,169,40,0.22), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-gold:hover {
  background: linear-gradient(180deg, #FFE28A 0%, #E7B936 100%);
  box-shadow: 0 12px 30px rgba(217,169,40,0.34), inset 0 1px 0 rgba(255,255,255,0.56);
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff;
  background: transparent;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-soft); }

.btn-outline-dark {
  border: 1px solid var(--navy-700);
  color: var(--navy-900);
  background: transparent;
}
.btn-outline-dark:hover { border-color: var(--gold); color: var(--navy-900); background: var(--off-white); }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* =========================================================
   HEADER / HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  background-color: var(--navy-950); /* shows while image loads / if missing */
  background-image:
    linear-gradient(90deg, rgba(8,18,38,0.72) 0%, rgba(8,18,38,0.5) 42%, rgba(8,18,38,0.24) 100%),
    url("../images/header/leeintro1.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23,55,94,0.94);
  color: #fff;
  box-shadow: 0 1px 0 rgba(201,162,75,0.2);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav.is-scrolled {
  background: rgba(23,55,94,0.88);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(201,162,75,0.25);
}

.hero__content {
  flex: 1;
  display: flex;
  align-items: center;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.3vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero__brand em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-soft);
}

.nav-link {
  position: relative;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--gold-soft); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

/* Mobile nav panel */
#mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-nav.open { max-height: 420px; }

/* ---------- Ledger stat strip (hero bottom) ---------- */
.stat {
  border-left: 1px solid rgba(201,162,75,0.35);
  padding-left: 1.1rem;
}
.stat__figure {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-figure {
  aspect-ratio: 4 / 5.1;
  background: var(--navy-800) url("../images/about/lee.jpg") center/cover no-repeat;
  position: relative;
}
.about-figure::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201,162,75,0.55);
  pointer-events: none;
}

.about-section { padding: clamp(5.5rem, 9vw, 8rem) 0 clamp(2.5rem, 4vw, 4rem); background: #fff; }
.about-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 8vw, 7.5rem); align-items: center; }
.about-media { position: relative; padding: 0 1.5rem 1.5rem 0; }
.about-media__note { position: absolute; right: 0; bottom: 0; width: min(13.5rem, 58%); padding: 1.35rem 1.45rem; background: var(--navy-900); color: #fff; border-top: 3px solid var(--gold); }
.about-media__note span { display: block; color: var(--gold-soft); font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; }
.about-media__note strong { display: block; margin-top: 0.15rem; font-family: var(--font-display); font-size: 2.35rem; font-weight: 500; line-height: 1; }
.about-media__note p { margin: 0.55rem 0 0; color: rgba(255,255,255,0.62); font-size: 0.75rem; line-height: 1.45; }
.about-copy h2 { max-width: 12ch; margin: 0.7rem 0 0; color: var(--navy-900); font-size: clamp(2.2rem, 3.7vw, 3.8rem); font-weight: 500; line-height: 1.06; letter-spacing: 0; }
.about-copy__body { max-width: 38rem; margin-top: 2rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.8; }
.about-copy__body p { margin: 0; }
.about-copy__body p + p { margin-top: 1rem; }
.about-copy__cta { margin-top: 2.25rem; }
.practice-areas { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(4.5rem, 8vw, 7rem); padding-top: 2rem; border-top: 1px solid #dfe3eb; }
.practice-areas__intro h3 { margin: 0.65rem 0 0; color: var(--navy-900); font-size: clamp(1.8rem, 2.6vw, 2.55rem); font-weight: 500; line-height: 1.12; }
.practice-areas__intro > p:last-child { max-width: 20rem; margin: 1rem 0 0; color: var(--ink-soft); line-height: 1.6; }
.practice-areas__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid #dfe3eb; border-left: 1px solid #dfe3eb; }
.practice-areas__list li { display: flex; gap: 0.9rem; min-height: 7.75rem; padding: 1.45rem; border-right: 1px solid #dfe3eb; border-bottom: 1px solid #dfe3eb; transition: background-color 0.2s ease; }
.practice-areas__list li:hover { background: var(--off-white); }
.practice-areas__list li > span { color: var(--gold); font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.6; }
.practice-areas__list h4 { margin: 0; color: var(--navy-900); font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; line-height: 1.2; }
.practice-areas__list p { margin: 0.5rem 0 0; color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.02em; line-height: 1.45; }
.practice-areas__list li:last-child { grid-column: span 2; }
@media (max-width: 860px) { .about-layout, .practice-areas { grid-template-columns: 1fr; } .about-copy h2 { max-width: 14ch; } .practice-areas { gap: 2rem; } }
@media (max-width: 560px) { .about-section { padding: 5rem 0 2.5rem; } .about-media { padding-right: 0.8rem; padding-bottom: 0.8rem; } .about-media__note { padding: 1rem 1.1rem; } .about-media__note strong { font-size: 1.85rem; } .practice-areas__list { grid-template-columns: 1fr; } .practice-areas__list li:last-child { grid-column: span 1; } .practice-areas__list li { min-height: auto; padding: 1.25rem; } }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-section {
  background: #fff;
  padding: clamp(2rem, 3.5vw, 3.5rem) 0 clamp(5rem, 8vw, 7.5rem);
}

.gallery-shell {
  width: min(78vw, 1500px);
  margin: 0 auto;
}

.gallery-intro {
  max-width: 42rem;
  margin: 0 auto 2.25rem;
  text-align: center;
}

.gallery-intro h2 {
  margin: 0.6rem 0 0;
  color: var(--navy-900);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.08;
}

.gallery-masonry {
  column-count: 3;
  column-gap: 20px;
}

.gallery-item {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  overflow: hidden;
  background: #f3f5f7;
  cursor: pointer;
  break-inside: avoid;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-item__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.9rem 1rem 0.7rem;
  background: linear-gradient(0deg, rgba(8,18,38,0.85), rgba(8,18,38,0));
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.gallery-item:hover .gallery-item__caption {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .gallery-shell { width: min(88vw, 920px); }
  .gallery-masonry { column-count: 2; }
}
@media (max-width: 560px) {
  .gallery-shell { width: calc(100% - 2rem); }
  .gallery-masonry { column-count: 1; column-gap: 0; }
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(4,9,20,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 100;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(201,162,75,0.4);
}
.lightbox__close {
  position: absolute;
  top: 1.5rem; right: 1.8rem;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  background: none; border: none;
  cursor: pointer;
  font-weight: 300;
}
.lightbox__close:hover { color: var(--gold-soft); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--brand-blue);
  color: rgba(255,255,255,0.75);
}
.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.footer-link { transition: color 0.2s ease; }
.footer-link:hover { color: var(--gold-soft); }

.contact-section {
  background: #fff;
  padding: clamp(4rem, 7vw, 6.5rem) 0;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  color: var(--ink);
}
.contact-panel .footer-heading { color: var(--gold); }
.contact-panel__copy h2 {
  margin: 0.8rem 0 0;
  color: var(--navy-900);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 500;
  line-height: 1.05;
}
.contact-panel__copy p:last-child {
  max-width: 24rem;
  margin: 1.2rem 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}
.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 600;
}
.contact-form label:last-child { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  background: #f8f9fa;
  color: var(--ink);
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  background: #fff;
}
.contact-form__submit { margin-top: 1.2rem; }
.contact-form .btn { border-radius: 999px; }

.social-icon {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.social-icon:hover { border-color: var(--gold); color: var(--gold-soft); }

/* Reveal-on-scroll (used by main.js via IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Google-style reviews ---------- */
.reviews-section { padding: clamp(5rem, 8vw, 7rem) 0; background: #f8f9fa; color: #202124; }
.reviews-header { display: flex; align-items: end; justify-content: space-between; gap: 2.5rem; }
.reviews-header__copy { max-width: 41rem; }
.reviews-header__copy .eyebrow { color: #5f6368; }
.reviews-header__copy h2 { margin: 0.7rem 0 0; color: #202124; font-size: clamp(2.2rem, 3.8vw, 3.8rem); font-weight: 500; line-height: 1.06; letter-spacing: 0; }
.reviews-header__copy > p:last-child { max-width: 35rem; margin: 1.4rem 0 0; color: #5f6368; font-size: 1.03rem; line-height: 1.7; }
.reviews-widget { margin-top: 2.5rem; }
@media (max-width: 700px) { .reviews-header { align-items: stretch; flex-direction: column; } }

@media (max-width: 760px) {
  .contact-panel,
  .contact-form__grid {
    grid-template-columns: 1fr;
  }
}
