/* Frostward Colony: the site's one stylesheet. Night-blue ground, the logo's cream and gold, hard pixel edges. */
@font-face {
  font-family: "Departure Mono";
  src: url("/fonts/DepartureMono-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --night: #171821;
  --slate: #20222d;
  --slate-2: #2a2d3b;
  --line: #3b3f52;
  --ink: #0b0b10;
  --cream: #ecd9b0;
  --cream-dim: #b8a784;
  --text: #d8d5cd;
  --muted: #9c9aa3;
  --parchment: #e9d7ad;
  --parchment-2: #dcc797;
  --parchment-ink: #33271a;
  --parchment-muted: #6a5638;
  --gold: #e6ae3f;
  --gold-dark: #a9741d;
  --wood: #4a3a27;
  --pixel: "Departure Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wide: 1180px;
  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(--text); font: 17px/1.62 var(--body); overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; color: var(--cream); line-height: 1.2; margin: 0; letter-spacing: 0.02em; }
p { margin: 0 0 1em; }
.pix { image-rendering: pixelated; image-rendering: crisp-edges; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 12px; z-index: 50; font-family: var(--pixel); }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: min(var(--wide), 100% - 32px); margin-inline: auto; }
.small { font-size: 0.86rem; color: var(--muted); }

/* ---- the bar at the top ---- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; padding: 10px max(16px, calc((100% - var(--wide)) / 2)); background: rgba(19, 20, 28, 0.94); border-bottom: 3px solid var(--ink); backdrop-filter: blur(6px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--pixel); color: var(--cream); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; white-space: nowrap; }
.brand img { image-rendering: pixelated; }
.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; }
.top nav a, .foot nav a { font-family: var(--pixel); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cream-dim); text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.top nav a:hover, .foot nav a:hover { color: var(--cream); }
.top nav a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--gold); }

/* ---- buttons: a gold key with a hard edge ---- */
.btn { display: inline-block; font-family: var(--pixel); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; color: var(--ink); background: var(--gold); padding: 13px 22px 12px; border: 3px solid var(--ink); box-shadow: inset -3px -3px 0 var(--gold-dark), inset 3px 3px 0 #f6cf7a, 0 5px 0 var(--ink); transition: transform 80ms steps(2), box-shadow 80ms steps(2); white-space: nowrap; }
.btn:hover { color: var(--ink); transform: translateY(2px); box-shadow: inset -3px -3px 0 var(--gold-dark), inset 3px 3px 0 #f6cf7a, 0 3px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: inset -3px -3px 0 var(--gold-dark), inset 3px 3px 0 #f6cf7a, 0 0 0 var(--ink); }
.btn-small { font-size: 0.8rem; padding: 8px 12px 7px; box-shadow: inset -2px -2px 0 var(--gold-dark), inset 2px 2px 0 #f6cf7a, 0 3px 0 var(--ink); }
.btn-small:hover { transform: translateY(1px); box-shadow: inset -2px -2px 0 var(--gold-dark), inset 2px 2px 0 #f6cf7a, 0 2px 0 var(--ink); }
.btn-ghost { background: var(--slate-2); color: var(--cream); box-shadow: inset -3px -3px 0 #1c1e29, inset 3px 3px 0 #3b3f52, 0 5px 0 var(--ink); }
.btn-ghost:hover { color: var(--cream); box-shadow: inset -3px -3px 0 #1c1e29, inset 3px 3px 0 #3b3f52, 0 3px 0 var(--ink); }

/* ---- the opening: the whole city from far out, the winter coming in from the right; the name stands on the summer side ---- */
.hero { position: relative; min-height: min(88vh, 860px); display: grid; align-items: center; padding: 56px max(16px, calc((100% - var(--wide)) / 2)) 72px; isolation: isolate; border-bottom: 3px solid var(--ink); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/img/hero.webp") 62% 58% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15, 16, 23, 0.72) 0%, rgba(15, 16, 23, 0.40) 34%, rgba(15, 16, 23, 0) 62%), linear-gradient(180deg, rgba(23, 24, 33, 0) 70%, rgba(23, 24, 33, 0.85) 100%); }
.hero-in { display: grid; justify-items: start; gap: 22px; max-width: 560px; }
.hero-in h1 { margin-left: -10px; }
.hero-logo { width: min(540px, 88vw); image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35)); }
.hero-line { font-family: var(--pixel); color: var(--cream); font-size: clamp(1.05rem, 2.2vw, 1.4rem); max-width: 26ch; text-shadow: 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 4px 0 var(--ink); margin: 0; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note { font-family: var(--pixel); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream); background: rgba(11, 11, 16, 0.72); padding: 5px 10px; margin: 0; }

/* ---- a heading between two arrows, as on the store page ---- */
.banner { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; font-size: clamp(1.25rem, 3.2vw, 1.9rem); text-transform: uppercase; }
.banner::before, .banner::after { content: ""; flex: 0 1 120px; height: 3px; background: var(--cream-dim); box-shadow: 0 3px 0 var(--ink); }
.lede { text-align: center; max-width: 62ch; margin: 14px auto 0; color: var(--text); }
section { padding: 72px 0; scroll-margin-top: 58px; }
.band { background: var(--slate); border-block: 3px solid var(--ink); }

/* ---- a picture in a wooden frame ---- */
.frame { background: var(--ink); border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--wood), 0 0 0 6px var(--ink), 0 12px 0 rgba(0, 0, 0, 0.28); }
.frame video, .frame img { width: 100%; }
.clip { image-rendering: pixelated; background: var(--ink); }

/* ---- the chapters: a clip beside its words ---- */
.chapter { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.chapter + .chapter { margin-top: 88px; }
.chapter.flip .chapter-media { order: 2; }
.chapter h2 { font-size: clamp(1.3rem, 2.8vw, 1.75rem); text-transform: uppercase; margin-bottom: 14px; }
.chapter-num { font-family: var(--pixel); color: var(--gold); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 10px; }
.points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 22px; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; background: var(--gold); box-shadow: 2px 2px 0 var(--ink); }
.points b { color: var(--cream); font-weight: 600; }

/* ---- the six peoples, on parchment ---- */
.peoples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.card { background: var(--parchment); color: var(--parchment-ink); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--parchment-2), 0 6px 0 rgba(0, 0, 0, 0.35); padding: 20px 20px 18px; position: relative; }
.card h3 { color: var(--parchment-ink); font-size: 1.15rem; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.card h3::before { content: ""; width: 14px; height: 14px; background: var(--chip, var(--gold)); border: 2px solid var(--ink); flex: none; }
.card p { margin: 0; font-size: 0.98rem; }
.pillars .card h3::before { background: var(--gold); }
.card .weak { color: var(--parchment-muted); margin-top: 8px; }
.note { text-align: center; max-width: 64ch; margin: 28px auto 0; color: var(--muted); }

/* ---- screenshots ---- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.shot { display: block; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--wood), 0 0 0 6px var(--ink); transition: transform 90ms steps(2); background: var(--ink); }
.shot:hover { transform: translateY(-4px); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; display: none; place-items: center; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(8, 8, 12, 0.92); }
.lightbox img { max-width: min(96vw, 1920px); max-height: 86vh; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--wood), 0 0 0 6px var(--ink); }
.lightbox button { position: fixed; font-family: var(--pixel); font-size: 1rem; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); padding: 8px 14px; cursor: pointer; }
.lightbox-close { top: 14px; right: 14px; text-transform: uppercase; }
.lightbox-prev { left: 14px; top: 50%; }
.lightbox-next { right: 14px; top: 50%; }

/* ---- the clips: a row to scroll ---- */
.reel { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 560px); gap: 22px; overflow-x: auto; padding: 12px 6px 26px; margin-top: 30px; scroll-snap-type: x proximity; }
.reel figure { margin: 0; scroll-snap-align: start; }
.reel figcaption { font-family: var(--pixel); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.82rem; color: var(--cream-dim); margin-top: 14px; }

/* ---- the list of what is in the game ---- */
.checklist { list-style: none; margin: 34px auto 0; padding: 26px 28px; max-width: 980px; columns: 2; column-gap: 40px; background: var(--parchment); color: var(--parchment-ink); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--parchment-2), 0 6px 0 rgba(0, 0, 0, 0.35); }
.checklist li { break-inside: avoid; position: relative; padding: 5px 0 5px 24px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 10px; background: #3d6a3a; border: 2px solid var(--ink); }

/* ---- the last call ---- */
.call { text-align: center; display: grid; justify-items: center; gap: 20px; }
.call h2 { font-size: clamp(1.4rem, 3.6vw, 2.2rem); text-transform: uppercase; }

/* ---- devlog cards ---- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.post-card { display: grid; align-content: start; gap: 8px; background: var(--slate-2); border: 3px solid var(--ink); padding: 0 0 18px; text-decoration: none; color: var(--text); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35); transition: transform 90ms steps(2); }
.post-card:hover { transform: translateY(-4px); color: var(--text); }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--ink); }
.post-card > span, .post-card > strong { padding: 0 18px; }
.post-card strong { font-family: var(--pixel); font-weight: 400; color: var(--cream); font-size: 1.05rem; line-height: 1.3; }
.post-date { font-family: var(--pixel); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); padding-top: 14px !important; }
.post-summary { font-size: 0.95rem; color: var(--muted); }

/* ---- a page's own head (devlog, press) ---- */
.page-head { padding: 64px 0 34px; text-align: center; background: var(--slate); border-bottom: 3px solid var(--ink); }
.page-head h1 { font-size: clamp(1.6rem, 4.4vw, 2.5rem); text-transform: uppercase; }
.page-head p { margin: 12px auto 0; max-width: 60ch; color: var(--muted); }

/* ---- a devlog post ---- */
.post { width: min(720px, 100% - 32px); margin: 0 auto; padding: 56px 0 72px; }
.post-head { margin-bottom: 30px; }
.post-head h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-top: 10px; }
.post-body { font-size: 1.06rem; }
.post-body h2 { font-size: 1.3rem; margin: 2em 0 0.6em; text-transform: uppercase; }
.post-body h3 { font-size: 1.08rem; margin: 1.6em 0 0.5em; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.post-body li { margin-bottom: 0.4em; }
.post-body figure { margin: 30px 0; }
.post-body figure img, .post-body figure video { width: 100%; border: 3px solid var(--ink); box-shadow: 0 0 0 3px var(--wood), 0 0 0 6px var(--ink); }
.post-body figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 16px; text-align: center; }
.post-body blockquote { margin: 1.4em 0; padding: 14px 18px; background: var(--slate-2); border-left: 6px solid var(--gold); }
.post-body blockquote p { margin: 0; }
.post-body code { font-family: var(--pixel); font-size: 0.9em; background: var(--slate-2); padding: 1px 5px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; padding-top: 24px; border-top: 3px solid var(--line); }
.post-nav-link { text-decoration: none; color: var(--cream); font-family: var(--pixel); font-size: 0.95rem; }
.post-nav-link span { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 4px; }
.post-nav-older { text-align: right; }
.post-foot { margin-top: 44px; text-align: center; }

/* ---- the press kit ---- */
.press { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: 56px 0 72px; }
.sheet { background: var(--parchment); color: var(--parchment-ink); border: 3px solid var(--ink); box-shadow: inset 0 0 0 3px var(--parchment-2), 0 6px 0 rgba(0, 0, 0, 0.35); padding: 22px; position: sticky; top: 84px; }
.sheet h2 { color: var(--parchment-ink); font-size: 1.1rem; text-transform: uppercase; margin-bottom: 12px; }
.sheet dl { margin: 0; display: grid; gap: 12px; }
.sheet dt { font-family: var(--pixel); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--parchment-muted); }
.sheet dd { margin: 2px 0 0; }
.sheet a { color: #7a4d0c; }
.sheet .btn { margin-top: 18px; width: 100%; text-align: center; white-space: normal; }
.press-body h2 { font-size: 1.3rem; text-transform: uppercase; margin: 44px 0 14px; }
.press-body h2:first-child { margin-top: 0; }
.press-body ul { padding-left: 1.2em; margin: 0 0 1em; }
.press-body li { margin-bottom: 0.35em; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; margin-top: 8px; }
.download { display: grid; gap: 8px; text-decoration: none; color: var(--cream-dim); font-family: var(--pixel); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.download img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--slate-2); border: 3px solid var(--ink); image-rendering: pixelated; }
.download:hover { color: var(--cream); }

/* ---- the foot ---- */
.foot { border-top: 3px solid var(--ink); background: #12131a; padding: 34px max(16px, calc((100% - var(--wide)) / 2)) 40px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.foot nav { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.foot .small { margin: 0; max-width: 72ch; }

/* ---- narrower screens ---- */
@media (max-width: 900px) {
  .hero { min-height: min(92vh, 780px); align-items: start; padding-top: 40px; }
  /* the words stand over the picture, which still fills the whole box; it is darkened behind them and clear over the city */
  .hero::before { background-position: 64% 62%; }
  .hero::after { background: linear-gradient(180deg, rgba(15, 16, 23, 0.7) 0%, rgba(15, 16, 23, 0.52) 34%, rgba(15, 16, 23, 0.16) 52%, rgba(15, 16, 23, 0) 62%, rgba(23, 24, 33, 0) 88%, rgba(23, 24, 33, 0.9) 100%); }
  .hero-in { justify-items: center; text-align: center; max-width: none; margin-inline: auto; }
  .hero-in h1 { margin-left: 0; }
  .hero-buttons { justify-content: center; }
  .chapter, .chapter.flip { grid-template-columns: 1fr; }
  .chapter.flip .chapter-media { order: 0; }
  .peoples, .shots, .posts { grid-template-columns: repeat(2, 1fr); }
  .press { grid-template-columns: 1fr; }
  .sheet { position: static; }
  section { padding: 56px 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  /* a phone held upright gets the tall cut of the city: the town below the words, the winter at its right, filling the box */
  .hero::before { background: url("/img/hero-tall.webp") 50% 100% / cover no-repeat; }
  .hero { padding-top: 26px; min-height: clamp(690px, 92vh, 780px); }      /* never so short that the buttons cover the whole town */
  .hero-in { gap: 16px; }
  .top { padding-block: 8px 0; gap: 4px 10px; }
  .top .brand { font-size: 0.8rem; gap: 8px; letter-spacing: 0.04em; }
  .top nav { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .top nav a { font-size: 0.78rem; }
  .top .btn-small { margin-left: auto; font-size: 0.7rem; padding: 6px 8px 5px; letter-spacing: 0.03em; }
  .peoples, .posts { grid-template-columns: 1fr; }
  .shots { gap: 16px; }
  .checklist { columns: 1; padding: 20px; }
  .banner::before, .banner::after { flex-basis: 28px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-older { text-align: left; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .shot, .post-card { transition: none; }
}
