/* Mozma Games: one stylesheet for the studio page and every game page.
   A game page re-colours itself by setting the variables below on <body style="...">
   (see games/_template/index.html). Nothing else needs touching. */

:root {
  --bg: #0e0c0d;            /* page */
  --surface: #191517;       /* cards, panels */
  --surface-2: #231d20;     /* raised bits inside cards */
  --line: rgba(255, 255, 255, .08);
  --text: #f3eee9;
  --muted: #b3aaa3;
  --accent: #d1323a;        /* studio crimson, from the storm emblem */
  --accent-2: #ff5a4f;
  --on-accent: #fff;
  --glow: rgba(209, 50, 58, .35);
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --wide: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Pictures keep their shape at any width: only ones told to fill a box (object-fit) set a height. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.bar .brand img { height: 30px; width: auto; }
.bar nav { margin-left: auto; display: flex; gap: 22px; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.bar nav a:hover { color: var(--text); }
.bar .back { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.bar .back:hover { color: var(--accent-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 0;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 28px -10px var(--glow);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px var(--glow); }
.btn.ghost { background: rgba(255, 255, 255, .08); color: var(--text); box-shadow: none; border: 1px solid rgba(255, 255, 255, .16); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn small { display: block; font-weight: 600; font-size: .68rem; opacity: .8; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 3px; }
.btn .two { display: flex; flex-direction: column; align-items: flex-start; }
.btn.soon { background: rgba(255, 255, 255, .06); color: var(--muted); box-shadow: none; cursor: default; border: 1px dashed rgba(255, 255, 255, .22); }
.btn.soon:hover { transform: none; }

/* ---------- labels ---------- */
.eyebrow { font: 700 .78rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: rgba(255, 255, 255, .08); color: var(--text); border: 1px solid rgba(255, 255, 255, .1);
}
.chip.status { background: var(--accent); color: var(--on-accent); border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
h1, h2, .display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: .98; margin: 0; }
.section { padding: 72px 0; }
.section > .wrap > h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 28px; }

/* ---------- studio hero ---------- */
.studio-hero { position: relative; padding: 64px 0 64px; text-align: center; overflow: hidden; isolation: isolate; }
.studio-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 140%; z-index: -1;
  background:
    radial-gradient(40% 45% at 50% 40%, rgba(209, 50, 58, .38), transparent 70%),
    conic-gradient(from 210deg at 50% 42%, transparent, rgba(209, 50, 58, .14), transparent 30%, rgba(255, 90, 79, .1), transparent 60%);
  filter: blur(20px);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
  animation: storm 28s linear infinite;
}
@keyframes storm { to { transform: rotate(360deg); } }
.studio-hero img { width: min(330px, 66%); height: auto; margin: 0 auto 18px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .55)); }
.studio-hero p { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 0 auto 28px; }

/* ---------- featured banner ---------- */
.featured {
  position: relative; display: grid; align-items: end; min-height: 460px;
  border-radius: calc(var(--radius) + 6px); overflow: hidden; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); isolation: isolate;
  box-shadow: 0 40px 80px -40px var(--c-glow, var(--glow));
}
.featured > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s ease; }
.featured::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 8, 9, .92) 0%, rgba(10, 8, 9, .6) 42%, transparent 75%), linear-gradient(0deg, rgba(10, 8, 9, .7), transparent 50%); }
.featured:hover > img { transform: scale(1.03); }
.featured .copy { padding: 40px; max-width: 520px; }
.featured .logo { width: 300px; margin-bottom: 14px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .5)); }
.featured p { color: #e6ddd6; margin: 0 0 20px; font-size: 1.05rem; }
.featured .btn { background: var(--c, var(--accent)); color: var(--c-on, #fff); }

/* ---------- game cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
  --c: var(--accent); position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 26px 50px -24px var(--c); }
.card .art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card .art > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .art > img { transform: scale(1.05); }
/* No wide art yet: the icon, blurred into a backdrop, stands in. */
.card .art.from-icon { display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--c) 55%, transparent), var(--surface-2) 70%); }
.card .art.from-icon > img { position: absolute; inset: -20%; width: 140%; height: 140%; filter: blur(30px) saturate(1.3); opacity: .55; }
.card .art.from-icon > img + img { position: relative; inset: auto; width: 38%; height: auto; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); opacity: 1; border-radius: 22%; }
.card .art .chip { position: absolute; top: 12px; left: 12px; z-index: 1; }
.card .body { position: relative; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .icon { width: 72px; height: 72px; border-radius: 18px; margin-top: -36px; border: 3px solid var(--surface); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); background: var(--surface); }
.card h3 { margin: 0; font-size: 1.3rem; line-height: 1.2; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.card .more { font-weight: 700; color: var(--c); font-size: .92rem; }
.card .more::after { content: " →"; transition: margin .2s; }
.card:hover .more::after { margin-left: 4px; }

/* ---------- about the studio ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.about p { color: var(--muted); font-size: 1.05rem; }
.pillars { display: grid; gap: 14px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.pillar strong { display: block; margin-bottom: 2px; }
.pillar span { color: var(--muted); font-size: .95rem; }

/* ---------- game page hero ---------- */
.game-hero { position: relative; min-height: min(86vh, 760px); display: grid; align-items: end; isolation: isolate; overflow: hidden; }
.game-hero > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.game-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, var(--bg) 2%, color-mix(in srgb, var(--bg) 70%, transparent) 30%, transparent 62%),
              linear-gradient(90deg, color-mix(in srgb, var(--bg) 80%, transparent), transparent 55%);
}
/* No key art yet: a glow in the game's colour behind its icon. */
.game-hero.from-icon { min-height: 520px; background: radial-gradient(60% 70% at 75% 40%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%), var(--bg); }
.game-hero.from-icon .side-icon { position: absolute; right: 8%; top: 50%; translate: 0 -55%; width: min(340px, 34vw); height: auto; border-radius: 22%; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); z-index: -1; }
.game-hero > .wrap { width: 100%; }
.game-hero .copy { padding: 120px 0 56px; max-width: 620px; }
/* Key art with its characters on the left: the words go on the right instead. */
.game-hero.copy-right .copy { margin-left: auto; }
.game-hero.copy-right::after {
  background: linear-gradient(0deg, var(--bg) 2%, color-mix(in srgb, var(--bg) 60%, transparent) 26%, transparent 55%),
              linear-gradient(270deg, color-mix(in srgb, var(--bg) 86%, transparent) 8%, color-mix(in srgb, var(--bg) 40%, transparent) 42%, transparent 62%);
}
.game-hero .logo { width: min(440px, 80vw); margin: 0 0 16px -8px; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .55)); }
.game-hero h1 { font-size: clamp(3rem, 8vw, 5.4rem); margin-bottom: 14px; }
.game-hero .tagline { font-size: 1.2rem; color: var(--text); margin: 0 0 18px; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.game-hero .chips { margin-bottom: 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- trailer ---------- */
.trailer {
  max-width: 1000px; margin: 0 auto;
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 50px 90px -50px var(--glow);
}
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.45) saturate(1.1); transform: scale(1.05); }
.trailer .soon-note { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; }
.trailer .soon-note .play { width: 78px; height: 78px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .35); }
.trailer .soon-note .play::before { content: ""; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; opacity: .85; }
.trailer .soon-note strong { font: 400 2rem/1 var(--display); letter-spacing: .02em; }
.trailer .soon-note span { color: var(--muted); }

/* ---------- about the game ---------- */
.about-game { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.about-game .lead { font-size: 1.2rem; color: var(--text); }
.about-game p { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 16px 52px; position: relative; color: var(--muted); font-size: .95rem; }
.features li strong { display: block; color: var(--text); font-size: 1rem; margin-bottom: 2px; }
.features li::before { content: ""; position: absolute; left: 16px; top: 19px; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); box-shadow: 0 6px 16px -4px var(--glow); }
.features li::after { content: ""; position: absolute; left: 23px; top: 24px; width: 6px; height: 10px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; rotate: 45deg; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 84px; }
.facts img.icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 14px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.facts .actions { margin-top: 18px; }
.facts .actions .btn { width: 100%; justify-content: center; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--surface); }
.shots a:first-child { grid-column: span 2; grid-row: span 2; }
.shots img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; }
.shots a:hover img { transform: scale(1.04); filter: brightness(1.08); }

.lightbox { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(6, 5, 5, .94); padding: 24px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 84vh; width: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox figcaption { text-align: center; color: var(--muted); margin-top: 12px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox .close { top: 18px; right: 18px; }
.lightbox .prev { left: 18px; top: 50%; translate: 0 -50%; }
.lightbox .next { right: 18px; top: 50%; translate: 0 -50%; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 40px; color: var(--muted); font-size: .92rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
footer.site img { height: 26px; width: auto; opacity: .85; }
footer.site nav { display: flex; gap: 20px; margin-left: auto; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .about, .about-game { grid-template-columns: 1fr; }
  .facts { position: static; }
}
/* Portrait phones and tablets: the art on top, the words under it. Held sideways, a phone keeps
   the wide layout below instead, which suits a short, wide screen. */
@media (max-width: 860px) and (orientation: portrait) {
  .shots { grid-template-columns: repeat(2, 1fr); }
  .featured .copy { padding: 26px; }
  .featured::after { background: linear-gradient(0deg, rgba(10, 8, 9, .95) 10%, rgba(10, 8, 9, .5) 60%, transparent); }
  .featured { min-height: 520px; }
  .featured .logo { width: 220px; }
  .game-hero.from-icon .side-icon { right: 50%; translate: 50% 0; top: 90px; width: 180px; }
  .game-hero.from-icon .copy { padding-top: 300px; }
  .game-hero { min-height: 0; }
  .game-hero > .bg { bottom: auto; height: auto; aspect-ratio: 16 / 10; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .game-hero::after, .game-hero.copy-right::after { background: linear-gradient(0deg, var(--bg) 40%, transparent 62%); }
  .game-hero .copy, .game-hero.copy-right .copy { padding-top: calc(62.5vw - 70px); margin-left: 0; }
  .game-hero .logo { width: min(320px, 72vw); }
}
@media (orientation: landscape) and (max-height: 560px) {
  .game-hero { min-height: 100vh; min-height: 100svh; }
  .game-hero .copy { padding: 84px 0 28px; max-width: 46%; }
  .game-hero .logo { width: min(260px, 30vw); margin-bottom: 8px; }
  .game-hero .tagline { font-size: 1rem; margin-bottom: 12px; }
  .game-hero .chips { margin-bottom: 14px; }
  .game-hero.from-icon .side-icon { width: min(220px, 26vw); }
  .featured { min-height: 360px; }
  .featured .logo { width: 200px; }
  .studio-hero img { width: min(220px, 30vw); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .bar nav { gap: 14px; }
  .bar nav a.hide-sm { display: none; }
  .features { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shots a:first-child { grid-column: auto; grid-row: auto; }
  .section { padding: 52px 0; }
  .lightbox .prev, .lightbox .next { top: auto; bottom: 18px; translate: none; }
  .lightbox .prev { left: calc(50% - 64px); }
  .lightbox .next { right: calc(50% - 64px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
