:root {
  --night: #0a0c1e;
  --night2: #120f2e;
  --violet: #2a1f5c;
  --panel: rgba(18, 16, 46, .72);
  --panel-solid: #15123a;
  --edge: rgba(244, 197, 90, .28);
  --edge-strong: rgba(244, 197, 90, .65);
  --gold: #f6c95c;
  --gold-deep: #c08a2e;
  --cream: #fff1cc;
  --text: #e4e2f3;
  --muted: #a9a6c8;
  --fire: #ff8a1f;
  --fire2: #ffb347;
  --moon: #b9c6ff;
  --live: #ff3b4e;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; background: var(--night); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.55 var(--sans);
  background:
    radial-gradient(ellipse 80% 600px at 85% 1400px, rgba(124, 92, 255, .14), transparent 70%),
    radial-gradient(ellipse 80% 600px at 10% 2600px, rgba(255, 138, 31, .08), transparent 70%),
    linear-gradient(180deg, var(--night) 0, var(--night2) 60%, var(--night) 100%);
  background-color: var(--night);
}
a { color: var(--gold); }
img { max-width: 100%; }
code {
  font: 600 .92em/1 ui-monospace, Consolas, monospace;
  color: var(--cream);
  background: rgba(246, 201, 92, .12);
  border: 1px solid rgba(246, 201, 92, .3);
  padding: .18em .42em;
  border-radius: 6px;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px;
  transition: background .3s, border-color .3s, padding .3s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(10, 12, 30, .85);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--edge);
  padding: 8px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px var(--serif); color: var(--cream); text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.brand img { border-radius: 50%; box-shadow: 0 0 14px rgba(255, 160, 40, .5); }
.topbar nav { display: flex; gap: 20px; margin-left: auto; }
.topbar nav a { position: relative; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.topbar nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--fire), var(--gold));
  transform: scaleX(0); transition: transform .25s;
}
.topbar nav a:hover { color: var(--cream); }
.topbar nav a:hover::after { transform: scaleX(1); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--edge); background: rgba(10, 12, 30, .6);
  color: var(--muted); font: 700 13px var(--sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #5d5a7a; }
.status-pill.is-live { color: #fff; background: var(--live); border-color: #ff8a95; animation: liveGlow 1.6s ease-in-out infinite; }
.status-pill.is-live .dot { background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@keyframes liveGlow { 50% { box-shadow: 0 0 0 6px rgba(255, 59, 78, .18), 0 0 22px rgba(255, 59, 78, .55); } }

/* ---------- hero (town render) ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(92vh, 860px);
  display: grid; place-items: center;
  text-align: center;
  padding: 110px 20px 90px;
  isolation: isolate;
}
.scene { position: absolute; z-index: -3; left: 50%; top: 50%; transform: translate(-50%, -50%); will-change: transform; }
.scene-img {
  position: absolute; inset: 0;
  background: url("img/town.webp") center / 100% 100% no-repeat;
  animation: kenburns 28s ease-in-out infinite alternate;
  transform-origin: 46% 40%;
}
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.torch {
  position: absolute; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 170, 60, .55) 0%, rgba(255, 120, 20, .2) 35%, transparent 70%);
  mix-blend-mode: screen; animation: flicker 2.3s infinite;
}
.torch:nth-child(3) { animation-duration: 1.9s; animation-delay: -.7s; width: 12%; }
.torch:nth-child(4) { animation-duration: 2.7s; animation-delay: -1.3s; }
@keyframes flicker {
  0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  20% { opacity: 1; transform: translate(-50%, -52%) scale(1.06); }
  40% { opacity: .6; }
  60% { opacity: .95; transform: translate(-50%, -49%) scale(.97); }
  80% { opacity: .7; }
}
.moonglow {
  position: absolute; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(200, 215, 255, .35), rgba(140, 150, 255, .12) 40%, transparent 70%);
  mix-blend-mode: screen; animation: moon 7s ease-in-out infinite;
}
@keyframes moon { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.12); } }
.fog {
  position: absolute; left: -20%; right: -20%; bottom: 18%; height: 30%;
  background:
    radial-gradient(ellipse 30% 50% at 20% 50%, rgba(180, 190, 255, .16), transparent 70%),
    radial-gradient(ellipse 35% 60% at 70% 60%, rgba(180, 190, 255, .12), transparent 70%);
  animation: fog 26s linear infinite alternate; filter: blur(6px);
}
@keyframes fog { to { transform: translateX(14%); } }
.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 60% 55% at 50% 52%, rgba(10, 12, 30, .55), transparent 75%),
    linear-gradient(180deg, rgba(10, 12, 30, .35) 0%, transparent 25%, transparent 60%, var(--night) 100%);
}
#embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero-content { position: relative; }
.hero-logo {
  width: 132px; height: 132px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(246, 201, 92, .55), 0 0 50px rgba(255, 150, 40, .65);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.gold-text {
  margin: 18px 0 0;
  font: 700 clamp(42px, 7.4vw, 84px)/1.04 var(--serif);
  text-transform: uppercase; letter-spacing: .02em;
  filter: drop-shadow(0 4px 0 #1a0f05) drop-shadow(0 0 22px rgba(255, 170, 50, .45));
}
.gold-text span {
  background: linear-gradient(100deg, #f7cf6a 0%, #fff6d6 18%, #f2b84a 34%, #c4892c 50%, #f7cf6a 66%, #fff6d6 82%, #f2b84a 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }
.tagline {
  margin: 8px 0 0; font: 700 clamp(15px, 2.3vw, 21px) var(--serif); color: var(--cream);
  letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
}
.now {
  display: inline-block; min-height: 1.5em; margin: 18px 0 0; padding: 6px 16px; border-radius: 18px;
  background: rgba(10, 12, 30, .55); border: 1px solid var(--edge); backdrop-filter: blur(4px);
}
.now:empty { visibility: hidden; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.scroll-cue {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(246, 201, 92, .6); border-radius: 14px;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--gold); animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  font: 700 15px var(--sans); text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  color: #2a1205; background: linear-gradient(180deg, #ffe08a, var(--fire2) 55%, var(--fire));
  box-shadow: 0 6px 22px rgba(255, 138, 31, .45);
}
.btn-gold:hover { box-shadow: 0 8px 30px rgba(255, 138, 31, .7); }
.btn-gold::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg); animation: sheen 4.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-ghost { color: var(--cream); border: 1px solid var(--edge-strong); background: rgba(10, 12, 30, .45); backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: var(--gold); box-shadow: 0 0 20px rgba(246, 201, 92, .3); }

.demo-note {
  max-width: 1060px; margin: 8px 16px 0; padding: 8px 14px;
  border: 1px dashed var(--edge-strong); border-radius: 10px;
  color: var(--muted); font-size: 14px; text-align: center; background: rgba(18, 16, 46, .5);
}
@media (min-width: 1093px) { .demo-note { margin: 8px auto 0; } }

/* ---------- sections ---------- */
.panel { max-width: 1100px; margin: 0 auto; padding: 64px 20px 12px; }
.panel h2 {
  display: flex; align-items: center; gap: 18px; justify-content: center;
  margin: 0 0 8px; font: 700 clamp(26px, 3.6vw, 36px) var(--serif); color: var(--gold); text-align: center;
  text-shadow: 0 0 24px rgba(246, 201, 92, .35);
}
.panel h2 .rule { position: relative; flex: 1; max-width: 220px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-deep), transparent); overflow: hidden; }
.panel h2 .rule::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 30%;
  background: linear-gradient(90deg, transparent, #fff3c4, transparent);
  animation: run 3.5s ease-in-out infinite;
}
@keyframes run { from { left: -30%; } to { left: 100%; } }
.panel h3 { font: 700 19px var(--serif); color: var(--cream); margin: 28px 0 12px; }
.sub { text-align: center; color: var(--muted); margin: 0 0 24px; }

/* sections with a render behind them */
.band { position: relative; margin-top: 56px; padding-bottom: 60px; isolation: isolate; overflow: hidden; }
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--band-img) center / cover no-repeat;
  filter: saturate(1.1);
  transform: scale(1.04);
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--night2) 0%, rgba(10, 12, 30, .58) 18%, rgba(10, 12, 30, .58) 82%, var(--night) 100%);
}
.band-bar { --band-img: url("img/bar.webp"); }
.band-inn { --band-img: url("img/inn.webp"); }
.band .panel { padding-top: 72px; }

/* cards */
.card {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .08), 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--edge-strong);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .1), 0 14px 34px rgba(0, 0, 0, .45), 0 0 26px rgba(255, 150, 40, .18);
}
.card h3:first-child { margin-top: 0; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- stage ---------- */
.stage { display: grid; grid-template-columns: 1fr 340px; gap: 14px; margin-top: 22px; }
.stage .player, .stage .chat { border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; background: #000; }
.stage .player { aspect-ratio: 16 / 9; box-shadow: 0 0 40px rgba(124, 92, 255, .25); }
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.stage .chat { height: 100%; min-height: 360px; }
.stage-off { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 28px; }
.offline-art {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--edge);
  background: url("img/town.webp") center / cover;
  display: grid; place-items: center; text-align: center; padding: 20px;
  box-shadow: 0 0 40px rgba(124, 92, 255, .22);
}
.offline-art::before { content: ""; position: absolute; inset: 0; background: rgba(10, 12, 30, .55); }
.offline-art > div { position: relative; }
.offline-art img { width: 110px; border-radius: 50%; box-shadow: 0 0 30px rgba(255, 150, 40, .6); }
.offline-art p { margin: 10px 0 0; font: 700 18px var(--serif); color: var(--cream); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 2px 8px #000; }
.offline-art.live { box-shadow: 0 0 0 2px var(--live), 0 0 40px rgba(255, 59, 78, .4); }
.stage-info .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.stage-info .title { font: 700 24px var(--serif); color: var(--cream); margin: 4px 0 10px; }
.stage-info .next { color: var(--text); margin: 0 0 20px; }
.stage-info .fine { margin-top: 14px; }

/* ---------- schedule ---------- */
.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.slot { text-align: center; padding: 22px 20px; }
.slot .day { font: 700 24px var(--serif); color: var(--gold); }
.slot .date { color: var(--muted); font-size: 14px; }
.slot .time { font-size: 19px; color: var(--cream); margin: 8px 0 2px; font-weight: 700; }
.slot .what { color: var(--muted); font-size: 14px; }
.slot.next { border-color: var(--gold); animation: nextGlow 2.8s ease-in-out infinite; }
@keyframes nextGlow { 50% { box-shadow: 0 0 0 1px var(--gold-deep), 0 0 34px rgba(255, 160, 40, .38); } }
.slot .badge { display: inline-block; margin-top: 10px; font: 800 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #2a1205; background: linear-gradient(180deg, #ffe08a, var(--fire2)); padding: 4px 10px; border-radius: 999px; }
.slot.canceled { opacity: .5; text-decoration: line-through; }

/* ---------- clips ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile {
  display: block; text-decoration: none; color: var(--text); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--edge); background: var(--panel); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-4px) scale(1.015); border-color: var(--edge-strong); box-shadow: 0 14px 30px rgba(0, 0, 0, .45), 0 0 24px rgba(124, 92, 255, .3); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: url("img/inn.webp") center / cover; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.tile:hover .thumb img { transform: scale(1.06); }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; background: rgba(10, 12, 30, .45); }
.thumb::after {
  content: "▶"; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center; border-radius: 50%; font-size: 18px; color: #2a1205;
  background: linear-gradient(180deg, #ffe08a, var(--fire2)); box-shadow: 0 0 24px rgba(255, 150, 40, .6);
  opacity: 0; transform: scale(.7); transition: opacity .2s, transform .2s;
}
.tile:hover .thumb::after { opacity: 1; transform: scale(1); }
.thumb .len { position: absolute; z-index: 1; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .75); color: #fff; font: 600 12px var(--sans); padding: 2px 6px; border-radius: 4px; }
.tile .meta { padding: 10px 12px 12px; }
.tile .t { font-weight: 700; color: var(--cream); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .s { color: var(--muted); font-size: 13px; margin-top: 4px; }
.empty { color: var(--muted); text-align: center; padding: 18px; border: 1px dashed var(--edge); border-radius: var(--radius); grid-column: 1 / -1; }

/* ---------- gold shop ---------- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 7px 0; border-bottom: 1px solid rgba(246, 201, 92, .14); }
ul.plain li:last-child { border-bottom: 0; }
.shop { width: 100%; border-collapse: collapse; }
.shop td { padding: 7px 4px; border-bottom: 1px solid rgba(246, 201, 92, .14); }
.shop tr { transition: background .15s; }
.shop tr:hover { background: rgba(255, 150, 40, .1); }
.shop td.cost { text-align: right; color: var(--gold); font-weight: 800; white-space: nowrap; }
.shop td.cost::before { content: "🪙 "; }
.shop td.desc { color: var(--muted); font-size: 14px; }
.fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ---------- servers ---------- */
.servers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.server { display: flex; align-items: center; gap: 14px; }
.server .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(180deg, rgba(124, 92, 255, .3), rgba(124, 92, 255, .1)); border: 1px solid var(--edge); }
.server .n { font: 700 18px var(--serif); color: var(--cream); }
.server .st { font-size: 14px; color: var(--muted); }
.server .st.up::before { content: "● "; color: #4cd964; }
.server .st.down::before { content: "● "; color: var(--live); }
.server .st.soon::before { content: "● "; color: #8f8ab8; }
.server .st.beta::before { content: "● "; color: var(--gold); }
.server.featured { grid-column: 1 / -1; align-items: flex-start; text-decoration: none; color: inherit; border-color: var(--edge-strong); background: linear-gradient(135deg, rgba(246, 201, 92, .10), rgba(124, 92, 255, .10)); }
.server.featured .ico { width: 64px; height: 64px; font-size: 32px; }
.server.featured .n { font-size: 22px; }
.server .badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font: 600 11px/1.6 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #c9b8ff; border: 1px solid rgba(160, 130, 255, .6); background: rgba(124, 92, 255, .15); }
.server .blurb { margin: 4px 0 6px; color: var(--cream); opacity: .85; font-size: 15px; }
.server .addr { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.server .addr code { color: var(--gold); background: rgba(0, 0, 0, .35); border: 1px solid var(--edge); border-radius: 8px; padding: 3px 9px; }
.server .more { margin-top: 10px; font-weight: 600; color: var(--gold); }
.server.featured:hover .more { text-decoration: underline; }

/* ---------- tavern ---------- */
.tavern-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin-top: 18px; }
.tavern-inner:has(#discordWidget:empty) { grid-template-columns: 1fr; text-align: center; }
.tavern .big { font: 400 clamp(19px, 2.4vw, 24px)/1.5 var(--serif); color: var(--cream); margin: 0 0 22px; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
#discordWidget iframe { width: 100%; height: 360px; border: 0; border-radius: var(--radius); }

/* ---------- footer ---------- */
.footer { padding: 30px 20px 40px; text-align: center; border-top: 1px solid var(--edge); color: var(--muted); font-size: 14px; }
.socials { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.socials a { text-decoration: none; color: var(--cream); border: 1px solid var(--edge); background: var(--panel); padding: 9px 16px; border-radius: 999px; font-weight: 600; transition: all .2s; }
.socials a:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 18px rgba(246, 201, 92, .3); transform: translateY(-2px); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .stage, .stage-off, .tavern-inner { grid-template-columns: 1fr; }
  .stage .chat { min-height: 420px; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar, .topbar.scrolled { padding: 10px 16px; gap: 10px; }
  .topbar nav { display: none; }
  .status-pill { margin-left: auto; }
  .hero { min-height: 86vh; padding: 96px 16px 80px; }
  .panel { padding: 52px 16px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
