/* Highmarch Games - studio site. Plain CSS, no build step. */
@font-face { font-family: "IM Fell English SC"; src: url("fonts/IMFellEnglishSC-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #121014;
  --bg-2: #18141a;
  --surface: #1e191f;
  --line: #34292d;
  --text: #ece4d8;
  --muted: #a99d8f;
  --gold: #d8ab4f;
  --gold-hi: #f0d48a;
  --wine: #7a1f2b;
  --wine-hi: #a3283a;
  --display: "IM Fell English SC", "Palatino Linotype", Georgia, serif;
  --body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.65 var(--body);
  background-image: radial-gradient(1200px 600px at 50% -200px, #2a1a20 0%, transparent 70%);
  background-repeat: no-repeat;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-decoration-color: rgba(216,171,79,.45); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(18,16,20,.86); 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: 72px; flex-wrap: wrap; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: clamp(14px, 3vw, 30px); font: 600 14px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(44px, 7vw, 84px); }
h2 { font-size: clamp(34px, 4.6vw, 52px); }
h3 { font-size: 28px; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(19px, 2.2vw, 23px); color: #d9cfc2; max-width: 40em; }
.eyebrow { font: 600 13px/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.muted { color: var(--muted); }
.rule { width: 72px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 18px 0 26px; border: 0; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 4px; font: 600 15px/1 var(--ui); letter-spacing: .06em; text-decoration: none; border: 1px solid var(--gold); color: var(--gold-hi); background: transparent; cursor: pointer; }
.btn:hover { background: rgba(216,171,79,.12); color: #fff; }
.btn.primary { background: linear-gradient(180deg, #e7c470, #b8862f); color: #1a1210; border-color: #e7c470; }
.btn.primary:hover { background: linear-gradient(180deg, #f3d892, #c99539); color: #120c0a; }

/* Sections */
section { padding: clamp(56px, 9vw, 110px) 0; }
section + section { border-top: 1px solid var(--line); }
.band { background: var(--bg-2); }

/* Studio hero */
.studio-hero { text-align: center; padding-top: clamp(56px, 10vw, 120px); }
.studio-hero .emblem { width: clamp(110px, 16vw, 160px); margin: 0 auto 28px; filter: drop-shadow(0 12px 28px rgba(0,0,0,.6)); }
.studio-hero .lede { margin: 0 auto; }
.studio-hero .btns { justify-content: center; }

/* Game feature card */
.feature-game { position: relative; display: grid; align-items: end; min-height: clamp(420px, 56vw, 600px); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); text-decoration: none; color: var(--text); isolation: isolate; }
.feature-game > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s ease; }
.feature-game::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,9,12,.92) 0%, rgba(10,9,12,.65) 42%, rgba(10,9,12,0) 75%), linear-gradient(0deg, rgba(10,9,12,.85), transparent 45%); }
a.feature-game:hover > img.bg { transform: scale(1.03); }
.feature-game .inner { padding: clamp(24px, 5vw, 56px); max-width: 560px; }
.feature-game .game-logo { width: min(380px, 80%); margin-bottom: 14px; }
.tag { display: inline-block; font: 600 12px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); border: 1px solid rgba(216,171,79,.5); border-radius: 999px; padding: 7px 12px; margin: 0 8px 8px 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.card .body { padding: 22px 24px 26px; }
.card.placeholder { display: grid; place-items: center; text-align: center; min-height: 260px; border-style: dashed; color: var(--muted); padding: 24px; }

/* Game page */
.game-hero { position: relative; min-height: min(88vh, 760px); display: grid; align-items: center; isolation: isolate; border-bottom: 1px solid var(--line); }
.game-hero picture, .game-hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 50%; z-index: -2; }
/* Wide screens: a taller hero and a higher focus point, so the moon and the gate both stay in the picture. */
@media (min-width: 2000px) {
  .game-hero { min-height: min(84vh, max(760px, 36vw)); }
  .game-hero picture img { object-position: 65% 22%; }
}
.game-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,10,14,.9) 0%, rgba(12,10,14,.55) 45%, rgba(12,10,14,.05) 80%), linear-gradient(0deg, var(--bg) 0%, transparent 30%); }
.game-hero .game-logo { width: min(520px, 88%); margin-bottom: 18px; filter: drop-shadow(0 8px 22px rgba(0,0,0,.7)); }
.game-hero .lede { max-width: 30em; text-shadow: 0 2px 12px rgba(0,0,0,.8); }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 28px 0 0; }
.features li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; padding: 20px 22px; }
.features h3 { font-size: 25px; margin-bottom: 6px; color: var(--gold-hi); }
.features p { margin: 0; color: #d6ccbf; font-size: 17px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 28px; }
.gallery button { all: unset; cursor: zoom-in; display: block; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery button:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease, opacity .3s; }
.gallery button:hover img { transform: scale(1.03); }
.note { font: 14px/1.5 var(--ui); color: var(--muted); margin-top: 14px; }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); width: 100%; color: var(--text); }
dialog.lightbox::backdrop { background: rgba(6,5,8,.92); }
dialog.lightbox img { width: 100%; height: auto; border-radius: 4px; }
dialog.lightbox p { font: 15px/1.5 var(--ui); text-align: center; margin: 12px 0 0; color: #d6ccbf; }
dialog.lightbox .close { display: block; margin: 0 0 8px auto; font: 600 14px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--text); cursor: pointer; padding: 10px 14px; }

.heroes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 28px; }
.heroes img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; border: 1px solid rgba(216,171,79,.45); }
@media (max-width: 700px) { .heroes { grid-template-columns: repeat(4, 1fr); } .heroes img:nth-child(n+9) { display: none; } }

.story { position: relative; isolation: isolate; overflow: hidden; }
.story > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; }
/* The story's painting is 1920 px: past 2400 px it stays centred and fades into the page instead of stretching. */
@media (min-width: 2400px) {
  .story > img.bg { left: 50%; right: auto; max-width: 2400px; transform: translateX(-50%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
}
.story::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(18,16,20,.6) 30%, rgba(18,16,20,.6) 70%, var(--bg) 100%); }
.story blockquote { margin: 0; max-width: 34em; font-size: clamp(19px, 2.2vw, 23px); font-style: italic; color: #eee6da; text-shadow: 0 2px 10px rgba(0,0,0,.9); }

/* Press kit */
.facts { width: 100%; border-collapse: collapse; font-size: 17px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts th { width: 38%; font: 600 13px/1.6 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-right: 16px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.downloads a { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.downloads a:hover { border-color: var(--gold); }
.downloads .thumb { aspect-ratio: 16 / 9; background: #0c0a0d center / contain no-repeat; display: grid; place-items: center; }
.downloads .thumb.light { background-color: #efe9df; }
.downloads .thumb img { max-height: 80%; max-width: 86%; width: auto; }
.downloads .thumb img.cover { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.downloads .meta { padding: 12px 14px; font: 14px/1.4 var(--ui); }
.downloads .meta b { display: block; font-weight: 600; margin-bottom: 2px; }
.downloads .meta span { color: var(--muted); }
.toc { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 600 14px/1.4 var(--ui); letter-spacing: .06em; margin-top: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font: 14px/1.6 var(--ui); color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
.site-footer img { height: 40px; width: auto; opacity: .9; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.mt0 { margin-top: 0; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .brand img { height: 42px; }
  .site-header .wrap { min-height: 0; padding-top: 10px; padding-bottom: 6px; row-gap: 2px; }
  .nav { width: 100%; justify-content: space-between; font-size: 13px; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Notice shown after a mailto click copies the address. */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 16px); max-width: calc(100vw - 32px); padding: 12px 18px; border: 1px solid var(--gold); border-radius: 6px; background: var(--surface); color: var(--text); font: 15px/1.4 var(--ui); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
