/* Kindleforge Games. Plain CSS, no build step.
   Colours are lifted from the Horde Hero key art: the dusk sky, the burning sword, the gold crown. */

@font-face {
  font-family: "Lilita One";
  src: url("../fonts/lilita-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-var-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-italic-var-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --dusk: #24152f;       /* page: the sky behind the castle */
  --dusk-deep: #1a0f23;  /* footer, image wells */
  --dusk-raised: #322042;/* panels */
  --line: #4a3459;       /* rules, borders */
  --ember: #ff8a2b;      /* the sword's flame: buttons, markers */
  --ember-hot: #ffa552;
  --gold: #ffc64d;       /* the crown: links */
  --ash: #f5e9dc;        /* body text */
  --ash-dim: #c4b1c6;    /* secondary text */

  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, sans-serif;

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--dusk);
  color: var(--ash);
  font-family: var(--body);
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.6;
  font-weight: 450;
  text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }

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

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ember-hot); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 8px; top: -60px;
  background: var(--gold); color: var(--dusk-deep);
  padding: 8px 14px; border-radius: 6px; font-weight: 800; z-index: 10;
}
.skip:focus { top: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 22px;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.6rem; line-height: 1;
  color: var(--ash); text-decoration: none; letter-spacing: 0.005em;
  display: inline-flex; align-items: baseline; gap: 0.32em; white-space: nowrap;
}
.wordmark:hover { color: var(--ash); }
.wordmark .games {
  font-family: var(--body); font-weight: 700; font-size: 0.62em; color: var(--ash-dim);
  letter-spacing: 0.01em;
}
/* the ember over the i */
.wordmark .i { position: relative; display: inline; }
.wordmark .i::after {
  content: ""; position: absolute; left: 50%; top: 0.145em;
  width: 0.24em; height: 0.24em; margin-left: -0.12em; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0.25em 0.06em rgba(255, 138, 43, 0.75);
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 2.4vw, 30px); }
.site-nav a {
  color: var(--ash); text-decoration: none; font-weight: 700; font-size: 0.98rem;
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--ember); }

/* ---------- Studio hero ---------- */
.studio-hero { padding-block: clamp(40px, 9vw, 120px) clamp(40px, 7vw, 96px); }
.studio-hero h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(3rem, 1.6rem + 6.4vw, 6.6rem); line-height: 0.94; letter-spacing: -0.005em;
  color: var(--ash);
}
.studio-sub {
  margin: 24px 0 0; max-width: 46ch;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.5; font-weight: 500; color: var(--ash-dim);
}
.studio-links { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.studio-links a {
  color: var(--ash); font-weight: 800; text-decoration: none; font-size: 1.05rem;
  border-bottom: 2px solid var(--ember); padding-bottom: 2px;
}
.studio-links a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.section-title {
  margin: 0 0 22px; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.1;
}

/* ---------- Games ---------- */
.games-section { padding-bottom: clamp(48px, 7vw, 96px); }
.game-card {
  background: var(--dusk-raised); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(10, 4, 16, 0.7);
}
.keyart { position: relative; margin: 0; background: var(--dusk-deep); }
.keyart picture, .keyart picture img { width: 100%; }
.keyart picture img { aspect-ratio: 3840 / 1240; object-fit: cover; }
.keyart .logo {
  position: absolute; left: clamp(16px, 4vw, 56px); top: 9%;
  width: clamp(160px, 24vw, 340px);
  filter: drop-shadow(0 10px 22px rgba(20, 8, 26, 0.6));
}
.keyart::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 22%;
  background: linear-gradient(to bottom, rgba(50, 32, 66, 0), var(--dusk-raised));
  pointer-events: none;
}

.game-body {
  display: grid; gap: 20px clamp(24px, 4vw, 56px);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  padding: clamp(20px, 3vw, 36px) clamp(18px, 3.5vw, 44px) 8px;
}
.game-intro h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); line-height: 1; }
.badges { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li {
  font-size: 0.85rem; font-weight: 800; color: var(--ash);
  border: 1px solid var(--line); background: var(--dusk); border-radius: 999px; padding: 4px 12px;
}
.game-tagline { margin: 20px 0 0; font-family: var(--display); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.1; color: var(--ember); max-width: 16ch; }
.game-text p { margin: 0 0 1em; max-width: 60ch; }
.game-text .lede { font-size: 1.1875rem; font-weight: 500; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 22px; }
.btn {
  display: inline-block; text-decoration: none;
  background: var(--ember); color: #2a1206;
  font-family: var(--display); font-size: 1.15rem; line-height: 1;
  padding: 15px 22px 14px; border-radius: 10px;
  box-shadow: 0 4px 0 #b4501a, 0 10px 24px rgba(255, 138, 43, 0.22);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn:hover { background: var(--ember-hot); color: #2a1206; transform: translateY(-1px); box-shadow: 0 5px 0 #b4501a, 0 12px 28px rgba(255, 138, 43, 0.3); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b4501a; }
.btn-quiet, .btn-quiet:hover { background: transparent; color: var(--ash); box-shadow: inset 0 0 0 2px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold); }
.btn.is-static, .btn.is-static:hover, .btn.is-static:active { transform: none; cursor: default; color: var(--ash-dim); box-shadow: inset 0 0 0 2px var(--line); }

/* Screenshots: one big, two supporting */
.shots {
  display: grid; gap: 12px; padding: 24px clamp(18px, 3.5vw, 44px) 0;
  grid-template-columns: 2fr 1fr;
  grid-template-areas: "big a" "big b";
}
.shots figure { margin: 0; }
.shots .big { grid-area: big; }
.shots .a { grid-area: a; }
.shots .b { grid-area: b; }
.shots img { border-radius: 10px; background: var(--dusk-deep); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shots figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--ash-dim); line-height: 1.45; }

/* Release path: a real sequence, so it gets markers */
.path { padding: clamp(28px, 4vw, 44px) clamp(18px, 3.5vw, 44px); }
.path h4 { margin: 0 0 18px; font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
.path ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative;
}
.path ol::before {
  content: ""; position: absolute; left: 9px; right: 0; top: 9px; height: 2px;
  background: linear-gradient(to right, var(--ember), var(--line) 40%);
}
.path li { position: relative; padding: 34px 24px 0 0; }
.path li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--dusk-raised); border: 2px solid var(--line);
}
.path li.next::before { background: var(--ember); border-color: var(--ember); box-shadow: 0 0 14px rgba(255, 138, 43, 0.7); }
.path .when { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--ash); line-height: 1.15; }
.path .what { display: block; margin-top: 4px; color: var(--ash-dim); font-size: 0.98rem; }

.next-game {
  margin-top: 16px; border: 2px dashed var(--line); border-radius: 20px;
  padding: 22px clamp(18px, 3.5vw, 44px); color: var(--ash-dim);
}
.next-game p { margin: 0; }
.next-game strong { color: var(--ash); }

/* ---------- About ---------- */
.about { padding-bottom: clamp(56px, 8vw, 112px); }
.about-text { max-width: 62ch; }
.about-text p { margin: 0 0 1em; font-size: 1.15rem; line-height: 1.6; }

/* ---------- Footer / contact ---------- */
.site-foot { background: var(--dusk-deep); padding-block: clamp(40px, 6vw, 64px) 28px; margin-top: 0; }
.foot-grid {
  display: grid; gap: 32px 48px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
}
.site-foot h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.site-foot p { margin: 0 0 8px; color: var(--ash-dim); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { color: var(--ash); }
.site-foot a:hover { color: var(--gold); }
.mail { font-weight: 800; font-size: 1.15rem; word-break: break-word; }
.small-print {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 0.9rem; color: var(--ash-dim);
}
.small-print ul { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.small-print a { color: var(--ash-dim); }

/* ---------- Text pages (privacy, support, press) ---------- */
.page-head { padding-block: clamp(24px, 5vw, 56px) 8px; }
.page-head h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); line-height: 1.04;
}
.page-head .sub { margin: 12px 0 0; color: var(--ash-dim); font-size: 1.125rem; max-width: 56ch; }

.prose { max-width: var(--measure); padding-bottom: clamp(48px, 7vw, 96px); }
.prose h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.15;
  margin: 2.2em 0 0.5em; color: var(--ash);
}
.prose h3 { font-size: 1.125rem; font-weight: 800; margin: 1.6em 0 0.3em; }
.prose p, .prose ul { margin: 0 0 1em; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--ember); }
.prose strong { font-weight: 800; color: #fff4e8; }
.prose code {
  font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.88em;
  background: var(--dusk-raised); padding: 1px 6px; border-radius: 4px; word-break: break-all;
}
.prose .meta { color: var(--ash-dim); }

.short-version {
  background: var(--dusk-raised); border-left: 4px solid var(--ember);
  padding: 18px 22px 6px; border-radius: 0 10px 10px 0; margin: 28px 0 8px;
}
.short-version h2 { margin-top: 0; }

/* placeholders the owner must fill in before publishing */
.ph {
  background: #ffe36b; color: #2a1206; font-weight: 800;
  padding: 0 4px; border-radius: 3px; font-style: normal;
}
.ph-note {
  background: #3d2a12; border: 1px dashed #ffe36b; color: #ffe9a8;
  padding: 10px 14px; border-radius: 8px; font-size: 0.95rem;
}

/* two-column text pages: reading column + a sticky aside */
.doc-grid {
  display: grid; gap: 24px clamp(32px, 6vw, 96px);
  grid-template-columns: minmax(0, 66ch) minmax(220px, 320px);
  justify-content: space-between; align-items: start;
}
.doc-grid .prose { max-width: none; }
.doc-aside { position: sticky; top: 24px; padding-top: 28px; }
.doc-aside h2 { font-family: var(--display); font-weight: 400; font-size: 1.2rem; margin: 0 0 10px; }
.toc { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--ash-dim); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.toc a:hover { color: var(--gold); }

/* FAQ */
.faq h3 { font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; color: #fff4e8; }
.faq > div { border-top: 1px solid var(--line); padding: 22px 0 8px; }
.faq > div:last-child { border-bottom: 1px solid var(--line); }

.help-box {
  background: var(--dusk-raised); border-radius: 14px; padding: 22px; margin: 0;
}
.help-box img { width: 72px; height: 72px; border-radius: 12px; margin-bottom: 14px; }
.help-box p { margin: 0 0 10px; color: var(--ash-dim); }
.help-box .mail { display: inline-block; margin-bottom: 12px; font-size: 1.05rem; }

/* Press */
.facts { width: 100%; border-collapse: collapse; margin: 8px 0 1em; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts th { width: 34%; padding-right: 16px; color: var(--ash-dim); font-weight: 700; }
.downloads { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.downloads li { margin: 0; }
.downloads a { display: block; text-decoration: none; color: var(--ash); }
.downloads a:hover { color: var(--gold); }
.downloads img { border-radius: 6px; background: var(--dusk-deep); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; margin-bottom: 6px; }
.downloads .logo-thumb { object-fit: contain; padding: 10px; background: var(--dusk-raised); }
.downloads span { display: block; font-weight: 700; line-height: 1.3; }
.downloads small { color: var(--ash-dim); font-size: 0.85rem; }
.press-wide { max-width: var(--wide); }
.press-grid { margin-top: 36px; }
.facts-aside { padding-top: 0; }
.facts-aside .facts { font-size: 0.95rem; }
.facts-aside .facts th { width: 40%; }
.store-text p { max-width: var(--measure); }

/* 404 */
.lost { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; padding-block: clamp(32px, 8vw, 110px); }
.lost h1 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem); line-height: 1; }
.lost p { margin: 0 0 1em; max-width: 44ch; color: var(--ash-dim); font-size: 1.15rem; }
.lost img { width: clamp(180px, 26vw, 320px); }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .site-head { flex-wrap: wrap; padding-block: 16px; }
  .wordmark { font-size: 1.4rem; }
  .site-nav ul { gap: 18px; }
  .site-nav a { font-size: 0.95rem; }

  .keyart picture img { aspect-ratio: 900 / 698; }
  .keyart { display: flex; flex-direction: column; background: var(--dusk-raised); }
  .keyart .logo { position: static; order: -1; align-self: center; width: min(66vw, 280px); margin: 20px 0 12px; }
  .game-body { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; grid-template-areas: "big big" "a b"; gap: 10px; }
  .shots figcaption { font-size: 0.86rem; }
  .path ol { grid-template-columns: 1fr; }
  .path ol::before { left: 9px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto;
    background: linear-gradient(to bottom, var(--ember), var(--line) 45%); }
  .path li { padding: 0 0 22px 38px; }
  .path li:last-child { padding-bottom: 0; }
  .cta-row .btn { width: 100%; text-align: center; }

  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .facts th { width: 40%; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-aside { position: static; padding-top: 8px; }
  .doc-aside.toc-aside { display: none; }
  .support .doc-aside, .press-grid .doc-aside { order: -1; }
  .help-box { padding: 18px; }
  .help-box img { width: 52px; height: 52px; margin-bottom: 10px; }
  .lost { grid-template-columns: 1fr; }
  .lost img { order: -1; width: 180px; }
}

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