/* SFE Studio 99 game page. Palette and type follow the game's UI theme v2
   (cream panels with gold rims, red ribbon headers, navy bars, candy buttons). */

@font-face { font-family: "Fredoka"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Fredoka-Bold.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Nunito-Regular.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../assets/fonts/Nunito-Bold.woff") format("woff"); }

:root {
  --ink: #48261E;
  --ink-body: #4C443E;
  --ink-soft: #705541;
  --link: #0D48DE;
  --cream-0: #FFF8EC;
  --cream-1: #FFF6E6;
  --cream-2: #F8E4C2;
  --cream-3: #F3DDB6;
  --stitch: #C9A576;
  --gold-top: #FFD983;
  --gold-mid: #F8BD52;
  --gold-bot: #D9902E;
  --gold-out: #9A5F1C;
  --gold: #F7BE1B;
  --red-top: #D3404A;
  --red-mid: #B42A33;
  --red-bot: #8E161E;
  --red-edge: #6A0A06;
  --text-cream: #FCE8C9;
  --navy-950: #0D1B30;
  --navy-900: #132A4D;
  --navy-850: #1A3B60;
  --navy-600: #25497A;
  --text: #FFF8EA;
  --sfe: #EBB531;
  --radius: 18px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-body);
  background: var(--cream-1);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy-850); color: var(--text);
  padding: 8px 16px; border-radius: 10px; font-family: var(--display); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.muted { color: var(--ink-soft); }

/* ---------- top bar (navy with a gold rim, like the in-game toolbar) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-850));
  border-bottom: 3px solid var(--gold-mid);
  box-shadow: 0 1px 0 var(--gold-out), 0 6px 18px rgba(13, 27, 48, .28);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.topbar__logo img { width: auto; height: auto; max-width: 140px; max-height: 56px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.topbar__nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.topbar__nav a {
  font-family: var(--display); color: var(--text); text-decoration: none; font-size: 17px;
  padding: 6px 12px; border-radius: 999px; text-shadow: 0 1px 0 var(--navy-950);
}
.topbar__nav a:hover { background: rgba(255, 217, 131, .16); color: var(--gold-top); }
@media (max-width: 860px) {
  .topbar__nav { display: none; }
  .topbar__inner > .btn { margin-left: auto; }
}

/* ---------- candy buttons with a gold ring ---------- */
.btn {
  --b-top: #7BCE40; --b-mid: #55B225; --b-bot: #2A8E12; --b-lip: #22800E; --b-edge: #1F4D00;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1;
  color: var(--text); text-decoration: none; letter-spacing: .01em;
  padding: 14px 30px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--b-top), var(--b-mid) 55%, var(--b-bot));
  box-shadow:
    inset 0 -5px 0 var(--b-lip),
    inset 0 0 0 1.5px var(--b-edge),
    0 0 0 3px var(--gold-mid),
    0 0 0 4.5px var(--gold-out),
    0 8px 16px rgba(13, 27, 48, .28);
  text-shadow: -1.5px -1.5px 0 var(--b-edge), 1.5px -1.5px 0 var(--b-edge), -1.5px 1.5px 0 var(--b-edge),
               1.5px 1.5px 0 var(--b-edge), 0 2px 0 var(--b-edge);
  transition: transform .12s ease, filter .12s ease;
}
.btn::before { /* gloss band */
  content: ""; position: absolute; left: 14%; right: 14%; top: 4px; height: 40%;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.08));
  pointer-events: none;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px) scale(1.02); }
.btn:active { filter: brightness(.92); transform: translateY(1px) scale(.98); }
.btn--blue { --b-top: #4CC2F7; --b-mid: #2A9EE2; --b-bot: #1279C2; --b-lip: #0A62A4; --b-edge: #0D446C; }
.btn--sm { font-size: 16px; padding: 8px 18px 10px; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(150px, 18vw, 230px);
  text-align: center; color: var(--text);
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__bg { z-index: -2; }
.hero__bg img { object-fit: cover; object-position: center 40%; }
.hero::after { /* warm navy veil that fades into the cream page */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 246, 230, 0) 62%, rgba(255, 246, 230, .75) 88%, var(--cream-1) 100%),
    radial-gradient(ellipse 70% 60% at 50% 38%, rgba(19, 42, 77, .30), rgba(19, 42, 77, .62));
}
.hero__inner { max-width: 820px; margin: 0 auto; }
.hero__title { margin: 0 auto 6px; }
.hero__logo {
  width: auto; height: auto; max-width: min(560px, 92%); max-height: 320px; margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(13, 27, 48, .45));
}
.hero__wt {
  display: inline-block; margin: 0 0 14px; padding: 3px 14px; border-radius: 999px;
  font-family: var(--display); font-size: 15px; color: var(--text-cream);
  background: rgba(13, 27, 48, .55); box-shadow: inset 0 0 0 1.5px rgba(255, 217, 131, .55);
}
.hero__wt span { color: #D8C7A6; }
.hero__hook {
  font-family: var(--display); font-size: clamp(26px, 4.2vw, 44px); line-height: 1.15; margin: 0 0 12px;
  color: #FFF6E2;
  text-shadow: -2px -2px 0 var(--navy-950), 2px -2px 0 var(--navy-950), -2px 2px 0 var(--navy-950),
               2px 2px 0 var(--navy-950), 0 3px 0 var(--navy-950), 0 8px 18px rgba(0,0,0,.35);
}
.hero__sub {
  font-size: clamp(17px, 2vw, 20px); font-weight: 700; max-width: 640px; margin: 0 auto 26px;
  color: #FFF8EA; text-shadow: 0 1px 2px rgba(13, 27, 48, .9), 0 0 14px rgba(13, 27, 48, .6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 18px 22px; justify-content: center; margin-bottom: 26px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chips li {
  font-family: var(--display); font-size: 15px; color: var(--ink);
  background: linear-gradient(180deg, #FEF0D8, #F6D8AA);
  padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 0 0 2px var(--gold-mid), 0 0 0 3px var(--gold-out), 0 3px 8px rgba(0,0,0,.2);
}

/* ---------- trailer frame (navy window with a thick gold rim) ---------- */
.trailer { position: relative; z-index: 2; margin-top: clamp(-200px, -15vw, -120px); padding-inline: var(--gutter); }
.frame {
  max-width: 980px; margin: 0 auto; padding: 10px; border-radius: 26px;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-900));
  box-shadow:
    0 0 0 5px var(--gold-mid),
    0 0 0 7px var(--gold-out),
    inset 0 0 0 2px var(--navy-950),
    0 22px 40px rgba(13, 27, 48, .35);
}
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--navy-950); }
.video img, .video video, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.video video { object-fit: contain; background: #000; }
.video--soon img { filter: saturate(.85) brightness(.55); }
.video__soon { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; }
.video__soon span {
  font-family: var(--display); font-size: clamp(18px, 2.6vw, 28px); color: var(--text-cream);
  background: linear-gradient(180deg, var(--red-top), var(--red-mid) 50%, var(--red-bot));
  padding: 10px 26px; border-radius: 14px; text-align: center;
  box-shadow: inset 0 0 0 2px var(--red-edge), 0 0 0 3px var(--gold-mid), 0 0 0 4.5px var(--gold-out);
  text-shadow: 0 2px 0 #5E1410;
}
.yt { /* click-to-load YouTube: nothing from YouTube loads until the visitor presses play */
  position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: var(--navy-950); color: inherit; text-decoration: none;
}
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  background: linear-gradient(180deg, #FBDE55, #F7BE1B 55%, #E08A16);
  box-shadow: inset 0 -5px 0 #B9600E, 0 0 0 4px var(--cream-1), 0 0 0 6px var(--gold-out), 0 10px 22px rgba(0,0,0,.4);
  transition: transform .15s ease;
}
.yt__play::after { /* play triangle */
  content: ""; position: absolute; left: 36px; top: 27px;
  border-style: solid; border-width: 19px 0 19px 30px; border-color: transparent transparent transparent #6A3A08;
}
.yt:hover .yt__play { transform: scale(1.07); }
.yt__note {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0;
  font-size: 13px; color: var(--text); background: rgba(13, 27, 48, .72); padding: 4px 12px; border-radius: 999px;
  white-space: nowrap;
}
.trailer__alt { text-align: center; margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--alt {
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40%),
    var(--cream-2);
  border-top: 2px dashed rgba(201, 165, 118, .55);
  border-bottom: 2px dashed rgba(201, 165, 118, .55);
}

/* red ribbon header with notched ends, like the in-game window titles */
.ribbon { display: block; margin: 0 0 28px; }
.ribbon span {
  display: inline-block; position: relative;
  font-size: clamp(24px, 3.2vw, 34px); color: var(--text-cream);
  padding: 10px 46px 12px;
  background: linear-gradient(180deg, #F08A8C 0, var(--red-top) 7%, var(--red-mid) 52%, var(--red-bot) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 50%, 100% 100%, 0 100%, 20px 50%);
  text-shadow: -2px -2px 0 #5E1410, 2px -2px 0 #5E1410, -2px 2px 0 #5E1410, 2px 2px 0 #5E1410, 0 3px 0 #5E1410;
  filter: drop-shadow(0 4px 0 rgba(106, 10, 6, .35));
}
.ribbon--center { text-align: center; }

/* cream card with a gold rim and an inner stitch */
.card {
  position: relative;
  border: 4px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, var(--cream-1), var(--cream-2)) padding-box,
    linear-gradient(180deg, var(--gold-top), var(--gold-mid) 45%, var(--gold-bot)) border-box;
  box-shadow: 0 0 0 1.5px var(--gold-out), 0 12px 26px rgba(72, 38, 30, .14);
}
.card::after {
  content: ""; position: absolute; inset: 6px; border-radius: 12px; pointer-events: none;
  border: 1.5px dashed rgba(201, 165, 118, .8);
}

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.lead { font-size: 20px; font-weight: 700; color: var(--ink); }
.facts { padding: 26px 26px 18px; }
.facts__title { font-size: 24px; margin-bottom: 12px; }
.facts dl { margin: 0; }
.facts dl div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-top: 1.5px solid rgba(210, 174, 122, .55); }
.facts dl div:first-child { border-top: 0; }
.facts dt { font-family: var(--display); color: var(--ink-soft); font-size: 15px; }
.facts dd { margin: 0; font-weight: 700; color: var(--ink); font-size: 16px; line-height: 1.45; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }

/* ---------- features ---------- */
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.feature { padding: 26px 24px 20px; }
.feature img { width: 64px; height: 64px; margin-bottom: 12px; filter: drop-shadow(0 4px 4px rgba(72, 38, 30, .2)); }
.feature h3 { font-size: 22px; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 16px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; gap: 20px; }
  .feature { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: center; padding: 20px 20px 18px; }
  .feature img { width: 52px; height: 52px; margin: 0; }
  .feature h3 { margin: 0; font-size: 21px; }
  .feature p { grid-column: 1 / -1; margin-top: 10px; }
}

/* ---------- gallery ---------- */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.shot { margin: 0; }
.shot a {
  display: block; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9;
  background: var(--navy-900);
  box-shadow: 0 0 0 3px var(--gold-mid), 0 0 0 4.5px var(--gold-out), 0 10px 22px rgba(13, 27, 48, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.shot a:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--gold-top), 0 0 0 4.5px var(--gold-out), 0 16px 28px rgba(13, 27, 48, .3); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { font-size: 15px; color: var(--ink-soft); margin-top: 12px; line-height: 1.4; padding-inline: 2px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- demo ---------- */
.demo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  padding: clamp(24px, 4vw, 40px); border-radius: 26px;
  background: linear-gradient(180deg, var(--navy-600), var(--navy-850) 60%, var(--navy-900));
  box-shadow: 0 0 0 5px var(--gold-mid), 0 0 0 7px var(--gold-out), 0 18px 34px rgba(13, 27, 48, .3);
  color: #E9DCC2;
}
.demo__icon { width: 96px; height: 96px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.demo h2 {
  color: var(--text-cream); font-size: clamp(24px, 3vw, 34px); margin-bottom: 8px;
  text-shadow: 0 2px 0 var(--navy-950);
}
.demo p { margin: 0; color: #EADFCB; }
@media (max-width: 820px) {
  .demo { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

/* ---------- press kit ---------- */
.presskit { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.kit { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 18px 20px; height: 100%; }
.kit__thumb { height: 110px; display: grid; place-items: center; margin-bottom: 12px; }
.kit__thumb img { max-height: 110px; width: auto; }
.kit__thumb--shots img { border-radius: 8px; box-shadow: 0 0 0 2px var(--gold-mid), 0 0 0 3px var(--gold-out); max-height: 96px; }
.kit h3 { font-size: 19px; margin-bottom: 4px; }
.kit p { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; }
.kit .btn { margin-top: auto; }
@media (max-width: 960px) { .presskit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .presskit { gap: 16px; }
  .kit { padding: 18px 10px 16px; }
  .kit__thumb { height: 76px; }
  .kit__thumb img { max-height: 76px; }
  .kit__thumb--shots img { max-height: 70px; }
  .kit h3 { font-size: 17px; }
  .kit p { font-size: 13px; }
}
@media (max-width: 340px) { .presskit { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { max-width: 720px; margin: 0 auto; padding: 34px clamp(18px, 4vw, 40px) 36px; text-align: center; }
.contact .ribbon { margin-bottom: 18px; }
.contact__mail {
  font-family: var(--display); font-size: clamp(20px, 3.4vw, 30px); color: var(--ink);
  margin: 4px 0 20px; overflow-wrap: anywhere; user-select: all;
}

/* ---------- footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--navy-850), var(--navy-950));
  border-top: 3px solid var(--gold-mid);
  color: #CFC3AE; font-size: 15px;
  padding: 34px var(--gutter) calc(34px + env(safe-area-inset-bottom, 0px));
}
.footer__inner { max-width: var(--wrap); margin: 0 auto; display: flex; gap: 20px; align-items: center; }
.footer__inner img { width: 80px; height: 80px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px rgba(235, 181, 49, .5); }
.footer p { margin: 0 0 4px; }
.footer__brand { font-family: var(--display); font-size: 22px; color: #FFFFFF; letter-spacing: .04em; }
.footer__brand .sfe { color: var(--sfe); }
.footer__small { font-size: 13px; opacity: .8; }
@media (max-width: 520px) { .footer__inner { flex-direction: column; text-align: center; } }

/* ---------- lightbox ---------- */
.lightbox {
  width: min(1400px, 96vw); max-width: none; max-height: 96vh; padding: 0; border: 0; background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(9, 18, 34, .88); }
.lightbox figure { margin: 0; }
.lightbox img {
  width: 100%; max-height: calc(96vh - 120px); object-fit: contain; border-radius: 12px; background: #000;
  box-shadow: 0 0 0 3px var(--gold-mid), 0 0 0 4.5px var(--gold-out);
}
.lightbox figcaption { color: #F3E6CC; text-align: center; margin-top: 12px; font-size: 16px; }
.lightbox__bar { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.lightbox__count { color: #D8C7A6; font-family: var(--display); min-width: 64px; text-align: center; }
.lb-btn {
  font-family: var(--display); font-size: 17px; color: var(--text); cursor: pointer;
  background: linear-gradient(180deg, #6788A3, #45607A 55%, #2F4A60);
  border: 0; border-radius: 999px; padding: 8px 18px;
  box-shadow: inset 0 -3px 0 #233A4F, 0 0 0 2px var(--gold-mid), 0 0 0 3px var(--gold-out);
}
.lb-btn:hover { filter: brightness(1.1); }
.lb-btn--close { background: linear-gradient(180deg, #E2464A, #C42E35 55%, #9C1A21); box-shadow: inset 0 -3px 0 #7E0F14, 0 0 0 2px var(--gold-mid), 0 0 0 3px var(--gold-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
