@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  --ink: #080a0f;
  --panel: rgba(12, 14, 20, 0.94);
  --panel-light: rgba(24, 27, 36, 0.94);
  --bone: #e8dcc0;
  --muted: #aaa397;
  --gold: #d6ad5a;
  --gold-bright: #f3d98d;
  --purple: #7f4b9e;
  --blood: #8f2f33;
  --line: #4f412d;
  font-family: "Source Sans 3", system-ui, sans-serif;
  background: var(--ink);
  color: var(--bone);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--ink); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(4, 5, 8, 0.35), #080a0f 78%),
    url("assets/background_title.png") center top / cover no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 16%, transparent 0 12%, rgba(0, 0, 0, 0.66) 72%), linear-gradient(90deg, rgba(0,0,0,.5), transparent 30% 70%, rgba(0,0,0,.5));
  z-index: 0;
}

.embers {
  position: fixed;
  inset: 42% 0 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .62;
  contain: strict;
}
.embers::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 3px;
  height: 3px;
  background: transparent;
  box-shadow:
    5vw -39vh #8f2f33,
    10vw -8vh #e38745,
    17vw -31vh #9e4735,
    23vw -51vh #b95439,
    29vw -18vh #d06a3d,
    36vw -43vh #853443,
    42vw -27vh #c65d3b,
    49vw -55vh #9e4735,
    55vw -12vh #e38745,
    61vw -34vh #8f2f33,
    67vw -48vh #d06a3d,
    73vw -22vh #a44638,
    79vw -57vh #853443,
    84vw -9vh #e38745,
    89vw -38vh #9e4735,
    94vw -25vh #d06a3d,
    97vw -50vh #a44638,
    99vw -14vh #853443;
  backface-visibility: hidden;
  will-change: transform;
  animation: ember-rise 28s linear infinite;
}

.page-shell, footer, .noscript { position: relative; z-index: 1; }

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(38px, 7vw, 84px) 0 32px;
}

.hero { margin-bottom: 34px; text-align: center; }
.logo {
  display: block;
  width: min(640px, 92vw);
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 5px 0 #190b0a) drop-shadow(0 13px 24px #000);
}

.kicker {
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.story-panel {
  position: relative;
  max-width: 900px;
  margin: 0 auto 40px;
  padding: clamp(8px, 1.5vw, 13px) clamp(28px, 5vw, 54px);
  border: 8px solid transparent;
  border-image: url("assets/row.png") 14 74 fill / 8px 30px / 0 stretch;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.72));
}
.story-copy { text-align: center; }
h2 {
  margin: 0;
  color: var(--gold-bright);
  font-family: Cinzel, Georgia, serif;
  line-height: 1.1;
  text-shadow: 0 2px #331b17;
}
.feature-list {
  display: flex;
  justify-content: center;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .09em;
}
.feature-list li::before { content: "✦"; margin-right: 8px; color: var(--purple); }

.downloads {
  padding: clamp(18px, 4vw, 36px);
  border: 18px solid transparent;
  border-image: url("assets/panel.png") 20 fill / 18px / 0 stretch;
  filter: drop-shadow(0 22px 26px rgba(0,0,0,.78));
}
.section-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; text-align: center; }
.section-heading .kicker { margin: 0 0 7px; font-size: .65rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.rule:last-child { background: linear-gradient(90deg, var(--line), transparent); }

.download-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.download-badge {
  position: relative;
  display: flex;
  width: 244px;
  max-width: 100%;
  min-width: 0;
  min-height: 116px;
  align-items: center;
  gap: 10px;
  padding: 8px 7px;
  overflow: hidden;
  border: 10px solid transparent;
  border-image: url("assets/panel_inset.png") 10 fill / 10px / 0 stretch;
  color: var(--bone);
  filter: drop-shadow(0 8px 7px rgba(0,0,0,.65));
  text-decoration: none;
  transition: transform .18s ease, filter .18s ease;
}
.download-badge:hover, .download-badge:focus-visible {
  z-index: 2;
  filter: brightness(1.16) drop-shadow(0 10px 8px rgba(0,0,0,.62));
  transform: translateY(-3px);
}
.platform-icon-frame {
  position: relative;
  z-index: 1;
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  place-items: center;
  border: 8px solid transparent;
  border-image: url("assets/panel_inset.png") 10 fill / 8px / 0 stretch;
  filter: drop-shadow(0 2px 2px #000);
}
.platform-icon-frame img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 2px #000);
}
.download-badge[data-platform="windows"] .platform-icon-frame img {
  width: 50px;
  height: 50px;
}
.badge-copy { position: relative; z-index: 1; display: flex; min-width: 0; flex-direction: column; }
.badge-copy small { color: var(--muted); font-size: .7rem; line-height: 1; }
.badge-copy strong { margin: 3px 0 5px; color: #f0dfb2; font-family: Cinzel, Georgia, serif; font-size: clamp(.9rem, 1.4vw, 1.08rem); line-height: 1.05; text-shadow: 0 2px #1b0e0c; }
.badge-copy span { color: #89867f; font-size: .67rem; line-height: 1.15; }
.badge-sub { display: inline-flex; align-items: center; gap: 6px; }
.beta-tag {
  display: inline-block;
  padding: 1px 6px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1b0e0c;
  font-style: normal;
  font-weight: 700;
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 3px;
  text-shadow: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 0 8px rgba(214,173,90,.5);
}
.release-status { margin: 22px 0 0; color: var(--gold); text-align: center; font-size: .85rem; }
.release-status a { color: inherit; }
.install-note { max-width: 760px; margin: 8px auto 0; color: #77746f; text-align: center; font-size: .75rem; line-height: 1.45; }
footer { display: flex; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 34px; justify-content: space-between; gap: 20px; color: #6e6b66; font-size: .78rem; }
footer p { margin: 0; }
footer nav { display: flex; gap: 20px; }
footer a { color: #99948a; text-decoration-color: #4d493f; text-underline-offset: 4px; }
footer a:hover, footer a:focus-visible { color: var(--gold); }
.noscript { margin: 0; padding: 8px; color: #fff; background: var(--blood); text-align: center; }

@keyframes ember-rise {
  from { transform: translate3d(0, 24vh, 0); }
  to { transform: translate3d(0, -62vh, 0); }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 20px, 1120px); padding-top: 28px; }
  .hero { margin-bottom: 25px; }
  .story-panel { margin-bottom: 22px; }
  .story-copy { padding-inline: 22px; }
  .feature-list { flex-direction: column; gap: 6px; }
  .downloads { padding: 25px 16px; }
  .section-heading { grid-template-columns: 25px 1fr 25px; gap: 8px; }
  .download-badge { width: min(100%, 390px); }
  footer { flex-direction: column; align-items: center; text-align: center; }
  footer nav { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
