/* ═══════════════════════════════════════════
   HOPE COMMUNITY CHURCH — Global Design System
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

/* ── CSS Variables ── */
:root {
  --cream: #FFFAF4;
  --warm-white: #FFF5EB;
  --amber: #F4A261;
  --gold: #E8890C;
  --gold-text: #A85A0C; /* orange for text on light backgrounds (4.7:1+) */
  --gold-light: #FFBA47;
  --coral: #E07A5F;
  --navy: #1D3461;
  --navy-light: #264680;
  --sky: #3D7EA6;
  --muted: #5F7189;
  --text: #1D3461;
  --white: #FFFFFF;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 12px rgba(29, 52, 97, 0.08);
  --shadow-md: 0 8px 32px rgba(29, 52, 97, 0.12);
  --shadow-lg: 0 20px 60px rgba(29, 52, 97, 0.15);
  --shadow-gold: 0 8px 32px rgba(244, 162, 97, 0.25);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Typography ── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
}

h1 {
  font-size: clamp(40px, 7vw, 88px);
}

h2 {
  font-size: clamp(30px, 4vw, 52px);
}

h3 {
  font-size: clamp(22px, 2.5vw, 32px);
}

h4 {
  font-size: clamp(18px, 2vw, 24px);
}

p {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.75;
  color: var(--muted);
}

/* ── NAVIGATION ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px clamp(24px, 4vw, 64px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(10, 20, 50, 0.55) 0%, rgba(10, 20, 50, 0) 100%);
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 250, 244, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px clamp(24px, 4vw, 64px);
  box-shadow: 0 2px 32px rgba(29, 52, 97, 0.10);
}

#navbar.scrolled-dark {
  background: rgba(29, 52, 97, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px clamp(24px, 4vw, 64px);
  box-shadow: 0 4px 24px rgba(15, 30, 61, 0.15);
}

.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img {
  height: 60px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(15, 30, 61, 0.18));
  transition: height var(--transition);
}

#navbar.scrolled .nav-logo img,
#navbar.scrolled-dark .nav-logo img {
  height: 48px;
}

.logo-text-below {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color var(--transition);
}

#navbar.scrolled .logo-text-below {
  color: var(--navy);
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-logo-text .logo-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  transition: color var(--transition);
}

.nav-logo-text .logo-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

#navbar.scrolled .logo-name {
  color: var(--navy);
}

#navbar.scrolled .logo-sub {
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

#navbar.scrolled .nav-links a {
  color: var(--navy);
}

#navbar.scrolled .nav-links a:hover {
  background: var(--warm-white);
  color: var(--gold-text);
}

/* Dropdown Navigation */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition);
  margin-top: -2px;
}

.nav-dropdown:hover > a::after {
  transform: rotate(-135deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(29, 52, 97, 0.06);
  padding: 8px 0;
  min-width: 210px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 1010;
  pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu li a {
  color: var(--navy) !important;
  font-size: 14px;
  font-weight: 500;
  display: block;
  padding: 10px 20px;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  text-align: left;
}

.dropdown-menu li a:hover {
  background: var(--warm-white) !important;
  color: var(--gold-text) !important;
}

.nav-cta {
  background: var(--amber) !important;
  color: var(--navy) !important;
  padding: 10px 20px !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-gold);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition) !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(244, 162, 97, 0.4) !important;
  background: var(--gold) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

#navbar.scrolled .nav-hamburger span {
  background: var(--navy);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 90vw);
  height: 100vh;
  /* Visible screen height on phones, so the last items (Give, Contact Us)
     aren't hidden behind the browser's bottom toolbar */
  height: 100dvh;
  background: var(--cream);
  z-index: 1100;
  padding: 80px 32px calc(40px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: -20px 0 60px rgba(29, 52, 97, 0.15);
  transition: right var(--transition-slow);
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  padding: 14px 0;
  border-bottom: 1px solid rgba(29, 52, 97, 0.07);
  transition: color var(--transition), padding-left var(--transition);
}

.mobile-menu a:hover {
  color: var(--gold-text);
  padding-left: 8px;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.menu-close {
  position: absolute;
  top: 22px;
  right: 22px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--navy);
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── SECTION UTILITIES ── */
.section {
  padding: 100px 48px;
}

.section-sm {
  padding: 60px 48px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 840px;
  margin: 0 auto;
}

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 12px;
}

.section-eyebrow::before {
  content: '✦ ';
}

.section-title {
  font-family: var(--font-serif);
  color: var(--navy);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--muted);
  line-height: 1.7;
  max-width: 540px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.2px;
  text-decoration: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(244, 162, 97, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(29, 52, 97, 0.2);
}

.btn-outline:hover {
  border-color: var(--amber);
  color: var(--gold-text);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--navy);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--navy-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(29, 52, 97, 0.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(244, 162, 97, 0.3);
}

/* ── DIVIDER ── */
.warm-divider {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--coral));
  border-radius: 2px;
  margin: 16px 0 32px;
  border: none;
}

.center .warm-divider {
  margin-left: auto;
  margin-right: auto;
}

/* ── TAGS ── */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(244, 162, 97, 0.12);
  border: 1px solid rgba(244, 162, 97, 0.3);
  color: var(--coral);
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 210px 48px 80px;
  background: linear-gradient(135deg, var(--navy) 0%, #264680 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-hero h1 {
  color: var(--white);
  position: relative;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  margin: 16px auto 0;
  max-width: 540px;
}

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: var(--white);
  padding: 80px 48px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto 60px;
}

.footer-brand .brand-name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li,
.footer-col li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  transition: color var(--transition);
}

.footer-col li a:hover {
  color: var(--amber);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 10px;
}

.footer-contact-item svg {
  color: var(--amber);
  flex-shrink: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 1280px) {

  .section,
  .section-sm {
    padding-left: 28px;
    padding-right: 28px;
  }

  #navbar {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 20px !important;
    gap: 0 !important;
  }

  .nav-logo {
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 12px !important;
  }

  .nav-logo img {
    height: 52px !important;
  }

  #navbar.scrolled .nav-logo img,
  #navbar.scrolled-dark .nav-logo img {
    height: 52px !important;
  }

  .nav-logo-text {
    align-items: flex-start !important;
  }

  .nav-links,
  .desktop-only-nav {
    display: none !important;
  }

  .nav-hamburger {
    display: flex !important;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 70px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer-col ul {
    gap: 0;
  }

  .footer-col li a,
  a.footer-contact-item {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-contact-item {
    margin-bottom: 0;
  }
}

/* ── FAITH ACCORDION ── */
.faith-accordion {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faith-item {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 52, 97, 0.06);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}

.faith-item:hover {
  border-color: rgba(244, 162, 97, 0.3);
  box-shadow: var(--shadow-md);
}

.faith-trigger {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  outline: none;
}

.faith-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(244, 162, 97, 0.12);
  color: var(--amber);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.faith-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  flex-grow: 1;
}

.faith-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

.faith-icon::before,
.faith-icon::after {
  content: '';
  position: absolute;
  background: var(--navy);
  transition: transform var(--transition);
}

/* Horizontal line */
.faith-icon::before {
  top: 9px; left: 2px;
  width: 16px; height: 2px;
}

/* Vertical line */
.faith-icon::after {
  top: 2px; left: 9px;
  width: 2px; height: 16px;
}

.faith-item.active .faith-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faith-item.active .faith-icon::before {
  transform: rotate(180deg);
}

.faith-item.active .faith-letter {
  background: var(--amber);
  color: var(--white);
}

.faith-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition) ease-out;
}

.faith-panel p {
  padding: 0 24px 24px 72px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.faith-panel p em {
  color: var(--coral);
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-top: 12px;
}

/* ── KEYBOARD FOCUS ── */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.faith-trigger:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: -3px;
}

/* ── FORM STATUS ── */
.form-status:empty {
  display: none;
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--navy);
}

.form-status.is-error {
  color: #B3261E;
}

.btn.is-sent {
  background: #2E7D32;
  color: var(--white);
}
