/* ============================================================
   ORM Geek — Global Stylesheet
   /assets/css/global.css
   Covers: CSS variables, reset, typography, nav, footer,
           shared utilities, animations, responsive rules.
   Page-specific styles go in a <style> block on each page.

   Font loading note:
   Fonts are loaded via <link> tags in the <head> of each page,
   NOT via @import here — this is intentional for performance.
   The standard font link to include on every page is:
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Outfit:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
   ============================================================ */

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

/* ── DESIGN TOKENS ── */
:root {
  --cream:      #F7F4EF;
  --white:      #FFFFFF;
  --paper:      #EEE9E1;
  --forest:     #1B3A2D;
  --forest2:    #254D3C;
  --forest3:    #2E6350;
  --gold:       #C9973A;
  --gold2:      #E2B05A;
  --gold-light: rgba(201,151,58,0.12);
  --ink:        #111A14;
  --ink2:       #2C3A30;
  --muted:      #7A8C7F;
  --border:     rgba(27,58,45,0.1);
  --border2:    rgba(27,58,45,0.06);
  --charcoal:   #0F1510;
  --red:        #C0392B;
  --red2:       #E84040;
  --red-dim:    rgba(192,57,43,0.15);
  --red-border: rgba(192,57,43,0.3);
  --green:      #1B8A5A;
  --shadow:     0 4px 32px rgba(27,58,45,0.10);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::after {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9000;
}

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.025em; color: var(--ink);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.15;
  color: var(--ink); margin-bottom: 1.25rem;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600;
  color: var(--ink); margin-bottom: 0.5rem;
}

h2 em, h1 em { font-style: italic; color: var(--forest); }

.lead {
  font-size: 1rem; color: var(--muted);
  line-height: 1.8; font-weight: 300; max-width: 640px;
}

.lead strong { color: var(--ink); font-weight: 500; }

/* Section sub-heading — used below h2 across multiple pages */
.section-sub {
  font-size: 1rem; color: var(--muted);
  line-height: 1.8; font-weight: 300;
  max-width: 580px;
}

/* Mono utility — for terminal/code components */
.mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ── SECTION DEFAULTS ── */
.section { padding: 110px 6%; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--gold); margin-bottom: 1.1rem;
}

.section-tag::before { content: ''; width: 18px; height: 1px; background: var(--gold); }
.section-tag.red { color: var(--red2); }
.section-tag.red::before { background: var(--red2); }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; color: rgba(247,244,239,0.3);
  margin-bottom: 1.75rem;
}

.breadcrumb a { color: rgba(247,244,239,0.3); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold2); }
.breadcrumb-sep { opacity: 0.3; }
.breadcrumb-current { color: var(--gold2); }

/* ── SHARED BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--forest); color: var(--cream);
  padding: 0.95rem 1.9rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(27,58,45,0.2);
}

.btn-primary:hover { background: var(--forest2); transform: translateY(-2px); }

.btn-gold {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gold); color: var(--forest);
  padding: 0.9rem 1.85rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  border: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}

.btn-gold:hover { background: var(--gold2); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--forest);
  padding: 0.9rem 1.9rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  text-decoration: none; border: 1.5px solid var(--border);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-ghost:hover { border-color: var(--forest); background: rgba(27,58,45,0.04); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--cream);
  padding: 0.75rem 1.5rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; border: 1.5px solid rgba(247,244,239,0.2);
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover { border-color: rgba(247,244,239,0.5); color: var(--cream); }

.btn-red {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--red); color: var(--cream);
  padding: 0.9rem 1.85rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(192,57,43,0.3);
}

.btn-red:hover { background: var(--red2); transform: translateY(-2px); }

.btn-forest {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--forest); color: var(--cream);
  padding: 0.8rem 1.5rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: background 0.2s;
}

.btn-forest:hover { background: var(--forest2); }

/* Ghost light — for dark background sections */
.btn-ghost-light {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: rgba(247,244,239,0.65);
  padding: 0.9rem 1.85rem; border-radius: 5px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
  text-decoration: none; border: 1.5px solid rgba(247,244,239,0.2);
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost-light:hover { border-color: rgba(247,244,239,0.45); color: var(--cream); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%;
  background: rgba(247,244,239,0.93); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

/* Dark nav variant — add class="nav-dark" to <nav> on dark-hero pages */
nav.nav-dark {
  background: rgba(15,21,16,0.95);
  border-bottom-color: rgba(201,151,58,0.15);
}

nav.nav-crisis {
  background: rgba(15,21,16,0.95);
  border-bottom-color: rgba(192,57,43,0.2);
}

.logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.4rem; color: var(--forest);
  text-decoration: none; letter-spacing: -0.01em;
}

nav.nav-dark .logo,
nav.nav-crisis .logo { color: var(--cream); }

.logo sup {
  font-family: var(--font-body); font-size: 0.5rem;
  font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); vertical-align: super; margin-left: 2px;
}

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

.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--ink2); text-decoration: none; transition: color 0.2s;
}

nav.nav-dark .nav-links a,
nav.nav-crisis .nav-links a { color: rgba(247,244,239,0.65); }

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

/* Active nav link — set by JS based on current URL */
.nav-links a.active {
  color: var(--forest); font-weight: 600;
}

nav.nav-dark .nav-links a.active,
nav.nav-crisis .nav-links a.active {
  color: var(--gold2); font-weight: 600;
}

/* Default CTA — green */
.nav-cta {
  background: var(--forest) !important;
  color: var(--cream) !important;
  padding: 0.5rem 1.35rem; border-radius: 4px;
  font-weight: 500 !important;
  transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover { background: var(--forest2) !important; transform: translateY(-1px); }

/* Gold CTA variant */
.nav-cta-gold {
  background: var(--gold) !important;
  color: var(--forest) !important;
  padding: 0.5rem 1.35rem; border-radius: 4px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

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

/* Red CTA variant — crisis page */
.nav-cta-red {
  background: var(--red) !important;
  color: var(--cream) !important;
  padding: 0.5rem 1.35rem; border-radius: 4px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

.nav-cta-red:hover { background: var(--red2) !important; }

/* Mobile hamburger — hidden by default, shown via JS if needed */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}

.nav-hamburger span {
  width: 24px; height: 2px;
  background: var(--forest); border-radius: 2px;
  transition: all 0.3s;
}

nav.nav-dark .nav-hamburger span,
nav.nav-crisis .nav-hamburger span { background: var(--cream); }

/* ── FOOTER ── */
footer { background: var(--ink); padding: 5rem 6% 0; }

.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 4rem; padding-bottom: 4rem;
  border-bottom: 1px solid rgba(247,244,239,0.07);
}

.footer-brand-block { }

.footer-logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.35rem; color: var(--cream);
  text-decoration: none; display: block;
  margin-bottom: 1rem; letter-spacing: -0.01em;
}

.footer-logo sup {
  font-family: var(--font-body); font-size: 0.45rem;
  font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold); vertical-align: super;
}

.footer-tagline {
  font-size: 0.82rem; color: rgba(247,244,239,0.4);
  line-height: 1.7; max-width: 240px;
  margin-bottom: 1.5rem; font-weight: 300;
}

.footer-email {
  font-size: 0.82rem; color: var(--gold2);
  text-decoration: none; transition: color 0.2s;
}

.footer-email:hover { color: var(--gold); }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(247,244,239,0.3); margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 0.65rem; }

.footer-col ul li a {
  font-size: 0.845rem; color: rgba(247,244,239,0.55);
  text-decoration: none; font-weight: 300; transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--cream); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 0; font-size: 0.75rem;
  color: rgba(247,244,239,0.3); flex-wrap: wrap; gap: 0.5rem;
}

.footer-bottom a { color: rgba(247,244,239,0.3); text-decoration: none; }
.footer-bottom a:hover { color: rgba(247,244,239,0.7); }

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

.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* Stagger delay utilities — add to .reveal siblings for cascade effect */
.reveal.d1 { transition-delay: 0.05s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.19s; }
.reveal.d4 { transition-delay: 0.26s; }
.reveal.d5 { transition-delay: 0.33s; }

/* Hero fade-in — for above-the-fold elements that don't use IntersectionObserver */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FAQ ACCORDION (shared) ── */
.faq-section { padding: 110px 6%; }

.faq-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 300px 1fr;
  gap: 5rem; align-items: start;
}

.faq-sidebar { position: sticky; top: 100px; }
.faq-sidebar h2 { margin-bottom: 1rem; }
.faq-sidebar p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.5rem; font-weight: 300; }

.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }

.faq-q {
  width: 100%; text-align: left; padding: 1.5rem 0;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-size: 0.975rem; font-weight: 600;
  color: var(--ink); line-height: 1.3;
}

.faq-q:hover { color: var(--forest); }

.faq-icon {
  font-size: 1.2rem; color: var(--muted);
  transition: transform 0.3s; flex-shrink: 0;
}

.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--forest); }

.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.faq-item.open .faq-a { max-height: 500px; padding-bottom: 1.5rem; }

.faq-a p { font-size: 0.875rem; color: var(--ink2); line-height: 1.8; font-weight: 300; }
.faq-a p + p { margin-top: 0.75rem; }
.faq-a strong { color: var(--ink); font-weight: 600; }

/* ── RESPONSIVE — GLOBAL ── */
@media (max-width: 1060px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .faq-inner { grid-template-columns: 1fr; gap: 3rem; }
  .faq-sidebar { position: static; }
}

@media (max-width: 720px) {
  /* Nav */
  .nav-links { display: none; }

  /* Section padding */
  .section { padding: 70px 6%; }
  .faq-section { padding: 70px 6%; }

  /* Footer accordion */
  footer { padding: 2.5rem 6% 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; border-bottom: none; }
  .footer-brand-block { padding-bottom: 2rem; border-bottom: 1px solid rgba(247,244,239,0.07); }
  .footer-col { border-bottom: 1px solid rgba(247,244,239,0.07); }
  .footer-col h4 {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 0; margin-bottom: 0;
    cursor: pointer; user-select: none;
    font-size: 0.75rem; letter-spacing: 0.12em;
  }
  .footer-col h4::after {
    content: '+'; font-size: 1.1rem; font-weight: 300;
    color: rgba(247,244,239,0.4); transition: transform 0.25s; line-height: 1;
  }
  .footer-col.open h4::after { transform: rotate(45deg); color: var(--gold2); }
  .footer-col ul {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease; padding-bottom: 0;
  }
  .footer-col.open ul { max-height: 400px; padding-bottom: 1.25rem; }
  .footer-col ul li { margin-bottom: 0.75rem; }
  .footer-col ul li a { font-size: 0.9rem; }
  .footer-bottom {
    flex-direction: column; text-align: center;
    margin-top: 0; padding: 1.25rem 0;
    border-top: 1px solid rgba(247,244,239,0.07);
  }
}
