/* ═══════════════════════════════════════════════════════════════════
   THE OUTSIDE CLUB — site.css
   Design system & shared styles for theoutsideclub.co.uk
   
   Font imports are in each HTML <head> to avoid render-blocking:
   <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet">
   ═══════════════════════════════════════════════════════════════════ */


/* ── 1. CSS VARIABLES ──────────────────────────────────────────── */

:root {
  /* Night — darkest backgrounds, hero, footer */
  --night:           #141618;
  --night-warm:      #1A1B18;
  --night-glow:      #1E1F1A;

  /* Forest — deep teal-green sections */
  --forest:          #142E28;
  --forest-mid:      #1A3F35;
  --forest-light:    #1F4A3E;
  --forest-surface:  rgba(255,255,255,0.04);
  --forest-border:   rgba(255,255,255,0.06);

  /* Earth — warm dark brown sections */
  --earth:           #1E1B17;
  --earth-mid:       #2A2520;
  --earth-light:     #332D26;
  --earth-surface:   rgba(255,255,255,0.035);
  --earth-border:    rgba(255,255,255,0.055);

  /* Brand teal (logo O and C) */
  --teal:            #3A8574;
  --teal-deep:       #2B6B5E;
  --teal-bright:     #4CA893;
  --teal-glow:       rgba(74,168,147,0.15);

  /* Brand fire (logo flame) */
  --fire:            #D4703C;
  --fire-deep:       #B85A2B;
  --fire-bright:     #E8915F;
  --fire-glow:       #F0A878;
  --fire-ember:      #F4C496;
  --fire-hot:        #FFD4A8;
  --fire-surface:    rgba(212,112,60,0.08);

  /* Bark (logo T) */
  --bark:            #7A5234;
  --bark-light:      #9B7354;

  /* Text — warm off-whites, never pure white */
  --text-bright:     #F0EDE8;
  --text-primary:    #D8D3CB;
  --text-secondary:  #BDB4A7;
  --text-muted:      #6B6358;
  --text-faint:      #4A443D;

  /* Spacing scale */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;
  --sp-5xl: 8rem;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:   0.8rem;
  --text-sm:   0.9rem;
  --text-base: 1.05rem;
  --text-lg:   1.2rem;
  --text-xl:   1.45rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  2.9rem;
  --text-5xl:  3.8rem;

  /* Border radius */
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shared transition */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ── 2. RESET & BASE ───────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--night);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-bright);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--fire-bright);
}


/* ── 3. TYPOGRAPHY ─────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-bright);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

/* Section heading — used on most pages */
.section-heading {
  font-size: var(--text-3xl);
  margin-bottom: var(--sp-lg);
  font-weight: 700;
}

/* Section body text block */
.section-body {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}
.section-body p + p {
  margin-top: var(--sp-md);
}

/* Eyebrow label (small uppercase accent text) */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fire);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-md);
}

/* Emphasised words in headings — colour shift, no italic */
h1 em, h2 em, h3 em {
  font-style: normal;
  color: var(--fire-glow);
}


/* ── 4. LAYOUT ─────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.container--narrow {
  max-width: 800px;
}

section {
  padding: var(--sp-4xl) 0;
}

/* Two-column content + image layout */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: center;
}

/* Section backgrounds — apply to <section> elements */
.bg-night      { background: var(--night); }
.bg-night-warm { background: var(--night-warm); }
.bg-forest     { background: var(--forest); }
.bg-forest-mid { background: var(--forest-mid); }
.bg-earth      { background: var(--earth); }
.bg-earth-mid  { background: var(--earth-mid); }

/* Decorative section divider — thin gradient line */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(74,168,147,0.12), transparent);
}


/* ── 5. NAVIGATION ─────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-nav.scrolled {
  background: rgba(20,22,24,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
  transition: height 0.4s ease;
}
.site-nav.scrolled .nav-inner {
  height: 64px;
}

.nav-logo {
  height: 48px;
  width: auto;
  transition: height 0.4s ease, opacity 0.3s ease;
}
.site-nav.scrolled .nav-logo {
  height: 38px;
}

.nav-links {
  display: flex;
  gap: var(--sp-lg);
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.03em;
  transition: color var(--transition);
  position: relative;
}

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

.nav-links a:hover {
  color: var(--text-bright);
  text-decoration: none;
}
.nav-links a:hover::after {
  width: 100%;
}

/* Donate CTA button in nav */
.nav-cta {
  background: var(--fire) !important;
  color: var(--text-bright) !important;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: all var(--transition);
  box-shadow: 0 0 0 0 rgba(212,112,60,0);
  animation: cta-glow 3s ease-in-out infinite;
}
.nav-cta::after {
  display: none !important;
}
.nav-cta:hover {
  background: var(--fire-bright) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212,112,60,0.3);
}

@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,112,60,0); }
  50% { box-shadow: 0 0 16px 2px rgba(212,112,60,0.15); }
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-sm);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
}


/* ── 6. BUTTONS ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

/* Primary action — fire orange */
.btn--fire {
  background: var(--fire);
  color: var(--text-bright);
}
.btn--fire:hover {
  background: var(--fire-bright);
  color: #fff;
  box-shadow: 0 4px 24px rgba(212,112,60,0.3);
}

/* Secondary action — teal */
.btn--teal {
  background: var(--teal-deep);
  color: var(--text-bright);
}
.btn--teal:hover {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 24px rgba(43,107,94,0.25);
}

/* Outlined button */
.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-muted);
}
.btn--outline:hover {
  border-color: var(--fire);
  color: var(--fire-bright);
}

/* Ghost link-style button */
.btn--ghost {
  background: transparent;
  color: var(--teal-bright);
  padding-left: 0;
  padding-right: 0;
  font-family: var(--font-display);
}
.btn--ghost:hover {
  color: var(--fire-bright);
  transform: none;
}
.btn--ghost .arrow {
  transition: transform var(--transition);
  display: inline-block;
}
.btn--ghost:hover .arrow {
  transform: translateX(4px);
}


/* ── 7. CARDS ──────────────────────────────────────────────────── */

/* Generic dark card — translucent surface */
.card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: var(--sp-2xl);
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

/* Card with fire accent bar on hover */
.card--accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--fire), var(--fire-glow));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card--accent:hover::before {
  opacity: 1;
}
.card--accent:hover {
  transform: translateY(-3px);
}

/* Clickable card (link card) */
.card--link {
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  display: block;
}
.card--link:hover {
  border-color: var(--fire);
  background: rgba(212,112,60,0.05);
  transform: translateY(-3px);
  color: var(--text-bright);
  text-decoration: none;
}

/* Card icon container */
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-lg);
  background: rgba(212,112,60,0.08);
  border: 1px solid rgba(212,112,60,0.12);
}
.card-icon svg {
  width: 26px;
  height: 26px;
}

/* Card title */
.card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--sp-md);
  font-weight: 700;
}

/* Card body text */
.card p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ── 8. BADGES & TAGS ──────────────────────────────────────────── */

/* Location badge (pill shape) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-display);
}

.badge--teal {
  background: var(--teal-glow);
  color: var(--teal-bright);
}
.badge--teal svg {
  width: 16px;
  height: 16px;
  fill: var(--teal-bright);
}

/* Activity/topic tags */
.tag {
  background: var(--fire-surface);
  color: var(--fire-bright);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-display);
  border: 1px solid rgba(212,112,60,0.12);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}


/* ── 9. SUPPORTERS STRIP ──────────────────────────────────────── */

.supporters-strip {
  background: var(--night-warm);
  padding: var(--sp-xl) 0;
  border-top: 1px solid rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.supporters-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3xl);
  flex-wrap: wrap;
}

.supporters-strip-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.supporter-logo {
  width: 100px;
  height: 44px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity var(--transition);
}
.supporter-logo:hover {
  opacity: 0.8;
}
.supporter-logo img {
  max-height: 28px;
  width: auto;
}


/* ── 10. PULL QUOTE ────────────────────────────────────────────── */

.pull-quote {
  padding: var(--sp-xl) var(--sp-xl) var(--sp-xl) var(--sp-2xl);
  background: rgba(212,112,60,0.05);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--fire);
  position: relative;
}

.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: Georgia, serif;
  font-size: 3rem;
  color: rgba(212,112,60,0.15);
  line-height: 1;
}

.pull-quote blockquote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.4;
}

.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-sm);
}


/* ── 11. IMAGE PLACEHOLDERS (dev only) ─────────────────────────── */

.img-placeholder {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 24px,
    rgba(255,255,255,0.015) 24px, rgba(255,255,255,0.015) 26px
  );
}

.img-placeholder-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  z-index: 1;
  background: rgba(0,0,0,0.3);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
}


/* ── 12. FOOTER ────────────────────────────────────────────────── */

.site-footer {
  background: var(--night);
  border-top: 1px solid rgba(255,255,255,0.04);
  color: var(--text-muted);
  padding: var(--sp-3xl) 0 var(--sp-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
  margin-bottom: var(--sp-3xl);
}

.footer-brand {
  color: var(--text-bright);
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: var(--sp-md);
  opacity: 0.85;
  transition: opacity var(--transition);
}
.footer-logo:hover {
  opacity: 1;
}

.footer-about p {
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 320px;
  margin-top: var(--sp-md);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-md);
}

.footer-col ul {
  list-style: none;
}
.footer-col li + li {
  margin-top: var(--sp-sm);
}

.footer-col a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.footer-col a:hover {
  color: var(--text-bright);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: var(--sp-xl);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-faint);
}


/* ── 13. ANIMATIONS ────────────────────────────────────────────── */

/* Scroll-triggered fade up (requires JS IntersectionObserver) */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for sequential reveals */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Gentle scroll indicator bounce */
@keyframes gentle-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* Hero star twinkle */
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: star-twinkle ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: var(--star-min, 0.15); }
  50% { opacity: var(--star-max, 0.6); }
}

/* Hero ember rise */
.ember {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  animation: ember-rise linear infinite;
}
@keyframes ember-rise {
  0% { opacity: 0; transform: translateY(0) translateX(0) scale(1); }
  8% { opacity: var(--ember-peak, 0.7); }
  60% { opacity: var(--ember-peak, 0.7); }
  100% { opacity: 0; transform: translateY(var(--ember-travel, -65vh)) translateX(var(--ember-drift, 30px)) scale(0.2); }
}

/* Falling leaves */
.leaf {
  position: absolute;
  opacity: 0;
  will-change: transform;
  animation: leaf-fall linear infinite;
}
@keyframes leaf-fall {
  0% { opacity: 0; transform: translateY(-30px) translateX(0) rotate(0deg); }
  5% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(100% + 60px)) translateX(var(--drift)) rotate(var(--spin)); }
}

/* Stat counter bar slide-in */
.stat-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--fire), var(--fire-glow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.stat-item.counted .stat-bar {
  transform: scaleX(1);
}


/* ── 14. RESPONSIVE ────────────────────────────────────────────── */

@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  .split-layout { gap: var(--sp-3xl); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --text-3xl: 1.8rem;
    --text-4xl: 2.2rem;
    --text-5xl: 2.6rem;
  }

  section { padding: var(--sp-3xl) 0; }
  .container { padding: 0 var(--sp-lg); }

  /* Nav — mobile */
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(20,22,24,0.97);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: var(--sp-xl);
    gap: var(--sp-lg);
  }
  .nav-toggle { display: block; }

  /* Stacked layouts */
  .split-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
  }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-sm);
    text-align: center;
  }

  /* Supporters */
  .supporters-strip-inner { gap: var(--sp-lg); }

  /* Reduce particles for performance */
  .ember:nth-child(n+9) { display: none; }
  .star:nth-child(n+12) { display: none; }
  .leaf:nth-child(n+4) { display: none; }
}

@media (max-width: 480px) {
  :root {
    --text-5xl: 2.2rem;
    --text-4xl: 1.9rem;
  }
}


/* ── 15. SHARED JS BEHAVIOUR (document in HTML) ────────────────
   
   Every page should include this script before </body>:
   
   <script>
     // Nav scroll effect
     const nav = document.getElementById('site-nav');
     window.addEventListener('scroll', () => {
       nav.classList.toggle('scrolled', window.scrollY > 20);
     });

     // Fade-up on scroll
     const fadeObserver = new IntersectionObserver((entries) => {
       entries.forEach(entry => {
         if (entry.isIntersecting) entry.target.classList.add('visible');
       });
     }, { threshold: 0.12, rootMargin: '0px 0px -50px 0px' });
     document.querySelectorAll('.fade-up').forEach(el => fadeObserver.observe(el));
   </script>
   
   ────────────────────────────────────────────────────────────── */
