/* Dhriti Games - dhritigames.com. Palette and type follow the Walls Have Eyes main menu. */

@font-face { font-family: "IM Fell English"; src: url("../fonts/im-fell-english.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("../fonts/im-fell-english-sc.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("../fonts/libre-caslon-text.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; src: url("../fonts/libre-caslon-text-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 400; src: url("../fonts/dm-sans-regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 500; src: url("../fonts/dm-sans-medium.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DM Sans"; font-weight: 600; src: url("../fonts/dm-sans-semibold.woff2") format("woff2"); font-display: swap; }

:root {
  --depth: #181722;
  --depth-2: #1f1d2b;
  --depth-3: #272436;
  --ink: #e9e3d7;
  --quiet: #aaa4b6;
  --rose: #ca9daf;
  --mist: #a9bcdc;
  --pitch: #000000;
  --ember: #ff6b4a; /* the eyes of the key art: used once per view at most */
  --hair: color-mix(in srgb, var(--rose) 38%, transparent);
  --hair-soft: color-mix(in srgb, var(--rose) 18%, transparent);

  --f-title: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --f-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --f-read: "Libre Caslon Text", Georgia, serif;
  --f-ui: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--depth);
  color: var(--ink);
  font: 17px/1.65 var(--f-read);
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--mist); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--mist); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--f-title); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.eyebrow {
  font: 600 .74rem/1 var(--f-ui);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 1rem;
}
.lede { font-size: 1.15rem; color: var(--ink); max-width: 40ch; }
.muted { color: var(--quiet); }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--depth) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair-soft);
}
.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; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand span { font: 1.2rem/1 var(--f-sc); letter-spacing: .08em; }
.nav { display: flex; gap: clamp(12px, 2.5vw, 28px); align-items: center; }
.nav a {
  font: 500 .82rem/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase;
  color: var(--quiet); text-decoration: none; padding: 8px 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) {
  .brand span { display: none; }
  .nav { gap: 14px; }
  .nav a { font-size: .72rem; letter-spacing: .08em; }
  .nav .hide-sm { display: none; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font: 600 .86rem/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--ink); color: var(--depth); background: var(--ink);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: #fff; color: var(--pitch); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn.ghost:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn.steam { background: #171a21; color: #fff; border-color: #3d4450; }
.btn.steam:hover { background: #2a475e; border-color: #66c0f4; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------ hero */

.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 860px);
  display: grid; align-items: end;
  padding: 120px 0 72px;
  overflow: hidden;
}
.hero-art {
  position: absolute; inset: 0; z-index: -2;
  background: var(--pitch);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,9,16,.92) 0%, rgba(10,9,16,.55) 38%, rgba(10,9,16,0) 65%),
    linear-gradient(0deg, var(--depth) 0%, rgba(24,23,34,0) 40%);
}
.hero-title { width: min(360px, 70vw); margin: 0 0 22px; }
.hero .lede { font-family: var(--f-title); font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.3; max-width: 22ch; margin-bottom: .6em; }
.hero p.sub { color: var(--ink); opacity: .85; max-width: 44ch; margin-bottom: 28px; }
@media (max-width: 720px) {
  /* Art sits on top as a square; the title overlaps its faded lower edge. */
  .hero { min-height: 0; padding: calc(min(100vw, 720px) * .78) 0 56px; }
  .hero-art { bottom: auto; height: min(100vw, 720px); }
  .hero-art img { object-position: 50% 50%; }
  .hero::after { background: linear-gradient(0deg, var(--depth) 0%, var(--depth) calc(100% - min(100vw, 720px)), rgba(24,23,34,.55) calc(100% - min(100vw, 720px) * .45), rgba(24,23,34,0) calc(100% - min(100vw, 720px) * .1)); }
}

/* ------------------------------------------------------------ sections */

section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.rule { border: 0; border-top: 1px solid var(--hair-soft); margin: 0; }

.trailer-frame {
  position: relative; aspect-ratio: 16 / 9; background: var(--pitch);
  border: 1px solid var(--hair-soft); box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.trailer-frame video { width: 100%; height: 100%; object-fit: cover; }

.features { display: grid; gap: clamp(56px, 8vw, 96px); }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: 1fr 1.25fr; }
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media { aspect-ratio: 16 / 9; background: var(--pitch); border: 1px solid var(--hair-soft); overflow: hidden; }
.feature-media video { width: 100%; height: 100%; object-fit: cover; }
.feature p { color: var(--ink); opacity: .88; }
@media (max-width: 820px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media { order: 0; }
}

/* ------------------------------------------------------------ leaderboard */

.board-panel {
  background: linear-gradient(180deg, var(--depth-2), var(--depth));
  border: 1px solid var(--hair);
  padding: clamp(16px, 3vw, 32px);
}
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--hair-soft); margin-bottom: 18px; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  font: 600 .76rem/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase;
  color: var(--quiet); padding: 14px 14px 13px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--rose); }
.board-sub { font: italic .98rem/1.4 var(--f-read); color: var(--quiet); margin: 0 0 14px; }
.board-table { width: 100%; border-collapse: collapse; font-family: var(--f-ui); font-variant-numeric: tabular-nums; }
.board-table th {
  text-align: left; font: 600 .68rem/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase;
  color: var(--quiet); padding: 10px 8px; border-bottom: 1px solid var(--hair-soft);
}
.board-table td { padding: 11px 8px; border-bottom: 1px solid color-mix(in srgb, var(--rose) 9%, transparent); }
.board-table td.rank { width: 3.2em; color: var(--quiet); }
.board-table td.time, .board-table th.time { text-align: right; width: 7em; }
.board-table td.name { overflow-wrap: anywhere; }
.board-table tr.target td { color: var(--mist); font-weight: 600; letter-spacing: .08em; }
.board-table tr.target td.name { font-size: .82rem; letter-spacing: .16em; }
.board-table tr.top1 td.name { color: var(--ink); font-weight: 600; }
.steam-mark { display: inline-block; margin-left: 8px; padding: 2px 5px; font: 600 .6rem/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); border: 1px solid color-mix(in srgb, var(--mist) 35%, transparent); border-radius: 2px; vertical-align: 2px; }
.board-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; font: .86rem/1.4 var(--f-ui); color: var(--quiet); }
.board-empty { padding: 28px 8px; color: var(--quiet); font-style: italic; }

/* ------------------------------------------------------------ gallery */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.gallery a { display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--hair-soft); background: var(--pitch); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .2s; opacity: .92; }
.gallery a:hover img { transform: scale(1.03); opacity: 1; }

dialog.lightbox { padding: 0; border: 1px solid var(--hair); background: var(--pitch); max-width: min(1600px, 96vw); width: auto; }
dialog.lightbox::backdrop { background: rgba(6,6,10,.88); }
dialog.lightbox img { max-height: 88vh; width: auto; }
dialog.lightbox button {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px;
  background: rgba(0,0,0,.6); color: var(--ink); border: 1px solid var(--hair); cursor: pointer; font: 22px/1 var(--f-ui);
}

/* ------------------------------------------------------------ studio + footer */

.studio { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.studio img { width: clamp(140px, 22vw, 240px); animation: drift 14s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .studio img { animation: none; } }
@media (max-width: 640px) { .studio { grid-template-columns: 1fr; text-align: left; } }

.site-footer { border-top: 1px solid var(--hair-soft); padding: 40px 0 56px; font: .9rem/1.6 var(--f-ui); color: var(--quiet); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.socials { display: flex; gap: 8px; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--hair-soft); color: var(--quiet); border-radius: 50%;
}
.socials a:hover { color: var(--ink); border-color: var(--hair); }
.socials svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------ claim */

.claim-main { padding: clamp(48px, 8vw, 96px) 0; min-height: calc(100vh - 64px - 140px); }
.claim-card {
  width: min(640px, 100%); margin-inline: auto;
  background: linear-gradient(180deg, var(--depth-2), var(--depth));
  border: 1px solid var(--hair);
  padding: clamp(22px, 5vw, 44px);
}
.claim-card h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.code-chip {
  display: inline-block; font: 600 1.05rem/1 var(--f-ui); letter-spacing: .2em;
  padding: 10px 14px; border: 1px solid var(--hair); color: var(--mist); background: rgba(0,0,0,.25);
}
.code-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 6px; }
.code-form input {
  flex: 1 1 180px; min-height: 48px; padding: 0 14px;
  font: 600 1.05rem/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); background: rgba(0,0,0,.3); border: 1px solid var(--hair); border-radius: 2px;
}
.code-form input::placeholder { color: color-mix(in srgb, var(--quiet) 60%, transparent); }
.records { margin: 22px 0 26px; }
.records .board-table td.time { width: 6em; }
.notice { padding: 14px 16px; border-left: 2px solid var(--rose); background: rgba(202,157,175,.07); margin: 0 0 20px; font-size: .98rem; }
.notice.error { border-left-color: var(--ember); background: rgba(255,107,74,.07); }
.linked-banner { border: 1px solid color-mix(in srgb, var(--mist) 45%, transparent); background: rgba(169,188,220,.06); padding: 20px; margin: 0 0 22px; }
.linked-banner strong { color: var(--mist); font-family: var(--f-ui); }
.wishlist-step { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hair-soft); }
.wishlist-step p { margin-bottom: 16px; }
.fine { font: .82rem/1.5 var(--f-ui); color: var(--quiet); margin-top: 18px; }

/* ------------------------------------------------------------ press */

.press-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } }
.factsheet { border: 1px solid var(--hair); padding: 22px; background: var(--depth-2); position: sticky; top: 88px; }
@media (max-width: 860px) { .factsheet { position: static; } }
.factsheet dl { margin: 0; font-family: var(--f-ui); font-size: .92rem; }
.factsheet dt { font: 600 .66rem/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--rose); margin-top: 16px; }
.factsheet dt:first-child { margin-top: 0; }
.factsheet dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.press-body h2 { font-size: 1.9rem; margin-top: 2.2em; }
.press-body h2:first-child { margin-top: 0; }
.press-body ul { padding-left: 1.2em; }
.press-body li { margin-bottom: .4em; }
.logo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.logo-row a { display: grid; place-items: center; aspect-ratio: 1; padding: 18px; border: 1px solid var(--hair-soft); background: var(--pitch); text-decoration: none; }
.logo-row a.light { background: #ecebe6; }
.logo-row img { max-height: 100%; object-fit: contain; }
.dl-list { list-style: none; padding: 0 !important; display: grid; gap: 8px; font-family: var(--f-ui); }

/* ------------------------------------------------------------ 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.lost img { width: 140px; margin: 0 auto 24px; opacity: .85; }
