:root {
  --hue: #b4233f;
  --ink: #f4efe6;
  --dim: #aaa4b6;
  --night: #0c0a14;
  --panel: #161322;
  --panel2: #1d1930;
  --line: #2f2944;
  --gold: #e3bd6e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--night); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.bar {
  position: fixed; inset: 0 0 auto; z-index: 6; display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); background: rgb(12 10 20 / .82); backdrop-filter: blur(10px);
}
.mark { font: 500 19px var(--serif); text-decoration: none; margin: 0; }
.mark span { color: var(--gold); }
/* The logo image (img/logo.webp) in the header, the banner and the footer. */
.logo { display: block; width: auto; height: auto; }
.bar .mark .logo { height: 40px; }
.hero-logo { margin: 0 auto 6px; line-height: 0; }
.hero-logo .logo { width: min(620px, 86vw); margin: 0 auto; filter: drop-shadow(0 4px 18px rgb(0 0 0 / .55)); }
.foot-logo .logo { height: 54px; margin: 0 auto; }
@media (max-width: 520px) { .bar .mark .logo { height: 32px; } }
.bar nav { display: flex; gap: clamp(14px, 3vw, 30px); }
.bar nav a { color: var(--dim); text-decoration: none; font-size: 15px; }
.bar nav a:hover { color: var(--ink); }
.bar nav a.nav-topup { color: var(--gold); }

.rail {
  position: fixed; z-index: 5; right: 18px; top: 50%; transform: translateY(-50%); display: none; flex-direction: column;
  background: rgb(22 19 34 / .86); border: 1px solid var(--line); border-radius: 12px; padding: 6px; backdrop-filter: blur(8px);
}
.rail a { padding: 7px 14px; font-size: 14px; color: var(--dim); text-decoration: none; border-radius: 8px; }
.rail a:hover { color: var(--ink); background: var(--panel2); }

/* The Angels stand in front of the demon castle (img/banner/castle.webp), under a light wash so they stay the focus. */
.banner {
  position: relative; height: min(100svh, 860px); min-height: 560px; overflow: hidden; isolation: isolate;
  --castle: url(img/banner/castle.webp);
  background:
    linear-gradient(rgb(12 10 20 / .28), rgb(12 10 20 / .28)),
    var(--castle) center 40% / cover no-repeat,
    var(--night);
}
@media (max-width: 760px) { .banner { --castle: url(img/banner/castle-small.webp); } }
#banner-stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity .8s; }
.banner-ready #banner-stage { opacity: 1; }
.banner::after { content: ""; position: absolute; inset: auto 0 0; height: 56%; background: linear-gradient(transparent, rgb(12 10 20 / .78) 42%, var(--night) 94%); pointer-events: none; }
.banner-copy { position: absolute; z-index: 2; inset: auto 0 clamp(20px, 5vh, 46px); text-align: center; padding: 0 16px; }
.kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 8px rgb(0 0 0 / .9); }
h1 { font-size: clamp(42px, 6vw, 78px); text-shadow: 0 2px 24px rgb(0 0 0 / .7); }
h1 em { color: var(--gold); }
.lede { margin: 10px auto 20px; max-width: 34em; color: #d6d0df; text-shadow: 0 1px 10px rgb(0 0 0 / .8); }
.actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px; text-decoration: none;
  border: 1px solid rgb(255 255 255 / .28); background: rgb(12 10 20 / .5); backdrop-filter: blur(6px); font-size: 16px;
}
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #241a06; font-weight: 600; }

/* Download section between the banner and the news: "Download" with a down arrow. It slides open a hidden part
   of the page (no box) with the downloads, and slides it shut again. Heights stay whole pixels, so what follows
   (the News heading's thin lines) never lands between screen pixels. */
.download { position: relative; z-index: 2; text-align: center; padding: 10px var(--gutter) 0; }
.dl-head {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 20px; cursor: pointer;
  background: none; border: 0; color: var(--ink); font: 500 26px/32px var(--serif); letter-spacing: .04em;
}
.dl-head:hover .dl-title, .dl-head:focus-visible .dl-title { color: var(--gold); }
.dl-arrow { color: var(--gold); transition: transform .25s; animation: dl-nudge 1.8s ease-in-out infinite; }
.dl-head[aria-expanded="true"] .dl-arrow { transform: rotate(180deg); animation: none; }
@keyframes dl-nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
.dl-reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.dl-reveal.open { grid-template-rows: 1fr; }
.dl-inner { min-height: 0; overflow: hidden; }
.dl-content {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 8px;
  opacity: 0; transform: translateY(-8px); transition: opacity .35s ease, transform .35s ease;
}
.dl-reveal.open .dl-content { opacity: 1; transform: none; }
.dl-option {
  display: inline-flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 12px; text-align: left;
  color: var(--ink); text-decoration: none; transition: background .2s;
}
.dl-option:hover, .dl-option:focus-visible { background: rgb(255 255 255 / .05); }
.dl-option b { display: block; font-weight: 600; font-size: 17px; }
.dl-option small { display: block; color: var(--dim); font-size: 14px; line-height: 1.35; }
.dl-option:hover b { color: var(--gold); }
.dl-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--gold); color: #241a06; }
img.dl-icon { background: none; }
.dl-windows { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.dl-windows[hidden] { display: none; }  /* the flex above would otherwise override "hidden" */
.dl-windows h4 { margin: 0 0 2px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .dl-arrow { animation: none; } .dl-reveal, .dl-content, .dl-arrow { transition: none; } }

.news, .media { max-width: 1120px; margin: 0 auto; padding: clamp(44px, 7vw, 84px) var(--gutter) 0; }
.title { display: flex; align-items: center; gap: 18px; justify-content: center; font-size: clamp(30px, 4vw, 44px); margin-bottom: 28px; }
.title::before, .title::after {
  /* a border, not a 1px-high box: borders snap to whole screen pixels, so the lines never vanish at 125% scaling */
  content: ""; height: 0; width: min(16vw, 150px); border-top: 1px solid; border-image: linear-gradient(90deg, transparent, var(--gold)) 1;
}
.title::after { transform: scaleX(-1); }

.news-grid { --news-height: 340px; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: 14px; }
.slides { position: relative; height: var(--news-height); border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s; display: grid; place-items: center; overflow: hidden; }
.slide::before { content: ""; position: absolute; inset: -24px; background: var(--art) center / cover; filter: blur(18px) brightness(.5); }
.slide.on { opacity: 1; }
.slide picture { position: relative; display: block; width: 100%; }
.slide img { display: block; width: 100%; height: auto; }
.dots { position: absolute; left: 20px; bottom: 14px; display: flex; gap: 2px; z-index: 2; }
.dots button { width: 26px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 20px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .3); }
.dots button[aria-current="true"]::before { background: var(--gold); }

.news-box { display: flex; flex-direction: column; height: var(--news-height); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 18px 12px; min-width: 0; }
.tabs { flex: none; display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tabs button { font: inherit; font-size: 15px; background: none; border: 0; color: var(--dim); padding: 10px 14px; min-height: 44px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--gold); }
#news-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
#news-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid rgb(47 41 68 / .6); font-size: 15px; }
#news-list li:last-child { border-bottom: 0; }
#news-list time { color: var(--dim); font-size: 14px; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 6px; background: rgb(227 189 110 / .15); color: var(--gold); }
.tag.fix { background: rgb(120 170 255 / .14); color: #a9c8ff; }

.flow { position: relative; height: clamp(250px, 40vw, 440px); perspective: 1400px; outline-offset: 6px; touch-action: pan-y; overflow: hidden; }
.flow-track { position: absolute; inset: 0; transform-style: preserve-3d; }
.flow-item {
  position: absolute; top: 0; bottom: 0; left: 50%; width: min(74%, 760px); margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translateX(-50%); transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .55s, filter .55s;
}
.flow-item picture, .flow-item img { display: block; width: 100%; height: 100%; }
.flow-item img { object-fit: contain; border-radius: 12px; }
.flow-item.center { cursor: default; }
.flow-arrow {
  position: absolute; z-index: 20; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgb(255 255 255 / .28); background: rgb(12 10 20 / .66); backdrop-filter: blur(6px);
}
.flow-arrow:hover { border-color: var(--gold); }
.flow-arrow::before { content: ""; position: absolute; inset: 0; margin: auto; width: 11px; height: 11px; border: solid var(--ink); border-width: 2px 2px 0 0; }
.flow-arrow.prev { left: 4px; }
.flow-arrow.prev::before { transform: translateX(2px) rotate(-135deg); }
.flow-arrow.next { right: 4px; }
.flow-arrow.next::before { transform: translateX(-2px) rotate(45deg); }
.flow-dots { display: flex; justify-content: center; gap: 2px; margin-top: 12px; }
.flow-dots button { width: 30px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.flow-dots button::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .24); }
.flow-dots button[aria-current="true"]::before { background: var(--gold); }


footer { margin-top: clamp(48px, 7vw, 84px); padding: 28px 16px 36px; text-align: center; border-top: 1px solid var(--line); }
footer p:last-child { max-width: 44em; margin: 8px auto 0; color: var(--dim); font-size: 14px; }
.foot-company { margin: 2px 0 0; color: var(--dim); font-size: 14px; letter-spacing: .02em; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot-links a { color: var(--dim); text-decoration: none; }
.foot-links a:hover, .foot-links a:focus-visible, .foot-links a[aria-current="page"] { color: var(--gold); }

@media (min-width: 1320px) { .rail { display: flex; } }
@media (max-width: 760px) {
  .banner { height: 78svh; min-height: 500px; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .flow { height: min(118vw, 520px); }
  .flow-item { width: 72%; }
  .slides { height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Phone layout: no buttons under the banner logo (the header links and the Download section cover them). */
@media (max-width: 760px) { .banner-copy .actions { display: none; } }

/* News from the gateway (AngelPanel's News page): tags, links in the list, highlight captions, the article page */
.tag.event { background: rgb(180 35 63 / .2); color: #f0a3b4; }
.tag.notice { background: rgb(170 164 182 / .16); color: var(--ink); }
#news-list a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#news-list a:hover, #news-list a:focus-visible { color: var(--gold); text-decoration: underline; }
#news-list .news-wait { display: block; color: var(--dim); border-bottom: 0; }
a.slide { text-decoration: none; }
.slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 30px; font: 500 20px/1.25 var(--serif);
  background: linear-gradient(transparent, rgb(12 10 20 / .85)); text-shadow: 0 1px 3px rgb(0 0 0 / .6);
}
.article { max-width: 780px; margin: 0 auto; padding: 110px var(--gutter) 0; }
.article .back { display: inline-block; color: var(--dim); font-size: 15px; text-decoration: none; margin-bottom: 22px; }
.article .back::before { content: "← "; }
.article .back:hover { color: var(--gold); }
.article-wait, .article-missing p { color: var(--dim); }
.article-missing h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 12px; }
.article-meta { display: flex; gap: 12px; align-items: baseline; margin: 0 0 12px; color: var(--dim); font-size: 15px; }
.article-head h1 { font-size: clamp(32px, 5vw, 50px); }
.article-summary { color: var(--dim); font-size: 19px; margin: 14px 0 0; }
.article-picture { margin: 26px 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.article-picture img { display: block; width: 100%; height: auto; }
.article-body { margin-top: 28px; overflow-wrap: anywhere; }
.article-body h2, .article-body h3, .article-body h4 { margin: 32px 0 10px; }
.article-body h2 { font-size: 30px; } .article-body h3 { font-size: 24px; } .article-body h4 { font-size: 20px; }
.article-body p, .article-body blockquote { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; }
.article-body ul { list-style: disc; } .article-body ol { list-style: decimal; }
.article-body li { margin: 4px 0; }
.article-body a { color: var(--gold); }
.article-body img { max-width: 100%; border-radius: 10px; }
.article-body blockquote { border-left: 3px solid var(--gold); padding: 2px 0 2px 16px; color: var(--dim); }
.article-body code { font: .9em ui-monospace, Consolas, monospace; background: var(--panel2); padding: 1px 6px; border-radius: 5px; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
