/* ═══════════════════════════════════════════════════════════════
   Task Bar Villain — the page is a desktop and the content sits in
   its windows. Everything is hard-edged: no border-radius, no blur,
   offset solid shadows. The palette is lifted from the game itself.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --void:      #07090F;
  --bg:        #0B0E16;
  --panel:     #141822;
  --panel-hi:  #1B2130;
  --edge:      #3A4258;
  --edge-soft: #262D3E;

  --text:      #E8EDF5;
  --dim:       #808AA0;
  --dimmer:    #5A6478;

  --gold:      #D9A441;
  --grass:     #7DC94F;
  --grass-dk:  #57A03C;
  --blood:     #C93A3A;
  --steel:     #BFC9DE;

  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono",
          "Roboto Mono", Menlo, Consolas, monospace;

  --px: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem) 5rem;
  min-height: 100vh;
  background:
    radial-gradient(120% 80% at 78% -10%, #16203A 0%, transparent 58%),
    radial-gradient(90%  70% at 8% 105%,  #10241B 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint desktop grid, under everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120,150,200,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,150,200,.045) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(120% 90% at 50% 15%, #000 20%, transparent 80%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* ───────────────────────────── layout ───────────────────────────── */

.desktop {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

/* Offset and stacked, the way a real desktop ends up after ten minutes of
   use. Later windows sit ON TOP — so the overlap eats the previous window's
   bottom padding, never its title bar. Reverse this and the headings vanish. */
.win--hero   { grid-column: 1 / span 8;  z-index: 1; }
.win--shot   { grid-column: 3 / span 10; z-index: 2; margin-top: -18px; }
.win--vitals { grid-column: 1 / span 7;  z-index: 3; margin-top: -18px; }
.win--panels { grid-column: 2 / span 10; z-index: 4; margin-top: -18px; }
.win--controls { grid-column: 1 / span 9; z-index: 5; margin-top: -18px; }
.win--how    { grid-column: 3 / span 8;  z-index: 6; margin-top: -18px; }
.win--warn   { grid-column: 4 / span 9;  z-index: 7; margin-top: -18px; }

/* ───────────────────────────── window chrome ───────────────────── */

.win {
  background: var(--panel);
  border: var(--px) solid var(--edge);
  box-shadow: 8px 8px 0 rgba(0,0,0,.55);
  animation: rise .55s cubic-bezier(.2,.8,.25,1) backwards;
  animation-delay: calc(var(--d) * 80ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.win__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .6rem;
  background: var(--panel-hi);
  border-bottom: var(--px) solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.win__title {
  flex: 1;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}

.win__dot {
  width: 10px; height: 10px;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(217,164,65,.18);
}
.win__dot--warn { background: var(--blood); box-shadow: 0 0 0 2px rgba(201,58,58,.2); }

.win__btns { display: flex; gap: 5px; }
.win__btns i {
  width: 11px; height: 9px;
  background: var(--edge-soft);
  border: 1px solid var(--edge);
}
.win__btns i.x { background: #3A2430; border-color: #5A2430; }

.win__body { padding: clamp(1.1rem, 3vw, 2rem); }

/* ───────────────────────────── hero ───────────────────────────── */

.hero__logo {
  display: block;
  width: 100%;
  max-width: 384px;
  height: auto;
  image-rendering: pixelated;
  margin: 0 0 1.2rem;
}

.hero__tag {
  margin: 0 0 1.75rem;
  max-width: 46ch;
  color: var(--steel);
  font-size: clamp(15px, 1.6vw, 17px);
}

/* ───────────────────────────── download ───────────────────────── */

.dl { margin-bottom: .85rem; }

.dl__btn {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.5rem;
  background: var(--grass-dk);
  color: #071008;
  border: var(--px) solid #2C5C20;
  box-shadow: 5px 5px 0 rgba(0,0,0,.5);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .09s steps(2), box-shadow .09s steps(2),
              background .12s linear;
}
.dl__btn:hover, .dl__btn:focus-visible {
  background: var(--grass);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
  outline: none;
}
.dl__btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 rgba(0,0,0,.5); }
.dl__btn svg { flex: none; }

.dl__meta {
  margin: .7rem 0 0;
  font-size: 12.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dimmer);
}

/* the "we have nothing for you" state — honest, not a dead end */
.dl__none {
  padding: 1rem 1.15rem;
  border: var(--px) dashed var(--edge);
  background: rgba(201,58,58,.05);
  max-width: 52ch;
}
.dl__none b { color: var(--gold); }
.dl__none p { margin: .35rem 0 0; color: var(--dim); font-size: 13.5px; }

.dl__note { color: var(--dim); font-size: 13px; }
.dl__note a { color: var(--gold); }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dimmer);
  cursor: pointer;
  border-bottom: 1px solid var(--edge-soft);
}
.linkish:hover { color: var(--gold); border-bottom-color: var(--gold); }

.alt {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: var(--px);
  max-width: 480px;
}
.alt li { background: var(--panel-hi); border: 1px solid var(--edge-soft); }
.alt a, .alt--off {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem .85rem;
  text-decoration: none;
  color: var(--text);
}
.alt a:hover { background: var(--edge-soft); color: var(--gold); }
.alt b { font-size: 13.5px; letter-spacing: .06em; }
.alt span { font-size: 12px; color: var(--dimmer); text-align: right; }
.alt--off { opacity: .5; }
.alt--off b { color: var(--dim); }

/* ───────────────────────────── screenshots ────────────────────── */

.shot { margin: 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  border: var(--px) solid var(--edge-soft);
  background: var(--void);
}
.shot figcaption {
  margin-top: .7rem;
  font-size: 12px;
  line-height: 1.65;
  color: var(--dimmer);
}

/* Screenshots are pixel art: scaling them off their native size turns the
   5x7 text to mush. Cap every shot at 1:1 and centre it instead. */
.shot--wide img { max-width: 790px; margin: 0 auto; }

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 400px));
  justify-content: center;
  gap: 1.5rem 1.75rem;
}
.shots img { max-width: 400px; margin: 0 auto; }

/* The menu and the collapsed nub are small enough that stretching them to the
   column width lands on a fractional scale factor, and 5x7 text goes ragged at
   2.17x however you render it. Leave them at 1:1 and centre them. */
.shot--tight img { width: auto; max-width: 100%; margin: 0 auto; }

/* ───────────────────────────── vitals table ───────────────────── */

.lede { margin: 0 0 1.4rem; color: var(--steel); max-width: 56ch; }

.stats { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats th, .stats td {
  padding: .6rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--edge-soft);
}
.stats thead th {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dimmer);
  border-bottom: var(--px) solid var(--edge);
}
.stats tbody th {
  color: var(--dim);
  font-weight: 400;
  letter-spacing: .04em;
  width: 34%;
}
.stats b { color: var(--grass); font-size: 16px; letter-spacing: .02em; }
.stats s { color: var(--dimmer); text-decoration: none; font-size: 11.5px; }
.stats .bad { color: var(--blood); }
.stats thead .bad { color: rgba(201,58,58,.75); }

.fineprint {
  margin: 1.1rem 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--dimmer);
  max-width: 62ch;
}

/* ───────────────────────────── spec list ──────────────────────── */

.spec { margin: 0; }
.spec dt {
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 1rem;
  border-top: 1px solid var(--edge-soft);
}
.spec dt:first-child { padding-top: 0; border-top: 0; }
.spec dd {
  margin: .35rem 0 1rem;
  color: var(--steel);
  font-size: 14px;
  max-width: 60ch;
}

code {
  font-family: var(--mono);
  font-size: .9em;
  padding: .1em .38em;
  background: var(--void);
  border: 1px solid var(--edge-soft);
  color: var(--gold);
}

/* ───────────────────────────── warnings ───────────────────────── */

.warn { margin: 0; padding: 0; list-style: none; display: grid; gap: .85rem; }
.warn li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--steel);
  font-size: 14px;
  max-width: 66ch;
}
.warn li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 8px; height: 8px;
  background: var(--blood);
}
.warn b { color: var(--text); }

/* ───────────────────────────── footer ─────────────────────────── */

.foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 3rem;
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dimmer);
}

/* ───────────────────────────── responsive ─────────────────────── */

@media (max-width: 900px) {
  .desktop { display: block; }
  .win { margin-top: 1.25rem !important; box-shadow: 5px 5px 0 rgba(0,0,0,.55); }
  .win--hero { margin-top: 0 !important; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .dl__btn { width: 100%; justify-content: center; }
  /* A 790px-wide strip shrunk to phone width loses the pixels entirely;
     let it scroll at a legible size instead. */
  .shot--wide { overflow-x: auto; }
  .shot--wide img { width: 790px; max-width: none; }
}

/* ───────────────────────────── a11y ───────────────────────────── */

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

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

::selection { background: var(--gold); color: var(--void); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--edge-soft); border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: var(--edge); }
