/* ============================================================
   MOOLAH MEDIA — SHARED DESIGN SYSTEM
   Extracted from inline <style> blocks across all pages.
   Each page loads this stylesheet, then overrides page-specific
   values (body background, wrap padding, section padding, etc.)
   in a small inline <style> block.
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────── */
:root {
  /* Dark surfaces */
  --void:      #09090B;
  --void-l:    #111116;
  --void-ll:   #1A1A22;

  /* Light surfaces */
  --parch:     #F5F2EB;
  --parch-d:   #EAE5DA;
  --parch-dd:  #DDD7C8;
  --parch-ddd: #CEC8B6;
  --white:     #FFFFFF;

  /* Text */
  --snow:      #F8F8F6;
  --ink:       #0D0D10;
  --ink-m:     #2E3040;
  --mute:      #7A7E8A;
  --light:     #AAAFBC;

  /* Accent */
  --gold:      #B5883A;
  --gold-l:    #C9A050;
  --gold-dim:  rgba(181,136,58,.15);

  /* Status colours (case studies / proof pages) */
  --green:     #15803D;
  --green-l:   #16A34A;
  --green-bg:  rgba(21,128,61,.08);
  --red:       #B91C1C;
  --red-bg:    rgba(185,28,28,.08);
  --amber:     #B45309;
  --amber-bg:  rgba(180,83,9,.08);
  --indigo:    #6366F1;
  --sky:       #0EA5E9;
  --rose:      #E11D48;

  /* Borders */
  --border-d:  rgba(255,255,255,.07);
  --border-l:  rgba(13,13,16,.08);
  --border-m:  rgba(13,13,16,.13);
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--void);
  color: var(--snow);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

/* ── GLOBAL MOTION / PREMIUM FEEL ───────────────── */
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: page-enter .65s cubic-bezier(.22,1,.36,1) both;
}

a,
button,
.btn-primary,
.btn-ghost,
.nav-cta,
.nav-links a {
  transition: color .3s ease, background-color .3s ease,
              border-color .3s ease, opacity .3s ease,
              transform .28s cubic-bezier(.22,1,.36,1),
              box-shadow .3s ease;
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }
}

/* ── SCROLL REVEAL ──────────────────────────────── */
.r {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1),
              transform .8s cubic-bezier(.22,1,.36,1);
}
.r.in { opacity: 1; transform: none; }
.d1 { transition-delay: .09s }
.d2 { transition-delay: .18s }
.d3 { transition-delay: .27s }
.d4 { transition-delay: .36s }
.d5 { transition-delay: .45s }
.d6 { transition-delay: .54s }

/* ── COUNTER ────────────────────────────────────── */
.count { display: inline; }

/* ── NAVIGATION ─────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px;
  background: var(--void);
  border-bottom: 1px solid var(--border-d);
  transition: background .3s, border-color .3s;
}

/* Light nav variant (used on proof/case-study pages) */
.nav.light {
  background: rgba(245,242,235,.94);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border-l);
}

/* Wordmark */
.nav-logo {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--snow); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  transition: opacity .25s, color .3s;
}
.nav.light .nav-logo { color: var(--ink); }
.nav-logo:hover { opacity: .75; }

.nav-logo-mark {
  width: 28px; height: 28px;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark span {
  font-family: 'Playfair Display', serif;
  font-size: 14px; font-style: italic;
  color: var(--gold); line-height: 1;
}

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 40px;
  list-style: none;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  font-size: 12px; font-weight: 400;
  letter-spacing: .06em;
  color: rgba(248,248,246,.45);
  text-decoration: none;
  transition: color .25s;
  white-space: nowrap;
}
.nav.light .nav-links a { color: rgba(13,13,16,.45); }
.nav-links a:hover,
.nav-links a.active { color: var(--snow); }
.nav.light .nav-links a:hover,
.nav.light .nav-links a.active { color: var(--ink); }
.nav-links a.active { position: relative; }
.nav-links a.active::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--gold);
}

/* CTA button in nav */
.nav-cta {
  font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--void); background: var(--gold);
  padding: 10px 22px; text-decoration: none;
  transition: background .25s, transform .2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--gold-l); transform: translateY(-1px); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  line-height: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--snow);
  transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .2s ease;
}
.nav.light .nav-toggle span { background: var(--ink); }

/* ── ACCESSIBILITY ───────────────────────────── */
.skip-link {
  position: absolute;
  left: 12px; top: -48px; z-index: 1200;
  background: var(--gold); color: var(--void);
  padding: 10px 14px;
  font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold-l);
  outline-offset: 2px;
}

/* ── LAYOUT PRIMITIVES ──────────────────────────── */
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding: 0 56px;
}
.section { padding: 140px 0; }
.section.tight { padding: 100px 0; }
.section + .section { border-top: 1px solid var(--border-l); }

/* Surface overrides */
.on-void  { background: var(--void); color: var(--snow); }
.on-parch { background: var(--parch); color: var(--ink); }
.on-white { background: var(--white); color: var(--ink); }

/* ── TYPE SYSTEM (main pages) ─────────────────── */
.s-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.s-tag::before {
  content: '';
  display: block; width: 32px; height: 1px;
  background: var(--gold); flex-shrink: 0;
}
.on-parch .s-tag,
.on-white .s-tag { color: var(--gold); }

.display {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.0;
}
.display em { font-style: italic; color: var(--gold-l); }
.on-parch .display em,
.on-white .display em { color: var(--gold); }

.body-lg {
  font-size: 17px; line-height: 1.85;
  color: rgba(248,248,246,.5);
  font-weight: 300;
}
.on-parch .body-lg,
.on-white .body-lg { color: var(--mute); }

.body-md {
  font-size: 15px; line-height: 1.85;
  color: rgba(248,248,246,.55);
}
.on-parch .body-md,
.on-white .body-md { color: var(--ink-m); }

.gold-rule {
  width: 48px; height: 1px;
  background: var(--gold); margin: 40px 0;
}

/* ── TYPE SYSTEM (case study / proof pages) ────── */
.tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.tag::before {
  content: '';
  display: block; width: 28px; height: 1px;
  background: var(--gold);
}
.tag.gr { color: var(--green-l); }
.tag.gr::before { background: var(--green-l); }
.tag.wh { color: var(--gold-l); }
.tag.wh::before { background: var(--gold); }

.h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 400; line-height: 1.08; letter-spacing: -.02em;
  margin-bottom: 20px;
}
.h2 em { font-style: italic; color: var(--gold); }
.h2.wh { color: var(--snow); }
.h2.wh em { color: var(--gold-l); }

.intro {
  font-size: 17px; line-height: 1.8; color: var(--mute);
  max-width: 620px;
}
.intro.wh { color: rgba(248,248,246,.5); }
.intro strong { color: var(--ink); font-weight: 500; }
.intro.wh strong { color: var(--snow); }

/* ── BUTTONS ────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--void); background: var(--gold);
  padding: 16px 36px; text-decoration: none;
  transition: background .25s, transform .2s, box-shadow .25s;
  border: none; cursor: pointer;
}
.btn-primary::after { content: '→'; font-size: 14px; }
.btn-primary:hover {
  background: var(--gold-l);
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(181,136,58,.25);
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--snow);
  padding: 15px 35px;
  border: 1px solid rgba(248,248,246,.2);
  text-decoration: none;
  transition: border-color .25s, color .25s;
  background: none; cursor: pointer;
}
.btn-ghost::after { content: '→'; font-size: 14px; }
.btn-ghost:hover {
  border-color: var(--snow);
  color: var(--snow);
}
.on-parch .btn-ghost,
.on-white .btn-ghost {
  color: var(--ink);
  border-color: var(--border-m);
}
.on-parch .btn-ghost:hover,
.on-white .btn-ghost:hover { border-color: var(--ink); }

/* ── STAT COMPONENT ─────────────────────────────── */
.stat-num {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--snow);
}
.stat-num .acc { color: var(--gold-l); }
.on-parch .stat-num,
.on-white .stat-num { color: var(--ink); }
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(248,248,246,.3);
  margin-top: 8px;
}
.on-parch .stat-label,
.on-white .stat-label { color: var(--mute); }

/* ── HORIZONTAL RULE ────────────────────────────── */
hr.section-rule {
  border: none;
  border-top: 1px solid var(--border-d);
}
.on-parch hr.section-rule,
.on-white hr.section-rule { border-top-color: var(--border-l); }

/* ── FOOTER ─────────────────────────────────────── */
.site-footer {
  background: var(--void);
  border-top: 1px solid var(--border-d);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 56px; align-items: start;
}
.footer-brand .nav-logo { margin-bottom: 20px; display: inline-flex; }
.footer-brand p {
  font-size: 13px; line-height: 1.8;
  color: rgba(248,248,246,.3); max-width: 260px;
}
.footer-col-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(248,248,246,.25);
  margin-bottom: 20px;
}
.footer-links-col a {
  display: block; font-size: 13px;
  color: rgba(248,248,246,.4); text-decoration: none;
  margin-bottom: 10px; transition: color .2s;
}
.footer-links-col a:hover { color: var(--snow); }
.footer-bottom {
  border-top: 1px solid var(--border-d);
  padding: 24px 56px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p {
  font-size: 12px; color: rgba(248,248,246,.2);
}

/* ── CTA SECTION (shared pattern) ────────────────── */
.cta-section {
  padding: 160px 56px;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 256px; pointer-events: none; opacity: .5;
}
.cta-inner { position: relative; z-index: 2; max-width: 700px; margin: 0 auto; }
.cta-kicker {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 36px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.cta-kicker::before,
.cta-kicker::after {
  content: ''; width: 32px; height: 1px; background: var(--gold);
}
.cta-h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 400; line-height: 1.08; letter-spacing: -.02em;
  margin-bottom: 24px;
}
.cta-h2 em { font-style: italic; color: var(--gold-l); }
.cta-sub {
  font-size: 17px; line-height: 1.8; color: rgba(248,248,246,.42);
  margin-bottom: 52px; font-weight: 300;
  max-width: 500px; margin-left: auto; margin-right: auto;
}
.cta-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
}
.cta-note {
  margin-top: 24px; font-family: 'DM Mono', monospace;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(248,248,246,.2);
}

/* ── DESKTOP RESPONSIVE (1060px) ─────────────────── */
@media (max-width: 1060px) {
  .site-footer { grid-template-columns: 1fr; padding: 40px; }
  .footer-bottom { padding: 20px 40px; }
  .cta-section { padding: 120px 48px; }
}
