/* Molter Games site styles */

/* Fonts (Latin subsets, self-hosted; licenses in fonts/) */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/open-sans-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/open-sans-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/open-sans-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/fredoka-latin-wght.woff2") format("woff2");
}

:root {
  --display: "Fredoka", "Open Sans", system-ui, sans-serif;
  --bg: #0f1216;
  --surface: #171b21;
  --surface-2: #1f242c;
  --line: #2a313b;
  --ink: #eef1f4;
  --muted: #9aa4b1;
  --accent: #fdbd0d;
  --accent-dark: #e3a300;
  --accent-ink: #1b1406;
  --ok: #3fc79d;
  --soon: #7faef5;
  --error: #f07c66;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1rem; text-wrap: pretty; }

/* The duck, drawn in any color through a mask */
.duck { display: block; background: currentColor; -webkit-mask: url("../images/logo-mark.svg") center / contain no-repeat; mask: url("../images/logo-mark.svg") center / contain no-repeat; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
.brand img { width: 36px; height: 36px; transition: transform .2s; }
.brand:hover img { transform: rotate(-12deg); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a.nav-cta { background: var(--accent); color: var(--accent-ink); }
.nav a.nav-cta:hover { background: #ffcb3d; }
@media (max-width: 640px) { .nav a.nav-cta { display: none; } }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 8px 9px; font-size: 0.9rem; }
}

/* Buttons: chunky, game-style, with a darker base under the face that presses down */
.btn {
  --base: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 12px 22px; min-height: 48px;
  font-family: var(--display); font-size: 1.05rem; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 0 var(--base);
  transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { background: #ffcb3d; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--base); }
.btn.ghost { --base: #0a0c0f; background: var(--surface-2); color: var(--ink); }
.btn.ghost:hover { background: #2a313b; }
.btn.outline { --base: rgba(0, 0, 0, .5); background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px rgba(238, 241, 244, .35), 0 4px 0 var(--base); }
.btn.outline:hover { background: rgba(255, 255, 255, .06); }
.btn.small { padding: 7px 14px; min-height: 38px; font-size: 0.95rem; box-shadow: 0 3px 0 var(--base); }
.btn.big { padding: 16px 28px; min-height: 58px; font-size: 1.1rem; border-radius: 14px; }
.btn.big img { width: 22px; height: 22px; filter: brightness(0); }
.btn:disabled { opacity: .55; cursor: default; }

/* Page heads: a dark band with a yellow rule, used on every page's first section */
.head-band {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1a2029 0%, #121820 100%);
  border-bottom: 3px solid var(--accent);
}
.head-band .wrap { position: relative; z-index: 1; }
.kicker { color: var(--accent); font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-bottom: 14px; text-wrap: balance; }
.lead { font-size: 1.15rem; color: #b3bcc7; max-width: 62ch; margin: 16px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero { padding: 88px 0 96px; }
.hero .lead { font-size: 1.2rem; }
.lead strong { display: inline-block; margin-top: 8px; color: var(--ink); font-weight: 600; }
.page-head { padding: 64px 0 24px; }
.page-head.head-band { padding: 72px 0; }
.page-head h1 { max-width: 13ch; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.page-head .hero-grid { padding-bottom: 16px; }

/* Heads with gameplay clips behind them: centered text over an evenly darkened video */
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #121820; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; }
.hero-media video.on { opacity: 1; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(15, 18, 22, .68) 0%, rgba(15, 18, 22, .82) 100%),
    linear-gradient(0deg, rgba(15, 18, 22, .5) 0%, transparent 30%);
}
@media (max-width: 760px) { .hero-media::after { background: rgba(15, 18, 22, .8); } }
.has-video .hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.has-video h1 { max-width: 22ch; margin-left: auto; margin-right: auto; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.has-video .lead { max-width: 52ch; margin-left: auto; margin-right: auto; text-wrap: balance; }
.has-video .actions { justify-content: center; }
.hero.has-video { padding: 112px 0 120px; }
.page-head.has-video { padding: 88px 0 96px; }
.media-bar {
  position: absolute; z-index: 2; right: max(16px, calc(50vw - 532px)); bottom: 18px;
  display: flex; align-items: center; gap: 6px;
}
.hero-caption, .media-toggle {
  font-size: 0.85rem; color: #d6dde5; text-decoration: none; background: rgba(15, 18, 22, .6); border-radius: 8px; min-height: 32px;
}
.hero-caption { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; }
.hero-caption span { color: var(--muted); }
.hero-caption b { color: var(--accent); font-weight: 600; }
.hero-caption:hover b { text-decoration: underline; }
.media-toggle { border: 0; width: 32px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.media-toggle:hover { background: rgba(15, 18, 22, .85); color: var(--accent); }
.media-toggle svg { width: 14px; height: 14px; }
.media-toggle .play { display: none; }
.media-toggle[aria-pressed="true"] .play { display: block; }
.media-toggle[aria-pressed="true"] .pause { display: none; }
@media (max-width: 760px) { .media-bar { display: none; } }

/* "Games we publish" panel on the Publishing head, with the duck perched on it */
.showcase { display: none; position: relative; }
@media (min-width: 960px) {
  .showcase { display: block; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
}
.perch-duck { position: absolute; top: -40px; right: 28px; width: 56px; height: 56px; color: var(--accent); }
.showcase-head { font-size: 0.8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.showcase figure { margin: 0; }
.showcase img { width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; border-radius: 10px; }
.showcase figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--muted); line-height: 1.35; }
.showcase figcaption b { display: block; color: var(--ink); font-size: 0.95rem; }

/* Sections */
section { padding: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* A page ending on a band meets the footer directly, so the two edges don't double up */
main > .band:last-child { border-bottom: 0; }
main:has(> .band:last-child) + .site-footer { margin-top: 0; }
.muted-text { color: var(--muted); }

/* Follow on Steam banner */
.follow-wrap { padding-top: 48px; }
.follow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 28px 32px; border-radius: 18px;
  background: linear-gradient(120deg, #1b2838 0%, #2a475e 100%);
  border: 1px solid #3d5a73;
}
.follow > img { width: 56px; height: 56px; }
.follow h2 { font-size: 1.4rem; margin-bottom: 4px; }
.follow p { color: #c7d5e0; margin: 0; }
@media (max-width: 720px) {
  .follow { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 20px; gap: 14px; }
  .follow .btn { width: 100%; }
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.filter {
  border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted);
  min-width: 32px; min-height: 36px; padding: 6px 2px; font-family: var(--display); font-size: 1.05rem; font-weight: 500; cursor: pointer;
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Game cards: a wrapping row that centers an incomplete last row */
.games { --gap: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.game { flex: 0 1 100%; }
@media (min-width: 640px) { .game { flex-basis: calc((100% - var(--gap)) / 2); } }
@media (min-width: 1000px) { .game { flex-basis: calc((100% - 2 * var(--gap)) / 3); } }
.game {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.game:hover { border-color: #3a434f; transform: translateY(-2px); }
.game[hidden] { display: none; }
.cover { position: relative; display: block; aspect-ratio: 460 / 215; background: var(--surface-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.game:hover .cover img { transform: scale(1.03); }
.cover .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; color: var(--muted); padding: 12px; text-align: center; }
.cover img + .fallback { display: none; }
.cover.noimg .fallback { display: grid; }
.game h3 a { color: inherit; text-decoration: none; }
.game h3 a:hover { color: var(--accent); }
.status { align-self: flex-start; font-size: 0.78rem; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status.soon::before { background: var(--soon); }
.game-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
/* One full-width main button, then secondary links on one line. The line keeps its height when a card
   has no extra links, so main buttons line up across each row. */
.game-links { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 10px; }
.game-links .btn { width: 100%; }
.game-extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; min-height: 1.5em; font-size: 0.92rem; line-height: 1.5; }
.game-extras a { color: var(--ink); font-family: var(--display); font-weight: 500; text-decoration: none; }
.game-extras a::after { content: " \2197"; color: var(--accent); }
.game-extras a:hover { color: var(--accent); }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* Split / feature blocks */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.split.top { align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: var(--accent); -webkit-mask: url("../images/logo-mark.svg") center / contain no-repeat; mask: url("../images/logo-mark.svg") center / contain no-repeat; }

/* Services: plain columns with a yellow rule */
.cards { display: grid; grid-template-columns: 1fr; gap: 36px 32px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card { border-top: 3px solid var(--accent); padding-top: 16px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* How it works: 4 steps, in rows of 4, 2 or 1 so none is left alone */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 560px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-size: 3.4rem; font-weight: 700; line-height: 1; color: var(--accent); margin-bottom: 8px; }
.steps b { display: block; margin-bottom: 4px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.steps span { color: var(--muted); font-size: 0.98rem; }


/* Form */
.form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
@media (min-width: 700px) { .form-wrap { padding: 32px; } }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.95rem; padding: 0; }
.field .hint { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.req { color: var(--accent); }
input[type=text], input[type=email], input[type=url], input[type=number], select, textarea {
  width: 100%; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 46px;
  font: inherit; font-size: 1rem;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
textarea.short { min-height: 90px; }
textarea.tall { min-height: 220px; }
.field p.hint { margin: -2px 0 2px; max-width: 70ch; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: var(--error); }
/* Checkbox options: an even grid of equal boxes, so rows line up at any width */
.choices { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .choices { grid-template-columns: repeat(5, 1fr); } }
.choices label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 0.9rem; cursor: pointer; min-height: 44px; }
.choices label:hover { border-color: #3a434f; }
.choices label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.choices input { accent-color: var(--accent); margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); }
.consent input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; border-radius: 10px; padding: 14px 16px; font-weight: 600; }
.form-status.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.form-status.err { background: color-mix(in srgb, var(--error) 16%, transparent); color: var(--error); }
.form-status[hidden] { display: none; }

/* Fact sheet and legal notice: label/value rows separated by lines */
.facts { display: grid; grid-template-columns: 9rem 1fr; margin: 0; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding-top: 16px; }
.facts dd { padding-left: 16px; line-height: 1.5; }
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .facts dd { padding-left: 0; padding-top: 0; }
}
.kit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.kit-list li { border-top: 1px solid var(--line); }
.kit-list li:first-child { border-top: 0; }
.kit-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.15rem; font-weight: 500; }
.kit-list a::after { content: "\2197"; color: var(--accent); }
.kit-list a:hover { color: var(--accent); }

/* Prose pages */
.prose > * { max-width: 72ch; }
.prose h2 { font-size: 1.4rem; margin: 32px 0 12px; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 6px; }
.prose p, .prose li { color: #cfd5dc; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 24px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.social { display: flex; gap: 8px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); }
.social a:hover { background: var(--surface-2); }
.social img { width: 20px; height: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: var(--muted); display: inline-block; padding: 4px 0; }
.footer-links a:hover { color: var(--ink); }
