/* Lanternhold Games: one stylesheet for every page. No external requests: the font is served from this site. */

@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d0b12;
  --bg-raised: #17131f;
  --bg-card: #1c1726;
  --line: #2e2638;
  --text: #ece6d8;
  --muted: #b2aabd;
  --gold: #e6b65c;
  --gold-deep: #b9832f;
  --ice: #9fd8ff;
  --ice-deep: #4f9fd6;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 16px;
  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(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: #d2ecff; }
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--bg-card); padding: 8px 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 11, 18, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
/* The studio's lantern tower and its name. */
.studio { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.studio:hover { color: var(--gold); }
.studio .lamp { width: auto; height: 34px; flex: none; filter: drop-shadow(0 0 8px rgba(230, 182, 92, .45)); }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--text); background: var(--bg-card); }
.site-nav a[aria-current="page"] { color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 10px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
}
.btn-gold { background: linear-gradient(#f0c56d, var(--gold-deep)); color: #23170a; border-color: #f6d690; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.btn-gold:hover { color: #23170a; filter: brightness(1.07); }
.btn-ghost { background: rgba(23, 19, 31, .75); color: var(--text); border-color: #4a3f58; }
.btn-ghost:hover { color: var(--text); border-color: var(--ice); }
.btn small { display: block; font-weight: 500; font-size: .78rem; opacity: .85; }
.btn .lbl { display: flex; flex-direction: column; align-items: center; }
/* A store link that doesn't exist yet: shown, not clickable. assets/js/links.js switches it on. */
.btn.soon { background: rgba(23, 19, 31, .7); color: var(--muted); border: 1px dashed #5b4f6b; box-shadow: none; cursor: default; filter: none; }
.btn.soon .tag { display: inline-block; }
.btn .tag { display: none; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- home: hero ---------- */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; overflow: hidden; }
.hero > picture, .hero > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(13, 11, 18, .35) 0%, rgba(13, 11, 18, 0) 30%, rgba(13, 11, 18, .55) 62%, var(--bg) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 48px; }
/* The game's logo, as the page's title. */
.game-title { font-size: clamp(3rem, 11vw, 6.2rem); margin: 0 0 .1em; text-shadow: 0 3px 24px rgba(0, 0, 0, .8), 0 0 40px rgba(110, 180, 255, .25); }
.game-title img { display: block; width: min(560px, 86vw); height: auto; margin-left: -8px; filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .75)); }
.hero .lede { font-size: clamp(1.1rem, 2.6vw, 1.4rem); max-width: 640px; text-shadow: 0 2px 12px rgba(0, 0, 0, .9); margin-bottom: 1.4em; }
.eyebrow { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); font-weight: 600; margin-bottom: .6em; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.free-line { margin-top: 18px; color: var(--muted); font-size: .95rem; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.free-line strong { color: var(--text); }
/* On a computer too, the painting has its own band and the logo sits below it on the dark, centred: over the
   village the logo's own crystals and arch were lost in the painting. */
@media (min-width: 761px) {
  .hero { display: block; min-height: 0; text-align: center; }
  .hero > picture { position: relative; display: block; height: min(66vh, 640px); }
  .hero > picture img { object-position: 50% 88%; }
  .hero::after { display: none; }
  .hero > picture::after { content: ""; position: absolute; inset: 0; background:
    linear-gradient(180deg, rgba(13, 11, 18, .4) 0%, rgba(13, 11, 18, 0) 20%, rgba(13, 11, 18, 0) 74%, var(--bg) 100%); }
  .hero .wrap { padding-top: 0; margin-top: -30px; padding-bottom: 40px; }
  .hero .game-title img { margin: 0 auto; width: min(520px, 60vw); }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .btn-row { justify-content: center; }
}

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.split.flip > :first-child { order: 2; }
.painting { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.quote { font-family: var(--serif); font-style: italic; color: var(--muted); border-left: 3px solid var(--gold-deep); padding-left: 16px; margin: 1.2em 0; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.feature img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.feature .body { padding: 18px 20px 22px; }
.feature h3 { color: var(--gold); }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }

/* the party strip */
.party { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; margin-top: 8px; }
.party noscript { display: none; }
@media (scripting: none) { .party noscript { display: contents; } }
.party figure { margin: 0; text-align: center; }
.party img { height: 190px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0,0,0,.6)); }
.party figcaption { font-family: var(--serif); font-size: .95rem; margin-top: 8px; }
.party figcaption span { display: block; font-family: var(--sans); color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.party-roll { display: flex; justify-content: center; margin: 22px 0 0; }
.party-roll[hidden] { display: none; }
.btn-roll { background: rgba(23, 19, 31, .75); color: var(--gold); border-color: var(--gold-deep); }
.btn-roll:hover { border-color: var(--gold); background: var(--bg-card); }

.foes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: end; }
.foes figure { margin: 0; text-align: center; }
.foes img { height: 170px; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.7)); }
.foes figcaption { font-family: var(--serif); margin-top: 8px; font-size: .95rem; }
.foes figcaption span { display: block; font-family: var(--sans); color: var(--muted); font-size: .8rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery a:hover { border-color: var(--ice-deep); }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .25s ease; }
.gallery a:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery a:hover img { transform: none; } }

/* The screenshot viewer (assets/js/viewer.js) */
.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--text); }
.viewer::backdrop { background: rgba(5, 4, 8, .97); }
.viewer figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: max(56px, env(safe-area-inset-top, 0px)) max(64px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(64px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.viewer img { max-width: 100%; max-height: calc(100% - 48px); width: auto; height: auto; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); pointer-events: auto; }
.viewer figcaption { max-width: 60ch; text-align: center; color: var(--muted); font-size: .95rem; }
.viewer-btn { position: fixed; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid #4a3f58; background: rgba(23, 19, 31, .85); color: var(--text); font: 400 2rem/1 var(--sans); cursor: pointer; }
.viewer-btn:hover { border-color: var(--gold); color: var(--gold); }
.viewer-close { top: max(8px, env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
.viewer-prev, .viewer-next { top: 50%; transform: translateY(-50%); }
.viewer-prev { left: max(8px, env(safe-area-inset-left, 0px)); }
.viewer-next { right: max(8px, env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) {
  .viewer figure { padding-left: 8px; padding-right: 8px; }
  .viewer-prev, .viewer-next { top: auto; bottom: max(12px, env(safe-area-inset-bottom, 0px)); transform: none; }
  .viewer figure { padding-bottom: 80px; }
}

/* the deal */
.deal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.deal div { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.deal h3 { color: var(--ice); margin-bottom: .3em; }
.deal p { margin: 0; color: var(--muted); }

.callout { background: linear-gradient(135deg, #1d1828, #151120); border: 1px solid var(--line); border-radius: 16px; padding: 32px; text-align: center; }
.callout .btn-row { justify-content: center; margin-top: 20px; }
.mail { font-family: var(--serif); font-size: 1.25rem; word-break: break-word; }

/* ---------- inner pages ---------- */
.page-head { position: relative; padding: 72px 0 40px; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head picture, .page-head picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,11,18,.55), var(--bg)); }
.page-head .wrap { position: relative; z-index: 1; }
.page-head p { color: var(--muted); max-width: 680px; font-size: 1.08rem; margin: 0; }
.prose { padding-top: 48px; padding-bottom: 72px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; color: var(--gold); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose .updated { color: var(--muted); font-size: .95rem; }
.box { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 1.4em 0; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box.short { border-color: #3d5c75; }

/* press */
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.facts th { width: 34%; color: var(--muted); font-weight: 600; font-size: .95rem; }
.press-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dl { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.dl:hover { border-color: var(--ice-deep); color: var(--text); }
.dl img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.dl.cut img { object-fit: contain; background: radial-gradient(circle at 50% 60%, #2a2238, #121019); padding: 10px; }
.dl span { padding: 10px 12px; font-size: .9rem; }
.dl span small { display: block; color: var(--muted); }
.dl.logo img { padding: 18px; }
.dl.logo.light img { background: #efe9dc; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The trailer */
.trailer-section { padding-top: 8px; }
.trailer { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.trailer video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.trailer-note { text-align: center; color: var(--muted); font-size: .95rem; margin: 14px 0 0; }
.prose .trailer { margin: 1em 0; }
.placeholder { border: 1px dashed #5b4f6b; border-radius: 10px; padding: 18px; color: var(--muted); text-align: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer h2 { font-size: 1rem; color: var(--text); margin-bottom: .6em; }
.site-footer .footer-logo img { display: block; height: 48px; width: auto; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35em; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; font-size: .85rem; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .features, .gallery, .downloads { grid-template-columns: repeat(2, 1fr); }
  .party { grid-template-columns: repeat(4, 1fr); row-gap: 24px; }
  .press-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 24px; }
  .split.flip > :first-child { order: 0; }
  .deal { grid-template-columns: 1fr; }
  .foes { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > :first-child { grid-column: 1 / -1; }
  /* On a narrow screen the painting gets its own band, with the four delvers in view, and the text below it. */
  .hero { display: block; min-height: 0; }
  .hero > picture { position: relative; display: block; height: auto; aspect-ratio: 4 / 3.4; }
  .hero > picture img { position: absolute; object-position: 54% 82%; }
  .hero::after { background: linear-gradient(180deg, rgba(13, 11, 18, 0) 0%, rgba(13, 11, 18, 0) 38%, var(--bg) calc(min(85vw, 660px))); }
  .hero .wrap { padding-top: 0; margin-top: -34px; padding-bottom: 36px; }
  .callout { padding: 24px 18px; }
}
@media (max-width: 560px) {
  .features, .gallery, .downloads { grid-template-columns: 1fr; }
  .party img { height: 150px; }
  .party figcaption { font-size: .82rem; white-space: nowrap; }
  .foes img { height: 130px; }
  .btn-row .btn { width: 100%; }
  .site-header .wrap { justify-content: center; padding-top: 6px; padding-bottom: 4px; min-height: 0; row-gap: 0; }
  .site-nav a { padding: 6px 10px; }
  .facts th { width: 40%; }
}

/* footer links that don't exist yet */
a:not(.soon) .soon-note { display: none; }
a.soon, a.soon:hover { cursor: default; text-decoration: none; color: var(--muted); }

/* long paths (save folders) wrap on a phone */
.prose code { overflow-wrap: anywhere; font-size: .92em; color: #e9dcc0; }
