/*
Theme Name: Grit and Gaming
Theme URI: https://gritandgaming.com/
Author: Perplexity & Antigravity
Description: Custom WordPress theme for Grit and Gaming, featuring dark/light mode and dynamic elements.
Version: 1.0
Text Domain: grit-and-gaming
*/
/* ==============================================
   GRIT AND GAMING — Custom Design Tokens & Styles
   ============================================== */

/* --- Custom Properties --- */
:root {
  /* Dark mode (default) */
  --bg: #0D0D0F;
  --surface: #161619;
  --surface-2: #1C1C20;
  --accent: #CCFF00;
  --accent-hover: #b8e600;
  --accent-dark: #7a9900;
  --gold: #FFB800;
  --gold-hover: #e6a600;
  --text: #E8E6E3;
  --text-muted: #8A8A8E;
  --error: #FF3B3B;
  --border: #2A2A2E;
  --border-light: #35353A;
  --shadow: rgba(0,0,0,0.5);

  /* Typography */
  --font-display: 'Clash Display', 'Arial Black', sans-serif;
  --font-body: 'General Sans', 'Arial', sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Container */
  --container-max: 1280px;
  --container-padding: clamp(16px, 4vw, 32px);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  color-scheme: dark;
}

/* Light mode */
[data-theme="light"] {
  --bg: #F0EDE8;
  --surface: #E8E4DF;
  --surface-2: #DDD9D3;
  --accent: #6B8500;
  --accent-hover: #5a7000;
  --accent-dark: #4a5c00;
  --gold: #B88200;
  --gold-hover: #9A6E00;
  --text: #1A1A1D;
  --text-muted: #5A5A5E;
  --error: #CC2E2E;
  --border: #C5C1BB;
  --border-light: #D4D0CA;
  --shadow: rgba(0,0,0,0.12);

  color-scheme: light;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

a:hover { color: var(--accent-hover); }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style: none; }

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive),
    border-color var(--transition-interactive);
  white-space: nowrap;
}

.btn:active { transform: translateY(0) !important; }

.btn-primary {
  background: var(--accent);
  color: #0D0D0F;
  font-weight: 700;
}

[data-theme="light"] .btn-primary {
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0D0D0F;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(204,255,0,0.25);
}

[data-theme="light"] .btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: #0D0D0F;
}

.btn-gold:hover {
  background: var(--gold-hover);
  color: #0D0D0F;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,184,0,0.25);
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: var(--space-10);
}

.section-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.1;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin-top: var(--space-3);
  border-radius: 2px;
}

.section-header h2.gold-accent::after {
  background: var(--gold);
}

.section-header p {
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-size: 15px;
}

/* ==============================================
   NAVIGATION
   ============================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  padding: var(--space-4) 0;
}

.site-nav.scrolled {
  background: rgba(13,13,15,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="light"] .site-nav.scrolled {
  background: rgba(240,237,232,0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.nav-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color var(--transition-interactive);
}

.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface);
}

.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: var(--radius-sm);
}

.mobile-toggle svg { width: 24px; height: 24px; }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--bg);
  padding: 80px var(--container-padding) var(--space-8);
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
}

.mobile-nav.active { display: flex; }

.mobile-nav a {
  display: block;
  padding: var(--space-4) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--text);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition-interactive);
}

.mobile-nav a:hover { color: var(--accent); }

.mobile-nav .btn {
  margin-top: var(--space-4);
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .mobile-toggle { display: flex; }
}

/* ==============================================
   HERO SECTION
   ============================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,13,15,0.5) 0%,
    rgba(13,13,15,0.7) 40%,
    rgba(13,13,15,0.92) 80%,
    var(--bg) 100%
  );
}

[data-theme="light"] .hero-bg::after {
  background: linear-gradient(
    to bottom,
    rgba(240,237,232,0.4) 0%,
    rgba(240,237,232,0.65) 40%,
    rgba(240,237,232,0.9) 80%,
    var(--bg) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: var(--space-20) 0 var(--space-16);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 10vw, 100px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  margin-top: var(--space-6);
  max-width: 560px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

/* Stats row */
.stats-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  padding: var(--space-12) 0 var(--space-16);
  border-top: 1px solid var(--border);
  margin-top: var(--space-16);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==============================================
   NEWS SECTION
   ============================================== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.news-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--border-light);
}

.news-card.featured {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.news-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.news-card.featured .news-card-img {
  aspect-ratio: 16/12;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.news-card:hover .news-card-img img {
  transform: scale(1.03);
}

.news-card-body {
  padding: var(--space-5);
}

.news-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: #0D0D0F;
}

.news-badge.review { background: var(--gold); }
.news-badge.esports { background: var(--error); color: #fff; }

.news-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-top: var(--space-3);
  line-height: 1.25;
  color: var(--text);
}

.news-card.featured h3 {
  font-size: clamp(20px, 2.5vw, 26px);
}

.news-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--space-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-size: 12px;
  color: var(--text-muted);
}

.news-meta span { opacity: 0.5; }

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .news-card.featured {
    grid-column: auto;
    grid-row: auto;
  }
}

/* ==============================================
   ESPORTS SECTION
   ============================================== */
#esports {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
}

.esports-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.tournament-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition:
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.tournament-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(255,184,0,0.1);
  transform: translateY(-2px);
}

.tournament-card + .tournament-card {
  margin-top: var(--space-4);
}

.tournament-game {
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.tournament-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin-top: var(--space-1);
  color: var(--text);
}

.tournament-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  font-size: 13px;
  color: var(--text-muted);
}

.tournament-prize {
  font-weight: 600;
  color: var(--gold);
}

/* Rankings Table */
.rankings-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rankings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.rankings-header h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--gold);
}

.ranking-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-interactive);
}

.ranking-row:last-child { border-bottom: none; }
.ranking-row:hover { background: var(--surface-2); }

.rank-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--gold);
  text-align: center;
}

.rank-num.top { color: var(--accent); }

.rank-info h4 {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.rank-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.rank-earnings {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .esports-layout {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   COMMUNITY SECTION
   ============================================== */
#community {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
  position: relative;
}

.community-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.community-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: left;
  transition:
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.community-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--shadow);
}

.community-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  color: var(--accent);
  margin-bottom: var(--space-5);
}

.community-icon svg { width: 24px; height: 24px; }

.community-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--text);
}

.community-card p {
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-size: 14px;
  line-height: 1.6;
}

.community-card .btn {
  margin-top: var(--space-5);
}

/* Testimonials */
.testimonials {
  margin-top: var(--space-12);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  position: relative;
}

.testimonial-quote {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
}

.testimonial-author {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.testimonial-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.testimonial-loc {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .community-features,
  .testimonials {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   TRENDING GAMES SECTION
   ============================================== */
#trending {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
}

.trending-scroll {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.trending-scroll::-webkit-scrollbar { display: none; }

.game-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--accent);
}

.game-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.game-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.game-card:hover .game-card-img img {
  transform: scale(1.05);
}

.game-card-info {
  padding: var(--space-3) var(--space-4);
}

.game-card-info h4 {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.game-platforms {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-1);
  flex-wrap: wrap;
}

.platform-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trending-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-top: var(--space-1);
}

.trending-indicator svg { width: 12px; height: 12px; }

/* ==============================================
   DEALS SECTION
   ============================================== */
#deals {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
}

.deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.deal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  transition:
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.deal-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--shadow);
}

.deal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  color: var(--gold);
}

.deal-icon svg { width: 28px; height: 28px; }

.deal-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
}

.deal-card .deal-price {
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
  margin-top: var(--space-1);
}

.deal-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.deals-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: var(--space-8);
  padding: var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .deals-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   NEWSLETTER & FOOTER
   ============================================== */
.newsletter {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0;
  text-align: center;
}

.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
}

.newsletter h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  text-transform: uppercase;
  color: var(--text);
}

.newsletter p {
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-size: 15px;
}

.newsletter-form {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-interactive);
}

.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--accent); }

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-12) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.footer-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--text);
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  padding: var(--space-1) 0;
  transition: color var(--transition-interactive);
}

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

.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface-2);
}

.social-link svg { width: 18px; height: 18px; }

.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   SECTIONS SPACING
   ============================================== */
#news,
#community,
#trending,
#deals {
  padding-top: clamp(var(--space-16), 8vw, var(--space-24));
  padding-bottom: clamp(var(--space-16), 8vw, var(--space-24));
}

/* ==============================================
   SCROLL REVEAL ANIMATIONS
   ============================================== */
.reveal {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .reveal {
    opacity: 0;
    animation: revealFade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

@keyframes revealFade {
  to { opacity: 1; }
}

/* For browsers that don't support scroll-driven animations, use JS fallback */
.reveal-js {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.reveal-js.visible {
  opacity: 1;
}

/* ==============================================
   COMMUNITY BG IMAGE
   ============================================== */
.community-bg-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-10);
}

.community-bg-wrapper img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.community-bg-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
}

/* ==============================================
   REDUCED MOTION
   ============================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

