/* Novaris Studios: one stylesheet for every page.
   Colours are the studio card's own (docs/brand/README.md on The Deep's brand/novaris branch)
   and, inside a game's section, that game's own UI colours. */

@font-face {
  font-family: "Nunito";
  src: url("../media/fonts/Nunito-wght.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* the studio card */
  --night: #05050d;
  --night-2: #0c0c18;
  --night-3: #15152a;
  --cream: #eee8dc;
  --cream-dim: #b9b3a8;
  --gold: #facc6b;
  --gold-deep: #da9e4a;
  --warm: #ffaa46;
  --cool: #6050e6;
  --violet: #9684ff;
  /* Mountain Smasher's UI (game/scripts/ui_theme.gd) */
  --ms-cream: #fff7e6;
  --ms-ink: #3e2616;
  --ms-ink-soft: #6e5240;
  --ms-orange: #ff9d2e;
  --ms-orange-dark: #b4560f;
  --ms-green: #5bb33f;
  --ms-green-dark: #2f7a2a;
  --ms-sky: #49aef0;
  --ms-tan: #cdb48c;
  /* The Deep */
  --deep-bg: #0f0b12;
  --deep-panel: #1a1320;
  --deep-ember: #ff8a3d;
  --deep-parch: #f1e3c6;

  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --k: 3; /* the studio star: one art cell = --k px (always a whole number) */
}
@media (min-width: 560px) { :root { --k: 4; } }
@media (min-width: 1000px) { :root { --k: 6; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe3a3; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 900; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--gold); color: var(--night); padding: 10px 14px; border-radius: 10px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- the bar at the top ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  background: rgba(5,5,13,.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(238,232,220,.08);
}
.bar .home { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bar .home img { width: 31px; height: 31px; image-rendering: pixelated; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.bar nav a { color: var(--cream); text-decoration: none; font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.bar nav a:hover { color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 900; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #ffe09a; color: var(--night); }
.btn-line { color: var(--cream); box-shadow: inset 0 0 0 2px rgba(238,232,220,.55); }
.btn-line:hover { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.btn-ms { background: var(--ms-orange); color: var(--ms-ink); box-shadow: inset 0 -4px 0 rgba(0,0,0,.16); }
.btn-ms:hover { background: #ffb257; color: var(--ms-ink); }
.btn-ms-line { color: var(--ms-ink); box-shadow: inset 0 0 0 2px var(--ms-ink); }
.btn-ms-line:hover { color: var(--ms-ink); background: rgba(62,38,22,.07); }

/* ---------- the opening: the studio card over the game ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  overflow: hidden; isolation: isolate; text-align: center;
  padding: 96px var(--gutter) 72px;
}
.hero video, .hero .poster, .hero .poster-pic {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero::after { /* night over the world, darkest where the logo sits (brand rule: never on a busy light background) */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(5,5,13,.86) 0%, rgba(5,5,13,.7) 55%, rgba(5,5,13,.45) 100%),
    linear-gradient(to bottom, rgba(5,5,13,.35) 0%, rgba(5,5,13,0) 30%, rgba(5,5,13,0) 70%, var(--night) 100%);
}
.hero-inner { display: grid; justify-items: center; gap: 28px; }

.lockup {
  position: relative;
  width: calc(1125px * var(--k) / 12);
  height: calc(786px * var(--k) / 12);
}
.lockup .words { /* the lockup's letters only; the star above them is the animated one */
  position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: inset(52% 0 0 0);
  opacity: 0; animation: words-in .45s ease-out .8s forwards;
}
.lockup .star {
  position: absolute;
  width: calc(97px * var(--k)); height: calc(97px * var(--k));
  left: calc((563px / 12 - 48.5px) * var(--k));
  top: calc((210px / 12 - 48.5px) * var(--k));
  background: url("../media/brand/star_burst.png") 0 0 / calc(2231px * var(--k)) calc(97px * var(--k)) no-repeat;
  image-rendering: pixelated;
  animation: burst 1.53s steps(22, jump-end) .15s forwards;
}
.lockup .bloom {
  position: absolute; pointer-events: none; border-radius: 50%;
  left: calc(563px * var(--k) / 12); top: calc(210px * var(--k) / 12); translate: -50% -50%;
  opacity: 0; animation: bloom-in 1s ease-out .45s forwards;
}
.lockup .bloom.warm { width: calc(86px * var(--k) / 3); height: calc(86px * var(--k) / 3);
  background: radial-gradient(circle, rgba(255,170,70,.5) 0%, rgba(255,170,70,.17) 35%, rgba(255,170,70,0) 70%); }
.lockup .bloom.cool { width: calc(250px * var(--k) / 3); height: calc(250px * var(--k) / 3);
  background: radial-gradient(circle, rgba(96,80,230,.16) 0%, rgba(96,80,230,.05) 45%, rgba(96,80,230,0) 70%); }
@keyframes burst { to { background-position: calc(-2134px * var(--k)) 0; } }
@keyframes words-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes bloom-in { to { opacity: 1; } }
.hero .tagline { max-width: 30ch; margin: 0; font-size: clamp(20px, 2.6vw, 28px); font-weight: 800; color: var(--cream); text-wrap: balance;
  opacity: 0; animation: words-in .5s ease-out 1.2s forwards; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; opacity: 0; animation: words-in .5s ease-out 1.35s forwards; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; translate: -50% 0; width: 31px; height: 31px; opacity: .55; image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) {
  .lockup .star { animation: none; background-position: calc(-2134px * var(--k)) 0; }
  .lockup .words, .lockup .bloom, .hero .tagline, .hero .actions { animation: none; opacity: 1; }
}

/* ---------- a game's band ---------- */
.band { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.kicker img { width: 15px; height: 15px; image-rendering: pixelated; }

/* Mountain Smasher: the game's sky, grass and cream panels */
.ms {
  background:
    linear-gradient(to bottom, var(--night) 0, #2a6fb3 140px, var(--ms-sky) 340px, #8fd0ff 70%, #c8ecff 100%);
  color: var(--ms-ink);
}
.ms::after { /* a low-poly grass edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 42px;
  background: var(--ms-green);
  clip-path: polygon(0 60%, 6% 30%, 13% 55%, 21% 20%, 29% 50%, 37% 28%, 46% 58%, 55% 24%, 63% 52%, 72% 30%, 80% 55%, 88% 26%, 95% 48%, 100% 35%, 100% 100%, 0 100%);
}
.ms-grid { display: grid; gap: clamp(24px, 4vw, 48px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ms-grid { grid-template-columns: 1fr 1.15fr; } }
.panel {
  background: var(--ms-cream); border-radius: 24px; padding: clamp(22px, 3.4vw, 38px);
  box-shadow: 0 0 0 3px var(--ms-tan), 0 18px 40px rgba(20, 50, 90, .25);
}
.ms .logo { width: min(300px, 78%); margin: 0 0 10px -4px; }
.ms h2 { font-size: clamp(26px, 3.4vw, 38px); color: var(--ms-ink); }
.ms .kicker { color: var(--ms-orange-dark); }
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-weight: 700; color: var(--ms-ink); }
.facts li img { width: 30px; height: 30px; margin-top: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li { font-size: 14px; font-weight: 900; padding: 6px 12px; border-radius: 999px; background: rgba(62,38,22,.08); color: var(--ms-ink-soft); }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.screen {
  position: relative; border-radius: 20px; overflow: hidden; background: #2a6fb3;
  aspect-ratio: 16 / 9; box-shadow: 0 0 0 4px var(--ms-cream), 0 24px 48px rgba(20, 50, 90, .35);
}
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }

.moments { display: grid; gap: 18px; margin-top: clamp(36px, 5vw, 64px); grid-template-columns: 1fr; }
@media (min-width: 720px) { .moments { grid-template-columns: repeat(3, 1fr); } }
.moment { margin: 0; }
.moment .screen { box-shadow: 0 0 0 3px var(--ms-cream), 0 14px 30px rgba(20, 50, 90, .3); }
.moment figcaption { margin-top: 12px; font-weight: 900; font-size: 17px; color: var(--ms-ink); }
.moment figcaption span { display: block; font-weight: 700; font-size: 15px; color: var(--ms-ink-soft); }

.vistas { display: grid; gap: 12px; margin-top: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .vistas { grid-template-columns: 1fr 1fr 1fr; } }
.vistas img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 3px var(--ms-cream); }

/* The Deep: dark, ember, parchment */
.deep { background: linear-gradient(to bottom, var(--ms-green) 0, #1b3a1a 60px, var(--deep-bg) 220px, var(--deep-bg) 100%); color: var(--deep-parch); }
.deep .kicker { color: var(--deep-ember); }
.deep h2 { font-size: clamp(30px, 4vw, 46px); color: #fff3dc; }
.deep .lede { font-size: clamp(18px, 2vw, 21px); max-width: 52ch; color: var(--deep-parch); }
.deep-grid { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .deep-grid { grid-template-columns: .9fr 1.1fr; } }
.deep .facts li { color: var(--deep-parch); }
.deep .chips li { background: rgba(255,138,61,.12); color: #ffc79f; }
.shots { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.shots figure { margin: 0; }
.shots img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 2px #3a2a33; }
.shots figure:first-child { grid-column: 1 / -1; }
.shots figcaption { font-size: 14px; font-weight: 700; color: #cbb89a; margin-top: 6px; }

/* About and the rest: back to the night sky */
.about { background: var(--night); }
.about-grid { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 200px 1fr; } }
.about .mark { width: 186px; height: 186px; image-rendering: pixelated; justify-self: center; filter: drop-shadow(0 0 40px rgba(255,170,70,.35)); }
.about blockquote { margin: 0; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; line-height: 1.5; color: var(--cream); }
.about blockquote footer { margin-top: 14px; font-size: 17px; font-weight: 800; color: var(--gold); }
.about .small { color: var(--cream-dim); font-size: 17px; margin-top: 18px; }

.follow { background: radial-gradient(ellipse 70% 120% at 50% 100%, var(--night-3), var(--night) 70%); text-align: center; }
.follow h2 { font-size: clamp(28px, 3.6vw, 42px); }
.follow p { color: var(--cream-dim); max-width: 46ch; margin-inline: auto; }
.follow .row-actions { justify-content: center; margin-top: 20px; }

.foot { border-top: 1px solid rgba(238,232,220,.1); padding: 36px 0 48px; color: var(--cream-dim); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.foot .brand { display: flex; align-items: center; gap: 10px; color: var(--cream); font-weight: 800; }
.foot .brand img { width: 31px; height: 31px; image-rendering: pixelated; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--cream); }

/* ---------- the press kit ---------- */
.press-top { padding: 110px 0 30px; text-align: center; }
.press-top .lockup-sm { width: min(281px, 70vw); margin: 0 auto 18px; }
.press-top h1 { font-size: clamp(32px, 4.5vw, 52px); }
.press-top p { color: var(--cream-dim); max-width: 56ch; margin-inline: auto; }
.press-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 0; padding: 0; list-style: none; }
.kit { padding: 40px 0; border-top: 1px solid rgba(238,232,220,.08); }
.kit h2 { font-size: clamp(26px, 3.2vw, 36px); }
.kit h3 { font-size: 20px; color: var(--gold); margin-top: 1.6em; }
.kit-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .kit-grid { grid-template-columns: 320px 1fr; } .factsheet { position: sticky; top: 84px; } }
.factsheet { margin: 0; align-self: start; align-content: start; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; background: var(--night-2); border-radius: var(--radius); padding: 22px; font-size: 16px; }
.factsheet dt { color: var(--cream-dim); font-weight: 700; }
.factsheet dd { margin: 0; font-weight: 800; }
.kit-shots { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 12px 0 0; padding: 0; list-style: none; }
.kit-shots li { background: var(--night-2); border-radius: 14px; overflow: hidden; }
.kit-shots img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.kit-shots .cap { display: block; padding: 10px 14px; font-weight: 800; font-size: 15px; }
.kit ul.plain { padding-left: 1.1em; }
.kit ul.plain li { margin-bottom: .4em; }

.facts li img.pix-bullet { width: 24px; height: 24px; margin: 4px 3px 0; image-rendering: pixelated; }
.lost { min-height: 100svh; display: grid; place-items: center; }
.lost-star { image-rendering: pixelated; margin: 0 auto 24px; }

.itch-card { max-width: 552px; margin: 26px auto 0; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(238,232,220,.12), 0 16px 40px rgba(0,0,0,.4); }
.itch-card iframe { display: block; width: 100%; height: 167px; border: 0; background: #0c0c18; }
