/* ============================================================
   MFM MEGA REGION 2 USA — "Royal Flame" Design System
   ──────────────────────────────────────────────────────────
   Dual-tone: twilight navy (hero, nav, footer) + white/cream
   Gold primary accent · Fire orange secondary accent
   Built April 2026 · Theme Overhaul (Chat 8)
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,300;1,9..144,400;1,9..144,500&family=Inter+Tight:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');


/* ============================================================
   1. DESIGN TOKENS — Royal Flame Palette
   ============================================================ */
:root {
  /* ── Backgrounds ── */
  --bg-navy:        #142240;
  --bg-navy-deep:   #0f1a30;
  --bg-navy-panel:  #1a2d4d;
  --bg-white:       #ffffff;
  --bg-cream:       #f8f6f1;
  --bg-sand:        #f5f3ee;
  --bg-sand-border: #e8e4da;

  /* Backward-compat aliases (body / nav / hero / footer) */
  --bg:             #142240;
  --bg-2:           #0f1a30;
  --bg-panel:       #1a2d4d;

  /* ── Accents ── */
  --gold:           #c9952c;
  --gold-light:     #d4a853;
  --gold-dim:       #8b6f33;
  --gold-glow:      rgba(201, 149, 44, 0.18);

  --fire:           #e85d26;
  --fire-light:     #ff7a3d;
  --fire-dim:       rgba(232, 93, 38, 0.25);

  /* ── Text on navy ── */
  --cream:          #f0e6d0;
  --white:          #ffffff;
  --text:           #8899b8;
  --text-muted:     #8899b8;
  --text-dim:       #6a7a96;

  /* ── Text on white/cream ── */
  --navy:           #142240;
  --text-on-white:  #5a6270;
  --text-dim-white: #8a8f98;

  /* ── Borders ── */
  --line:           rgba(201, 149, 44, 0.15);
  --line-strong:    rgba(201, 149, 44, 0.35);
  --line-white:     #e8e4da;
  --line-white-strong: #d4cfc4;

  /* ── Typography ── */
  --font-serif:     'Fraunces', Georgia, serif;
  --font-sans:      'Inter Tight', 'Helvetica Neue', Arial, sans-serif;

  /* ── Spacing ── */
  --gutter:         24px;
  --section-y:      120px;
  --container-max:  1200px;

  /* ── Motion ── */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur:            0.4s;
  --dur-slow:       0.7s;

  /* ── Z-Index Scale ── */
  --z-grain:        1;
  --z-content:      2;
  --z-nav:          100;
  --z-overlay:      199;
  --z-drawer:       200;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}

a:hover {
  color: var(--fire-light);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

/* ── Headings (default: on navy) ── */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family: var(--font-serif);
  color: var(--cream);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1, .h1 {
  font-size: clamp(2.4rem, 5vw + 1rem, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-size: clamp(1.8rem, 3vw + 0.6rem, 2.8rem);
  font-weight: 600;
}

h3, .h3 {
  font-size: clamp(1.3rem, 2vw + 0.4rem, 1.8rem);
  font-weight: 600;
}

h4, .h4 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
}

/* ── Body Text ── */
p {
  margin-bottom: 1em;
}

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

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

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

/* ── Accent Text ── */
.text-fire {
  color: var(--fire);
}

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

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

/* ── Decorative: Section Eyebrow ── */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fire);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--fire);
  flex-shrink: 0;
}

/* ── Scripture / Blockquote ── */
blockquote,
.scripture {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--cream);
  border-left: 3px solid var(--gold);
  padding: 16px 0 16px 24px;
  margin: 24px 0;
  line-height: 1.6;
  opacity: 0.9;
}

blockquote cite,
.scripture-ref {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fire);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* ── Separator ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  border: none;
  margin: 48px 0;
}

.divider--fire {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fire), transparent);
}


/* ============================================================
   4. ATMOSPHERE EFFECTS (navy sections only)
   ============================================================ */

/* ── Ambient Background Gradients ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(201, 149, 44, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(232, 93, 38, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 50%, rgba(201, 149, 44, 0.03) 0%, transparent 70%);
}

/* ── Light Shaft ── */
body::after {
  content: '';
  position: fixed;
  top: -30%;
  right: -10%;
  width: 60vw;
  height: 120vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 149, 44, 0.06) 0%,
    rgba(232, 93, 38, 0.02) 30%,
    transparent 70%
  );
  animation: breathe 8s var(--ease-in-out) infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.5; transform: scale(1) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.05) rotate(1deg); }
}

/* ── Film Grain Overlay ── */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: overlay;
}

.grain svg {
  width: 100%;
  height: 100%;
}


/* ============================================================
   5. LAYOUT
   ============================================================ */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: var(--z-content);
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1400px;
}

/* ── Sections ── */
.section {
  padding: var(--section-y) 0;
  position: relative;
}

/* Navy section (dramatic) */
.section--navy {
  background: var(--bg-navy);
}

/* Dark navy section */
.section--dark {
  background: var(--bg-navy-deep);
}

/* ── WHITE SECTION — clean, sharp ── */
.section--white {
  background: var(--bg-white);
}

.section--white h1,
.section--white h2,
.section--white h3,
.section--white h4,
.section--white .heading {
  color: var(--navy);
}

.section--white p,
.section--white li,
.section--white address {
  color: var(--text-on-white);
}

.section--white .text-muted,
.section--white .card-body p,
.section--white .program-card-body p {
  color: var(--text-on-white);
}

.section--white .text-dim,
.section--white .card-meta {
  color: var(--text-dim-white);
}

.section--white .eyebrow {
  color: var(--gold);
}

.section--white .eyebrow::before {
  background: var(--gold);
}

.section--white blockquote,
.section--white .scripture {
  color: var(--navy);
  border-left-color: var(--gold);
}

.section--white .divider {
  background: var(--line-white);
}

.section--white a {
  color: var(--gold);
}

.section--white a:hover {
  color: var(--fire);
}

.section--white .section-header p {
  color: var(--text-on-white);
}

.section--white h4 {
  color: var(--navy);
}

/* Cards on white backgrounds */
.section--white .card,
.section--white .panel,
.section--white .program-card,
.section--white .branch-card,
.section--white .schedule-card,
.section--white .event-highlight,
.section--white .identity-card {
  background: var(--bg-sand);
  border-color: var(--bg-sand-border);
}

.section--white .card:hover,
.section--white .panel:hover,
.section--white .branch-card:hover,
.section--white .schedule-card:hover {
  border-color: var(--line-white-strong);
  box-shadow: 0 12px 40px rgba(20, 34, 64, 0.08);
}

.section--white .card h3,
.section--white .card h4,
.section--white .panel h3,
.section--white .panel h4,
.section--white .branch-card h3,
.section--white .schedule-card h3,
.section--white .event-highlight h3,
.section--white .identity-card h3 {
  color: var(--navy);
}

/* Forms on white */
.section--white .form-input,
.section--white .form-textarea,
.section--white .form-select,
.section--white .sermon-search {
  background: var(--bg-white);
  border-color: var(--line-white-strong);
  color: var(--navy);
}

.section--white .form-input:focus,
.section--white .form-textarea:focus,
.section--white .sermon-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.section--white .form-input::placeholder,
.section--white .form-textarea::placeholder,
.section--white .sermon-search::placeholder {
  color: var(--text-dim-white);
}


/* ── CREAM SECTION ── */
.section--cream {
  background: var(--bg-cream);
}

.section--cream h1,
.section--cream h2,
.section--cream h3,
.section--cream h4,
.section--cream .heading {
  color: var(--navy);
}

.section--cream p,
.section--cream li,
.section--cream address {
  color: var(--text-on-white);
}

.section--cream .text-muted,
.section--cream .card-body p,
.section--cream .program-card-body p {
  color: var(--text-on-white);
}

.section--cream .text-dim,
.section--cream .card-meta {
  color: var(--text-dim-white);
}

.section--cream .eyebrow {
  color: var(--gold);
}

.section--cream .eyebrow::before {
  background: var(--gold);
}

.section--cream blockquote,
.section--cream .scripture {
  color: var(--navy);
  border-left-color: var(--gold);
}

.section--cream .divider {
  background: var(--line-white);
}

.section--cream a {
  color: var(--gold);
}

.section--cream a:hover {
  color: var(--fire);
}

.section--cream .section-header p {
  color: var(--text-on-white);
}

.section--cream h4 {
  color: var(--navy);
}

/* Cards on cream backgrounds */
.section--cream .card,
.section--cream .panel,
.section--cream .program-card,
.section--cream .branch-card,
.section--cream .schedule-card,
.section--cream .event-highlight,
.section--cream .identity-card {
  background: var(--bg-white);
  border-color: var(--bg-sand-border);
}

.section--cream .card:hover,
.section--cream .panel:hover,
.section--cream .branch-card:hover,
.section--cream .schedule-card:hover {
  border-color: var(--line-white-strong);
  box-shadow: 0 12px 40px rgba(20, 34, 64, 0.08);
}

.section--cream .card h3,
.section--cream .card h4,
.section--cream .panel h3,
.section--cream .panel h4,
.section--cream .branch-card h3,
.section--cream .schedule-card h3,
.section--cream .event-highlight h3,
.section--cream .identity-card h3 {
  color: var(--navy);
}

/* ── Event banner on light sections ── */
.section--white .event-banner,
.section--cream .event-banner {
  background: linear-gradient(135deg, rgba(201, 149, 44, 0.08), rgba(232, 93, 38, 0.05));
  border-color: var(--line-white-strong);
}

.section--white .event-banner h3,
.section--cream .event-banner h3 {
  color: var(--navy);
}

.section--white .event-banner-date,
.section--cream .event-banner-date {
  background: var(--bg-white);
  border-color: var(--line-white-strong);
}

.section--white .event-banner-date .day,
.section--cream .event-banner-date .day {
  color: var(--navy);
}

/* ── Program cards on light sections ── */
.section--white .program-card,
.section--cream .program-card {
  border-color: var(--bg-sand-border);
}

.section--white .program-card-body h3,
.section--cream .program-card-body h3 {
  color: var(--navy);
}

.section--white .program-card-schedule li,
.section--cream .program-card-schedule li {
  color: var(--text-on-white);
}

/* ── Badge on light sections ── */
.section--white .badge--gold,
.section--cream .badge--gold {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: rgba(201, 149, 44, 0.3);
}


/* ── Grids ── */
.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ── Flex Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 12px; }
.gap-md { gap: var(--gutter); }
.gap-lg { gap: 48px; }

/* ── Text Alignment ── */
.text-center { text-align: center; }


/* ============================================================
   6. NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 16px 0;
  background: rgba(20, 34, 64, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 149, 44, 0.08);
  transition: background var(--dur) var(--ease-out),
              padding var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}

/* Scrolled state — added via JS */
.site-nav.scrolled {
  background: rgba(20, 34, 64, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0;
  box-shadow: 0 1px 0 var(--line);
  border-bottom-color: rgba(201, 149, 44, 0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform var(--dur) var(--ease-out);
  /* Clean logo rendering - no background artifacts */
  background: transparent;
  image-rendering: auto;
}

.site-nav.scrolled .nav-logo img {
  width: 40px;
  height: 40px;
}

.nav-logo-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
  transition: color var(--dur) var(--ease-out);
}

.nav-logo-text span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-logo:hover .nav-logo-text {
  color: var(--white);
}

/* ── Desktop Links ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color var(--dur) var(--ease-out);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--dur) var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cream);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ── Nav CTA Button (Give) ── */
.nav-links a.nav-cta {
  background: var(--gold);
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 12px rgba(201, 149, 44, 0.3);
  transition: all var(--dur) var(--ease-out);
}
.nav-links a.nav-cta::after { display: none; }
.nav-links a.nav-cta:hover {
  background: var(--gold-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201, 149, 44, 0.45);
}
.nav-links a.nav-cta.active { color: #fff; }

/* ── Drawer CTA (Give) ── */
.drawer-nav a.drawer-cta {
  display: block;
  margin-top: 12px;
  padding: 12px 24px;
  background: var(--gold);
  color: #fff;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 12px rgba(201, 149, 44, 0.3);
  transition: all var(--dur) var(--ease-out);
}
.drawer-nav a.drawer-cta:hover {
  background: var(--gold-light);
  color: #fff;
}

/* ── Nav Dropdowns ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--dur) var(--ease-out);
}

.nav-dropdown-toggle svg.dd-chevron {
  transition: transform 0.3s var(--ease-out);
}

.nav-dropdown-toggle:hover {
  color: var(--cream);
}

.nav-dropdown-toggle.active {
  color: var(--gold);
}

.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--gold);
}

.nav-dropdown.open .nav-dropdown-toggle svg.dd-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown Panel — Gold-topped cinematic ── */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  min-width: 260px;
  background: #0f1a30;
  border: 1px solid rgba(201, 149, 44, 0.18);
  border-top: 2.5px solid var(--gold);
  border-radius: 0 0 10px 10px;
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px);
  transition: opacity 0.25s var(--ease-out),
              visibility 0.25s var(--ease-out),
              transform 0.25s var(--ease-out);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(201, 149, 44, 0.06);
  z-index: 100;
  overflow: hidden;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Dropdown Row — Icon + Two-line Label ── */
.nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 149, 44, 0.06);
  transition: background 0.2s var(--ease-out),
              color 0.2s var(--ease-out);
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(201, 149, 44, 0.08);
}

.nav-dropdown-menu a:hover .nav-dd-label {
  color: var(--gold);
}


.nav-dropdown-menu a.active {
  background: rgba(201, 149, 44, 0.06);
}

.nav-dropdown-menu a.active .nav-dd-label {
  color: var(--gold);
}



/* ── Two-line Label ── */
.nav-dd-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: color 0.2s var(--ease-out);
}

.nav-dd-label span {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ── Live Badge ── */
.nav-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fire-dim);
  color: var(--fire-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(232, 93, 38, 0.3);
}

.nav-live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--fire);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}

/* ── Hamburger Button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 6px;
  cursor: pointer;
  z-index: calc(var(--z-drawer) + 1);
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out),
              opacity var(--dur) var(--ease-out);
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
}


/* ============================================================
   7. MOBILE DRAWER
   ============================================================ */

/* ── Overlay ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 48, 0.8);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease-out),
              visibility var(--dur) var(--ease-out);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Drawer Panel ── */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-navy-deep);
  z-index: var(--z-drawer);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  overflow-y: auto;
}

.drawer.open {
  transform: translateX(0);
}

body.drawer-open {
  overflow: hidden;
}

/* ── Drawer Content ── */
.drawer-header {
  padding: 24px var(--gutter);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-header img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.drawer-header span {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
}

.drawer-nav {
  padding: 24px 0;
  flex: 1;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--gutter);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}

.drawer-nav a:hover,
.drawer-nav a.active {
  background: var(--gold-glow);
  color: var(--cream);
}

.drawer-nav a.active {
  border-right: 3px solid var(--gold);
}

.drawer-footer {
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
}

.drawer-scripture {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.drawer-scripture cite {
  display: block;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--fire);
  margin-top: 6px;
  letter-spacing: 0.04em;
}


/* ============================================================
   8. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px var(--gutter) var(--section-y);
  overflow: hidden;
}

.hero--short {
  min-height: 50vh;
  min-height: 50dvh;
}

/* ── Hero Background Image ── */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 30%, transparent 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(20, 34, 64, 0.7), rgba(20, 34, 64, 0.4));
}

/* ── Hero Content ── */
.hero-content {
  position: relative;
  z-index: var(--z-content);
  max-width: 800px;
}

.hero-emblem {
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  filter: drop-shadow(0 4px 24px rgba(201, 149, 44, 0.25));
  animation: floatIn 1.2s var(--ease-out) both;
  /* Ensure clean transparency on navy backgrounds */
  background: transparent;
  mix-blend-mode: normal;
  image-rendering: auto;
}

.hero h1 {
  margin-bottom: 20px;
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.hero .btn-group {
  animation: fadeUp 0.8s var(--ease-out) 0.6s both;
}

/* ── Gold underline for hero heading ── */
.fire-underline {
  display: inline;
  background-image: linear-gradient(90deg, var(--gold), var(--gold-light));
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: 0 92%;
  padding-bottom: 4px;
}

@keyframes floatIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   9. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
  border: none;
}

/* ── Primary: Gold ── */
.btn--primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(201, 149, 44, 0.3);
}

.btn--primary:hover {
  background: var(--gold-light);
  color: var(--white);
  box-shadow: 0 4px 30px rgba(201, 149, 44, 0.45);
  transform: translateY(-2px);
}

/* Defensive: section--white/cream set ALL anchors to gold (specificity 0,2,0),
   which would otherwise hide white-text solid buttons. Re-assert white. */
.section--white a.btn--primary,
.section--cream a.btn--primary,
.section--white a.btn--primary:hover,
.section--cream a.btn--primary:hover {
  color: var(--white);
}

/* ── Secondary: Ghost/outline ──
   Defensive defaults: light cream text + gold border on dark surfaces.
   Explicit context selectors below ensure visibility regardless of
   ancestor or future overrides. */
.btn--secondary {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line-strong);
}

.btn--secondary:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: var(--gold-glow);
  transform: translateY(-2px);
}

/* Secondary on DARK contexts — hero, navy/dark sections, footer.
   Explicit so it can't be silently overridden by an inherited color. */
.hero .btn--secondary,
.section--navy .btn--secondary,
.section--dark .btn--secondary,
.site-footer .btn--secondary {
  color: var(--cream);
  border-color: var(--line-strong);
}

.hero .btn--secondary:hover,
.section--navy .btn--secondary:hover,
.section--dark .btn--secondary:hover,
.site-footer .btn--secondary:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: var(--gold-glow);
}

/* Secondary on LIGHT contexts — white/cream content sections */
.section--white .btn--secondary,
.section--cream .btn--secondary {
  color: var(--navy);
  border-color: var(--line-white-strong);
}

.section--white .btn--secondary:hover,
.section--cream .btn--secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}

/* ── Fire: Solid fire CTA ── */
.btn--fire {
  background: linear-gradient(135deg, var(--fire), var(--fire-light));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(232, 93, 38, 0.3);
}

.btn--fire:hover {
  box-shadow: 0 4px 30px rgba(232, 93, 38, 0.5);
  transform: translateY(-2px);
}

/* Defensive: same fix as primary — re-assert white text on light sections
   so the section-wide anchor rule (.section--cream a) can't tint the
   button text gold and make it invisible against the orange gradient. */
.section--white a.btn--fire,
.section--cream a.btn--fire,
.section--white a.btn--fire:hover,
.section--cream a.btn--fire:hover {
  color: var(--white);
}

/* ── Small variant ── */
.btn--sm {
  font-size: 0.78rem;
  padding: 10px 20px;
}

/* ── Button Group ── */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-group--center {
  justify-content: center;
}


/* ============================================================
   10. CARDS
   ============================================================ */

/* ── Base Card ── */
.card {
  background: var(--bg-navy-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(201, 149, 44, 0.08);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  margin-bottom: 8px;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 16px;
}

/* ── Program Card (weekly events with flyer) ── */
.program-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-navy-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

.program-card:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 12px 40px rgba(201, 149, 44, 0.08);
}

.program-card-img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.program-card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.program-card-body h3 {
  margin-bottom: 12px;
}

.program-card-schedule {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.program-card-schedule li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.program-card-schedule li::before {
  content: '🕐';
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  .program-card {
    grid-template-columns: 1fr;
  }
  .program-card-img {
    min-height: 200px;
  }
}

/* ── Sermon Card ── */
.sermon-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.sermon-card .card-img {
  position: relative;
}

.sermon-card .card-img::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  background: rgba(20, 34, 64, 0.4);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.sermon-card:hover .card-img::after {
  opacity: 1;
}

/* ── Panel Card (for featured content) ── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
}

.panel--glow {
  box-shadow: 0 0 60px rgba(201, 149, 44, 0.06);
}

/* ── Leader Card (about page) ── */
.leader-card {
  text-align: center;
}

.leader-card-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 3px solid var(--gold-dim);
  box-shadow: 0 8px 30px rgba(201, 149, 44, 0.15);
}

.leader-card h3 {
  margin-bottom: 4px;
}

.leader-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* ============================================================
   11. SECTION HEADINGS
   ============================================================ */
.section-header {
  margin-bottom: 56px;
}

.section-header.text-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header.text-center .eyebrow {
  justify-content: center;
}

.section-header.text-center .eyebrow::before {
  display: none;
}

.section-header p {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 12px;
}


/* ============================================================
   12. FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-navy-deep);
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  position: relative;
  z-index: var(--z-content);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}

/* ── Footer Brand Column ── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Ensure logo transparency across all contexts */
img[src*="logo"] {
  background: transparent !important;
}

.footer-logo img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.footer-logo-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}

.footer-logo-text span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Footer Link Columns ── */
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}

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

/* ── Footer Social ── */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--dur) var(--ease-out);
}

.footer-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.footer-connect-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}

.footer-connect-link:hover {
  color: var(--gold-light);
}

/* ── Footer Bottom Bar ── */
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0;
}

.footer-bottom a {
  color: var(--text-dim);
  font-size: 0.78rem;
}

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

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}


/* ============================================================
   13. SCROLL-TRIGGERED REVEALS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children: add .reveal-stagger on parent */
.reveal-stagger .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger .reveal:nth-child(6) { transition-delay: 0.5s; }

/* Variant: fade in from left */
.reveal--left {
  transform: translateX(-32px);
}
.reveal--left.visible {
  transform: translateX(0);
}

/* Variant: fade in from right */
.reveal--right {
  transform: translateX(32px);
}
.reveal--right.visible {
  transform: translateX(0);
}

/* Variant: scale up */
.reveal--scale {
  transform: scale(0.95);
}
.reveal--scale.visible {
  transform: scale(1);
}


/* ============================================================
   14. FORMS (Contact / Prayer Request)
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}


/* ============================================================
   15. MISC COMPONENTS
   ============================================================ */

/* ── Video Embed ── */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.3);
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Branch Card ── */
.branch-card {
  background: var(--bg-navy-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}

.branch-card:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 8px 30px rgba(201, 149, 44, 0.08);
}

.branch-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.branch-card address {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.branch-card-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Badge / Tag ── */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.badge--gold {
  background: var(--gold-glow);
  color: var(--gold-light);
  border: 1px solid rgba(201, 149, 44, 0.3);
}

/* Keep --purple badge name for backward compat, map to gold */
.badge--purple {
  background: var(--gold-glow);
  color: var(--gold-light);
  border: 1px solid rgba(201, 149, 44, 0.3);
}

.badge--fire {
  background: var(--fire-dim);
  color: var(--fire-light);
  border: 1px solid rgba(232, 93, 38, 0.3);
}

/* ── Featured Event Banner ── */
.event-banner {
  background:
    linear-gradient(135deg, rgba(201, 149, 44, 0.10), rgba(232, 93, 38, 0.06));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.event-banner-content {
  flex: 1;
}

.event-banner-date {
  text-align: center;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 16px 24px;
}

.event-banner-date .month {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fire);
}

.event-banner-date .day {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .event-banner {
    flex-direction: column;
    text-align: center;
    padding: 28px;
  }
}

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-navy-deep) 25%,
    var(--bg-panel) 50%,
    var(--bg-navy-deep) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Preview Mode Banner ── */
.preview-banner {
  background: var(--fire-dim);
  border-bottom: 1px solid rgba(232, 93, 38, 0.3);
  padding: 10px var(--gutter);
  text-align: center;
  font-size: 0.8rem;
  color: var(--fire-light);
  font-weight: 500;
}


/* ============================================================
   16. RESPONSIVE FINE-TUNING
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --section-y: 80px;
    --gutter: 20px;
  }
}

@media (max-width: 600px) {
  :root {
    --section-y: 60px;
    --gutter: 16px;
  }

  .hero {
    min-height: 90vh;
    min-height: 90dvh;
    padding-top: 100px;
  }

  .hero-emblem {
    width: 90px;
    height: 90px;
    margin-bottom: 24px;
  }

  .panel {
    padding: 24px;
  }

  .program-card-body {
    padding: 24px;
  }

  /* iOS zoom prevention — inputs < 16px trigger auto-zoom on focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  select,
  textarea,
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* ============================================================
   BACK-TO-TOP BUTTON
   ──────────────────────────────────────────────────────────
   Floating gold-accent button that appears after 400px scroll.
   Injected into every page by the back-to-top IIFE.
   ============================================================ */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-navy);
  color: var(--gold);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    visibility 0.3s var(--ease-out),
    background 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  font: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--gold);
  color: var(--bg-navy);
  border-color: var(--gold);
  box-shadow: 0 8px 26px rgba(201, 149, 44, 0.45);
  transform: translateY(-3px);
  outline: none;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}

.back-to-top:hover svg,
.back-to-top:focus-visible svg {
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .back-to-top {
    right: 16px;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }
}


/* ============================================================
   17. SAFE AREA & MOBILE POLISH
   ============================================================ */

/* Safe-area for notched phones (iPhone X+) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
  .back-to-top {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .drawer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Ensure no horizontal overflow on any page */
html, body {
  overflow-x: hidden;
}

/* Touch action optimization for cards */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .branch-card:hover,
  .schedule-card:hover,
  .panel:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top,
  .back-to-top svg {
    transition: opacity 0.01ms, visibility 0.01ms;
    transform: none !important;
  }
}

