/* Qelmora Studio - hand-written, no framework. Edit here, then rebuild. */

:root {
  --bg: #F7F2E7;
  --bg-2: #EFE8D8;
  --surface: #FFFDF8;
  --surface-2: #F1EADB;
  --ink: #1B2340;
  --ink-2: #4A5270;
  --ink-3: #858BA0;
  --line: #E3DAC4;
  --brand: #E8B04A;
  --brand-ink: #9A6A18;
  --brand-deep: #1B2340;
  --accent: #C0392B;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(23, 51, 20, .05), 0 8px 24px rgba(23, 51, 20, .07);
  --shadow-lg: 0 2px 4px rgba(23, 51, 20, .06), 0 24px 60px rgba(23, 51, 20, .13);
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141A2E;
    --bg-2: #0E1426;
    --surface: #1E2640;
    --surface-2: #252F4C;
    --ink: #F3EEE2;
    --ink-2: #B9BDCD;
    --ink-3: #7F869E;
    --line: #2C3756;
    --brand: #E8B04A;
    --brand-ink: #F0C46B;
    --brand-deep: #F3EEE2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--ink-2); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand span { white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav a {
  color: var(--ink-2); font-weight: 600; font-size: .95rem;
  padding: 9px 14px; border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

@media (max-width: 640px) {
  .site-head .wrap { gap: 8px; padding: 0 14px; height: 60px; }
  .brand { font-size: .95rem; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: .88rem; }
}
@media (max-width: 430px) {
  /* the mark alone is enough once the nav needs the room */
  .brand span { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(180deg, #F2C56E, var(--brand));
  color: #1B2340;
  
  box-shadow: 0 2px 0 #B07F2A, 0 10px 24px rgba(232, 176, 74, .34);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

.pill {
  display: inline-block; font-size: .76rem; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-3);
  border: 1px solid var(--line);
}
.pill-soon { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.hero h1 { margin-bottom: .35em; }
.hero-art img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* home hero: the studio's shelf of games, in studio colours, one tile per game */
.studio-board {
  background: radial-gradient(120% 120% at 20% 0%, #2A3560 0%, #1B2340 55%, #131A31 100%);
  border-radius: var(--radius-lg); padding: clamp(22px, 3.4vw, 36px);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.studio-board::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; border: 26px solid rgba(232, 176, 74, .16); pointer-events: none;
}
.board-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; position: relative; z-index: 1; }
.board-head span:first-child { color: #F3EEE2; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.board-count { color: #E8B04A; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.board-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 20px; position: relative; z-index: 1; }
.board-icons a { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #F3EEE2; font-weight: 700; font-size: .92rem; text-align: center; }
.board-icons a:hover { text-decoration: none; }
.board-icons img { width: 100%; max-width: 132px; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24%; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); transition: transform .18s ease; }
.board-icons a:hover img { transform: translateY(-4px) scale(1.03); }

.mark { width: clamp(96px, 16vw, 148px); height: auto; border-radius: 26px; box-shadow: var(--shadow-lg); }

/* ---------- sections ---------- */
section { padding: clamp(40px, 6vw, 76px) 0; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head p { margin-bottom: 0; }

/* ---------- game cards ---------- */
.games { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .games { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .games { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card-cover { aspect-ratio: 1024 / 500; background: var(--surface-2); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; color: var(--ink); }
.card-body p { margin: 0; font-size: .95rem; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 10px; }

/* ---------- media ---------- */
.video-box {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: #000; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9;
}
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.video-box .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-box .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 0; background: rgba(8, 30, 14, .28); cursor: pointer; width: 100%; height: 100%;
}
.video-box .play span {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255, 255, 255, .94); display: grid; place-items: center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
}
.video-box .play span::after {
  content: ""; width: 0; height: 0; margin-left: 5px;
  border-left: 22px solid var(--brand-deep);
  border-top: 14px solid transparent; border-bottom: 14px solid transparent;
}
.video-box .play:hover span { transform: scale(1.06); }

.shots { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shots button {
  padding: 0; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  box-shadow: var(--shadow); display: block;
}
.shots img { width: 100%; height: auto; }

dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh;
}
dialog.lightbox::backdrop { background: rgba(8, 18, 8, .86); }
dialog.lightbox img { border-radius: 14px; max-height: 88vh; width: auto; }
dialog.lightbox .close {
  position: absolute; top: -46px; right: 0; background: none; border: 0;
  color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1;
}

/* ---------- feature list ---------- */
.features { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.feature h3 { margin-bottom: .35em; color: var(--ink); }
.feature p { margin: 0; font-size: .96rem; }

/* ---------- spec table ---------- */
.specs { width: 100%; border-collapse: collapse; font-size: .96rem; }
.specs th, .specs td { text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--ink-3); font-weight: 600; width: 42%; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }

/* ---------- prose ---------- */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; color: var(--ink-2); }
.prose li { margin-bottom: .45em; }
.prose code { background: var(--surface-2); padding: .14em .42em; border-radius: 6px; font-size: .92em; }

.note {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 12px; padding: 16px 20px; margin: 1.4em 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 44px 0 56px; color: var(--ink-3); font-size: .93rem;
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; }
.foot-grid nav { display: flex; flex-direction: column; gap: 7px; }
.foot-grid nav a { color: var(--ink-2); }
.foot-bottom { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); padding: 12px 18px; border-radius: 0 0 12px 0; z-index: 100;
}
.skip:focus { left: 0; }
