/*
 * THWA DESIGN SYSTEM — Brand System 2.0
 * Authority: Jason Thomas Cawley — Founder & Supreme Custodian
 * Version: 4.0 — Brand System 2.0 Canon
 *
 * CORE — Identity (Structure + Trust)
 *   Cathedral Blue   #2F3A5F
 *   Deep Cathedral   #1E2746
 *   Soft Cathedral   #4A5A8A
 *
 * HUMAN — Dignity + Warmth
 *   Dignity Beige    #F5DC75
 *   Soft Dignity     #FBF3D1
 *   Warm Sand        #E8D8A8
 *
 * PATHWAY — Progress + Movement
 *   Accordance Green #8BC34A
 *   Deep Accordance  #5E8C2A
 *   Soft Accordance  #DDECC5
 *
 * HOPE — Breakthrough (use sparingly)
 *   Bright Horizon   #FFD700
 *   Soft Horizon     #FFE680
 *   Deep Horizon     #C9A600
 *
 * STRUCTURE — Neutral + Balance
 *   Hearth Grey      #666666
 *   Soft Hearth      #9CA3AF
 *   Light Hearth     #E5E7EB
 *
 * BACKGROUND SYSTEM
 *   Pure White       #FFFFFF
 *   Light Canvas     #FAF8F2
 *   Soft Background  #F4F1E8
 *
 * DARK SUPPORT
 *   Deep Backdrop    #101828
 *   Soft Backdrop    #1C2536
 */

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* CORE — Identity */
  --cathedral:       #2F3A5F;
  --cathedral-deep:  #1E2746;
  --cathedral-soft:  #4A5A8A;

  /* HUMAN — Dignity + Warmth */
  --dignity:         #F5DC75;
  --dignity-soft:    #FBF3D1;
  --warm-sand:       #E8D8A8;

  /* PATHWAY — Progress + Movement */
  --accordance:      #8BC34A;
  --accordance-deep: #5E8C2A;
  --accordance-soft: #DDECC5;

  /* HOPE — Breakthrough */
  --horizon:         #FFD700;
  --horizon-soft:    #FFE680;
  --horizon-deep:    #C9A600;

  /* STRUCTURE — Neutral */
  --hearth:          #666666;
  --hearth-soft:     #9CA3AF;
  --hearth-light:    #E5E7EB;

  /* BACKGROUNDS */
  --bg-white:        #FFFFFF;
  --bg-canvas:       #FAF8F2;
  --bg-soft:         #F4F1E8;

  /* DARK SUPPORT */
  --backdrop:        #101828;
  --backdrop-soft:   #1C2536;

  /* ── Semantic aliases (used throughout) ── */
  --navy:            var(--cathedral);
  --navy-deep:       var(--cathedral-deep);
  --navy-mid:        var(--cathedral-soft);
  --gold:            var(--dignity);
  --gold-str:        var(--horizon);
  --gold-soft:       rgba(245,220,117,0.15);
  --gold-border:     rgba(245,220,117,0.3);
  --green:           var(--accordance);
  --green-dark:      var(--accordance-deep);
  --green-soft:      rgba(139,195,74,0.12);
  --bg-dark:         var(--backdrop);
  --bg-card:         var(--backdrop-soft);
  --bg-light:        var(--bg-canvas);
  --text-dark:       var(--cathedral-deep);
  --text-body:       #2a3550;
  --text-soft:       var(--hearth);
  --text-muted:      var(--hearth-soft);
  --text-white:      #f8f6f0;
  --text-white-soft: rgba(248,246,240,0.75);
  --text-white-muted:rgba(248,246,240,0.45);
  --border:          rgba(47,58,95,0.12);
  --border-dark:     rgba(248,246,240,0.08);
  --border-gold:     rgba(245,220,117,0.3);

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(30,39,70,0.08);
  --shadow:      0 8px 24px rgba(30,39,70,0.12);
  --shadow-lg:   0 20px 50px rgba(30,39,70,0.18);
  --shadow-gold: 0 0 30px rgba(245,220,117,0.2);
  --shadow-dark: 0 20px 50px rgba(16,24,40,0.6);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  /* Transitions */
  --transition:      0.2s ease-out;
  --transition-slow: 0.4s ease-out;

  /* Layout */
  --max-width:  1200px;
  --nav-height: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cathedral-deep);
}

.text-hero  { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.08; }
.text-h1    { font-size: clamp(2rem, 4vw, 3.25rem); }
.text-h2    { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.text-h3    { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.text-h4    { font-size: 1.25rem; }
.text-lead  { font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; }
.text-body  { font-size: 1rem; line-height: 1.7; }
.text-sm    { font-size: 0.875rem; }
.text-xs    { font-size: 0.75rem; }
.text-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

.text-gold    { color: var(--dignity); }
.text-navy    { color: var(--cathedral); }
.text-green   { color: var(--accordance); }
.text-soft    { color: var(--text-soft); }
.text-muted   { color: var(--text-muted); }
.text-white   { color: var(--text-white); }
.text-center  { text-align: center; }

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.container    { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

.section    { padding: var(--space-3xl) 0; }
.section-sm { padding: var(--space-2xl) 0; }
.section-lg { padding: 120px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.thwa-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition-slow);
}

.thwa-nav.scrolled {
  background: rgba(30,39,70,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245,220,117,0.2);
  box-shadow: 0 4px 24px rgba(16,24,40,0.3);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Logo image */
.nav-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter var(--transition);
}
.thwa-nav.light .nav-logo-img { filter: none; }

/* Fallback mark if image fails */
.nav-logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--horizon), var(--dignity), var(--horizon-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 17px;
  color: var(--cathedral-deep);
  box-shadow: 0 4px 12px rgba(255,215,0,0.3);
  flex-shrink: 0;
}

.nav-logo-text { display: flex; flex-direction: column; gap: 1px; }
.nav-logo-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 15px;
  color: var(--text-white);
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav-logo-sub {
  font-size: 9px;
  color: var(--text-white-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-white-soft);
  transition: all var(--transition);
  text-decoration: none;
}
.nav-link:hover { color: var(--text-white); background: rgba(255,255,255,0.08); }
.nav-link.active { color: var(--dignity); }

.nav-cta { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(30,39,70,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(245,220,117,0.2);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { padding: 12px 16px; font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Primary — Dignity Gold */
.btn-gold {
  background: linear-gradient(135deg, var(--horizon), var(--dignity), var(--horizon-deep));
  border-color: rgba(245,220,117,0.5);
  color: var(--cathedral-deep);
  box-shadow: 0 4px 20px rgba(255,215,0,0.25);
}
.btn-gold:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,215,0,0.35);
}

/* Secondary — Cathedral Blue */
.btn-navy {
  background: var(--cathedral);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(47,58,95,0.3);
}
.btn-navy:hover:not(:disabled) {
  background: var(--cathedral-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47,58,95,0.4);
}

/* Outline gold */
.btn-outline-gold {
  background: transparent;
  border-color: var(--dignity);
  color: var(--dignity);
}
.btn-outline-gold:hover:not(:disabled) {
  background: rgba(245,220,117,0.1);
  transform: translateY(-2px);
}

/* Outline white */
.btn-outline-white {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: var(--text-white);
}
.btn-outline-white:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-2px);
}

/* Accordance Green */
.btn-green {
  background: var(--accordance);
  border-color: var(--accordance-deep);
  color: #fff;
}
.btn-green:hover:not(:disabled) { background: var(--accordance-deep); transform: translateY(-2px); }

/* Ghost */
.btn-ghost {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--text-white-soft);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.08); color: var(--text-white); }

.btn-sm  { padding: 9px 20px; font-size: 13px; }
.btn-lg  { padding: 16px 36px; font-size: 16px; }
.btn-xl  { padding: 18px 44px; font-size: 17px; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.card-dark {
  background: var(--backdrop-soft);
  border-color: var(--border-dark);
  color: var(--text-white);
}

.card-cathedral {
  background: linear-gradient(135deg, var(--cathedral-deep), var(--cathedral));
  border-color: rgba(245,220,117,0.2);
  color: var(--text-white);
}

.card-canvas {
  background: var(--bg-canvas);
  border-color: var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(245,220,117,0.12);
  border: 1px solid rgba(245,220,117,0.3);
  color: var(--horizon-deep);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-eyebrow-navy {
  background: rgba(47,58,95,0.08);
  border-color: rgba(47,58,95,0.2);
  color: var(--cathedral);
}

.section-eyebrow-green {
  background: rgba(139,195,74,0.1);
  border-color: rgba(139,195,74,0.25);
  color: var(--accordance-deep);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BADGES & PILLS
   ═══════════════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-gold  { background: rgba(245,220,117,0.15); border: 1px solid rgba(245,220,117,0.3); color: var(--horizon-deep); }
.badge-navy  { background: rgba(47,58,95,0.1); border: 1px solid rgba(47,58,95,0.2); color: var(--cathedral); }
.badge-green { background: rgba(139,195,74,0.1); border: 1px solid rgba(139,195,74,0.25); color: var(--accordance-deep); }
.badge-white { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: var(--text-white); }

/* ═══════════════════════════════════════════════════════════════════════════
   DIVIDERS & DECORATIVE
   ═══════════════════════════════════════════════════════════════════════════ */
.divider      { height: 1px; background: var(--border); margin: var(--space-xl) 0; }
.divider-gold { height: 2px; background: linear-gradient(90deg, transparent, var(--dignity), transparent); }
.gold-line    { width: 48px; height: 3px; background: var(--dignity); border-radius: 2px; margin: 12px auto 0; }
.gold-line-left { margin: 12px 0 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-dark {
  background: linear-gradient(135deg, var(--cathedral-deep) 0%, var(--cathedral) 50%, var(--cathedral-deep) 100%);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}
.hero-dark::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(245,220,117,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgba(47,58,95,0.4) 0%, transparent 50%);
  pointer-events: none;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(245,220,117,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAT BLOCKS
   ═══════════════════════════════════════════════════════════════════════════ */
.stat-block { text-align: center; }
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--dignity);
  line-height: 1;
}
.stat-label { font-size: 13px; color: var(--text-white-soft); margin-top: 6px; line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-body); text-transform: uppercase; letter-spacing: 0.05em; }
.form-input, .form-select, .form-textarea {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cathedral);
  box-shadow: 0 0 0 3px rgba(47,58,95,0.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 120px; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.thwa-footer {
  background: var(--cathedral-deep);
  color: var(--text-white-soft);
  padding: 64px 0 32px;
  border-top: 2px solid var(--dignity);
}

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

.footer-brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 20px;
  color: var(--text-white);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-white-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dignity);
  margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link {
  font-size: 13px;
  color: var(--text-white-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--dignity); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy { font-size: 12px; color: var(--text-white-muted); }
.footer-code { font-size: 12px; color: var(--dignity); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.pt-nav { padding-top: var(--nav-height); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

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

.animate-fade-up { animation: fadeUp 0.6s ease-out both; }
.animate-fade-in { animation: fadeIn 0.5s ease-out both; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .btn-xl { padding: 15px 32px; font-size: 15px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
}