/* Salvage site: PSX survival-horror. Pixel body font, typewriter titles, bevelled panels,
   a dingy palette with blood-red accents, film grain, scanlines and a heavy vignette. */
@font-face { font-family: "VT323"; src: url("/fonts/VT323-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Special Elite"; src: url("/fonts/SpecialElite-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #0a0907;
  --panel: #131210;
  --panel2: #1b1916;
  --bone: #d6cfb3;
  --dim: #80786a;
  --blood: #c8210f;
  --blood-hot: #f0381f;
  --blood-dark: #5c0d07;
  --light: #57514a;
  --dark: #040403;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: "VT323", monospace;
  font-size: 24px;
  line-height: 1.25;
  text-shadow: 2px 2px 0 #000;
  image-rendering: pixelated;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: radial-gradient(ellipse at 50% 0%, #2a1a14 0%, #0a0907 55%);
}
a { color: var(--blood-hot); text-decoration: none; }
a:hover { color: #ff7a60; text-decoration: underline; }
code, kbd {
  font-family: "VT323", monospace;
  background: #000; color: #e6dcb0; padding: 0 6px; border: 1px solid #2d2923;
}
kbd { border-color: var(--light); border-bottom-color: #000; border-right-color: #000; background: var(--panel2); }

/* overlays: grain, scanlines, vignette */
.grain, .scan, .vignette { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.grain {
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  animation: grain 0.6s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0,0) } 20% { transform: translate(-8px,6px) } 40% { transform: translate(6px,-10px) } 60% { transform: translate(-10px,-4px) } 80% { transform: translate(8px,8px) } 100% { transform: translate(0,0) } }
.scan { background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.28) 3px); opacity: .5; }
.vignette { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,.85) 100%); }

/* hero */
.hero { min-height: min(82vh, 700px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 8vh 7vw 6vh; position: relative; }
.rec { position: absolute; top: 28px; right: 7vw; color: var(--blood-hot); letter-spacing: 2px; }
.rec .dot { display: inline-block; width: 14px; height: 14px; background: var(--blood-hot); border-radius: 50%; margin-right: 6px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.title {
  font-family: "Special Elite", monospace; font-weight: normal; margin: 0;
  font-size: clamp(64px, 14vw, 190px); line-height: .95; letter-spacing: 4px;
  color: var(--blood); text-shadow: 4px 4px 0 #000, -2px 0 0 rgba(90,0,0,.6), 3px 0 0 rgba(255,60,30,.18);
  animation: flicker 5s infinite;
  position: relative;
}
.title::after { /* faint glitch ghost */
  content: attr(data-text); position: absolute; left: 3px; top: 0; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.08); pointer-events: none;
}
@keyframes flicker {
  0%, 100% { opacity: 1 } 3% { opacity: .85 } 5% { opacity: 1 } 41% { opacity: 1 } 42% { opacity: .35 }
  43% { opacity: 1 } 44% { opacity: .2 } 46% { opacity: 1 } 78% { opacity: .92 } 80% { opacity: 1 }
}
.tag { font-size: 32px; color: var(--dim); margin: 14px 0 34px; }
nav { display: flex; gap: 14px; flex-wrap: wrap; }
.status { margin-top: 30px; color: var(--dim); }
.pill { background: var(--blood-dark); color: #ffd9cf; border: 1px solid var(--blood); padding: 0 10px; margin-right: 10px; letter-spacing: 2px; }

/* bevelled buttons */
.btn {
  display: inline-block; font-family: "VT323", monospace; font-size: 28px; color: var(--bone); cursor: pointer;
  background: var(--panel2); padding: 6px 22px 8px; text-decoration: none;
  border: 3px solid; border-color: var(--light) #000 #000 var(--light);
  text-shadow: 2px 2px 0 #000; outline: 2px solid #000;
}
.btn:hover { background: var(--blood-dark); color: #fff; text-decoration: none; border-color: var(--blood) #000 #000 var(--blood); }
.btn:active { border-color: #000 var(--light) var(--light) #000; transform: translate(1px,1px); }
.btn.ghost { background: transparent; }
.btn.big { font-size: 40px; padding: 10px 34px 12px; background: var(--blood-dark); border-color: var(--blood-hot) #000 #000 var(--blood-hot); }
.btn.big:hover { background: var(--blood); }

main { max-width: 1100px; margin: 0 auto; padding: 0 5vw 40px; }
section { margin: 70px 0; }
h2 {
  font-family: "Special Elite", monospace; font-weight: normal; font-size: 46px; color: var(--blood);
  margin: 0 0 20px; border-bottom: 3px solid var(--blood-dark); padding-bottom: 6px;
}
h3 { font-family: "Special Elite", monospace; font-weight: normal; font-size: 26px; color: var(--bone); margin: 0 0 8px; }
p { margin: 0 0 14px; }
.small { font-size: 21px; color: var(--dim); }
.note { color: var(--dim); }
.err { color: var(--blood-hot); }

/* screenshots */
.shot-strip { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-top: -2vh; }
.shot-strip figure { margin: 0; position: relative; border: 3px solid; border-color: var(--light) #000 #000 var(--light); background: #000; outline: 2px solid #000; }
.shot-strip figure.wide { grid-row: span 2; }
.shot-strip img { display: block; width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(.9); }
.shot-strip figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 22px; }

/* cards */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-top: 22px; }
.card, .dl, .steps li { background: var(--panel); border: 3px solid; border-color: var(--light) #000 #000 var(--light); outline: 2px solid #000; }
.card { padding: 16px 18px 6px; background-image: repeating-conic-gradient(rgba(255,255,255,.02) 0% 25%, transparent 0% 50%); background-size: 4px 4px; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.steps li { counter-increment: s; padding: 12px 16px 12px 64px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 8px; font-family: "Special Elite", monospace; font-size: 38px; color: var(--blood); }
.controls { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0; color: var(--dim); }
.controls span { white-space: nowrap; }

/* download panel */
.dl { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; }
.dl-main { padding: 22px 26px; border-right: 3px solid #000; }
.dl-notes { padding: 22px 26px; }
.dl-notes ul { margin: 0; padding-left: 22px; }
.dl-notes li { margin-bottom: 6px; }
.ver { font-family: "Special Elite", monospace; font-size: 72px; color: var(--blood); line-height: 1; }
.meta { color: var(--dim); margin: 6px 0 22px; }
.sha { margin-top: 18px; font-size: 17px; color: #5d574c; word-break: break-all; }
.code { display: grid; gap: 10px; max-width: 420px; }
.code label { color: var(--dim); }
.code input { font: inherit; font-size: 28px; color: var(--bone); background: #050504; padding: 6px 12px; border: 3px solid; border-color: #000 var(--light) var(--light) #000; outline: none; }
.code input:focus { border-color: #000 var(--blood) var(--blood) #000; }

.credits { padding-left: 22px; }
.credits li { margin-bottom: 4px; }
footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 7vw 48px; color: var(--dim); border-top: 3px solid var(--blood-dark); font-size: 20px; }

@media (max-width: 760px) {
  body { font-size: 22px; }
  .shot-strip { grid-template-columns: 1fr; }
  .shot-strip figure.wide { grid-row: auto; }
  .dl { grid-template-columns: 1fr; }
  .dl-main { border-right: 0; border-bottom: 3px solid #000; }
  .hero { padding-top: 14vh; }
  .rec { right: 5vw; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .title, .rec .dot { animation: none; }
}
