/* Keseduran Game Studio — an oil lamp behind a shadow-theatre screen.
   Tokens → base → layout → components → pages. No framework. */
@font-face {
  font-family: "Alegreya";
  src: url("/assets/fonts/Alegreya-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --night: #0b0907;
  --walnut: #17100b;
  --walnut-2: #21170f;
  --walnut-3: #2c1f14;
  --line: #3a2a1b;
  --line-soft: rgba(201, 162, 74, 0.18);
  --ivory: #efe2c2;
  --parchment: #d9c6a0;
  --muted: #a8977a;
  --brass: #c9a24a;
  --brass-2: #e2c070;
  --ember: #d9773a;
  --curtain: #7e2418;
  --radius: 12px;
  --max: 1180px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html.lb-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--night);
  color: var(--parchment);
  font-family: "Alegreya", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-2); text-underline-offset: 0.18em; }
a:hover { color: var(--ivory); }
:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--ivory); line-height: 1.12; font-weight: 800; margin: 0 0 0.45em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--night); padding: 6px 10px; z-index: 30; }
.eyebrow { display: inline-block; font-variant: small-caps; letter-spacing: 0.14em; color: var(--brass); font-size: 1rem; font-weight: 700; margin-bottom: 0.5em; }
.lead { font-size: clamp(1.2rem, 2.2vw, 1.4rem); color: var(--ivory); line-height: 1.5; }
.muted, .note { color: var(--muted); }
.note { font-size: 1rem; }
.center { text-align: center; }
.narrow { max-width: 46rem; }
.center.narrow { margin-left: auto; margin-right: auto; }

/* ---- Header ------------------------------------------------------------------------------------------- */
.site-head { border-bottom: 1px solid var(--line); background: rgba(11, 9, 7, 0.9); }
@media (min-width: 720px) {
  .site-head { position: sticky; top: 0; z-index: 20; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-variant: small-caps; letter-spacing: 0.07em; font-size: 1.05rem; }
.nav a { color: var(--parchment); text-decoration: none; padding: 4px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); box-shadow: 0 2px 0 var(--brass); }
.lang { display: flex; gap: 4px; font-size: 0.9rem; font-variant: normal; letter-spacing: 0.04em; }
.lang a, .lang span { padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang a:hover { box-shadow: none; border-color: var(--brass); }
.lang span { color: var(--night); background: var(--brass); border-color: var(--brass); font-weight: 700; }

/* ---- Sections ----------------------------------------------------------------------------------------- */
section { padding: clamp(56px, 9vw, 112px) 0; position: relative; }
.band { background: linear-gradient(180deg, var(--walnut) 0%, var(--night) 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 44rem; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head.center { margin-left: auto; margin-right: auto; }

/* ---- Buttons & badges ---------------------------------------------------------------------------------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }
.btns.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 24px; border-radius: 10px;
  font: inherit; font-size: 1.08rem; font-weight: 800; text-decoration: none; letter-spacing: 0.02em; cursor: pointer;
  background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: var(--night); border: 1px solid #8a6a26;
  box-shadow: 0 6px 18px rgba(201, 162, 74, 0.18); transition: transform 0.15s var(--ease), filter 0.15s;
}
.btn:hover { color: var(--night); filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: rgba(11, 9, 7, 0.55); color: var(--ivory); border-color: var(--brass); box-shadow: none; }
.btn.ghost:hover { background: rgba(201, 162, 74, 0.14); color: var(--ivory); }
.btn[aria-disabled="true"] { background: rgba(33, 23, 15, 0.85); color: var(--parchment); border-color: var(--line); cursor: default; box-shadow: none; transform: none; filter: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.badges.center { justify-content: center; }
.badges li { padding: 3px 12px; border: 1px solid var(--line-soft); border-radius: 999px; font-size: 0.95rem; color: var(--parchment); background: rgba(11, 9, 7, 0.55); }

/* ---- Studio hero (lamp-lit screen) --------------------------------------------------------------------- */
.screen {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 75% at 50% 42%, rgba(232, 170, 88, 0.36), rgba(170, 92, 40, 0.13) 45%, transparent 75%),
    linear-gradient(180deg, var(--walnut) 0%, var(--night) 100%);
}
.screen::before, .screen::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(10px, 3vw, 40px);
  background: linear-gradient(90deg, var(--curtain), #4a140c); opacity: 0.9;
}
.screen::before { left: 0; }
.screen::after { right: 0; transform: scaleX(-1); }
.hero { text-align: center; padding: clamp(56px, 9vw, 104px) 24px clamp(48px, 8vw, 88px); }
.hero .logo { width: min(320px, 66vw); margin: 0 auto 26px; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.5)); }
.tagline { font-size: clamp(1.4rem, 3.4vw, 2.05rem); color: var(--ivory); font-style: italic; margin: 0; }

/* ---- Game hero (key art) ------------------------------------------------------------------------------- */
.key {
  position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line);
  min-height: clamp(520px, 78vh, 820px); display: flex; align-items: flex-end;
}
.key > picture, .key > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -2; }
.key::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 9, 7, 0.2) 0%, rgba(11, 9, 7, 0.05) 30%, rgba(11, 9, 7, 0.75) 68%, var(--night) 100%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(11, 9, 7, 0.6), transparent 70%);
}
.key .wrap { width: 100%; padding-bottom: clamp(36px, 6vw, 72px); text-align: center; }
.key .game-logo { width: min(560px, 86vw); margin: 0 auto 6px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.85)); }
.key .hook { max-width: 40rem; margin: 0 auto; font-size: clamp(1.15rem, 2.3vw, 1.45rem); color: var(--ivory); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.key .btns { justify-content: center; }

/* ---- Trailer ------------------------------------------------------------------------------------------- */
.player { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* ---- Stats strip --------------------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stats li { background: var(--walnut); padding: 20px 12px; text-align: center; }
@media (max-width: 719px) { .stats li:last-child { grid-column: span 2; } .key { min-height: 600px; } .key > picture img { object-position: 50% 20%; } .nav { font-size: 1rem; gap: 2px 16px; } }
.stats b { display: block; font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--brass-2); line-height: 1; font-weight: 900; }
.stats span { display: block; margin-top: 6px; font-variant: small-caps; letter-spacing: 0.08em; color: var(--parchment); font-size: 1rem; }

/* ---- Feature rows (alternating) ------------------------------------------------------------------------ */
.feature { display: grid; gap: clamp(22px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
@media (min-width: 880px) {
  .feature { grid-template-columns: 1.25fr 1fr; }
  .feature.flip { grid-template-columns: 1fr 1.25fr; }
  .feature.flip .media { order: 2; }
}
.media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--walnut); }
.media video, .media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.media a { display: block; }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.feature p { color: var(--parchment); }
.combo { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.combo li { padding: 10px 14px; border-left: 3px solid var(--brass); background: var(--walnut-2); border-radius: 0 8px 8px 0; font-size: 1.02rem; }
.combo b { color: var(--ivory); }

/* ---- Gallery ------------------------------------------------------------------------------------------- */
.shots { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.shots a { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--walnut); }
.shots img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; transition: transform 0.35s var(--ease), opacity 0.2s; }
.shots a:hover img, .shots a:focus-visible img { transform: scale(1.04); }
.shots a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.2s; }
.shots a:hover::after, .shots a:focus-visible::after { box-shadow: inset 0 0 0 2px var(--brass); }
.shots .wide { grid-column: span 2; }

/* ---- Lightbox ------------------------------------------------------------------------------------------ */
dialog.lb { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 5, 4, 0.94); color: var(--ivory); }
dialog.lb::backdrop { background: rgba(6, 5, 4, 0.94); }
dialog.lb[open] { display: flex; align-items: center; justify-content: center; animation: lb-in 0.18s var(--ease); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-fig { margin: 0; padding: 56px 12px 12px; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
@media (min-width: 720px) { .lb-fig { padding: 56px 84px 24px; } }
.lb-img { max-width: 100%; max-height: calc(100% - 52px); width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); transition: opacity 0.15s; }
.lb-img.lb-loading { opacity: 0.35; }
.lb-cap { display: flex; gap: 16px; align-items: baseline; justify-content: center; flex-wrap: wrap; text-align: center; color: var(--parchment); font-size: 1.05rem; }
.lb-count { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: rgba(23, 16, 11, 0.85); color: var(--ivory); font: 700 1.9rem/1 Georgia, serif; cursor: pointer; }
.lb-btn:hover { border-color: var(--brass); color: var(--brass-2); }
.lb-close { top: 10px; right: 10px; font-size: 1.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 719px) { .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } .lb-prev { left: 16px; } .lb-next { right: 16px; } .lb-fig { padding-bottom: 72px; } }

/* ---- Generic cards / lists ----------------------------------------------------------------------------- */
.grid2 { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 880px) { .grid2 { grid-template-columns: 1.1fr 1fr; } }
.grid3 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: linear-gradient(180deg, var(--walnut-2), var(--walnut)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 0.3em; }
.card p:last-child { margin-bottom: 0; }
.frame { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--walnut); box-shadow: var(--shadow); }
a.frame img { transition: transform 0.35s var(--ease); }
a.frame:hover img { transform: scale(1.02); }
ul.feats { padding-left: 1.1em; margin: 0; }
ul.feats li { margin-bottom: 0.45em; }
ul.feats li::marker { color: var(--brass); }
.cta { text-align: center; }
.cta .game-logo { width: min(380px, 76vw); margin: 0 auto 10px; }

/* ---- Fact sheet / press -------------------------------------------------------------------------------- */
table.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.facts th { color: var(--ivory); width: 34%; font-weight: 700; }
@media (max-width: 560px) {
  .facts th, .facts td { display: block; width: auto; padding: 4px 0; border: 0; }
  .facts tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
}
.dl { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dl a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--walnut); color: var(--ivory); }
.dl a:hover { border-color: var(--brass); }
.dl small { color: var(--muted); white-space: nowrap; }
blockquote { margin: 0; padding: 16px 20px; border-left: 3px solid var(--brass); background: var(--walnut); border-radius: 0 10px 10px 0; }
.logos { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .logos { grid-template-columns: 2fr 1.3fr 1fr; } }
.logos .card { display: grid; place-items: center; min-height: 180px; }
.logos img { max-height: 140px; width: auto; }
.mail { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 800; word-break: break-all; margin: 0; }

/* ---- Footer -------------------------------------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 0.95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; align-items: center; }
.site-foot .fb { display: flex; gap: 14px; align-items: center; }
.site-foot img { height: 30px; width: auto; opacity: 0.85; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ivory); }

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