/* Cursed Wings – site styles. No external resources: fonts are self-hosted (SIL OFL).
 * Design rules: the page looks like the game. Two typefaces from the game (Press Start 2P for
 * headings, buttons and numbers; Metamorphous for reading text). Pictures are real in-game pixel
 * sprites, drawn pixelated. Gold = interface, blood red = the one action that matters. */
@font-face {
  font-family: "Press Start 2P";
  src: url("fonts/PressStart2P-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Metamorphous";
  src: url("fonts/Metamorphous-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --night: #0a0614;
  --night-2: #130b24;
  --plum: #1d1236;
  --violet: #3a2266;
  --blood: #c3142c;
  --blood-hi: #ee3048;
  --blood-deep: #6d0a19;
  --gold: #e8b64c;
  --gold-hi: #ffd77a;
  --gold-deep: #8a6420;
  --bone: #ede6f6;
  --mist: #b9abd3;
  --line: rgba(232, 182, 76, .28);
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --read: "Metamorphous", Georgia, serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --panel-edge: 0 0 0 3px #000, 0 0 0 6px var(--gold-deep), 0 0 0 9px #000;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 1.06rem/1.75 var(--read);
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
.sprite { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
[hidden] { display: none !important; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--plum); padding: 1px 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--gold); color: #000; padding: 8px 12px; font: .7rem var(--pixel); }
.skip:focus { left: 8px; }

/* ---------- shared pieces ---------- */
.panel { background: rgba(19, 11, 36, .92); box-shadow: var(--panel-edge); }

.section-title {
  margin: 0 0 14px; text-align: center;
  font: 400 clamp(1rem, 2.6vw, 1.45rem)/1.4 var(--pixel); color: var(--gold);
  text-shadow: 3px 3px 0 #000;
}
.section-title::after { /* the pixel rule used under every heading in the game menus */
  content: ""; display: block; width: 120px; height: 8px; margin: 18px auto 0;
  background:
    linear-gradient(90deg, transparent 0 8px, var(--blood) 8px 16px, transparent 16px 24px, var(--gold) 24px 96px, transparent 96px 104px, var(--blood) 104px 112px, transparent 112px);
}
.section-lead { max-width: 58ch; margin: 0 auto 44px; text-align: center; color: var(--mist); }
section { padding: clamp(64px, 9vw, 110px) 0; }

.btn {
  --b: var(--blood); --bh: var(--blood-hi); --bd: var(--blood-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 16px 24px;
  font: 400 .78rem/1.3 var(--pixel); text-decoration: none;
  color: #fff; background: var(--b); border: 0; cursor: pointer;
  box-shadow:
    inset -4px -4px 0 var(--bd), inset 4px 4px 0 var(--bh),
    0 0 0 3px #000, 0 0 0 5px var(--gold-deep);
  transition: transform .12s, filter .12s;
}
.btn:hover { color: #fff; filter: brightness(1.12); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--ghost {
  --b: rgba(19, 11, 36, .88); --bh: var(--violet); --bd: #080510;
  color: var(--gold-hi);
}
.btn--ghost:hover { color: var(--gold-hi); }
.btn--big { font-size: .88rem; padding: 20px 30px; }
@media (prefers-reduced-motion: no-preference) {
  /* the page's one ambient motion: the main call to action glows like a pickup */
  .btn--pulse { animation: pulse 2.6s ease-in-out infinite; }
  @keyframes pulse {
    50% { box-shadow: inset -4px -4px 0 var(--bd), inset 4px 4px 0 var(--bh), 0 0 0 3px #000, 0 0 0 5px var(--gold), 0 0 34px rgba(238, 48, 72, .55); }
  }
}

/* ---------- top bar ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter);
  font: 400 .6rem/1.4 var(--pixel);
}
.topbar nav { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar nav a { color: var(--mist); text-decoration: none; text-shadow: 2px 2px 0 #000; }
.topbar nav a:hover { color: var(--gold-hi); }
.brand { color: var(--gold); text-decoration: none; white-space: nowrap; text-shadow: 2px 2px 0 #000; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 92px 0 0; text-align: center;
  background:
    linear-gradient(180deg, rgba(10, 6, 20, .1) 0%, rgba(10, 6, 20, .45) 38%, var(--night) 62%),
    url("img/hero-bg.webp") center top / auto 760px no-repeat,
    var(--night);
}
.hero-h1 { margin: 0; }
.logo { width: min(620px, 90vw); height: auto; margin: 0 auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .8)); }
.tagline {
  margin: 8px auto 16px; font: 400 clamp(.95rem, 2.6vw, 1.5rem)/1.5 var(--pixel);
  color: var(--gold-hi); text-shadow: 3px 3px 0 #000, 0 0 18px rgba(232, 182, 76, .35);
}
.subline { margin: 0 auto 32px; max-width: 50ch; font: 400 clamp(.6rem, 1.5vw, .76rem)/2.1 var(--pixel); color: var(--bone); text-shadow: 2px 2px 0 #000; }
.cta-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.trailer { max-width: 1040px; margin: 0 auto; padding: 0; box-shadow: var(--panel-edge), 0 30px 90px rgba(0, 0, 0, .8); }
.trailer video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }

/* ---------- pitch ---------- */
.pitch { padding-bottom: 0; }
.pitch .lead { max-width: 60ch; margin: 0 auto; text-align: center; font-size: clamp(1.1rem, 2vw, 1.28rem); line-height: 1.8; }
.pitch .lead strong { color: var(--gold-hi); font-weight: 400; }

/* ---------- features: Fly. Burn. Die. Fly again. ---------- */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.loop > li { padding: 0 26px; border-left: 2px dashed var(--line); }
.loop > li:first-child { border-left: 0; }
.loop .sprite-slot { height: 104px; display: flex; align-items: flex-end; margin-bottom: 20px; }
.loop .sprite-slot img { height: auto; filter: drop-shadow(4px 4px 0 #000); }
.loop h3 { margin: 0 0 16px; font: 400 .92rem/1.4 var(--pixel); color: var(--gold-hi); text-shadow: 3px 3px 0 #000; }
.loop ul { margin: 0; padding: 0; list-style: none; }
.loop ul li { position: relative; padding-left: 20px; margin: 0 0 12px; color: var(--mist); line-height: 1.6; }
.loop ul li::before { /* pixel coin bullet */
  content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
  background: var(--gold); box-shadow: 2px 2px 0 #000;
}
.loop ul li b { color: var(--bone); font-weight: 400; }

/* ---------- bestiary ---------- */
.bosses {
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(195, 20, 44, .22), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
}
.bestiary { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; align-items: end; }
.bestiary li { text-align: center; }
.bestiary .sprite { height: 180px; width: auto; margin: 0 auto 4px; object-fit: contain; filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, .75)); }
.bestiary li::before { /* ground shadow */
  content: ""; display: block; order: 2;
}
.bestiary .plinth { display: block; height: 10px; margin: 0 12% 16px; background: rgba(0, 0, 0, .55); border-radius: 50%; }
.bestiary .rank { display: block; font: 400 .66rem/1 var(--pixel); color: var(--blood-hi); margin-bottom: 10px; }
.bestiary .name { display: block; font: 400 1.02rem/1.3 var(--read); color: var(--bone); }
.bestiary li:last-child .rank, .bestiary li:last-child .name { color: var(--gold-hi); }
.bestiary li:last-child .sprite { height: 210px; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.shots button {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: #000;
  box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--gold-deep); transition: box-shadow .15s;
}
.shots button:hover { box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--gold); }
.shots img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.lightbox {
  width: min(1600px, 96vw); max-width: 96vw; max-height: 96vh; padding: 0; border: 0;
  background: transparent; color: var(--bone); overflow: visible;
}
.lightbox::backdrop { background: rgba(5, 3, 10, .92); }
.lightbox img { width: 100%; height: auto; max-height: 86vh; object-fit: contain; box-shadow: var(--panel-edge); background: #000; }
.lb-bar { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.lb-bar .btn { min-height: 44px; padding: 12px 16px; font-size: .66rem; }

/* ---------- Hall of Fame ---------- */
.hof { background: linear-gradient(180deg, var(--night), var(--night-2)); }
.hof-box { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.hof-col { padding: 22px 20px; }
.hof-col h3 { margin: 0 0 16px; text-align: center; font: 400 .74rem/1.4 var(--pixel); color: var(--blood-hi); }
.hof-col ol { margin: 0; padding: 0; list-style: none; font: 400 .7rem/1.4 var(--pixel); }
.hof-col li { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 8px; padding: 10px 4px; border-bottom: 2px dashed rgba(232, 182, 76, .16); }
.hof-col li:last-child { border-bottom: 0; }
.hof-col li .r { color: var(--mist); }
.hof-col li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hof-col li .s { color: var(--gold-hi); }
.hof-col li:first-child .n { color: var(--gold-hi); }
.hof-col .empty { color: var(--mist); text-align: center; font-size: .62rem; padding: 12px 0; }

/* ---------- alpha download ---------- */
.alpha-box { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr; gap: 34px; align-items: center; padding: 30px 34px; }
.alpha-box .sprite { width: 104px; height: auto; filter: drop-shadow(4px 4px 0 #000); }
.alpha-box h2 { margin: 0 0 12px; font: 400 clamp(.9rem, 2.2vw, 1.15rem)/1.5 var(--pixel); color: var(--gold); text-shadow: 3px 3px 0 #000; }
.alpha-box p { margin: 0 0 18px; color: var(--mist); }
.alpha-meta { margin: 14px 0 0 !important; font: 400 .56rem/1.8 var(--pixel); color: var(--mist); }

/* ---------- closing call ---------- */
.final {
  text-align: center; position: relative;
  background:
    linear-gradient(180deg, var(--night) 0%, rgba(10, 6, 20, .35) 35%, rgba(10, 6, 20, .5) 75%, var(--night) 100%),
    url("img/bg.webp") center bottom / cover no-repeat;
  padding: clamp(90px, 13vw, 160px) 0;
}
.final .sprite { width: 150px; height: auto; margin: 0 auto 26px; filter: drop-shadow(5px 5px 0 #000); }
.final h2 { margin: 0 0 16px; font: 400 clamp(1.1rem, 3vw, 1.7rem)/1.4 var(--pixel); color: #fff; text-shadow: 3px 3px 0 #000, 0 0 20px #000; }
.final p { margin: 0 auto 34px; max-width: 46ch; text-shadow: 0 1px 3px #000, 0 0 12px #000; }

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--line); background: #07040e; padding: 34px 0 40px; color: var(--mist); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 26px; font: 400 .58rem/1.6 var(--pixel); }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--gold-hi); }
.copy { font-size: .95rem; }

/* ---------- legal + contact pages ---------- */
.legal-head { padding: 22px 0; border-bottom: 2px solid var(--line); background: linear-gradient(180deg, var(--plum), var(--night)); }
.legal-head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.legal-head img { width: 170px; height: auto; }
.legal-head a.back { font: 400 .6rem/1.5 var(--pixel); color: var(--gold-hi); text-decoration: none; }
.legal { max-width: 780px; padding: 48px var(--gutter) 80px; margin: 0 auto; }
.legal h1 { font: 400 clamp(1rem, 3vw, 1.4rem)/1.45 var(--pixel); color: var(--gold); margin: 0 0 20px; text-shadow: 3px 3px 0 #000; }
.legal h2 { font: 400 .78rem/1.6 var(--pixel); color: var(--gold-hi); margin: 42px 0 12px; }
.legal .meta { color: var(--mist); }
.legal address { font-style: normal; }
.legal strong { color: #fff; font-weight: 400; }
.table-scroll { overflow-x: auto; margin: 18px 0; border: 2px solid var(--line); }
.legal table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .97rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font: 400 .58rem/1.6 var(--pixel); color: var(--gold); background: var(--plum); }

.form-status { display: none; padding: 14px 18px; margin: 20px 0; }
.form-status:target { display: block; }
.form-status.ok { box-shadow: 0 0 0 3px var(--gold); color: var(--gold-hi); background: rgba(232, 182, 76, .08); }
.form-status.err { box-shadow: 0 0 0 3px var(--blood-hi); color: #ffd0d6; background: rgba(195, 20, 44, .12); }
.contact-form { display: grid; gap: 8px; margin-top: 30px; }
.contact-form label { font: 400 .6rem/1.6 var(--pixel); color: var(--gold); margin-top: 14px; }
.contact-form label span { color: var(--mist); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--bone);
  background: var(--night-2); border: 0; border-radius: 0; box-shadow: 0 0 0 2px var(--gold-deep);
}
.contact-form textarea { resize: vertical; min-height: 170px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--gold); }
.contact-form .check { display: flex; gap: 12px; align-items: flex-start; font: inherit; font-size: .97rem; color: var(--bone); margin: 18px 0 12px; }
.contact-form .check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--gold); flex: none; }
.contact-form .btn { justify-self: start; margin-top: 6px; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .loop { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .loop > li:nth-child(3) { border-left: 0; }
  .bestiary { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .bestiary li:last-child .sprite { height: 180px; }
}
@media (max-width: 720px) {
  .topbar nav { display: none; }
  .hero { padding-top: 76px; background-size: auto, auto 560px, auto; }
  .loop { grid-template-columns: 1fr; }
  .loop > li { border-left: 0; padding: 0; }
  .loop .sprite-slot { height: 84px; }
  .bestiary { grid-template-columns: repeat(2, 1fr); }
  .bestiary .sprite, .bestiary li:last-child .sprite { height: 150px; }
  .shots { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hof-box { grid-template-columns: 1fr; gap: 30px; }
  .alpha-box { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .btn { width: 100%; font-size: .7rem; padding: 15px 14px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .lb-bar .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.loop .sprite-slot img.fire { width: 78px; }
.pow-note { margin: 10px 0 0; font-size: .95rem; color: var(--mist); }
.contact-form .btn:disabled { filter: grayscale(.7) brightness(.7); cursor: progress; transform: none; }
/* Steam page not live yet: greyed out, not clickable */
.btn.btn--soon, .btn.btn--soon:hover {
  --b: #3a3446; --bh: #5a5366; --bd: #1f1b27;
  color: #a39cb0; cursor: default; filter: none; transform: none; animation: none;
  box-shadow: inset -4px -4px 0 var(--bd), inset 4px 4px 0 var(--bh), 0 0 0 3px #000, 0 0 0 5px #4a4456;
}
.release { padding: 6px 0 4px; border-bottom: 2px dashed var(--line); }
.release:last-of-type { border-bottom: 0; }
.release h2 { margin-bottom: 4px; }
.release .meta { margin: 0 0 10px; }
