:root {
  --site-primary: rgba(31, 94, 168, 1);
  --site-accent: rgba(229, 163, 0, 1);
  --site-text: rgba(17, 24, 39, 1);
  --site-muted: rgba(107, 114, 128, 1);
  --site-surface: rgba(255, 255, 255, 1);
  --site-bg: rgba(247, 249, 252, 1);
  --site-divider-color: rgba(229, 231, 235, 1);

  --site-max-width: 1200px;
  --site-section-space: 40px;
  --site-radius: 16px;
  --site-header-height: 70px;
  --site-nav-font-size: 0.9rem;
  --site-body-font-size: 1rem;

  --site-btn-bg: rgba(31, 94, 168, 1);
  --site-btn-ink: rgba(255, 255, 255, 1);
  --site-btn-radius: 8px;
  --site-btn-weight: 600;
  --site-btn-min-height: 44px;
  --site-btn-anim-speed: 180ms;

  --motion-stagger: 80ms;
  --motion-duration: 700ms;
  --site-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
  --site-divider: 1px solid var(--site-divider-color);
  --site-heading-font: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --site-body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body.edwin-site {
  color: var(--site-text);
  background:
    radial-gradient(1200px 500px at 50% -15%, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0) 70%),
    linear-gradient(180deg, #f7f9fc 0%, var(--site-bg) 45%, #fafbfe 100%);
  font-family: var(--site-body-font);
  font-size: var(--site-body-font-size);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--site-heading-font);
  color: var(--site-text);
  letter-spacing: -0.02em;
  margin-top: 0;
}

a { color: var(--site-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
.site-btn:focus-visible,
.faq-toggle:focus-visible {
  outline: 3px solid rgba(31, 94, 168, 0.9);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 200;
  transform: translateY(-140%);
  background: #fff;
  border: var(--site-divider);
  color: var(--site-text);
  border-radius: 8px;
  padding: 8px 12px;
}
.skip-link:focus { transform: translateY(0); }

.site-shell {
  width: min(100%, var(--site-max-width));
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.site-header {
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: var(--site-divider);
  transition: box-shadow 220ms ease, background-color 220ms ease;
}
.site-header.is-sticky { position: sticky; top: 0; }
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.1);
}
.site-header .site-shell {
  min-height: var(--site-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: var(--site-heading-font);
}
.site-logo-img,
.site-logo .custom-logo { max-height: 55px; width: auto; display: block; }
.site-logo a,
.site-logo .custom-logo-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }

.site-nav { display: flex; align-items: center; }
.site-nav ul { display: flex; gap: 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.site-nav li { position: relative; }
.site-nav a { font-size: var(--site-nav-font-size); color: rgba(255,255,255,0.7); text-decoration: none; }
.site-nav a:hover { color: #ffffff; text-decoration: none; }
.site-nav li.current-menu-item > a,
.site-nav li.current_page_item > a { color: #ffffff; font-weight: 600; }

/* Dropdown */
.site-nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #0f1b2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 18px 0 8px; /* top padding creates an invisible bridge over the gap */
  margin-top: 0;
  flex-direction: column;
  gap: 0;
  z-index: 100;
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
.site-nav ul ul li { width: 100%; }
.site-nav ul ul a { display: block; padding: 8px 16px; font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.site-nav ul ul a:hover { color: #ffffff; background: rgba(255,255,255,0.05); }
.site-nav li.dropdown-open > ul { display: flex; }

/* ── Dark header variant ── */
.site-header--dark {
  background: #0f1b2e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: none;
}
.site-header--dark .site-logo { color: #ffffff; }
.site-header--dark .site-nav a { color: rgba(255, 255, 255, 0.7); }
.site-header--dark .site-nav a:hover,
.site-header--dark .site-nav a.current-menu-item { color: #ffffff; }
.site-header--dark.is-scrolled { background: rgba(15, 27, 46, 0.96); }

.site-header-cta {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.site-header-cta:hover { text-decoration: none; opacity: 0.85; }
.site-header-btn {
  font-size: 0.88rem;
  padding: 0 18px;
  min-height: 38px;
  white-space: nowrap;
}

/* ── Sections ── */
.site-section {
  margin-top: var(--site-section-space);
  padding: clamp(20px, 3vw, 34px);
  border: var(--site-divider);
  border-radius: var(--site-radius);
  background: var(--site-surface);
  box-shadow: var(--site-shadow);
}

/* Flat page section — spacing only, no card border/shadow */
.page-section {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(12px, 2vw, 20px) 0;
  overflow: visible;
}
.section-edge { pointer-events: none; }

/*
 * Full-bleed breakout: when a page section has a background applied via
 * inline style (set by Page Settings meta box), break it out of .site-shell
 * to span the full viewport width, then restore content alignment with padding.
 * Formula: margin pulls to viewport edge, padding restores the shell indent.
 * --site-shell-pad must match the padding value in .site-shell (20px).
 */
.page-section[style*="background"] {
  margin-left:   calc(50% - 50vw);
  margin-right:  calc(50% - 50vw);
  padding-top:    clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
  padding-left:  calc(50vw - 50% + 20px);
  padding-right: calc(50vw - 50% + 20px);
}

/* When a background is set via Page Settings, ensure child elements
   remain readable regardless of what image or color is behind them. */
.page-section[style*="background"] .borough-card,
.page-section[style*="background"] .feature-card,
.page-section[style*="background"] .law-card,
.page-section[style*="background"] .why-card {
  background: #fff;
  color: var(--site-text);
}
/* Header text block gets a semi-transparent backdrop for contrast
   over any background image, positioned before the cards begin. */
.page-section[style*="background"] > .section-heading-eyebrow,
.page-section[style*="background"] > h2,
.page-section[style*="background"] > .section-heading-subtitle {
  color: #fff;
}
.page-section[style*="background"] > .section-heading-eyebrow {
  color: #e5a300;
}

/* Tinted page section — subtle background band, no card border */
.page-section--tinted {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(32px, 5vw, 60px) 0;
  background: var(--site-bg);
}

/* Dark page section — full dark band like hero */
.page-section--dark {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(40px, 6vw, 72px) 0;
  background: linear-gradient(135deg, #0f1b2e 0%, #142744 50%, #1a3158 100%);
  color: #fff;
}
.page-section--dark h2,
.page-section--dark h3,
.page-section--dark h4 { color: #fff; }
.page-section--dark .section-heading-eyebrow { color: #e5a300; }
.page-section--dark p { color: rgba(255,255,255,0.75); }

/* ── Buttons ── */
.site-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--site-btn-min-height);
  padding: 0 22px;
  border: 0;
  border-radius: var(--site-btn-radius);
  background: var(--site-btn-bg);
  color: var(--site-btn-ink);
  font-weight: var(--site-btn-weight);
  cursor: pointer;
  transition:
    transform var(--site-btn-anim-speed) ease,
    box-shadow var(--site-btn-anim-speed) ease,
    opacity var(--site-btn-anim-speed) ease;
  text-decoration: none;
}
.site-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 94, 168, 0.24);
  text-decoration: none;
  color: var(--site-btn-ink);
}
.site-btn--secondary {
  background: transparent;
  color: var(--site-primary);
  border: 1px solid rgba(31, 94, 168, 0.28);
}
.site-btn--secondary:hover { color: var(--site-primary); }
.site-btn:disabled,
.site-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

/* ── Footer ── */
.site-footer {
  margin-top: calc(var(--site-section-space) * 1.3);
  border-top: var(--site-divider);
  padding: 28px 0 48px;
  color: var(--site-muted);
}
/* Allow sections to blend into footer by removing the gap */
.site-footer.flush-top {
  margin-top: 0;
}
.site-footer--expanded {
  background: #0f1b2e;
  color: rgba(255, 255, 255, 0.65);
  border-top: none;
  margin-top: 0;
  padding: 48px 0 0;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr 1fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Brand column */
.site-footer-logo {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--site-heading-font);
  margin-bottom: 12px;
}
.site-footer-logo-img { margin-bottom: 16px; }
.site-footer-logo-img img { max-height: 80px; width: auto; display: block; }
.site-footer-disclaimer {
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

/* Sitemap column */
.site-footer-sitemap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* Shared link styles */
.site-footer-links h4,
.site-footer-contact h4 {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
  font-family: var(--site-body-font);
}
.site-footer-links ul,
.site-footer-contact ul { list-style: none; padding: 0; margin: 0; }
.site-footer-links li,
.site-footer-contact li { margin-bottom: 10px; font-size: 0.88rem; color: rgba(255,255,255,0.6); }
.site-footer-links a,
.site-footer-contact a { color: rgba(255, 255, 255, 0.6); text-decoration: none; }
.site-footer-links a:hover,
.site-footer-contact a:hover { color: #ffffff; text-decoration: none; }

/* Bottom bar */
.site-footer-bottom {
  padding: 20px 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}
.site-footer-bottom p { margin: 0; }
.site-footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.site-footer-bottom a:hover { color: #ffffff; }

/* ── Scroll reveal — managed entirely by GSAP in main.js ── */

/* ── Responsive ── */
@media (max-width: 760px) {
  .site-shell { padding: 0 14px; }
  .site-header .site-shell { min-height: 66px; }
  .site-nav { gap: 12px; }
  .site-section { padding: 18px; }
  .site-header-cta { display: none; }
  .site-header-btn { display: none; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer-sitemap { grid-template-columns: 1fr 1fr; }
  .site-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
