:root {
  /* Royal Attorneys logo — shield / bar blue #004A8D, silver trim #A7A9AC, white */
  --brand: #004a8d;
  --brand-dark: #002f52;
  --brand-mid: #003a63;
  --brand-light: #3d86c9;
  --brand-pale: #e3ecf5;
  --silver: #a7a9ac;
  --silver-mid: #8d9094;
  --silver-pale: #d9dbde;

  /* Legacy names (used site-wide in templates) */
  --gold: var(--brand);
  --gold-light: var(--brand-light);
  --gold-pale: var(--brand-pale);
  --navy: var(--brand-dark);
  --navy-mid: var(--brand-mid);
  --navy-light: var(--brand);
  --cream: #f5f8fb;
  --cream-dark: #e8edf2;
  --text-dark: #102a40;
  --text-mid: #3d5166;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(0, 47, 82, 0.14);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Jost', sans-serif; background: var(--cream); color: var(--text-dark); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ─── TYPOGRAPHY ─── */
.serif { font-family: 'Cormorant Garamond', serif; }
h1,h2,h3 { font-family: 'Cormorant Garamond', serif; }

/* ─── UTILITIES ─── */
.gold-line { display: inline-block; width: 50px; height: 1px; background: var(--gold); vertical-align: middle; margin: 0 10px; }
.section-eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; margin-bottom: 16px; }
.section-center { text-align: center; }
.section-center .section-eyebrow { justify-content: center; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 60px; }
.section-pad { padding: 110px 0; }
.section-pad-sm { padding: 70px 0; }

/* ─── BUTTONS ─── */
.btn-gold { display: inline-flex; align-items: center; gap: 12px; background: var(--gold); color: var(--white); font-size: 10px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; padding: 17px 36px; transition: all .3s; border: none; cursor: pointer; font-family: 'Jost', sans-serif; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,74,141,.35); }
.btn-outline { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--gold); color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; padding: 15px 32px; transition: all .3s; }
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-outline-white { border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.8); }
.btn-outline-white:hover { border-color: var(--gold); background: var(--gold); color: var(--white); }
.btn-arrow::after { content: '→'; margin-left: 4px; }

/* ─── NAV ─── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center; padding: 0 50px; height: 78px; transition: all .4s; }
nav.scrolled { background: rgba(0,47,82,.97); backdrop-filter: blur(14px); height: 66px; box-shadow: 0 4px 40px rgba(0,0,0,.3); }
nav.dark-nav { background: rgba(0,47,82,.97); }

.nav-logo { display: flex; align-items: center; gap: 0; flex-shrink: 0; }

/* Navy logo on dark bar: light chip so shield + type stay visible (until you use a transparent PNG). */
.nav-logo-surface {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  padding: 5px 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav-logo:hover .nav-logo-surface {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}
.nav-logo-img {
  height: 52px;
  width: auto;
  max-width: min(280px, 46vw);
  object-fit: contain;
  display: block;
}
nav.scrolled .nav-logo-img { height: 44px; }
.nav-logo-img--footer { height: 60px; max-width: 300px; }

.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links > li { position: relative; }
.nav-links > li > a { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.75); padding: 8px 14px; transition: color .3s; }
.nav-links > li > a:hover { color: var(--gold); }
.drop-arrow { font-size: 8px; opacity: .7; }

/* Invisible bridge so pointer can reach the menu without leaving the li (fixes hover flicker) */
.has-dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  display: none;
}
@media (min-width: 1101px) {
  .has-dropdown::after { display: block; }
}

.dropdown { display: none; position: absolute; top: calc(100% + 14px); left: 0; background: var(--navy-mid); border-top: 2px solid var(--gold); min-width: 220px; box-shadow: 0 20px 50px rgba(0,0,0,.4); z-index: 200; }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
@media (min-width: 1101px) {
  .has-dropdown.submenu-open .dropdown { display: block; }
}
@media (min-width: 1101px) and (hover: none) {
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.submenu-open .dropdown,
  .has-dropdown:focus-within .dropdown { display: block; }
}
.dropdown li a { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.65); padding: 13px 20px; transition: all .2s; border-bottom: 1px solid rgba(255,255,255,.05); }
.dropdown li a:hover { color: var(--gold); padding-left: 26px; background: rgba(0,74,141,.06); }

.nav-cta { border: 1px solid var(--gold) !important; color: var(--gold) !important; padding: 10px 24px !important; transition: all .3s !important; letter-spacing: 2px !important; }
.nav-cta:hover { background: var(--gold) !important; color: var(--white) !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px,4.5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px,-4.5px); }

/* ─── PAGE HERO (internal pages) ─── */
.page-hero { background: var(--navy); padding: 160px 0 90px; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 100% at 80% 50%, rgba(0,74,141,.45) 0%, transparent 70%); }
.page-hero-geo { position: absolute; right: 0; top: 0; bottom: 0; width: 45%; opacity: .1; }
.page-hero-geo svg { width: 100%; height: 100%; }
.page-hero > .container { position: relative; z-index: 2; }
.page-hero > .container > .page-hero-content {
  max-width: 38rem;
  margin: 0;
  text-align: left;
  position: relative;
}
.page-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(40px,5vw,70px); font-weight: 300; color: var(--white); line-height: 1.1; margin-bottom: 20px; }
.page-hero h1 em { font-style: italic; color: var(--gold); }
.page-hero p { font-size: 15px; color: rgba(255,255,255,.55); line-height: 1.8; max-width: 100%; font-weight: 300; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.35); margin-bottom: 24px; }
.breadcrumb a { color: var(--gold); }
.breadcrumb span { opacity: .4; }

/* ─── FOOTER ─── */
footer { background: #001a2e; border-top: 1px solid rgba(167,169,172,.22); }
.footer-main { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1.4fr; gap: 50px; padding: 80px 0 60px; }
.footer-brand .nav-logo { margin-bottom: 4px; }
.footer-brand p { font-size: 12.5px; color: rgba(255,255,255,.3); line-height: 1.9; font-weight: 300; margin-top: 16px; max-width: 260px; }
.footer-col h4 { font-size: 9.5px; letter-spacing: 3.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a { font-size: 12.5px; color: rgba(255,255,255,.38); font-weight: 300; transition: color .3s; letter-spacing: .3px; }
.footer-col ul a:hover { color: var(--gold); }
.footer-newsletter h4 { font-size: 9.5px; letter-spacing: 3.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer-newsletter p { font-size: 12px; color: rgba(255,255,255,.3); line-height: 1.7; margin-bottom: 18px; font-weight: 300; }
.newsletter-form { display: flex; }
.newsletter-form input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(0,74,141,.2); border-right: none; color: var(--white); padding: 12px 16px; font-family: 'Jost', sans-serif; font-size: 12px; outline: none; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.2); }
.newsletter-form button { background: var(--gold); border: none; color: var(--white); padding: 12px 20px; font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 700; cursor: pointer; letter-spacing: 1px; transition: background .3s; }
.newsletter-form button:hover { background: var(--gold-light); }
.footer-socials { display: flex; gap: 10px; margin-top: 20px; }
.social-btn { width: 36px; height: 36px; border: 1px solid rgba(0,74,141,.25); display: flex; align-items: center; justify-content: center; transition: all .3s; }
.social-btn:hover { border-color: var(--gold); background: rgba(0,74,141,.1); }
.social-btn svg { width: 14px; height: 14px; stroke: rgba(255,255,255,.45); fill: none; stroke-width: 1.5; transition: stroke .3s; }
.social-btn:hover svg { stroke: var(--gold); }
.footer-bottom-bar { border-top: 1px solid rgba(255,255,255,.05); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom-bar p { font-size: 11px; color: rgba(255,255,255,.2); letter-spacing: .4px; }
.footer-bottom-bar a { color: rgba(200,210,225,.9); transition: color .3s; }
.footer-bottom-bar a:hover { color: var(--gold); }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity .8s ease, transform .8s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.d1 { transition-delay: .12s; } .d2 { transition-delay: .24s; } .d3 { transition-delay: .36s; } .d4 { transition-delay: .48s; } .d5 { transition-delay: .60s; }

/* ─── CARDS ─── */
.card-hover { transition: transform .35s, box-shadow .35s; }
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* ─── GOLD DIVIDER ─── */
.gold-divider { width: 60px; height: 2px; background: var(--gold); margin: 0 auto 30px; }
.gold-divider-left { margin-left: 0; }

/* ─── RESPONSIVE ─── */
@media (max-width:1100px) { .container { padding: 0 36px; } nav { padding: 0 36px; } .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) {
  .has-dropdown::after { display: none; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-mid); flex-direction: column; padding: 20px; gap: 4px; border-top: 1px solid rgba(0,74,141,.2); align-items: stretch; max-height: min(70vh, calc(100dvh - 78px)); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links > li > a { padding: 12px 16px; }
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { display: none; }
  .dropdown {
    position: static;
    display: none;
    top: auto;
    left: auto;
    min-width: 0;
    width: 100%;
    margin: 0 0 4px 0;
    padding: 0 0 0 8px;
    border-top: none;
    border-left: 2px solid var(--gold);
    box-shadow: none;
    background: rgba(0,0,0,.15);
  }
  .has-dropdown.submenu-open .dropdown { display: block; }
  .has-dropdown.submenu-open > a { color: var(--gold); }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  .container { padding: 0 24px; max-width: 100%; }
  .section-pad { padding: 70px 0; }
  .section-pad-sm { padding: 48px 0; }
  .footer-main { grid-template-columns: 1fr; }
  nav { padding: 0 24px; }
  .page-hero { padding: 120px 0 56px; }
  .page-hero h1 { font-size: clamp(32px, 8vw, 54px); word-wrap: break-word; }
  .page-hero p { font-size: 14px; max-width: 100%; }
  .breadcrumb { flex-wrap: wrap; row-gap: 6px; }
  .footer-bottom-bar { flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; }
  .footer-bottom-bar p { max-width: 100%; line-height: 1.5; }
  .newsletter-form { flex-direction: column; gap: 0; }
  .newsletter-form input { border-right: 1px solid rgba(0,74,141,.2); border-bottom: 1px solid rgba(0,74,141,.2); }
  .newsletter-form button { width: 100%; }
  .btn-gold, .btn-outline, .btn-outline-white { justify-content: center; max-width: 100%; box-sizing: border-box; }
}
@media (max-width: 480px) {
  .nav-logo-img { height: 44px; max-width: min(240px, 58vw); }
  nav.scrolled .nav-logo-img { height: 40px; }
  .nav-logo-img--footer { height: 50px; max-width: min(260px, 75vw); }
  .nav-logo { min-width: 0; }
  .nav-logo-surface { border-radius: 3px; }
}

/* ─── Back to top ─── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1010;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0, 74, 141, 0.35);
  background: var(--white);
  color: var(--gold);
  box-shadow: 0 12px 40px rgba(0, 47, 82, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s, background 0.25s, color 0.25s, border-color 0.25s;
}
.back-to-top:not(.is-visible) {
  pointer-events: none;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (max-width: 768px) {
  .back-to-top {
    bottom: 22px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}
