/* ============================================
   THE EZRA CENTRE — Shared Design System
   "Editorial Sacred" — Transforming man from the core
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600&display=swap');

:root {
  /* Palette — deep purple dominant, cream canvas, gold accent */
  --purple-deep: #3D0F5C;
  --purple-rich: #5B1A8E;
  --purple-shadow: #2A0A42;
  --purple-veil: rgba(61, 15, 92, 0.08);
  --purple-mist: rgba(61, 15, 92, 0.15);

  --cream: #F5EFE4;
  --cream-warm: #EEE4D0;
  --cream-deep: #E4D5BA;
  --ivory: #FAF6EC;

  --gold: #D4A537;
  --gold-bright: #F4C542;
  --gold-deep: #A87D20;
  --gold-veil: rgba(212, 165, 55, 0.12);

  --ink: #1A0F20;
  --ink-soft: #2D1F38;
  --ink-muted: #5A4B65;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Garamond', serif;
  --font-editorial: 'Fraunces', 'Georgia', serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  /* Motion */
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  background: rgba(245, 239, 228, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--purple-mist);
  transition: all 0.4s var(--ease-soft);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--purple-deep);
}

.nav-brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav-brand-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.nav-brand-text em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
  font-size: 0.75rem;
  display: block;
  margin-top: 2px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease-soft);
}

.nav-links a:hover { color: var(--purple-deep); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--purple-deep); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--purple-deep);
  color: var(--cream) !important;
  padding: 0.7rem 1.5rem !important;
  border-radius: 100px;
  border: 1px solid var(--purple-deep);
  transition: all 0.3s var(--ease-soft) !important;
}

.nav-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink) !important;
}

.nav-cta::after { display: none !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-burger span {
  width: 26px;
  height: 1.5px;
  background: var(--purple-deep);
  transition: all 0.3s;
}

/* ============ LAYOUT UTILITIES ============ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 3rem;
}

section { position: relative; }

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gold);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--purple-shadow);
}

.h-display {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.h-display em {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 300;
  color: var(--gold-deep);
}

.h-section {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
}

.h-section em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
}

.lede {
  font-family: var(--font-editorial);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
}

/* ============ SCRIPTURE / PULL QUOTE ============ */
.scripture {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
  line-height: 1.35;
  color: var(--purple-deep);
  padding: 2.5rem 0 1.5rem;
  position: relative;
}

.scripture::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  font-family: var(--font-display);
  font-size: 6rem;
  color: var(--gold);
  line-height: 1;
  opacity: 0.4;
  font-style: normal;
}

.scripture-ref {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
  margin-top: 1.5rem;
}

.scripture-ref::before {
  content: '— ';
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.4s var(--ease-soft);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--purple-deep);
  color: var(--cream);
  border-color: var(--purple-deep);
}

.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 165, 55, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--purple-deep);
  border-color: var(--purple-deep);
}

.btn-secondary:hover {
  background: var(--purple-deep);
  color: var(--cream);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 165, 55, 0.35);
}

.btn-arrow {
  transition: transform 0.3s;
}

.btn:hover .btn-arrow { transform: translateX(4px); }

/* ============ DECORATIVE ELEMENTS ============ */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.ornament-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* Lightning motif — echoes the logo */
.lightning-streak {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold) 20%, var(--gold-bright) 50%, var(--gold) 80%, transparent);
  opacity: 0.4;
  pointer-events: none;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--purple-shadow);
  color: var(--cream);
  padding: 5rem 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gold);
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(245, 239, 228, 0.15);
}

.footer-brand h3 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-family: var(--font-editorial);
  font-style: italic;
  color: var(--gold-bright);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.footer-brand .footer-verse {
  font-family: var(--font-editorial);
  font-style: italic;
  color: rgba(245, 239, 228, 0.7);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: rgba(245, 239, 228, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(245, 239, 228, 0.5);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(245, 239, 228, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 239, 228, 0.7);
  text-decoration: none;
  transition: all 0.3s;
}

.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-2px);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.reveal {
  opacity: 0;
  animation: fadeUp 1s var(--ease-reveal) forwards;
}

.reveal-delay-1 { animation-delay: 0.15s; }
.reveal-delay-2 { animation-delay: 0.3s; }
.reveal-delay-3 { animation-delay: 0.45s; }
.reveal-delay-4 { animation-delay: 0.6s; }
.reveal-delay-5 { animation-delay: 0.75s; }

/* Scroll-triggered reveals */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s var(--ease-reveal);
}

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

/* ============ PAGE HEADER (non-home pages) ============ */
.page-hero {
  padding: 11rem 3rem 5rem;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--purple-mist);
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--gold-veil) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.page-hero .eyebrow { margin-bottom: 1.5rem; }

.page-hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.page-hero .lede { max-width: 640px; }

/* ============ CARDS ============ */
.card {
  background: var(--ivory);
  border: 1px solid var(--purple-mist);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.4s var(--ease-soft);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 20px 50px rgba(61, 15, 92, 0.12);
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--ivory);
  border: 1px solid var(--purple-mist);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: all 0.3s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--ivory);
  box-shadow: 0 0 0 4px var(--gold-veil);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-body);
}

/* ============ MOBILE NAV OVERLAY ============ */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(245, 239, 228, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-soft);
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.nav-overlay-links a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--purple-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}

.nav-overlay-links a:hover {
  color: var(--gold-deep);
}

.nav-overlay-links .nav-cta {
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Burger animation when open */
.nav-burger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-burger { display: flex; z-index: 101; }
  .container, .container-narrow { padding: 0 1.5rem; }
  .page-hero { padding: 8rem 1.5rem 3rem; }
  .footer { padding: 4rem 1.5rem 2rem; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .btn { padding: 0.85rem 1.5rem; font-size: 0.8rem; }
  .scripture { font-size: clamp(1.25rem, 4vw, 2rem); }
  .scripture::before { font-size: 4rem; top: -0.75rem; left: -0.25rem; }
  .lede { font-size: 1.1rem; }
}
