/* ==========================================================================
   ZONA — S.T.A.L.K.E.R. Anomaly modpack site
   Palette: dark grey / ash grey / yellow (#ffff00)
   Vibe: simplistic, industrial, gritty — texture over decoration
   ========================================================================== */

:root {
  --black:      #0c0c0c;
  --dark:       #151515;
  --grey:       #1f1f1f;
  --panel:      #191919;
  --line:       #2c2c2c;

  --ash:        #8a8a8a;   /* ash grey */
  --ash-soft:   #b3b3b3;
  --ash-faint:  #5a5a5a;

  --yellow:     #ffff00;   /* pure yellow — the single loud accent */
  --yellow-dim: #b8b800;

  --font-mono:  "IBM Plex Mono", ui-monospace, "Cascadia Mono", "Consolas", monospace;
  --font-disp:  "Staatliches", "Arial Narrow", sans-serif;

  --pad: clamp(1rem, 4vw, 4rem);
  --maxw: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ash-soft);
  background-color: var(--black);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,255,0,0.04), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

::selection { background: var(--yellow); color: #000; }

/* ---------- typography ---------- */
h1, h2, h3 {
  font-family: var(--font-disp);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #ececec;
  text-transform: uppercase;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--yellow);
}

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.section { padding: clamp(4rem, 9vw, 8rem) 0; }

/* hazard stripe divider */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 14px,
    #111 14px 28px
  );
  opacity: 0.85;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand img { width: auto; height: 34px; }
.brand-name {
  font-family: var(--font-disp);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: #ececec;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--yellow); }
.nav-links a.active { color: var(--yellow); }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--yellow);
  color: #000;
  background: var(--yellow);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: #000; color: var(--yellow); }
.btn.ghost { background: transparent; color: var(--yellow); }
.btn.ghost:hover { background: var(--yellow); color: #000; }
.btn.sm { padding: 0.5rem 1rem; font-size: 0.7rem; }

/* mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--yellow);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}
.hero-media .media-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-media .media-item.is-visible { opacity: 1; }
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(12,12,12,0.55) 0%, rgba(12,12,12,0.35) 40%, var(--black) 100%),
    linear-gradient(90deg, rgba(12,12,12,0.7) 0%, rgba(12,12,12,0.15) 50%, rgba(12,12,12,0.7) 100%);
}
.hero-scanlines {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0 2px,
    rgba(0,0,0,0.16) 2px 4px
  );
  mix-blend-mode: multiply;
}
.hero-content { max-width: 820px; }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.hero-kicker .tick {
  width: 34px;
  height: 2px;
  background: var(--yellow);
}
.hero h1 {
  font-size: clamp(4rem, 16vw, 12rem);
  color: #f2f2f2;
  text-shadow: 0 2px 40px rgba(0,0,0,0.7);
}
.hero h1 .accent { color: var(--yellow); }
.hero-tagline {
  margin-top: 1rem;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  color: #d8d8d8;
  max-width: 44ch;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin-top: 1.75rem;
  color: var(--ash);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.hero-meta b { color: var(--yellow); font-weight: 700; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------- sections ---------- */
.sec-head {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  max-width: 720px;
}
.sec-head h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-top: 0.4rem;
}

/* features grid */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature {
  position: relative;
  background: var(--panel);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: background 0.15s;
}
.feature:hover { background: #1e1e1e; }
.feature .idx {
  font-family: var(--font-disp);
  font-size: 1.2rem;
  color: var(--ash-faint);
}
.feature h3 {
  font-size: 1.6rem;
  margin: 0.5rem 0 0.75rem;
}
.feature p { color: var(--ash); font-size: 0.9rem; }
.feature ul {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}
.feature li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--ash-soft);
}
.feature li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--yellow);
}

/* crafting */
.crafting { background: var(--dark); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.craft-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.craft {
  background: var(--panel);
  padding: 1.5rem;
}
.craft h4 {
  font-family: var(--font-disp);
  font-size: 1.3rem;
  color: #ececec;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.craft p { color: var(--ash); font-size: 0.82rem; margin-top: 0.5rem; }

/* videos */
.videos-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 320px);
  gap: 1rem;
  overflow-x: auto;
  padding-top: 4px;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.videos-scroll::-webkit-scrollbar { height: 8px; }
.videos-scroll::-webkit-scrollbar-track { background: var(--grey); }
.videos-scroll::-webkit-scrollbar-thumb { background: var(--ash-faint); }
.videos-scroll::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

.vcard {
  scroll-snap-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 0.15s, transform 0.15s;
}
.vcard:hover { border-color: var(--yellow); transform: translateY(-2px); }
.vcard .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--grey);
}
.vcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vcard .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12,12,12,0.15);
}
.vcard .body { padding: 0.9rem 1rem 1rem; }
.vcard .body h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ececec;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vcard .date {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ash-faint);
  text-transform: uppercase;
}
.videos-fallback {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  color: var(--ash);
}

/* community / discord */
.community {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.comm-pane { background: var(--panel); padding: clamp(1.5rem, 3vw, 2.5rem); }
.comm-pane h3 { font-size: 1.8rem; margin-bottom: 0.75rem; }
.comm-pane p { color: var(--ash); font-size: 0.9rem; }
.comm-pane .btn { margin-top: 1.5rem; }

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 4rem;
  background: var(--black);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-brand img { width: auto; height: 30px; }
.footer-brand .brand-name { font-size: 1.3rem; }
.footer-meta {
  font-size: 0.72rem;
  color: var(--ash-faint);
  letter-spacing: 0.05em;
}
.footer-meta a { color: var(--ash); }
.footer-meta a:hover { color: var(--yellow); }

/* ---------- download page ---------- */
.page-hero {
  /* extra top padding clears the fixed nav (64px) */
  padding: calc(clamp(4rem, 10vw, 8rem) + 64px) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(3rem, 9vw, 7rem); }
.page-hero p { margin-top: 1rem; color: var(--ash); max-width: 60ch; }

.dl-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.dl-pane { background: var(--panel); padding: clamp(1.5rem, 3vw, 2.5rem); }
.dl-pane h2 { font-size: 1.7rem; margin-bottom: 0.75rem; }
.dl-pane p { color: var(--ash); font-size: 0.9rem; }
.dl-pane .btn { margin-top: 1.5rem; }
.dl-note {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--yellow);
  background: var(--grey);
  font-size: 0.82rem;
  color: var(--ash-soft);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; }
  .craft-grid { grid-template-columns: repeat(2, 1fr); }
  .community { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--dark);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--line);
  }
  .nav-links .btn { margin: 1rem 1.5rem; text-align: center; }
  .craft-grid { grid-template-columns: 1fr; }
  .hero { min-height: 82vh; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .hero-media .media-item { opacity: 1; }
}
