@font-face { font-family: "Bebas Neue"; src: url(/fonts/bebas-neue-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0b0b;
  --bg-alt: #111;
  --surface: #161616;
  --surface-2: #1d1d1d;
  --line: #2a2a2a;
  --text: #ececec;
  --muted: #9b9b9b;
  --red: #d0142c;
  --red-hot: #ff2a43;
  --white: #fff;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 4px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--white); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-hot); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1; margin: 0; color: var(--white); }
h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h3 { font-size: 1.75rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 3px; color: var(--white); }
address { font-style: normal; }
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); color: #000; padding: 8px 12px; }

.label { font: 700 .75rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--red-hot); margin-bottom: 14px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 .85rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 15px 22px; border-radius: var(--radius); border: 2px solid var(--white); color: var(--white); background: transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--white); color: #000; }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-primary:hover { background: var(--red-hot); border-color: var(--red-hot); color: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,.6); }
.btn-small { padding: 11px 16px; font-size: .75rem; border-width: 1.5px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,11,11,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); font: 1.6rem/1 var(--display); letter-spacing: .04em; }
.brand img { width: 40px; height: 40px; border-radius: 3px; background: #fff; }
.brand:hover { color: var(--white); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font: 700 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 10px 12px; border-radius: var(--radius); }
.nav a:hover { color: var(--white); background: var(--surface); }
.nav .nav-cta { color: var(--white); border: 1.5px solid var(--red); margin-left: 8px; }
.nav .nav-cta:hover { background: var(--red); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: .85rem; }
  .nav .nav-cta { margin: 12px 0 0; text-align: center; border-radius: var(--radius); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background: url(/img/hero-forest-smoke.webp) center 40% / cover no-repeat; filter: grayscale(.35) contrast(1.05); transform: scale(1.04); animation: drift 30s ease-in-out infinite alternate; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,11,.25) 0%, rgba(11,11,11,.55) 45%, var(--bg) 100%), linear-gradient(90deg, rgba(11,11,11,.75) 0%, rgba(11,11,11,0) 70%); }
@keyframes drift { to { transform: scale(1.1) translate(-1.5%, -1%); } }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } html { scroll-behavior: auto; } }
.hero-inner { position: relative; padding-top: 120px; padding-bottom: clamp(56px, 9vw, 110px); width: 100%; }
.hero h1 { font-size: clamp(4.2rem, 13vw, 10rem); line-height: .86; text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.kicker { display: flex; align-items: center; gap: 12px; font: 700 .8rem/1 var(--mono); letter-spacing: .3em; color: var(--white); margin-bottom: 20px; }
.reticle { width: 22px; height: 22px; position: relative; border: 2px solid var(--red); border-radius: 50%; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: var(--red); }
.reticle::before { left: 50%; top: -6px; bottom: -6px; width: 2px; transform: translateX(-50%); }
.reticle::after { top: 50%; left: -6px; right: -6px; height: 2px; transform: translateY(-50%); }
.lede { max-width: 560px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: #d6d6d6; margin: 24px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p:last-child { color: var(--muted); margin: 0; }
.legacy-anchor { position: absolute; top: 0; }
.fine { font-size: .85rem; color: var(--muted); margin-top: 28px; }

/* ---------- order ---------- */
.order { padding-top: 0; margin-top: -1px; }
.order-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); margin-top: clamp(-48px, -5vw, -24px); display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px 48px; }
.order-head h2 { font-size: clamp(2.2rem, 4vw, 3rem); margin-bottom: 14px; }
.order-head p { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.step-n { font: 2rem/1 var(--display); color: var(--red-hot); }
.steps address { font: 1.05rem/1.45 var(--mono); color: var(--white); background: var(--bg); border: 1px dashed #444; padding: 12px 16px; margin: 10px 0; display: block; width: fit-content; max-width: 100%; }
.copy { display: block; font: 700 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: none; border: 1px solid var(--line); color: var(--muted); padding: 8px 12px; border-radius: 3px; cursor: pointer; }
.copy:hover { color: var(--white); border-color: var(--white); }
.copy.done { color: #6ee7a0; border-color: #6ee7a0; }
.order-foot { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 860px) { .order-card { grid-template-columns: 1fr; } }

/* ---------- products ---------- */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-img { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.product-img img.contain { object-fit: contain; }
.product-img:hover img { transform: scale(1.03); }
.product-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.product-body > .btn { align-self: flex-start; margin-top: auto; }
.price-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.price { font: 2.2rem/1 var(--display); color: var(--white); background: var(--red); padding: 6px 10px 3px; border-radius: 3px; white-space: nowrap; }
.price small { font: 700 .6rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; vertical-align: middle; }
.product p { color: #cfcfcf; }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: .95rem; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--red-hot); }
.warn { border-left: 3px solid var(--red); padding: 10px 14px; background: rgba(208,20,44,.08); font-size: .92rem; }
.notice { margin: 0 0 20px; border: 1px solid var(--line); border-radius: 3px; font-size: .88rem; color: var(--muted); }
.notice summary { cursor: pointer; padding: 10px 14px; font: 700 .72rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.notice[open] summary { border-bottom: 1px solid var(--line); }
.notice > p, .notice > ul { padding: 0 14px; margin: 12px 0; }
.notice ul { padding-left: 32px; }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }

/* ---------- guides ---------- */
.guide { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; padding: 40px 0; border-top: 1px solid var(--line); }
.guide:first-of-type { border-top: 0; padding-top: 0; }
.guide-body h3 { font-size: clamp(2rem, 3.5vw, 2.6rem); margin-bottom: 16px; }
.guide-body > p { color: #cfcfcf; }
.pw { font: .85rem/1 var(--mono); color: var(--muted); margin: 12px 0 0; }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; } }

/* ---------- youtube (click to load) ---------- */
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .4s; }
.yt:hover img { opacity: 1; transform: scale(1.02); }
.yt-play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); background: var(--red); border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,.5); }
.yt-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-play { background: var(--red-hot); }
.yt-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font: 700 .72rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #fff; text-align: left; }
.yt-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); display: block; background: #000; }

/* ---------- files ---------- */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.file { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, background .15s, transform .15s; }
.file:hover { border-color: var(--red); background: var(--surface-2); color: var(--white); transform: translateY(-1px); }
.file-type { grid-row: 1 / 3; font: 700 .7rem/1 var(--mono); letter-spacing: .06em; color: var(--white); background: var(--red); border-radius: 3px; padding: 14px 0; width: 46px; text-align: center; }
.file-name { font-weight: 600; line-height: 1.3; }
.file-meta { font: .75rem/1.4 var(--mono); color: var(--muted); }
.file-meta::after { content: "  ↓"; color: var(--red-hot); }
.guide-body .file { margin-top: 8px; }
@media (max-width: 400px) { .files { grid-template-columns: 1fr; } }

/* ---------- supplies ---------- */
.supply-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.supply-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.supply-group h3 { font-size: 1.5rem; margin-bottom: 14px; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.links li:first-child { border-top: 0; }
.links a { text-decoration: none; }
.links a::after { content: " ↗"; color: var(--red-hot); font-size: .85em; }
.links a:hover { text-decoration: underline; text-decoration-color: var(--red); color: var(--white); }
.tag { font: .75rem/1 var(--mono); color: var(--muted); white-space: nowrap; }
@media (max-width: 960px) { .supply-groups { grid-template-columns: 1fr 1fr; } .supply-group:last-child { grid-column: 1 / -1; } }
@media (max-width: 640px) { .supply-groups { grid-template-columns: 1fr; } }

/* ---------- videos ---------- */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.videos figure { margin: 0; }
.videos figcaption { margin-top: 12px; font-weight: 600; line-height: 1.35; }
@media (max-width: 700px) { .videos { grid-template-columns: 1fr; } }

/* ---------- puzzle ---------- */
.puzzle { padding: 40px 0 72px; text-align: center; }
.terminal { display: inline-flex; align-items: center; gap: 10px; background: #000; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 8px 16px; max-width: 100%; }
.terminal:focus-within { border-color: #444; }
.prompt { font: 700 1rem/1 var(--mono); color: var(--red-hot); animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.terminal input { background: transparent; border: 0; outline: 0; color: var(--white); font: 1rem/1 var(--mono); width: 200px; min-width: 0; padding: 10px 4px; }
.terminal button { font: 1rem/1 var(--sans); background: var(--surface-2); color: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 10px 16px; cursor: pointer; }
.terminal button:hover { border-color: var(--red); }
.terminal-msg { font: .8rem/1 var(--mono); color: var(--red-hot); min-height: 1em; margin: 14px 0 0; }
#pdfLink { display: none; margin-top: 14px; font: 700 .85rem/1 var(--mono); color: #6ee7a0; text-decoration: none; border: 1px solid #6ee7a0; padding: 12px 18px; border-radius: 3px; }
#pdfLink:hover { background: #6ee7a0; color: #000; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #070707; padding: 48px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { border-radius: 3px; background: #fff; }
.footer-brand strong { font: 1.6rem/1 var(--display); letter-spacing: .04em; display: block; margin-bottom: 6px; color: var(--white); }
.footer-brand address { color: var(--muted); font-size: .9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { font: 700 .75rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 6px 0; }
.footer-nav a:hover { color: var(--white); }
.copyright { margin-top: 8px; font-size: .78rem; }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0,0,0,.88); }
.lightbox img { max-width: 100%; max-height: calc(88vh - 60px); margin: 0 auto; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: -44px; right: 0; width: 40px; height: 40px; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.video-box { width: min(96vw, 1100px); }
.video-frame iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; border-radius: var(--radius); }
.yt[data-short] img { object-fit: contain; }

/* ---------- downloads (generated) ---------- */
.dl-cat + .dl-cat { margin-top: 48px; }
.dl-cat h3 { font-size: 1.9rem; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dl-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.dl-thumb { aspect-ratio: 4 / 3; background: #0d0d0d; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-ext { font: 2.6rem/1 var(--display); letter-spacing: .06em; color: var(--white); border: 2px solid var(--red); padding: 14px 18px 8px; border-radius: 3px; }
.dl-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.dl-body h4 { margin: 0 0 8px; font-size: 1.05rem; line-height: 1.3; color: var(--white); }
.dl-body p { color: #cfcfcf; font-size: .92rem; margin-bottom: 10px; }
.dl-body .dl-meta { font: .72rem/1.4 var(--mono); color: var(--muted); }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

/* ---------- STL viewer ---------- */
.viewer-box { width: min(96vw, 1100px); }
.viewer-stage { position: relative; height: min(70vh, 640px); background: #111; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.viewer-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.viewer-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: .85rem/1 var(--mono); color: var(--muted); }
.viewer-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 14px 16px; }
.viewer-title { color: var(--white); }
.viewer-hint { font: .72rem/1.4 var(--mono); color: var(--muted); flex: 1; }

/* ---------- gallery bits ---------- */
button.dl-thumb { width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); cursor: zoom-in; position: relative; }
.dl-badge { position: absolute; right: 10px; bottom: 10px; font: 700 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.75); border: 1px solid var(--red); padding: 7px 9px; border-radius: 3px; }
button.dl-thumb:hover .dl-badge { background: var(--red); }
.lightbox-nav { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 12px; }
.lightbox-nav button { width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; color: #fff; background: rgba(255,255,255,.08); border: 1px solid #444; border-radius: 50%; cursor: pointer; }
.lightbox-nav button:hover { border-color: var(--red); background: var(--red); }
.lb-count { font: .8rem/1 var(--mono); color: #bbb; min-width: 48px; text-align: center; }
