@font-face {
    font-family: "hal-night";
    src: url(/fonts/hal-night.otf) format("opentype");
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "bangers";
    src: url(/fonts/Bangers.ttf) format("truetype");
    font-display: swap;
    font-style: normal;
}

/* ══════════════════════════════════════════
   TOKENS
══════════════════════════════════════════ */
:root {
  --bg:           #0a0a0a;
  --surface:      #111111;
  --surface2:     #181818;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text:         #d8d8d8;
  --text-dim:     rgba(216,216,216,0.5);
  --text-bright:  #ffffff;
  --accent:       #5ccc2f;
  --accent-glow:  #5ccc2f;
  --free:         #3aaa5c;
  --free-glow:    rgba(58,170,92,0.3);
  --paid:         #9b6bff;
  --paid-glow:    rgba(155,107,255,0.3);
  --red:          #cc3333;
  --hyperlink:    #5ccc2f;
}

/* ══════════════════════════════════════════
   BASE
══════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   #1e1230 0%, transparent 58%),
    radial-gradient(ellipse 80%  50% at 100% 100%, #0d1525 0%, transparent 55%),
    radial-gradient(ellipse 70%  50% at 0%   80%,  #150d22 0%, transparent 55%),
    #07070f;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  padding-bottom: 260px;
}

/* edge vignette */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 110% 100% at 50% 50%,
    transparent 50%,
    rgba(0,0,0,0.5) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════
   BANNER
══════════════════════════════════════════ */
.banner {
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  height: 64px;
  padding: 0 24px;
  background: rgba(10,10,10,0.95);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.banner-image {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.banner-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.anchor-button {
  display: flex;
  align-items: center;
  padding: 0;
  color: var(--text-dim);
  text-decoration: none;
}

.beta-access-button {
  height: 50px;
  width: auto;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.beta-access-button:hover { opacity: 1; }

/* ══════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════ */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  /* NO position or z-index — would create a stacking context
     that traps open dropdowns below section headers */
}

/* ══════════════════════════════════════════
   SECTION BLOCK
   KEY: No position or z-index on .container
   or .downloads-header — any positioned
   ancestor with a z-index creates a new
   stacking context that traps the dropdown.
══════════════════════════════════════════ */
.container {
  margin-top: 48px;
  animation: fadeUp 0.5s ease both;
}

.downloads-header {
  font-family: "bangers", cursive;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.1em;
  color: var(--text-bright);
  padding: 0 0 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative; /* needed for ::after pseudo only */
  /* NO z-index — would create a stacking context */
}

.downloads-header::before {
  content: '';
  display: block;
  width: 5px;
  height: 100%;
  min-height: 30px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  flex-shrink: 0;
}

.downloads-header::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 120px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ══════════════════════════════════════════
   CONTENT GRID
   KEY: No z-index here either — open cards
   use z-index: 9999 which works relative to
   the page root stacking context.
══════════════════════════════════════════ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
}

/* ══════════════════════════════════════════
   DIVIDER
   KEY: No position or z-index.
══════════════════════════════════════════ */
.divider-container {
  width: 100%;
  margin: 48px 0 0;
}

.divider {
  width: 100%;
  height: 4px;
  object-fit: fill;
  display: block;
  opacity: 0.6;
}

/* ══════════════════════════════════════════
   TRUCK CARD
══════════════════════════════════════════ */
.placeholder-dropdown-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Open card jumps to top of page stacking context */
.placeholder-dropdown-container.open {
  z-index: 9999;
}

.image-trigger {
  display: block;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  outline: none;
}

.truck-name {
  display: block;
  width: 100%;
  padding: 8px 12px 9px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: none;
  font-family: "bangers", cursive;
  font-size: 1.05rem;
  letter-spacing: 0.09em;
  color: var(--text);
  text-align: left;
  transition: color 0.2s, background 0.2s;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 0;
}

.placeholder-dropdown-container.open .truck-name {
  color: var(--accent);
  background: rgba(92,204,47,0.07);
  border-color: var(--accent);
  border-bottom-color: transparent;
}

.placeholder-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}

.image-trigger:hover .placeholder-image {
  border-color: var(--border-hover);
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}

.placeholder-dropdown-container.open .placeholder-image {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--accent-glow);
  border-radius: 4px 4px 0 0;
}

.social-link {
  color: #5ccc2f;
  text-decoration:none;
}

/* ── Dropdown panel ── */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 0.38s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 4px 4px;
  box-sizing: border-box;
  box-shadow: 0 12px 32px rgba(0,0,0,0.7);
}

.placeholder-dropdown-container.open .dropdown-content {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  padding: 16px;
  border-color: var(--accent);
}

.dropdown-content p {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.dropdown-content p a {
  color: var(--paid);
  text-decoration: underline;
}

/* ── Download links ── */
.dropdown-content .download-link,
.dropdown-content a[href] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 3px;
  border: 1px solid;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  line-height: 1;
}

.dropdown-content a[href]:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* FREE = green */
.dropdown-content a[href*="drive.google"],
.dropdown-content a.free {
  color: var(--free);
  border-color: rgba(58,170,92,0.4);
  background: rgba(58,170,92,0.07);
}

.dropdown-content a[href*="drive.google"]:hover,
.dropdown-content a.free:hover {
  background: rgba(58,170,92,0.16);
  box-shadow: 0 0 12px var(--free-glow);
}

/* PAID = purple */
.dropdown-content a[href*="patreon"],
.dropdown-content a.paid {
  color: var(--paid);
  border-color: rgba(155,107,255,0.4);
  background: rgba(155,107,255,0.07);
}

.dropdown-content a[href*="patreon"]:hover,
.dropdown-content a.paid:hover {
  background: rgba(155,107,255,0.16);
  box-shadow: 0 0 12px var(--paid-glow);
}

/* unavailable */
.dropdown-content a:not([href]) {
  color: var(--text-dim);
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

/* ══════════════════════════════════════════
   DESKTOP
══════════════════════════════════════════ */
@media (min-width: 769px) {
  .-mobile { display: none; }
}

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .-desktop { display: none; }

  html, body { overflow-x: hidden; width: 100%; }

  .banner { height: 56px; padding: 0 14px; }
  .banner-image { height: 32px; }
  .beta-access-button { height: 30px; }

  .content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .truck-name { font-size: 0.9rem; padding: 6px 10px 7px; }
  .downloads-header { font-size: 1.6rem; }
  .dropdown-content p { font-size: 0.8rem; }

  .dropdown-content .download-link,
  .dropdown-content a[href] {
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  .page-wrap { padding: 0 10px; }
}

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

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}