/* ==========================================================================
   AtariVideoMusic.net — Museum Edition
   Design language: walnut cabinet, brushed aluminum faceplate,
   Atari orange/amber phosphor glow.
   ========================================================================== */

:root {
  --bg:            #16120e;
  --bg-panel:      #201a14;
  --bg-panel-2:    #2a2119;
  --walnut:        #8b4513;
  --walnut-dark:   #5c3a1e;
  --metal:         #c8c8c4;
  --metal-dark:    #8f8f8a;
  --orange:        #ff6600;
  --amber:         #ff9900;
  --cream:         #f0ead8;
  --text:          #e8e2d4;
  --text-dim:      #b0a898;
  --ink:           #171310;
  --radius:        10px;
  --shadow:        0 10px 30px rgba(0,0,0,.55);
  --glow:          0 0 22px rgba(255,102,0,.35);
  --maxw:          1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(255,102,0,.08), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--orange); color: #000; padding: 10px 18px;
  z-index: 10000; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background:
    linear-gradient(to bottom, rgba(24,14,6,.78), rgba(18,10,4,.86)),
    url('../images/header-wood.jpg') center / cover;
  border-bottom: 3px solid var(--walnut);
  box-shadow: 0 3px 14px rgba(0,0,0,.5);
}
.nav-bar {
  max-width: var(--maxw); margin: 0 auto; padding: 0 22px 0 8px;
  display: flex; align-items: center; gap: 28px; min-height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-family: 'Bungee', cursive; font-size: .98rem; letter-spacing: .5px;
  color: var(--orange); white-space: nowrap;
  text-shadow: 1px 1px 2px #000;
}
.brand:hover { text-decoration: none; color: var(--amber); }
.brand img { width: 30px; height: 30px; border-radius: 5px; border: 1px solid var(--walnut); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 2px solid var(--walnut); border-radius: 6px;
  color: var(--amber); font-size: 1.3rem; padding: 4px 12px; cursor: pointer;
}

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  display: block; padding: 8px 9px; border-radius: 6px;
  color: var(--text); font-weight: 600; font-size: .88rem;
  text-transform: uppercase; letter-spacing: .4px;
}
.site-nav a:hover { background: rgba(255,102,0,.14); color: var(--amber); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--orange); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 6px 6px 0 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 6px solid var(--walnut);
  background: linear-gradient(160deg, #241b12 0%, #16120e 70%);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px;
  align-items: center; padding-top: 84px; padding-bottom: 64px;
}
.hero h1 {
  font-family: 'Bungee', cursive; font-size: clamp(1.7rem, 4.2vw, 3rem);
  line-height: 1.15; margin: 0 0 14px; color: var(--orange);
  text-shadow: 2px 2px 0 #000, 0 0 28px rgba(255,102,0,.45);
}
.hero .tagline { font-size: 1.25rem; color: var(--amber); font-weight: 600; margin: 0 0 10px; }
.hero p.lead { color: var(--text-dim); font-size: 1.06rem; max-width: 54ch; }
.hero-img img {
  border: 5px solid var(--walnut-dark); border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow);
}

/* Page hero (interior pages) */
.page-hero {
  padding: 72px 0 40px;
  border-bottom: 4px solid var(--walnut);
  background: linear-gradient(160deg, #241b12 0%, #16120e 80%);
}
.page-hero h1 {
  font-family: 'Bungee', cursive; margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); color: var(--orange);
  text-shadow: 2px 2px 0 #000, 0 0 22px rgba(255,102,0,.4);
}
.page-hero p { color: var(--text-dim); margin: 0; max-width: 70ch; }

.breadcrumbs { font-size: .85rem; margin: 0 0 14px; color: var(--text-dim); }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px;
  background: var(--orange); color: #000 !important; font-weight: 800;
  letter-spacing: .5px; border: none; cursor: pointer; font-size: 1rem;
  font-family: inherit; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255,102,0,.35);
  transition: transform .15s, background .15s;
}
.btn:hover { background: var(--amber); transform: translateY(-2px); text-decoration: none; }
.btn.ghost {
  background: transparent; color: var(--amber) !important;
  border: 2px solid var(--walnut); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--orange); color: var(--orange) !important; }
.btn.small { padding: 8px 16px; font-size: .85rem; }

/* ---------- Sections & panels ---------- */
main { display: block; }
section.block { padding: 46px 0; }
section.block.alt { background: rgba(255,255,255,.025); }

h2.section-title {
  font-family: 'Bungee', cursive; font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--amber); margin: 0 0 22px;
  padding-bottom: 10px; border-bottom: 3px solid var(--walnut);
  text-shadow: 1px 1px 0 #000;
}
h3 { color: var(--amber); font-size: 1.25rem; margin: 28px 0 10px; }

.panel {
  background: linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2));
  border: 2px solid var(--walnut-dark); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow);
}
.panel.metal {
  background: linear-gradient(135deg, #d6d6d2, #a8a8a2 55%, #c4c4be);
  color: var(--ink); border-color: #444;
}
.panel.metal h3, .panel.metal h2 { color: #a33f00; }
.panel.metal a { color: #c24d00; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2));
  border: 2px solid var(--walnut-dark); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow), var(--glow); }
/* Only the card's top thumbnail is framed; images inside .card-body
   (logos etc.) keep their natural size. object-fit: contain keeps the
   whole photo viewable instead of cropping it. */
.card > img {
  width: 100%; aspect-ratio: 16/10; object-fit: contain;
  background: #0d0a07; border-bottom: 2px solid var(--walnut-dark);
}
.card .card-body { padding: 18px 20px 22px; flex: 1; }
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--text-dim); font-size: .95rem; }
a.card-link { color: inherit; }
a.card-link:hover { text-decoration: none; }

/* ---------- Figures ---------- */
figure { margin: 26px 0; text-align: center; }
figure img {
  margin: 0 auto; border: 4px solid var(--walnut-dark);
  border-radius: 8px; box-shadow: var(--shadow);
}
figcaption { margin-top: 10px; color: var(--text-dim); font-size: .92rem; font-style: italic; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 30px 0; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 4px; bottom: 4px;
  width: 4px; background: linear-gradient(var(--orange), var(--walnut));
  border-radius: 2px;
}
.timeline .tl-item { position: relative; margin-bottom: 30px; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: -31px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--orange); border: 3px solid var(--bg);
  box-shadow: 0 0 12px rgba(255,102,0,.6);
}
.timeline .tl-year {
  font-family: 'Bungee', cursive; color: var(--orange); font-size: 1.15rem;
}
.timeline .tl-item p { margin: 6px 0 0; color: var(--text-dim); }
.timeline .tl-photo {
  margin: 12px 0 0; max-width: 320px;
  border: 3px solid var(--walnut-dark); border-radius: 8px;
  box-shadow: var(--shadow);
}
.timeline .tl-credit { font-size: .78rem; color: var(--text-dim); font-style: italic; margin-top: 5px; }

/* ---------- Spec tables ---------- */
table.spec { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .97rem; }
table.spec th, table.spec td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--walnut-dark);
  vertical-align: top;
}
table.spec th { color: var(--amber); white-space: nowrap; width: 220px; font-weight: 700; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

/* ---------- Gallery & lightbox ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.gallery-grid a.g-item {
  display: block; border: 3px solid var(--walnut-dark); border-radius: 8px;
  overflow: hidden; box-shadow: var(--shadow); position: relative;
  transition: transform .2s;
}
.gallery-grid a.g-item:hover { transform: scale(1.025); border-color: var(--orange); }
.gallery-grid a.g-item img { width: 100%; height: 230px; object-fit: cover; }
.gallery-grid a.g-item .g-cap {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  color: #fff; font-size: .88rem; font-weight: 600;
}

#lightbox {
  position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.94);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 30px; cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 92vw; max-height: 82vh; width: auto;
  border: 4px solid var(--walnut); border-radius: 6px; box-shadow: var(--glow);
}
#lightbox .lb-cap { color: var(--cream); margin-top: 14px; font-size: 1rem; text-align: center; }
#lightbox .lb-close {
  position: absolute; top: 18px; right: 24px; font-size: 2rem; color: var(--amber);
  background: none; border: none; cursor: pointer;
}

/* ---------- Video cards / player ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.video-card {
  background: linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2));
  border: 2px solid var(--walnut-dark); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s;
}
.video-card:hover { transform: translateY(-5px); box-shadow: var(--shadow), var(--glow); }
.video-thumb { position: relative; cursor: pointer; aspect-ratio: 16/9; background: #000; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.video-thumb .play-badge span {
  width: 66px; height: 46px; background: rgba(20,14,8,.8);
  border: 2px solid var(--orange); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange); font-size: 1.3rem; transition: background .15s, transform .15s;
}
.video-thumb:hover .play-badge span { background: var(--orange); color: #000; transform: scale(1.08); }
.video-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .info { padding: 14px 16px 16px; }
.video-card .info h3 { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.35; color: var(--amber); }
.video-card .info p { margin: 0 0 10px; font-size: .88rem; color: var(--text-dim); }
.video-card .yt-link { font-size: .85rem; font-weight: 700; }

.embed-16x9 {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border: 4px solid var(--walnut); border-radius: var(--radius); box-shadow: var(--shadow);
  background: #000;
}
.embed-16x9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Epilepsy modal ---------- */
#epilepsy-modal {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.96);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#epilepsy-modal.show { display: flex; }
#epilepsy-modal .modal-content {
  max-width: 620px; background: #0c0a08; border: 5px solid #ffcc00;
  border-radius: 12px; padding: 38px 30px; text-align: center;
  box-shadow: 0 0 44px rgba(255,204,0,.55);
}
#epilepsy-modal h2 {
  font-family: 'Bungee', cursive; color: #ffee00; margin: 0 0 18px;
  font-size: clamp(1.2rem, 3vw, 1.8rem); text-shadow: 0 0 16px rgba(255,255,0,.6);
}
#epilepsy-modal p { color: #fff; font-size: 1.08rem; }

/* ---------- Downloads ---------- */
.download-list { list-style: none; padding: 0; margin: 20px 0; }
.download-list li {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 12px;
  background: linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2));
  border: 2px solid var(--walnut-dark); border-radius: var(--radius);
}
.download-list .dl-icon { font-size: 1.6rem; }
.download-list .dl-meta { flex: 1; min-width: 220px; }
.download-list .dl-meta strong { color: var(--amber); }
.download-list .dl-meta span { display: block; color: var(--text-dim); font-size: .88rem; }

/* ---------- Callouts ---------- */
.callout {
  border-left: 5px solid var(--orange); background: rgba(255,102,0,.08);
  padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 22px 0;
}
.callout.warn { border-color: #ffcc00; background: rgba(255,204,0,.08); }
.callout p { margin: 0; }

blockquote {
  margin: 24px 0; padding: 18px 24px;
  border-left: 5px solid var(--walnut); background: rgba(255,255,255,.03);
  border-radius: 0 8px 8px 0; font-style: italic; color: var(--cream);
}
blockquote cite { display: block; margin-top: 8px; font-style: normal; color: var(--text-dim); font-size: .9rem; }

/* ---------- Social row ---------- */
.social-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; align-items: center; }
.social-icons a img { height: 44px; width: auto; transition: transform .18s; }
.social-icons a:hover img { transform: scale(1.14); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 60px; border-top: 4px solid var(--walnut);
  background: rgba(0,0,0,.55); padding: 44px 0 30px;
  text-align: center; color: var(--text-dim); font-size: .95rem;
}
.site-footer .mission {
  max-width: 760px; margin: 0 auto 26px; font-style: italic; color: var(--cream);
}
.site-footer .mission strong { color: var(--amber); font-style: normal; display: block; margin-bottom: 6px; font-family: 'Bungee', cursive; font-size: .95rem; }
.site-footer nav { margin: 18px 0; }
.site-footer nav a { margin: 0 10px; color: var(--text-dim); font-size: .9rem; }
.site-footer nav a:hover { color: var(--amber); }
.site-footer .copyright { margin-top: 18px; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    background: #1c150e; border-bottom: 3px solid var(--walnut);
    padding: 10px 18px 18px; margin: 0;
    max-height: calc(100vh - 62px); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 10px; font-size: 1rem; }
  .nav-toggle { display: block; }
}

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 40px; }
  .page-hero { padding: 52px 0 32px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  table.spec th { width: 150px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .brand { font-size: .85rem; letter-spacing: .5px; }
  .brand img { width: 26px; height: 26px; }
  .wrap { padding: 0 16px; }
  section.block { padding: 34px 0; }
  .panel { padding: 20px 18px; }
  .btn { padding: 11px 20px; font-size: .92rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gallery-grid a.g-item img { height: 150px; }
  .social-icons { gap: 16px; }
  .social-icons a img { height: 36px; }
  table.spec th { width: auto; min-width: 110px; }
  figure { margin: 20px 0; }
}

/* ---------- Server address rows (copy + join) ---------- */
.server-box {
  background: linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2));
  border: 2px solid var(--walnut-dark); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.server-box h3 { margin-top: 0; }
.server-address {
  display: block; font-family: 'Courier New', monospace; font-size: 1.05rem;
  background: #0d0a07; border: 1px solid var(--walnut-dark); border-radius: 6px;
  padding: 10px 14px; margin: 10px 0 14px; color: var(--amber);
  overflow-wrap: anywhere;
}
.server-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.step-list { counter-reset: step; list-style: none; padding: 0; margin: 20px 0; }
.step-list li {
  counter-increment: step; position: relative;
  padding: 14px 16px 14px 62px; margin-bottom: 12px;
  background: linear-gradient(150deg, var(--bg-panel), var(--bg-panel-2));
  border: 2px solid var(--walnut-dark); border-radius: var(--radius);
}
.step-list li::before {
  content: counter(step); position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--orange); color: #000; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bungee', cursive; font-size: 1rem;
}
.gamertag {
  display: inline-block; font-family: 'Courier New', monospace; font-weight: 700;
  background: #0d0a07; border: 1px solid var(--orange); border-radius: 6px;
  padding: 3px 10px; color: var(--amber); margin: 2px 2px;
}
