/* Dreadspire: Tower Wars — ember-and-ink theme. Fonts are self-hosted (SIL OFL, see assets/fonts). */
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0d0807;
  --ink-2: #160e0b;
  --panel: #1e140f;
  --panel-2: #2a1a12;
  --line: #5a3a22;
  --gold: #f3c66b;
  --gold-deep: #c8913a;
  --ember: #e8743b;
  --text: #ece0cc;
  --muted: #c2b098;
  --radius: 14px;
  --wrap: 1200px;
  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:
    radial-gradient(1200px 600px at 75% -10%, rgba(232, 116, 59, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(200, 145, 58, .08), transparent 60%),
    var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
@media (min-width: 1200px) { html { font-size: 112.5%; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe0a0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, .display {
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.15;
  margin: 0 0 .5em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 24px rgba(232, 116, 59, .18);
}
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--panel); padding: .5rem 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(13, 8, 7, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(90, 58, 34, .6);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--gold); }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.brand span { font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
@media (max-width: 720px) {
  .site-nav .opt { display: none; }
  .site-nav ul { gap: 1rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.35rem;
  border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 1rem;
  border: 1px solid transparent;
}
.btn-primary {
  color: #2a1406;
  background: linear-gradient(180deg, #ffd98a, var(--gold) 45%, var(--gold-deep));
  border-color: #ffe7b0;
  box-shadow: 0 6px 20px rgba(232, 116, 59, .28), inset 0 -2px 0 rgba(0, 0, 0, .18);
}
.btn-primary:hover { color: #2a1406; filter: brightness(1.06); }
.badge-soon {
  color: var(--muted); background: transparent; border: 1px dashed var(--line);
  font-weight: 500; cursor: default;
}
.btn-lg { min-height: 58px; padding: 1rem 1.9rem; font-size: 1.125rem; border-radius: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Hero: blurred full-bleed backdrop + native-resolution key art feathered in + legible text overlay. */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid rgba(90, 58, 34, .5); }
.hero-bg {
  position: absolute; inset: 0; z-index: -3;
  background: url("../img/art/hero-backdrop.jpg") center / cover;
  background-image: image-set(url("../img/art/hero-backdrop.avif") type("image/avif"), url("../img/art/hero-backdrop.webp") type("image/webp"), url("../img/art/hero-backdrop.jpg") type("image/jpeg"));
  opacity: .5;
}
.hero-art { position: absolute; z-index: -2; top: 0; left: 0; right: 0; }
.hero-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 35%;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 98%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 50% 110%, rgba(232, 116, 59, .28), transparent 70%),
    linear-gradient(180deg, rgba(13, 8, 7, .1) 0%, rgba(13, 8, 7, .35) 40%, rgba(13, 8, 7, .92) 72%, var(--ink) 100%);
}
.hero .wrap { padding: 92vw 0 3.5rem; }
.hero-copy { max-width: 42rem; text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.hero-icon {
  width: 72px; height: 72px; border-radius: 17px; margin-bottom: 1.25rem;
  border: 2px solid var(--gold-deep); box-shadow: 0 12px 30px rgba(0, 0, 0, .6), 0 0 40px rgba(232, 116, 59, .25);
}
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; color: #f08a52; font-weight: 700; margin-bottom: .9rem; }
.hero h1 { font-size: clamp(3rem, 1.4rem + 6.6vw, 7.75rem); margin-bottom: .2em; line-height: 1.02; }
.hero h1 small { display: block; font-size: .5em; color: #ecb85a; letter-spacing: .1em; margin-top: .15em; }
.lede { font-size: clamp(1.1rem, .95rem + .6vw, 1.45rem); color: #f3e8d6; max-width: 36em; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; text-shadow: none; }
.facts li { font-size: .85rem; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; background: rgba(22, 14, 11, .75); }

@media (min-width: 900px) {
  .hero { min-height: clamp(620px, 88vh, 940px); display: flex; align-items: center; }
  .hero .wrap { padding: 6rem 0; }
  .hero-art { left: auto; bottom: 0; width: min(56vw, 900px); }
  .hero-art img {
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 62% 45%, #000 40%, transparent 80%);
    mask-image: radial-gradient(ellipse 85% 75% at 62% 45%, #000 40%, transparent 80%);
  }
  .hero::after {
    background:
      radial-gradient(800px 500px at 70% 100%, rgba(232, 116, 59, .25), transparent 70%),
      linear-gradient(90deg, var(--ink) 0%, rgba(13, 8, 7, .9) 30%, rgba(13, 8, 7, .45) 55%, rgba(13, 8, 7, .1) 75%),
      linear-gradient(180deg, transparent 75%, var(--ink) 100%);
  }
  .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
  .eyebrow { font-size: .9rem; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 8rem) 0; }
.section-alt { background: linear-gradient(180deg, rgba(30, 20, 15, .0), rgba(30, 20, 15, .75) 18%, rgba(30, 20, 15, .75) 82%, rgba(30, 20, 15, 0)); }
.section-head { max-width: 46rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: 1.15rem; }

.cards { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; position: relative;
  box-shadow: inset 0 1px 0 rgba(243, 198, 107, .12);
}
.card .step { font-family: "Cinzel", serif; color: var(--ember); font-size: 1.1rem; letter-spacing: .12em; }
.card p { color: var(--muted); margin: 0; }
.sprites { display: flex; gap: .25rem; margin: -.25rem 0 1rem; min-height: 96px; align-items: flex-end; }
.sprites img { width: 88px; height: 88px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }

/* Screenshots carousel: native scroll-snap, buttons are progressive enhancement. */
.shots { position: relative; }
.shots-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(72vw, 270px); gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem .25rem 1.5rem;
  scrollbar-color: var(--gold-deep) transparent; list-style: none; margin: 0;
}
@media (min-width: 1200px) { .shots-track { grid-auto-columns: 300px; } }
.shots-track li { scroll-snap-align: center; }
.shots-track figure { margin: 0; }
.shots-track img {
  width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover;
  border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  background: var(--panel);
}
.shots-track figcaption { font-size: .9rem; color: var(--muted); margin-top: .6rem; text-align: center; }
.shots-nav { display: none; gap: .5rem; justify-content: flex-end; margin-bottom: .75rem; }
.js .shots-nav { display: flex; }
.shots-nav button {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--panel-2); color: var(--gold); border: 1px solid var(--line); font-size: 1.2rem;
}
.shots-nav button:hover { border-color: var(--gold-deep); }

/* Features */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.feature { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: inset 0 1px 0 rgba(243, 198, 107, .12); }
.feature h3 { margin-bottom: .35em; }
.feature p { color: var(--muted); margin: 0; font-size: 1rem; }
.feature .num { font-family: "Cinzel", serif; font-size: 2.6rem; color: var(--ember); line-height: 1; display: block; margin-bottom: .4rem; }


/* CTA band */
.cta { text-align: center; }
.cta .panel {
  border: 1px solid var(--gold-deep); border-radius: calc(var(--radius) + 4px);
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
  background: radial-gradient(600px 220px at 50% 0%, rgba(232, 116, 59, .22), transparent 70%), var(--panel);
}
.cta .btn-row { justify-content: center; }
.cta p { color: var(--muted); max-width: 36rem; margin-inline: auto; }

/* Prose pages */
.page { padding: clamp(2rem, 6vw, 4rem) 0 4rem; }
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
.prose h2 { font-size: 1.45rem; margin-top: 2rem; }
.prose .meta { color: var(--muted); font-size: .95rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.callout { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; color: var(--text); list-style-position: inside; }
.faq details[open] summary { color: var(--gold); }
.faq details > div { padding: 0 1.25rem 1rem; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

.notfound { text-align: center; padding: 5rem 0; }
.notfound img { width: 120px; margin: 0 auto 1.5rem; }
.notfound .btn-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid rgba(90, 58, 34, .6); padding: 2rem 0 2.5rem; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }
