/* CMH Lawyers — Brand Stylesheet
   Navy #0F233C | Gold #C9A84C | Cormorant Garamond (display) | Inter (body)
   Mobile-first, no frameworks */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0F233C;
  --navy-light: #162D4A;
  --gold: #C9A84C;
  --gold-hover: #B8953F;
  --white: #FFFFFF;
  --off-white: #F7F6F3;
  --grey-light: #E8E6E1;
  --grey-mid: #6B7280;
  --grey-dark: #374151;
  --text: #1F2937;
  --font-display: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1140px;
  --gap: 1.5rem;
}

html { font-size: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin-bottom: 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

/* ── Layout ── */
.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }

/* ── Header ── */
.site-header {
  background: var(--navy);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-logo:hover { color: var(--gold); }

.site-logo span { color: var(--gold); }

.header-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.header-cta:hover { background: var(--gold-hover); color: var(--navy); }

/* ── Navigation ── */
.site-nav { width: 100%; margin-top: 0.5rem; }

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

/* ── Hero ── */
.page-hero {
  background: var(--navy);
  padding: 3rem 0 2.5rem;
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
  font-size: 2rem;
  max-width: 680px;
}

.page-hero .tagline {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  margin-top: 0.75rem;
}

.hero-cta {
  display: inline-block;
  margin-top: 1.25rem;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.hero-cta:hover { background: var(--gold-hover); color: var(--navy); }

/* ── Main Content ── */
.page-content {
  padding: 2.5rem 0;
}

.page-content h2 { border-bottom: 2px solid var(--gold); padding-bottom: 0.35rem; }

.content-body { max-width: 780px; }

/* Mid-page CTA */
.mid-cta {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  border-radius: 0 4px 4px 0;
}

.mid-cta p { margin-bottom: 0.75rem; }

.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn-gold:hover { background: var(--gold-hover); color: var(--navy); }

/* ── Internal links ── */
.related-pages {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--off-white);
  border-radius: 6px;
}

.related-pages h3 { margin-top: 0; color: var(--navy); }

.related-pages ul { list-style: none; padding: 0; }

.related-pages li { margin-bottom: 0.5rem; }

.related-pages a {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── FAQ ── */
.faq-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-light);
}

.faq-section h2 { border-bottom: none; }

.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--grey-light);
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-item h3 {
  margin-top: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
}

.faq-item p { color: var(--grey-dark); margin-top: 0.4rem; }

/* ── Contact CTA ── */
.contact-cta {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 6px;
  text-align: center;
}

.contact-cta h2 {
  color: var(--white);
  border-bottom: none;
  margin-top: 0;
}

.contact-cta p { color: rgba(255,255,255,0.85); margin-bottom: 1rem; }

.contact-cta .btn-gold { font-size: 1.05rem; }

.contact-cta .email-link {
  display: block;
  margin-top: 0.75rem;
  color: var(--gold);
  font-size: 0.95rem;
}

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 3rem;
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
}

.footer-nap h4 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer-nap address {
  font-style: normal;
  line-height: 1.8;
}

.footer-nap a { color: var(--gold); }

.footer-links h4 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.footer-links ul { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin-bottom: 0.3rem; }

.footer-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover { color: var(--gold); }

.footer-legal {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  grid-column: 1 / -1;
}

.footer-legal a { color: rgba(255,255,255,0.5); }

/* ── Responsive ── */
@media (min-width: 640px) {
  h1 { font-size: 2.4rem; }
  .page-hero { padding: 4rem 0 3rem; }
  .page-hero h1 { font-size: 2.5rem; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { width: auto; margin-top: 0; margin-left: auto; margin-right: 1.5rem; }
  .site-nav ul { gap: 0.15rem; }
  .site-nav a { font-size: 0.82rem; padding: 0.35rem 0.6rem; }

  h1 { font-size: 2.75rem; }
  .page-hero h1 { font-size: 2.8rem; }
  .page-hero { padding: 5rem 0 3.5rem; }

  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ── Print ── */
@media print {
  .site-header, .site-footer, .header-cta, .hero-cta, .mid-cta, .contact-cta { display: none; }
  body { color: #000; font-size: 11pt; }
}

/* ── Logo image (replaces text logo) ── */
.site-logo-img {
  height: 36px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}

@media (min-width: 640px) {
  .site-logo-img { height: 42px; }
}

/* Bigger logo on load, shrinks once scrolled (JS toggles .is-scrolled on .site-header) */
.site-header .site-logo-img { height: 56px; }
.site-header.is-scrolled .site-logo-img { height: 36px; }

@media (min-width: 640px) {
  .site-header .site-logo-img { height: 72px; }
  .site-header.is-scrolled .site-logo-img { height: 42px; }
}

.site-header {
  transition: padding 0.25s ease;
}

.site-header.is-scrolled {
  padding: 0.5rem 0;
}

/* ── Header actions: Enquire (primary) + phone (secondary, small) ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.header-phone {
  display: none;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}

.header-phone:hover { color: var(--gold); }
.header-phone svg { flex-shrink: 0; }

@media (min-width: 900px) {
  .header-phone { display: inline-flex; }
}

/* ── Hero watermark: height-constrained so it can never clip vertically ── */
.page-hero {
  position: relative;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
  height: 55%;
  width: auto;
  max-width: 45%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .hero-watermark { height: 65%; }
}

/* ── Hero secondary phone link ── */
.hero-phone-link {
  display: block;
  margin-top: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  font-size: 0.9rem;
}

.hero-phone-link:hover { color: var(--gold); }

/* ── Full-width CTA section ── */
section.contact-cta {
  border-radius: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

section.contact-cta .container {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-watermark {
  position: absolute;
  top: 50%;
  left: 4%;
  transform: translateY(-50%);
  height: 60%;
  width: auto;
  max-width: 40%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── Footer: remove gap after full-width sections, tighten overall size ── */
.site-footer {
  margin-top: 0;
  padding: 1.75rem 0 1.25rem;
}

.footer-legal {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
}
