:root {
  --navy: #16224c;
  --navy-light: #1f2f63;
  --gold: #2c56d6;
  --gold-light: #4d74e6;
  --grey-text: #5b5f6b;
  --bg-light: #f3f5fa;
  --white: #ffffff;
  --border: #e4e7ef;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--grey-text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.3px;
}

h2 { font-size: 2.1rem; margin-bottom: 14px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--navy); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
}

.section { padding: 96px 0; }
.section-heading { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-heading.light .eyebrow { color: #a9bdf2; }
.section-heading.light h2 { color: var(--white); }
.section-heading.light .section-intro { color: #c7cddb; }
.section-intro { font-size: 1.02rem; margin-top: 10px; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: #1c3aa0; }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  padding: 22px 0;
}
.site-header.scrolled {
  background: var(--navy);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { position: relative; display: inline-flex; align-items: center; height: 88px; transition: height 0.25s ease; }
.logo-img { height: 88px; width: auto; display: block; transition: height 0.25s ease; }
@media (min-width: 961px) {
  .site-header.scrolled .logo, .site-header.scrolled .logo-img { height: 66px; }
}
.logo-img-light { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.25s ease; }
.logo-img-dark { transition: opacity 0.25s ease; }
.site-header.scrolled .logo-img-dark { opacity: 0; }
.site-header.scrolled .logo-img-light { opacity: 1; }

.main-nav > ul { display: flex; gap: 30px; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  transition: color 0.2s;
}
.site-header.scrolled .main-nav a { color: var(--white); }
.main-nav a:hover { color: var(--gold); }

.has-dropdown { position: relative; }
.dropdown {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 260px;
  max-width: 300px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: 9px 20px; color: var(--navy) !important; font-size: 0.85rem; }
.dropdown li a:hover { background: var(--bg-light); color: var(--gold) !important; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone { font-weight: 600; font-size: 1.1rem; color: var(--navy); }
.site-header.scrolled .header-phone { color: var(--white); }

.nav-toggle { display: none; flex-direction: column; gap: 6px; padding: 6px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 30px; height: 3px; background: var(--navy); }
.site-header.scrolled .nav-toggle span { background: var(--white); }

/* ===== HERO ===== */
.hero { padding: 60px 0 0; background: var(--white); scroll-margin-top: 90px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  padding-bottom: 50px;
}
.hero-copy { text-align: center; }
.hero-copy h1 {
  font-size: 3rem;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.hero-overlay { height: 100%; display: flex; align-items: center; }
.hero-summary { max-width: 410px; }
.hero-summary p { font-size: 1.05rem; line-height: 1.65; color: #eef1f8; margin-bottom: 24px; text-shadow: 0 1px 14px rgba(16,28,51,0.55); }

.hero-visual {
  height: 420px;
  background: linear-gradient(120deg, rgba(16,28,51,0.82), rgba(22,34,76,0.5)), url('../img/gavel-scales.jpg') center 38%/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.hero-visual-inner { position: relative; height: 100%; z-index: 2; }

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: var(--white);
  padding: 38px 30px;
  transition: background 0.2s ease;
}
.service-card:hover { background: var(--bg-light); }
.service-index { font-family: var(--font-heading); font-size: 1.6rem; color: var(--gold); display: block; margin-bottom: 10px; }
.service-card p { font-size: 0.92rem; margin-bottom: 14px; }
.card-link { font-weight: 600; font-size: 0.85rem; color: var(--navy); }
.card-link:hover { color: var(--gold); }
.service-card-cta { background: var(--navy); color: var(--white); }
.service-card-cta h3 { color: var(--white); }
.service-card-cta p { color: #c7cddb; }

/* ===== STATS BAND ===== */
.stats-band { background: linear-gradient(120deg, rgba(16,28,51,0.93), rgba(22,34,76,0.9)), url('../img/law-books-shelf.jpg') center 25%/cover no-repeat; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
  margin-top: 20px;
}
.stat .stat-number, .stat .stat-suffix {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--gold);
}
.stat p { color: #c7cddb; margin-top: 8px; font-size: 0.92rem; }

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.feature { border-top: 3px solid var(--gold); padding-top: 18px; }
.feature p { font-size: 0.92rem; }

/* ===== HERITAGE ===== */
.heritage-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.heritage-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center 15%;
  mix-blend-mode: luminosity;
  filter: contrast(1.08) brightness(0.92);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 18%, #000 82%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.heritage-copy p:not(.eyebrow) { font-size: 1.02rem; }
.heritage { background: var(--navy); padding: 56px 0; }
.heritage .eyebrow { color: #a9bdf2; }
.heritage h2 { color: var(--white); }
.heritage-copy p:not(.eyebrow) { color: #c7cddb; }

/* ===== ABOUT ===== */
.about { background: var(--bg-light); scroll-margin-top: 90px; }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.about-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
}
.principles-list { margin-top: 24px; }
.principles-list li {
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.95rem;
}
.principles-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.principles-list strong { color: var(--navy); }
.btn-spaced { margin-top: 24px; }

/* ===== TABS ===== */
.practice-areas { scroll-margin-top: 90px; }
.tab-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.tab-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-text);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover { border-color: var(--gold); color: var(--navy); }
.tab-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tab-panel { display: none; max-width: 720px; margin: 0 auto; text-align: center; }
.tab-panel.active { display: block; }
.tab-panel p { font-size: 1rem; margin-bottom: 16px; }
.tab-panel .card-link { display: inline-block; }

/* ===== CTA BAND ===== */
.cta-band { background: linear-gradient(120deg, var(--navy), #26365c); padding: 70px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-inner h2 { color: var(--white); max-width: 560px; font-size: 1.7rem; margin-bottom: 0; }

/* ===== TESTIMONIALS ===== */
.testimonial-carousel { position: relative; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.4s ease; }
.testimonial-card {
  min-width: 100%;
  background: var(--bg-light);
  padding: 44px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 16px; }
.testimonial-card p { font-size: 1.05rem; font-style: italic; color: var(--navy); margin-bottom: 16px; }
.testimonial-card cite { font-style: normal; font-weight: 600; font-size: 0.85rem; color: var(--grey-text); }
.testimonial-controls { display: flex; justify-content: center; gap: 14px; margin-top: 20px; }
.testimonial-controls button {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.testimonial-controls button:hover { border-color: var(--gold); color: var(--gold); }
.testimonial-note { text-align: center; font-size: 0.85rem; margin-top: 18px; }
.testimonial-note a { color: var(--navy); font-weight: 600; }
.testimonial-note a:hover { color: var(--gold); }
.google-rating { margin-top: 14px; font-size: 0.95rem; color: var(--navy); }
.google-rating .stars-inline { color: var(--gold); letter-spacing: 2px; }
.stat-static { letter-spacing: -1px; }

/* ===== FOOTER ===== */
.site-footer { background: var(--navy); color: #c7cddb; }
.footer-top { text-align: center; padding: 70px 0 40px; }
.footer-logo { height: 140px; width: auto; margin: 0 auto 28px; }
.footer-top h2 { color: var(--white); font-size: 1.8rem; max-width: 760px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-col h3 { color: var(--white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col p, .footer-col a { font-size: 0.9rem; color: #c7cddb; }
.footer-col a:hover { color: var(--gold); }
.footer-col ul li { margin-bottom: 10px; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.social-links a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0; font-size: 0.8rem; }
.footer-bottom-row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.footer-badge { height: 84px; width: auto; }
.footer-disclaimer { font-size: 0.72rem; color: #9aa5c0; text-align: center; max-width: 640px; line-height: 1.5; }

/* ===== POLICY / LEGAL PAGES ===== */
.policy-hero { padding: 160px 0 50px; background: var(--bg-light); text-align: center; }
.policy-hero h1 { font-size: 2.3rem; max-width: 700px; margin: 0 auto; }
.policy-hero .eyebrow { justify-content: center; }
.policy-hero .policy-updated { margin-top: 12px; font-size: 0.85rem; color: var(--grey-text); }
.policy-page { padding: 64px 0 110px; }
.policy-container { max-width: 800px; margin: 0 auto; padding: 0 32px; }
.policy-body h2 { font-size: 1.35rem; margin-top: 52px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.policy-body h2:first-child { margin-top: 0; }
.policy-body h3 { font-size: 1.02rem; margin-top: 26px; color: var(--gold); }
.policy-body p { font-size: 0.97rem; margin-bottom: 14px; }
.policy-body ul { margin: 0 0 16px 22px; }
.policy-body ul li { list-style: disc; font-size: 0.96rem; margin-bottom: 8px; padding-left: 4px; }
.policy-body a { color: var(--gold); text-decoration: underline; }
.policy-body strong { color: var(--navy); }
.policy-meta { margin-top: 60px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: #9aa0aa; text-align: center; line-height: 1.7; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 10px 0; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: 0 32px; }
  .main-nav ul li { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .main-nav a { display: block; padding: 14px 0; color: var(--white); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; background: rgba(255,255,255,0.05); }
  .has-dropdown:hover .dropdown { display: block; }
  .dropdown li a { color: var(--white) !important; }
  .nav-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { height: auto; min-height: 420px; display: flex; align-items: center; padding: 48px 0; background: linear-gradient(rgba(16,28,51,0.8), rgba(16,28,51,0.8)), url('../img/gavel-scales.jpg') center 38%/cover no-repeat; }
  .hero-visual-inner { width: 100%; height: auto; }
  .hero-overlay { height: auto; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .heritage-grid { grid-template-columns: 1fr; }
  .heritage-visual { order: -1; max-width: 520px; margin: 0 auto; }
  .about-visual { max-width: 400px; margin: 0 auto; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.2rem !important; }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* ===== DESKTOP NAV ===== */
@media (min-width: 961px) {
  .header-inner { justify-content: flex-start; gap: 0; }
  .main-nav { margin-left: auto; }
  .main-nav > ul { gap: 26px; }
  .main-nav > ul > li > a { position: relative; display: block; padding: 14px 0; font-size: 1rem; font-weight: 600; letter-spacing: 0.2px; }
  .main-nav > ul > li > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease; }
  .main-nav > ul > li:hover > a::after { transform: scaleX(1); }
  .header-actions { margin-left: 24px; padding-left: 24px; border-left: 1px solid rgba(22,34,76,0.18); }
  .site-header.scrolled .header-actions { border-left-color: rgba(255,255,255,0.3); }
  .dropdown { min-width: 320px; max-width: 360px; }
  .dropdown li a { font-size: 0.92rem; padding: 10px 22px; }
}
@media (min-width: 961px) and (max-width: 1099px) {
  .main-nav > ul { gap: 22px; }
  .header-actions { margin-left: 18px; padding-left: 18px; }
}
@media (min-width: 1200px) {
  .main-nav > ul { gap: 40px; }
  .main-nav > ul > li > a { font-size: 1.05rem; }
  .header-actions { margin-left: 36px; padding-left: 36px; }
}

/* ===== DESKTOP FOOTER TOP ===== */
@media (min-width: 961px) {
  .footer-top { display: flex; align-items: center; justify-content: center; gap: 56px; text-align: left; padding-left: 32px; padding-right: 32px; }
  .footer-logo { margin: 0; flex-shrink: 0; }
  .footer-top h2 { margin: 0; flex: 0 1 640px; min-width: 0; font-size: 1.6rem; padding-left: 56px; border-left: 1px solid rgba(255,255,255,0.22); }
}
@media (min-width: 961px) and (max-width: 1199px) {
  .footer-top { gap: 32px; }
  .footer-logo { height: 110px; }
  .footer-top h2 { padding-left: 32px; font-size: 1.4rem; }
}

/* ===== DESKTOP HERO PHOTO ===== */
@media (min-width: 961px) {
  .hero-visual { height: 420px; background: linear-gradient(120deg, #101c33, #16224c); }
  .hero-visual::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: min(216.5%, calc((100vw - 410px) * 1.2636));
    aspect-ratio: 1365 / 1169;
    transform: translateY(-34.2%);
    background: url('../img/gavel-scales.jpg') center / 100% 100% no-repeat;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
    mask-image: linear-gradient(to right, transparent 0, #000 30%);
  }
  .hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(16,28,51,0.8), rgba(22,34,76,0.45)); }
  .hero-visual-inner { z-index: 2; }
}
@media (min-width: 961px) and (max-width: 1279px) {
  .hero-summary { max-width: 340px; }
  .hero-summary p { font-size: 1rem; }
}

/* ===== MOBILE HEADER + TABS ===== */
.logo, .logo-img { flex-shrink: 0; max-width: none; }
.header-phone { white-space: nowrap; }
@media (max-width: 960px) {
  .header-inner { gap: 12px; }
  .header-actions { gap: 14px; }
  .logo, .logo-img { height: 96px; }
  .header-phone { font-size: 1.05rem; }
}
@media (max-width: 640px) {
  .site-header { padding: 14px 0; }
  .site-header .container { padding: 0 16px; }
  .logo, .logo-img { height: clamp(46px, 15vw, 76px); }
  .header-actions { gap: 8px; }
  .header-phone { font-size: clamp(0.78rem, 3.7vw, 1rem); }
  .nav-toggle { padding: 4px; }
  .nav-toggle span { width: 28px; }
  .footer-logo { height: 90px; }
  .tab-list { flex-direction: column; align-items: stretch; gap: 8px; }
  .tab-btn { width: 100%; text-align: center; }

  .heritage { padding: 44px 0; }
  .footer-bottom-row { flex-direction: column; gap: 14px; text-align: center; }
  .footer-badge { height: 72px; }
  .footer-bottom-row p span { display: block; }

  /* centre content on phones */
  .hero-copy, .hero-summary, .service-card, .feature, .heritage-copy, .about-copy, .footer-col { text-align: center; }
  .hero-copy h1 { margin-left: auto; margin-right: auto; }
  .hero-summary { margin-left: auto; margin-right: auto; }
  .service-card .btn, .hero-summary .btn { display: block; max-width: 320px; margin-left: auto; margin-right: auto; }
  .service-card-cta .btn { margin-top: 6px; }
  .about-copy .btn-spaced { display: block; max-width: 320px; margin-left: auto; margin-right: auto; }
  .principles-list { text-align: left; }
  .cta-inner .btn { width: 100%; max-width: 320px; }
}
