/* The Ninth Setting: static site styles. No build step, no external resources. */
@font-face {
  font-family: "Press Start 2P";
  src: url("../assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../assets/fonts/PixelifySans-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #1b1838;        /* deep night */
  --ink-2: #26214d;
  --ink-3: #322b63;
  --paper: #fff6e3;      /* sand-white text */
  --muted: #d9cfee;
  --sand: #f2d38b;
  --copper: #e08a4a;
  --ember: #ff6a3d;
  --gale: #8be36b;
  --tide: #4fc3ff;
  --loam: #e2b04a;
  --crimson: #e8435a;
  --azure: #3a8cff;
  --px: 4px;             /* chunky pixel unit for borders/shadows */
  --head: "Press Start 2P", ui-monospace, "Courier New", monospace;
  --body: "Pixelify Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.15rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--sand); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--sand); color: var(--ink); padding: 10px 14px; font-weight: 700;
}
.skip-link:focus { top: 8px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 24, 56, .92);
  backdrop-filter: blur(6px);
  border-bottom: var(--px) solid var(--ink-3);
}
.nav { width: min(1120px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font-family: var(--head); font-size: .7rem; }
.brand img { border: 2px solid var(--copper); }
.nav-links { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-family: var(--head); font-size: .62rem; }
.nav-links a:hover { color: var(--sand); }
.menu-toggle { display: none; } /* phone-only menu button, see @media (max-width: 640px) */

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); font-size: .72rem; line-height: 1.2;
  padding: 14px 18px; text-decoration: none; cursor: pointer;
  border: var(--px) solid var(--ink); color: var(--ink);
  box-shadow: var(--px) var(--px) 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--sand); }
.btn-ghost { background: #fff; }
.btn-steam { background: #66c0f4; }
.btn-music { background: var(--ink-2); color: var(--paper); border-color: var(--paper); box-shadow: var(--px) var(--px) 0 rgba(0,0,0,.5); margin-top: 18px; font-size: .62rem; }
.btn-music:hover { color: var(--paper); box-shadow: 6px 6px 0 rgba(0,0,0,.5); }
.btn-music[aria-pressed="true"] { background: var(--ember); color: var(--ink); border-color: var(--ink); }
.btn-music[aria-pressed="true"] .music-icon { animation: bob .6s steps(2) infinite; display: inline-block; }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(78vh, 720px);
  display: grid; align-items: end;
  border-bottom: var(--px) solid var(--ink-3);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 0% 50%;
}
.hero::after { /* darken the left side for legible text */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(27,24,56,.85) 0%, rgba(27,24,56,.55) 40%, rgba(27,24,56,0) 58%),
              linear-gradient(0deg, rgba(27,24,56,.75) 0%, rgba(27,24,56,0) 40%);
}
.hero-inner { width: min(1120px, 100% - 40px); margin-inline: auto; padding: 72px 0 56px; }
.eyebrow { font-family: var(--head); font-size: .62rem; color: var(--sand); letter-spacing: .04em; margin: 0 0 18px; text-shadow: 2px 2px 0 var(--ink); }
.title {
  font-family: var(--head); font-weight: 400;
  font-size: clamp(2rem, 6.4vw, 4.4rem); line-height: 1.15; margin: 0 0 20px;
  color: #fff;
  text-shadow: 4px 4px 0 var(--crimson), 8px 8px 0 var(--ink);
}
.tagline { font-family: var(--head); font-size: clamp(.8rem, 1.6vw, 1rem); line-height: 1.9; margin: 0 0 28px; color: var(--sand); text-shadow: 2px 2px 0 var(--ink); }
.tagline span { color: var(--paper); font-size: .85em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
h2 {
  font-family: var(--head); font-weight: 400; font-size: clamp(1.05rem, 2.6vw, 1.5rem); line-height: 1.5;
  margin: 0 0 24px; color: #fff; text-shadow: 3px 3px 0 var(--ink-3);
}
h3 { font-family: var(--head); font-weight: 400; font-size: .82rem; line-height: 1.6; margin: 18px 0 10px; }
.lead { font-size: 1.35rem; color: #fff; }
.note { color: var(--muted); margin: -10px 0 24px; }

/* pitch */
.pitch { background:
  radial-gradient(circle at 85% 20%, rgba(79,195,255,.18), transparent 45%),
  radial-gradient(circle at 10% 90%, rgba(255,106,61,.15), transparent 40%), var(--ink); }
.pitch-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.elements { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.el { padding: 10px 12px; background: var(--ink-2); border-left: var(--px) solid; font-size: 1.05rem; }
.el strong { font-family: var(--head); font-weight: 400; font-size: .7rem; display: block; margin-bottom: 4px; }
.el.ember { border-color: var(--ember); } .el.ember strong { color: var(--ember); }
.el.gale  { border-color: var(--gale); }  .el.gale strong  { color: var(--gale); }
.el.tide  { border-color: var(--tide); }  .el.tide strong  { color: var(--tide); }
.el.loam  { border-color: var(--loam); }  .el.loam strong  { color: var(--loam); }
.solo { font-family: var(--head); font-size: .7rem; color: var(--copper); }

.frame { margin: 0; background: var(--ink-2); padding: 10px; border: var(--px) solid var(--paper); box-shadow: 8px 8px 0 var(--crimson); }
.frame img { width: 100%; }
.frame figcaption { font-size: .95rem; color: var(--muted); padding: 10px 4px 2px; }

/* features */
.features { background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { background: var(--ink); border: var(--px) solid var(--ink-3); padding: 14px 16px 20px; box-shadow: 6px 6px 0 var(--accent, var(--copper)); }
.card h3 { color: var(--accent); }
.card p { margin: 0; font-size: 1.02rem; color: var(--muted); }
.c-ember { --accent: var(--ember); } .c-gale { --accent: var(--gale); }
.c-tide { --accent: var(--tide); }  .c-loam { --accent: var(--loam); }
.card-art { aspect-ratio: 16 / 9; overflow: hidden; background: #0f0d24; border: 2px solid var(--ink-3); }
.card-art img, .card-art picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-art.sprites { display: grid; place-items: center; background:
  repeating-conic-gradient(#f2d38b 0 25%, #e9c779 0 50%) 0 0 / 32px 32px; }
.card-art.sprites img { width: auto; height: 82%; object-fit: contain; }

/* gallery */
.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.shots > li { grid-column: span 2; }
.shots > li.shot-wide { grid-column: span 6; }
.shots > li:nth-child(n+5) { grid-column: span 3; }
.shot { display: block; border: var(--px) solid var(--ink-3); background: #000; transition: border-color .1s, transform .1s; }
.shot:hover, .shot:focus-visible { border-color: var(--sand); transform: translateY(-2px); }
.shot img { width: 100%; }

/* trailer */
.trailer { background:
  radial-gradient(circle at 20% 30%, rgba(224,138,74,.14), transparent 50%), var(--ink); }
.trailer h2, .trailer .note, .trailer .trailer-link { text-align: center; }
.trailer-frame { box-sizing: border-box; width: min(94vw, 1600px, calc((80vh - 28px) * 16 / 9 + 28px)); max-width: none;
  position: relative; left: 50%; transform: translateX(-50%); margin-inline: 0; box-shadow: 8px 8px 0 var(--crimson); }
.trailer-link { margin: 24px 0 0; font-family: var(--head); font-size: .62rem; }
.trailer-link a { color: var(--sand); }
.trailer-link a:hover, .trailer-link a:focus-visible { color: #fff; }

/* lofi */
.lofi { background:
  radial-gradient(circle at 80% 30%, rgba(79,195,255,.16), transparent 50%), var(--ink); }
.lofi-frame { box-sizing: border-box; width: min(94vw, 1600px, calc((80vh - 28px) * 16 / 9 + 28px)); /* 28px = frame padding+border, so the whole frame fits in 80vh */ max-width: none;
  position: relative; left: 50%; transform: translateX(-50%); margin-inline: 0; box-shadow: 8px 8px 0 var(--tide); }
.lofi .lofi-link { text-align: center; }
.lofi h2, .lofi .note { text-align: center; }
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #0f0d24; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.lofi-link { margin: 24px 0 0; font-family: var(--head); font-size: .62rem; }
.lofi-link a { color: var(--sand); }
.lofi-link a:hover, .lofi-link a:focus-visible { color: #fff; }
.lofi-more-title { text-align: center; color: var(--sand); margin: 44px 0 16px; font-size: .7rem; }
.lofi-more { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 760px; }
.lofi-vol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 16px; text-decoration: none;
  background: var(--ink-2); border: var(--px) solid var(--ink-3); border-left-color: var(--accent);
  box-shadow: 6px 6px 0 var(--accent); color: var(--paper); transition: transform .08s ease, border-color .08s; }
.lofi-vol:hover, .lofi-vol:focus-visible { transform: translate(-2px, -2px); border-color: var(--accent); color: var(--paper); }
.lofi-vol-num { font-family: var(--head); font-size: .66rem; color: var(--accent); }
.lofi-vol-name { font-size: 1.1rem; font-variant-ligatures: none; font-feature-settings: "liga" 0; }
.lofi-vol-go { margin-left: auto; font-family: var(--head); font-size: .56rem; color: var(--sand); }

/* devlog */
.devlog { background:
  radial-gradient(circle at 20% 50%, rgba(224,138,74,.22), transparent 50%), var(--ink-2);
  border-block: var(--px) solid var(--ink-3); }
.devlog-box { display: grid; grid-template-columns: 160px 1fr; gap: 36px; align-items: center; }
.devlog-avatar { width: 160px; border: var(--px) solid var(--copper); box-shadow: 6px 6px 0 var(--ink); }
.devlog p { max-width: 62ch; color: var(--muted); }

/* footer */
.site-footer { padding: 40px 0 48px; background: #120f29; color: var(--muted); font-size: 1rem; }
.footer-inner p { margin: 6px 0; }
.small { font-size: .9rem; }

/* lightbox */
dialog#lightbox { border: var(--px) solid var(--paper); background: var(--ink); color: var(--paper); padding: 12px; max-width: min(96vw, 1400px); }
dialog#lightbox::backdrop { background: rgba(10, 8, 25, .88); }
#lb-img { width: min(92vw, 1280px); max-height: 80vh; object-fit: contain; }
#lb-cap { margin: 10px 4px 2px; }
.lb-close { position: absolute; right: 8px; top: 8px; background: var(--sand); border: 2px solid var(--ink); font-size: 1rem; width: 36px; height: 36px; cursor: pointer; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .pitch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1.08rem; }
  /* phone menu: button + dropdown panel (JS adds .has-menu; without JS the links simply stay hidden as before) */
  .nav-links { display: none; }
  .menu-toggle:not([hidden]) {
    display: grid; place-items: center; width: 48px; height: 44px; padding: 0; cursor: pointer;
    background: var(--ink-2); border: var(--px) solid var(--paper); box-shadow: var(--px) var(--px) 0 var(--copper);
    color: var(--paper);
  }
  .menu-toggle:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--copper); }
  .menu-toggle[aria-expanded="true"] { background: var(--sand); border-color: var(--ink); color: var(--ink); }
  .menu-bars { display: grid; gap: 4px; width: 20px; }
  .nav { gap: 12px; }
  .menu-bars span { display: block; height: 4px; background: currentColor; }
  .has-menu.is-open .nav-links {
    display: block; position: absolute; left: 0; right: 0; top: calc(100% + var(--px)); /* just under the header border */
    margin: 0; padding: 8px 16px 14px;
    background: var(--ink); border-bottom: var(--px) solid var(--ink-3);
    box-shadow: 0 8px 0 rgba(0,0,0,.35);
  }
  .has-menu.is-open .nav-links li + li { border-top: 2px solid var(--ink-3); }
  .has-menu.is-open .nav-links a {
    display: flex; align-items: center; min-height: 52px; padding: 0 8px;
    font-size: .78rem; color: var(--paper);
  }
  .has-menu.is-open .nav-links a:hover, .has-menu.is-open .nav-links a:focus-visible { color: var(--sand); background: var(--ink-2); }
  .hero { min-height: 0; display: block; }
  .hero-bg { position: relative; inset: auto; z-index: 0; height: auto; aspect-ratio: 2 / 1; object-position: 42% 50%; }
  .hero::after { display: none; }
  .hero-inner { padding: 28px 0 40px; }
  .section { padding: 60px 0; }
  .cards { grid-template-columns: 1fr; }
  .elements { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shots > li, .shots > li.shot-wide, .shots > li:nth-child(n+5) { grid-column: auto; }
  .devlog-box { grid-template-columns: 1fr; gap: 20px; }
  .lofi-more { grid-template-columns: 1fr; }
  .devlog-avatar { width: 112px; }
  .btn { font-size: .66rem; }
}
@media (max-width: 360px) {
  .brand { font-size: .6rem; gap: 8px; }
}

/* ---------- newsletter ---------- */
.newsletter { background: radial-gradient(circle at 80% 50%, rgba(79,195,255,.16), transparent 55%), var(--ink); }
.newsletter-box { max-width: 720px; }
.newsletter-lead { color: var(--muted); max-width: 62ch; }
.signup { margin-top: 22px; background: var(--ink-2); border: var(--px) solid var(--paper); box-shadow: 8px 8px 0 var(--copper); padding: 20px; }
.signup > label { display: block; font-family: var(--head); font-size: .62rem; color: var(--sand); margin-bottom: 10px; }
.signup-row { display: flex; gap: 12px; flex-wrap: wrap; }
.signup-row input { flex: 1 1 240px; min-height: 48px; padding: 0 12px; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--paper); border: var(--px) solid var(--ink); }
.signup-row input:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
.signup-tags { border: 0; padding: 0; margin: 18px 0 0; }
.signup-tags legend { font-size: 1rem; color: var(--muted); padding: 0; margin-bottom: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; color: var(--paper); }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--copper); flex: none; }
.signup-note { color: var(--muted); margin: 14px 0 0; }
@media (max-width: 640px) {
  .signup { padding: 16px; box-shadow: 6px 6px 0 var(--copper); }
  .signup-row .btn { width: 100%; }
}
