/* HeadPoper download site. Palette and type mirror the game's UiTheme (dark translucent panels, one orange accent, Lato). */

@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Lato-Regular.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Lato-Bold.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-style: normal; font-display: swap; src: url("/fonts/Lato-Black.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-style: italic; font-display: swap; src: url("/fonts/Lato-BlackItalic.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --accent: #ff8c26;
  --accent-bright: #ffb35c;
  --accent-deep: #db5c0f;
  --on-accent: #120d08;
  --bg: #08090d;
  --bg-2: #0d1018;
  --panel: rgba(14, 16, 22, 0.86);
  --panel-raised: rgba(27, 29, 37, 0.92);
  --panel-hover: rgba(38, 41, 51, 0.95);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f5fa;
  --text-dim: #a8b3c2;
  --text-mute: #707887;
  --good: #5ce685;
  --radius: 16px;
  --radius-small: 10px;
  --wrap: 1180px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: #fff; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--stroke); border-radius: 6px; padding: 0.08em 0.4em; overflow-wrap: anywhere; }
b, strong { font-weight: 700; color: var(--text); }
.muted { color: var(--text-mute); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; font-weight: 900; }
.skip:focus { left: 8px; }

/* ---------- nav ---------- */

.nav { position: sticky; top: 0; z-index: 20; background: rgba(8, 9, 13, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.2s, background 0.2s; }
.nav.scrolled { border-bottom-color: var(--stroke); background: rgba(8, 9, 13, 0.9); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav-logo { font-weight: 900; font-style: italic; letter-spacing: 0.02em; font-size: 22px; color: #fff; background: linear-gradient(180deg, #fff 30%, var(--accent-bright)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-links a:hover { color: #fff; }

/* ---------- buttons ---------- */

.btn { display: inline-flex; align-items: center; gap: 14px; border-radius: var(--radius-small); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; transition: transform 0.12s ease, background 0.12s, box-shadow 0.2s, color 0.12s, border-color 0.12s; cursor: pointer; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 32px rgba(255, 140, 38, 0.28); }
.btn-primary:hover { background: var(--accent-bright); color: var(--on-accent); box-shadow: 0 10px 40px rgba(255, 140, 38, 0.4); }
.btn-small { padding: 9px 16px; font-size: 13px; font-weight: 900; }

.downloads { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn-dl { padding: 16px 24px 16px 20px; min-width: 360px; background: var(--panel-raised); color: var(--text); border: 1px solid var(--stroke-strong); }
.btn-dl:hover { background: var(--panel-hover); color: #fff; border-color: rgba(255, 140, 38, 0.6); transform: translateY(-1px); }
.btn-dl.recommended { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 10px 40px rgba(255, 140, 38, 0.32); }
.btn-dl.recommended:hover { background: var(--accent-bright); color: var(--on-accent); }
.btn-dl.recommended small { color: rgba(18, 13, 8, 0.72); }
.btn-dl .os { width: 28px; height: 28px; flex: none; }
.dl-text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.dl-text b { color: inherit; font-size: 17px; font-weight: 900; letter-spacing: 0.06em; }
.dl-text small { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-mute); margin-top: 3px; }
.dl-meta { margin: 16px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.dl-meta .new { color: var(--accent); }
.mobile-note { margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius-small); background: rgba(255, 140, 38, 0.1); border: 1px solid rgba(255, 140, 38, 0.3); color: var(--accent-bright); font-weight: 700; font-size: 15px; }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; padding: 72px 0 88px; background:
  radial-gradient(1100px 600px at 78% 30%, rgba(255, 140, 38, 0.13), transparent 60%),
  radial-gradient(900px 700px at 10% 0%, rgba(70, 100, 150, 0.18), transparent 60%),
  linear-gradient(180deg, #0c1019 0%, var(--bg) 100%); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; color: #fff; }
.reticle { position: absolute; width: 760px; height: 760px; right: -120px; top: -90px; animation: spin 120s linear infinite; }
.slash { position: absolute; width: 2px; height: 160%; top: -30%; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.09), transparent); transform: rotate(28deg); }
.slash.s1 { left: 38%; }
.slash.s2 { left: 62%; width: 6px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05), transparent); }
.slash.s3 { left: 84%; background: linear-gradient(180deg, transparent, rgba(255, 140, 38, 0.18), transparent); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.tag { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; color: var(--accent); font-weight: 900; font-size: 14px; letter-spacing: 0.4em; text-transform: uppercase; }
.tag-bar { display: inline-block; width: 36px; height: 4px; background: var(--accent); flex: none; }
.logo { margin: 0 0 0 -0.04em; font-weight: 900; font-style: italic; font-size: clamp(44px, 6.5vw, 94px); line-height: 1.04; white-space: nowrap; letter-spacing: 0.01em; background: linear-gradient(180deg, #fff 18%, var(--accent-bright) 88%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.45)); padding-right: 0.08em; }
.tagline { margin: 10px 0 0; font-size: clamp(19px, 2.1vw, 24px); color: var(--text); }
.lede { margin: 14px 0 0; color: var(--text-dim); max-width: 34em; }

.hero-shot { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--stroke-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 140, 38, 0.08), 0 0 90px rgba(255, 140, 38, 0.12); transform: perspective(1400px) rotateY(-6deg); transition: transform 0.4s ease; aspect-ratio: 16 / 9; background: var(--bg-2); }
.hero-shot:hover { transform: perspective(1400px) rotateY(-2deg); }
.hero-shot img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- features ---------- */

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: -36px; position: relative; }
.feature { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 24px 24px 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.feature-num { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 900; font-size: 20px; box-shadow: 0 0 30px rgba(255, 140, 38, 0.3); }
.feature h3 { margin: 16px 0 6px; font-size: 19px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.feature p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* ---------- sections ---------- */

.section { padding-top: 92px; }
.section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; font-weight: 900; font-size: clamp(30px, 4vw, 44px); letter-spacing: 0.02em; text-transform: uppercase; }
.card { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 28px 32px; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 900; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }

/* release notes */
.notes { border-color: rgba(255, 140, 38, 0.35); box-shadow: 0 0 80px rgba(255, 140, 38, 0.06); }
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-bottom: 14px; }
.release-head h3 { margin: 0; font-size: 30px; letter-spacing: 0.01em; text-transform: none; color: var(--text); }
.chip { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.release-date { color: var(--text-mute); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.md h4 { margin: 20px 0 8px; font-size: 14px; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-bright); }
.md h4:first-child { margin-top: 0; }
.md p { margin: 0 0 12px; color: var(--text-dim); }
.md ul { margin: 0 0 12px; padding: 0; list-style: none; }
.md li { position: relative; padding-left: 22px; margin: 6px 0; color: var(--text-dim); }
.md li::before { content: ""; position: absolute; left: 4px; top: 0.66em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--stroke); }
.file { display: inline-flex; flex-direction: column; padding: 10px 14px; border-radius: var(--radius-small); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--stroke); color: var(--text); font-size: 14px; font-weight: 700; min-width: 0; max-width: 100%; }
.file:hover { border-color: rgba(255, 140, 38, 0.6); color: #fff; }
.file small { color: var(--text-mute); font-weight: 400; font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }

.older { margin-top: 14px; display: grid; gap: 10px; }
.older details { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); }
.older summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px; padding: 18px 24px; font-weight: 900; font-size: 18px; }
.older summary::-webkit-details-marker { display: none; }
.older summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 22px; line-height: 1; transition: transform 0.2s; }
.older details[open] summary::after { transform: rotate(45deg); }
.older .md, .older .files { margin: 0 24px 20px; }

/* gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery li:first-child, .gallery li:nth-child(2) { grid-column: span 2; }
.gallery button { display: block; width: 100%; padding: 0; border: 1px solid var(--stroke); border-radius: 12px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; position: relative; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease, filter 0.35s; filter: saturate(0.95); }
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.04); filter: saturate(1.1); }
.gallery .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; text-align: left; background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0; transition: opacity 0.2s; }
.gallery button:hover .cap, .gallery button:focus-visible .cap { opacity: 1; }

/* install */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.install ol { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.install li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 14px; color: var(--text-dim); }
.install li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 140, 38, 0.14); border: 1px solid rgba(255, 140, 38, 0.4); color: var(--accent-bright); font-weight: 900; font-size: 14px; display: grid; place-items: center; }
.updates { margin-top: 18px; }
.updates p { margin: 0; color: var(--text-dim); }

/* requirements */
.table-card { padding: 8px 0; overflow-x: auto; }
.reqs { width: 100%; border-collapse: collapse; font-size: 15px; }
.reqs th, .reqs td { text-align: left; padding: 14px 28px; border-top: 1px solid var(--stroke); vertical-align: top; }
.reqs thead th { border-top: 0; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase; }
.reqs tbody th { color: var(--text); font-weight: 900; white-space: nowrap; }
.reqs td { color: var(--text-dim); }

/* footer */
.footer { margin-top: 110px; padding: 40px 0 52px; border-top: 1px solid var(--stroke); background: linear-gradient(180deg, transparent, rgba(255, 140, 38, 0.03)); }
.footer-inner { display: grid; gap: 8px; }
.footer p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(3, 4, 6, 0.94); color: var(--text); }
.lightbox[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; animation: fade 0.18s ease; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; min-width: 0; }
.lightbox img { max-height: calc(100vh - 110px); width: auto; max-width: 100%; border-radius: 10px; border: 1px solid var(--stroke-strong); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); }
.lightbox figcaption { font-weight: 900; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.lb-btn { appearance: none; border: 1px solid var(--stroke-strong); background: var(--panel-raised); color: var(--text); width: 48px; height: 48px; border-radius: 12px; font: 900 28px/1 "Lato", sans-serif; cursor: pointer; justify-self: center; }
.lb-btn:hover { border-color: var(--accent); color: var(--accent-bright); }
.lb-close { position: absolute; top: 18px; right: 18px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-shot, .hero-shot:hover { transform: none; }
  .logo { font-size: min(13.4vw, 94px); }
  .reticle { width: 520px; height: 520px; right: -200px; top: -120px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery li:first-child, .gallery li:nth-child(2) { grid-column: span 2; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .btn-dl { min-width: 0; width: 100%; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .section { padding-top: 68px; }
  .card { padding: 22px 20px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery li:first-child, .gallery li:nth-child(2) { grid-column: auto; }
  .gallery .cap { opacity: 1; }
  .reqs th, .reqs td { padding: 12px 18px; }
  .reqs tbody th { white-space: normal; }
  .lightbox[open] { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lb-prev, .lb-next { position: absolute; bottom: 18px; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { left: calc(50% + 12px); }
  .lightbox img { max-height: calc(100vh - 170px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
