/* ============================================
   ECHOES OF WWII — Global Styles
   ============================================ */

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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --text-primary: #e8e6e3;
  --text-secondary: #9a9590;
  --text-muted: #5a5550;
  --accent: #8b2020;
  --accent-light: #c0392b;
  --accent-glow: rgba(192, 57, 43, 0.3);
  --gold: #c9a84c;
  --gold-muted: rgba(201, 168, 76, 0.15);
  --border: #2a2a2a;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.05rem, 2vw, 1.25rem); }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 65ch;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--accent-light);
}

/* --- Layout --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

section {
  padding: 6rem 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
  background: transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-logo .logo-accent {
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-light);
  transition: var(--transition);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  z-index: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url('../assets/hero-soldier.png');
  background-size: cover;
  background-position: center center;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.6) 0%, rgba(10, 10, 10, 0.4) 40%, rgba(10, 10, 10, 0.55) 70%, var(--bg-primary) 100%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #f0e6d3;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero h1 .highlight {
  color: #f0e6d3;
  position: relative;
}

.hero-description {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 550px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1.2s;
}

.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-light), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(192, 57, 43, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-image {
  width: 100%;
  height: clamp(180px, 20vw, 240px);
  object-fit: cover;
  filter: grayscale(30%) contrast(1.05);
  transition: var(--transition-slow);
}

.card:hover .card-image {
  filter: grayscale(0%) contrast(1.1);
  transform: scale(1.03);
}

.card-image-wrapper {
  overflow: hidden;
  position: relative;
}

.card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

.card-body {
  padding: 1.5rem;
}

.card-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.card-body h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.card-link:hover {
  gap: 0.75rem;
  color: var(--text-primary);
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: var(--transition);
}

/* --- Grid Layouts --- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

/* --- Featured Section --- */
.featured-section {
  border-top: 1px solid var(--border);
}

.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.featured-header p {
  margin-top: 0.75rem;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  padding: 3rem 2rem;
  text-align: center;
  border-right: 1px solid var(--border);
  transition: var(--transition);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item:hover {
  background: var(--bg-card);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-light);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139, 32, 32, 0.1) 0%, transparent 60%),
    var(--bg-primary);
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

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

.footer-about h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--text-primary);
  padding-left: 0.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-socials a {
  color: var(--text-muted);
  transition: var(--transition);
}

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

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Keyframes --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 5rem 2rem;
    gap: 1.5rem;
    border-left: 1px solid var(--border);
    transition: var(--transition-slow);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stories-grid,
  .videos-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  section {
    padding: 4rem 0;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-image {
    background-position: center 30%;
  }

  .hero-content {
    padding: 1.25rem;
  }

  .hero-subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .featured-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
