/* BattleTown website: one stylesheet for every page. */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/lilita-one-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #07070a;
  --bg-raised: #111117;
  --bg-card: #15151c;
  --line: #2a2a35;
  --gold: #f5b82e;
  --gold-bright: #ffd45c;
  --gold-pale: #fff0b8;
  --gold-deep: #b9781a;
  --gold-dark: #6b3f0a;
  --ruby: #e0313a;
  --text: #f4efe4;
  --muted: #a9a396;
  --radius: 12px;
  --max: 1180px;
  --display: "Lilita One", "Arial Black", Impact, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: 220ms ease both vt-out; }
::view-transition-new(root) { animation: 380ms var(--ease-out) both vt-in; }

@keyframes vt-out { to { opacity: 0; transform: scale(0.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #1a1206; }

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--gold);
  color: #1a1206;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus { top: 12px; color: #1a1206; }

a { color: var(--gold-bright); }
a:hover { color: #fff; }

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

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; color: var(--gold-pale); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 0.45em;
}

h3 { font-size: 1.35rem; }

/* Gold block lettering: a gradient face with a stepped brown extrusion,
   echoing the crowned BT logo. */
.gold-text, h1, h2 {
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--gold-bright) 35%, var(--gold) 60%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 var(--gold-dark)) drop-shadow(0 3px 0 #3b2205) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
h2 { font-size: clamp(2rem, 5.5vw, 3.4rem); }

.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.eyebrow::before { content: "◆ "; color: var(--ruby); }

.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 40em; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Scroll progress and header ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 30;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--ruby));
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

/* The blur sits on a layer behind the header, so the phone menu's fixed
   overlay is not trapped inside the header box. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 7, 10, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background 0.3s;
}

.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header.is-scrolled::before { background: rgba(7, 7, 10, 0.88); }

.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--gold);
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img { width: 38px; height: 38px; mix-blend-mode: lighten; transition: transform 0.4s var(--ease-out); }
.brand:hover img { transform: rotate(-8deg) scale(1.12); }
.brand:hover { color: var(--gold-bright); }

.nav { display: flex; gap: 2px; margin-left: auto; }

.nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 11px;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}

.nav a:hover { color: var(--gold-bright); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--gold); }

.nav .nav-play {
  margin-left: 8px;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--gold-dark);
}

.nav .nav-play::after { display: none; }
.nav .nav-play:hover, .nav .nav-play[aria-current] { color: #1a1206; filter: brightness(1.08); }

.menu-btn { display: none; }

/* Phones: a menu button opens the nav as a full-screen overlay. */
@media (max-width: 820px) {
  .menu-btn {
    display: grid;
    gap: 5px;
    margin-left: auto;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid rgba(245, 184, 46, 0.5);
    border-radius: 10px;
    background: rgba(10, 10, 14, 0.6);
    cursor: pointer;
    position: relative;
    z-index: 2;
  }

  .menu-btn span { display: block; width: 20px; height: 2px; background: var(--gold); border-radius: 2px; transition: transform 0.3s var(--ease-out), opacity 0.2s; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(60, 40, 10, 0.97), rgba(7, 7, 10, 0.98) 70%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .nav.is-open { opacity: 1; visibility: visible; }

  .nav a { font-family: var(--display); font-size: 2.1rem; font-weight: 400; letter-spacing: 0.02em; padding: 6px 16px; transform: translateY(18px); opacity: 0; transition: transform 0.5s var(--ease-out), opacity 0.4s; }
  .nav.is-open a { transform: none; opacity: 1; }
  .nav.is-open a:nth-child(2) { transition-delay: 0.04s; }
  .nav.is-open a:nth-child(3) { transition-delay: 0.08s; }
  .nav.is-open a:nth-child(4) { transition-delay: 0.12s; }
  .nav.is-open a:nth-child(5) { transition-delay: 0.16s; }
  .nav.is-open a:nth-child(6) { transition-delay: 0.2s; }
  .nav.is-open a:nth-child(7) { transition-delay: 0.24s; }
  .nav a::after { left: 16px; right: 16px; bottom: 2px; }
  .nav .nav-play { margin: 18px 0 0; font-size: 1.5rem; padding: 12px 28px 10px; }

  body.menu-open { overflow: hidden; }
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px 13px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--gold-bright) 30%, var(--gold) 70%, var(--gold-deep) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 5px 0 var(--gold-dark), 0 12px 24px rgba(245, 184, 46, 0.22);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease-out);
}

.btn:hover { color: #1a1206; filter: brightness(1.06); }
.btn:hover::before { transform: translateX(120%); }
.btn:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 1px 0 var(--gold-dark); }

.btn-ghost {
  color: var(--gold-bright);
  background: rgba(245, 184, 46, 0.06);
  box-shadow: inset 0 0 0 2px var(--gold), 0 5px 0 rgba(107, 63, 10, 0.7);
}

.btn-ghost:hover { color: #fff; background: rgba(245, 184, 46, 0.16); }

.btn-discord {
  color: #fff;
  background: linear-gradient(180deg, #7983ff, #5865f2 60%, #4450d8);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 5px 0 #2c348f, 0 12px 24px rgba(88, 101, 242, 0.3);
}

.btn-discord:hover { color: #fff; }

.btn-small { font-size: 0.9rem; padding: 9px 14px 8px; box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 rgba(107, 63, 10, 0.7); }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px 0 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -3; }

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.8s ease, transform 9s linear;
}

.hero-bg img.is-on { opacity: 0.6; transform: scale(1.0); }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 46% 42% at 50% 36%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%),
    linear-gradient(180deg, rgba(7, 7, 10, 0.4) 0%, rgba(7, 7, 10, 0.1) 40%, var(--bg) 100%);
}

.embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero-logo-wrap { position: relative; width: min(380px, 70vw, 36svh); margin: 0 auto; }

.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 46, 0.42) 0%, rgba(245, 184, 46, 0.1) 45%, transparent 70%);
  filter: blur(20px);
  animation: glow 4s ease-in-out infinite;
}

/* The logo art has a black background. Lighten lets the dark hero show
   through without changing a single pixel of the letters. */
.hero-logo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: lighten;
  animation: logo-in 1.2s var(--ease-out) both, float 6s ease-in-out 1.2s infinite;
}

@keyframes logo-in { from { opacity: 0; transform: scale(0.6) translateY(30px); } }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes glow { 50% { opacity: 0.55; transform: scale(1.1); } }

.hero h1 { margin: 0 0 0.1em; font-size: clamp(3rem, min(11vw, 10svh), 6.5rem); animation: rise 0.9s var(--ease-out) 0.3s both; }
.hero .lead { margin: 0 auto 26px; animation: rise 0.9s var(--ease-out) 0.45s both; }
.hero .ip-box { animation: rise 0.9s var(--ease-out) 0.6s both; }
.hero .live-row { animation: rise 0.9s var(--ease-out) 0.75s both; }
.hero .btn-row { animation: rise 0.9s var(--ease-out) 0.9s both; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.scroll-cue {
  position: absolute;
  bottom: 18px;
  left: 50%;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(245, 184, 46, 0.6);
  border-radius: 14px;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue { 60% { transform: translateY(14px); opacity: 0; } 61% { transform: none; opacity: 0; } }

/* ---------- Server address ---------- */

.ip-box {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border-radius: 12px;
  background: rgba(10, 10, 14, 0.85);
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 6px rgba(245, 184, 46, 0.08), 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ip-box code {
  font: 800 clamp(1.05rem, 4.5vw, 1.55rem)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--gold-bright);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.copy-btn {
  border: 0;
  margin: 6px;
  border-radius: 8px;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 70%, var(--gold-deep));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 var(--gold-dark);
  padding: 0 20px;
  cursor: pointer;
  min-width: 100px;
  transition: transform 0.1s, filter 0.2s;
}

.copy-btn:hover { filter: brightness(1.08); }
.copy-btn:active { transform: translateY(2px); }
.copy-btn.copied { background: linear-gradient(180deg, #7ddc7f, #3fae46); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 3px 0 #1f6324; color: #06200a; }

@media (max-width: 420px) {
  .ip-box { display: flex; }
  .ip-box code { flex: 1; min-width: 0; font-size: 0.95rem; padding: 14px 10px; justify-content: center; }
  .copy-btn { min-width: 0; padding: 0 14px; font-size: 0.95rem; }
}

/* ---------- Live row: status and countdown ---------- */

.live-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 24px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 21, 28, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-weight: 800;
  font-size: 0.92rem;
}

.pill strong { color: var(--gold); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: #666; }
.dot.is-online { background: #3ddc62; box-shadow: 0 0 0 0 rgba(61, 220, 98, 0.7); animation: ping 1.8s infinite; }
.dot.is-offline { background: var(--ruby); }

@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 98, 0); } }

.countdown { display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
.countdown span { color: var(--gold-bright); }

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid rgba(245, 184, 46, 0.35);
  background: linear-gradient(90deg, #1a1206, #2a1b06 50%, #1a1206);
  padding: 14px 0;
  transform: rotate(-1.2deg);
  margin: 0 -20px;
}

.ticker-track { display: flex; width: max-content; animation: ticker 40s linear infinite; }

.ticker span {
  font-family: var(--display);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 22px;
  white-space: nowrap;
}

.ticker span:nth-child(even) { color: var(--ruby); }

@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections and cards ---------- */

main { display: block; }

[id] { scroll-margin-top: 110px; }

.section { position: relative; padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-head { margin-bottom: 36px; }
.section-head.center { text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

.page-head {
  position: relative;
  padding: 72px 0 24px;
  overflow: hidden;
  isolation: isolate;
}

.page-head .lead { margin-top: 0; }

.page-head-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 30, 40, 0.9), rgba(18, 18, 24, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.card p { margin: 0.4em 0 0; color: var(--muted); }
.card h3 { color: var(--gold); }

a.card { display: block; text-decoration: none; color: var(--text); }
a.card:hover, .card.tilt:hover { border-color: rgba(245, 184, 46, 0.7); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 184, 46, 0.25), 0 0 40px rgba(245, 184, 46, 0.12); }

/* Pointer tilt (assets/js/site.js sets --rx, --ry, --mx, --my). */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s var(--ease-out), border-color 0.3s, box-shadow 0.3s; }

.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 220, 130, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tilt:hover::after { opacity: 1; }

/* ---------- Scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--delay, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Home: class carousel ---------- */

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 290px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 16px 24px;
  margin: 0 -16px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}

.class-tile {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: #000;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.class-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out), filter 0.4s; filter: saturate(0.9) brightness(0.8); }

.class-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.92) 100%);
}

.class-tile:hover img { transform: scale(1.08); filter: saturate(1.15) brightness(1); }
.class-tile:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent); }

.class-tile .tile-text { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; }
.class-tile .tile-name { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; text-transform: uppercase; color: var(--accent); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6); }
.class-tile .tile-hall { display: block; font-weight: 800; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.class-tile .tile-motto { display: block; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Home: modes ---------- */

.mode-tile { text-align: left; overflow: hidden; }
.mode-tile .icon { width: 56px; height: 56px; color: var(--gold); margin-bottom: 14px; filter: drop-shadow(0 0 12px rgba(245, 184, 46, 0.4)); }
.mode-tile .big { font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--text); margin: 0 0 4px; }
.mode-tile ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--muted); }
.mode-tile li::marker { color: var(--gold); }

/* ---------- Split feature ---------- */

.split { display: grid; gap: 40px; grid-template-columns: 1.05fr 1fr; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.art-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(245, 184, 46, 0.4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(245, 184, 46, 0.12);
  background: #000;
}

.art-frame img { display: block; width: 100%; transition: transform 1.2s var(--ease-out); }
.art-frame:hover img { transform: scale(1.04); }

/* ---------- Home: Hub places, features, FAQ ---------- */

.places { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.place h3 { font-size: 1.5rem; }
.place h3::before { content: "◆ "; color: var(--ruby); font-size: 0.8em; }

.features { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.feature .big { font-family: var(--display); font-size: 2.6rem; line-height: 1; margin: 0 0 6px; background: linear-gradient(180deg, var(--gold-pale), var(--gold) 60%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.faq-wrap { max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(30, 30, 40, 0.9), rgba(18, 18, 24, 0.95)); margin-bottom: 10px; transition: border-color 0.3s; }
.faq details[open] { border-color: rgba(245, 184, 46, 0.6); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--gold); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; position: relative; }

.steps li {
  counter-increment: step;
  position: relative;
  background: linear-gradient(90deg, rgba(30, 30, 40, 0.9), rgba(18, 18, 24, 0.6));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 16px 70px;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

.steps li:hover { border-color: rgba(245, 184, 46, 0.6); transform: translateX(6px); }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  margin-top: -19px;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-family: var(--display);
  font-size: 1.3rem;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 70%, var(--gold-deep));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 var(--gold-dark);
  color: #1a1206;
  display: grid;
  place-items: center;
}

.steps strong { color: var(--gold-bright); }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  text-align: center;
  padding: 100px 0;
  overflow: hidden;
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/assets/img/art/footer.webp") center / cover no-repeat;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, #000 30%, transparent 75%);
}

.cta-band .lead { margin: 0 auto 26px; }

/* ---------- Classes page: showcase ---------- */

.showcase { --accent: var(--gold); position: relative; }

.stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: min(calc((min(100vw, 1180px) - 32px) * 0.5625), calc(100svh - 150px));
  min-height: 560px;
  background: #000;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 80px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: border-color 0.6s, box-shadow 0.6s;
}



.class-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0.6s; }
.class-slide.is-active { opacity: 1; visibility: visible; }

.class-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s linear; }
.class-slide.is-active img { transform: scale(1); }

.class-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.5) 45%, transparent 75%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, transparent 40%);
}



.slide-text { position: absolute; z-index: 1; left: clamp(18px, 5vw, 56px); bottom: clamp(18px, 4vw, 44px); right: 18px; max-width: 600px; }

.slide-hall { font-weight: 800; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0; }

.slide-name {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.55), 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent);
  margin: 4px 0 8px;
  background: none;
  filter: none;
}

.slide-motto { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.6rem); text-transform: uppercase; margin: 0 0 6px; }
.slide-line { color: #ddd6c6; margin: 0 0 14px; font-size: 1.05rem; }

.abilities { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.abilities li { background: rgba(0, 0, 0, 0.55); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 12px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.abilities strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.1rem; text-transform: uppercase; color: var(--accent); }
.abilities span { display: block; font-size: 0.9rem; color: #e8e2d4; line-height: 1.35; }
.chips li strong { color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-weight: 800; font-size: 0.82rem; padding: 5px 11px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }

.class-slide.is-active .slide-text > * { animation: rise 0.7s var(--ease-out) both; }
.class-slide.is-active .slide-text > :nth-child(2) { animation-delay: 0.06s; }
.class-slide.is-active .slide-text > :nth-child(3) { animation-delay: 0.12s; }
.class-slide.is-active .slide-text > :nth-child(4) { animation-delay: 0.18s; }
.class-slide.is-active .slide-text > :nth-child(5) { animation-delay: 0.24s; }

.stage-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.2s;
}

.stage-arrow:hover { background: var(--accent); color: #000; transform: scale(1.08); }
.stage-arrow.prev { left: 14px; }
.stage-arrow.next { right: 14px; }


.pickers { display: grid; gap: 18px; margin-top: 22px; }
.picker-hall { margin: 0 0 8px; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.picker-hall strong { color: var(--gold); margin-right: 8px; }

.picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

@media (max-width: 900px) { .picker { grid-template-columns: repeat(4, 1fr); } }

.picker a {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #000;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}

.picker a img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.6) brightness(0.55); transition: filter 0.3s; }
.picker a span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  text-align: center;
  font-family: var(--display);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 4px #000;
}

.picker a:hover { transform: translateY(-3px); }
.picker a:hover img { filter: none; }
.picker a[aria-current="true"] { border-color: var(--pick); transform: translateY(-3px); box-shadow: 0 0 24px color-mix(in srgb, var(--pick) 50%, transparent); }
.picker a[aria-current="true"] img { filter: none; }

/* Phones: the image on top, the card below it. */
@media (max-width: 700px) {
  .stage { height: auto; min-height: 0; }
  .class-slide { position: relative; display: none; }
  .class-slide.is-active { display: block; }
  .class-slide img { position: relative; display: block; aspect-ratio: 16 / 10; height: auto; }
  .class-slide::after { inset: 0 0 auto 0; height: calc((100vw - 32px) * 0.625); background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 50%); }
  .slide-text { position: relative; left: 0; right: 0; bottom: 0; padding: 0 18px 20px; margin-top: -60px; max-width: none; }
  .abilities { grid-template-columns: 1fr; }
  .stage-arrow { top: calc((100vw - 32px) * 0.3); }
  .picker a span { font-size: 0.68rem; }
}
/* Without JavaScript the slides simply stack. */
html:not(.js) .stage { height: auto; aspect-ratio: auto; display: grid; gap: 12px; border: 0; box-shadow: none; background: none; }
html:not(.js) .class-slide { position: relative; opacity: 1; visibility: visible; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
html:not(.js) .stage-arrow { display: none; }

/* ---------- Maps ---------- */

.map-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }

.map-list li {
  font-family: var(--display);
  font-size: 1.3rem;
  text-transform: uppercase;
  padding: 12px 20px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(30, 30, 40, 0.95), rgba(18, 18, 24, 0.95));
  border: 1px solid var(--line);
  box-shadow: 0 4px 0 #000;
  transition: transform 0.25s var(--ease-out), border-color 0.25s, color 0.25s;
}

.map-list li:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--gold); color: var(--gold-bright); }

.sizes { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 26px; }

.size { text-align: center; }

.size-block {
  width: calc(var(--s) * 1px);
  height: calc(var(--s) * 1px);
  margin: 0 auto 12px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 50%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 6px 0 var(--gold-dark), 0 18px 30px rgba(0, 0, 0, 0.5);
}

.js .size-block { transform: scale(0); transition: transform 0.9s var(--ease-out); transition-delay: var(--delay, 0s); }
.js .is-in .size-block { transform: scale(1); }

.size-name { font-family: var(--display); font-size: 1.25rem; text-transform: uppercase; color: var(--gold); }
.size-meta { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.size-meta strong { color: var(--text); }

/* ---------- Rules ---------- */

.doc-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }

.doc { max-width: 48em; }
.doc h2 { margin-top: 0; }
.doc h3 { color: var(--gold); margin-top: 1.5em; font-size: 1.25rem; }
.doc p { margin: 0.5em 0; }
.doc .note { color: var(--muted); font-size: 0.9rem; margin-top: 2em; }
.doc ol.short { padding-left: 1.4em; }
.doc ol.short li { margin: 6px 0; }
.doc ol.short li::marker { color: var(--gold); font-weight: 900; }

.callout {
  position: relative;
  background: linear-gradient(90deg, rgba(224, 49, 58, 0.12), rgba(21, 21, 28, 0.9) 40%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ruby);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 24px 0;
}

.callout p { margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 40px 0 110px;
  color: var(--muted);
  font-size: 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(245, 184, 46, 0.04));
}

.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer p { margin: 0; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 52px; height: 52px; mix-blend-mode: lighten; }

/* ---------- Music player ---------- */

.music {
  position: fixed;
  z-index: 25;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(260px, calc(100vw - 32px));
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(245, 184, 46, 0.5);
  background: rgba(10, 10, 14, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.2s;
}

.music:hover { border-color: var(--gold); transform: translateY(-2px); }

.music-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: #1a1206;
  flex-shrink: 0;
}

.bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { display: block; width: 3px; height: 5px; background: #1a1206; border-radius: 1px; }
.music.is-playing .bars i { animation: bar 0.9s ease-in-out infinite; }
.music.is-playing .bars i:nth-child(2) { animation-delay: 0.2s; }
.music.is-playing .bars i:nth-child(3) { animation-delay: 0.4s; }
.music.is-playing .bars i:nth-child(4) { animation-delay: 0.1s; }

@keyframes bar { 50% { height: 14px; } }

.music-label { min-width: 0; line-height: 1.25; max-width: 200px; transition: max-width 0.4s var(--ease-out), opacity 0.3s; }

/* After the first few seconds the player shrinks to its icon until hovered. */
.music.is-compact { padding-right: 6px; gap: 0; }
.music.is-compact .music-label { max-width: 0; opacity: 0; overflow: hidden; }
.music.is-compact:hover, .music.is-compact:focus-visible { padding-right: 14px; gap: 10px; }
.music.is-compact:hover .music-label, .music.is-compact:focus-visible .music-label { max-width: 200px; opacity: 1; }
.music-label b, .music-label small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-label small { color: var(--muted); font-weight: 600; font-size: 0.72rem; }

/* ---------- Store (Tebex Headless) ---------- */

.store-name {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 30, 40, 0.95), rgba(18, 18, 24, 0.95));
  border: 1px solid rgba(245, 184, 46, 0.45);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 22px;
}

.store-name label { display: block; font-family: var(--display); font-size: 1.2rem; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }

.store-name-row { display: flex; gap: 0; max-width: 540px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--gold); background: var(--bg-raised); }

.store-name-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 700 1.1rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 15px 14px;
}

.store-name-row input:focus { outline: none; background: rgba(245, 184, 46, 0.06); }

.store-name-status { margin: 8px 0 0; color: var(--muted); font-size: 0.95rem; }
.is-error { color: #ff7a7f !important; }

.store-message { border-left: 4px solid var(--ruby); background: var(--bg-card); padding: 10px 16px; border-radius: 8px; }

.store-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; }

@media (max-width: 900px) { .store-layout { grid-template-columns: 1fr; } }

.store-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }

.shelf { padding: 22px 0 10px; }

.shelf-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 16 / 5;
  background: #000 center / cover no-repeat;
  border: 1px solid rgba(245, 184, 46, 0.35);
  display: flex;
  align-items: flex-end;
}

.shelf-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 60%); }
.shelf-banner.is-titled { aspect-ratio: 16 / 7; background-size: cover; }
.shelf-banner.is-titled::after { display: none; }
.shelf-banner h2 { position: relative; z-index: 1; margin: 0 0 14px 20px; }

@media (max-width: 600px) { .shelf-banner { aspect-ratio: 16 / 7; } }

.store-loading { color: var(--muted); }

.product { display: flex; flex-direction: column; padding: 14px; overflow: hidden; }
.product-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #000; border-radius: 9px; margin-bottom: 12px; transition: transform 0.6s var(--ease-out); }
.product:hover .product-img { transform: scale(1.04); }
.product h3 { margin-bottom: 2px; font-size: 1.3rem; }
.product .price { color: var(--text); font-family: var(--display); font-size: 1.5rem; margin: 0; }
.product .product-summary { flex: 1; font-size: 0.95rem; }
.product details { margin-top: 8px; color: var(--muted); font-size: 0.9rem; }
.product summary { cursor: pointer; color: var(--gold-bright); font-weight: 800; }
.product-details p { margin: 0.5em 0; }

.buy-btn { margin: 14px 0 0; padding: 12px; min-width: 0; font-size: 1.05rem; }
.buy-btn:disabled { background: var(--line); box-shadow: none; color: var(--muted); cursor: default; }

.basket {
  position: sticky;
  top: 86px;
  background: linear-gradient(180deg, rgba(36, 30, 18, 0.95), rgba(18, 18, 24, 0.98));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(245, 184, 46, 0.1);
}

.basket.is-bumped { animation: bump 0.5s var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(245, 184, 46, 0.5), 0 0 60px rgba(245, 184, 46, 0.4); } }

@media (max-width: 900px) { .basket { position: static; order: -1; } }

.basket h2 { font-size: 1.8rem; }
.basket-items { list-style: none; padding: 0; margin: 0 0 12px; }
.basket-items li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); animation: rise 0.4s var(--ease-out); }
.basket-items .basket-price { font-weight: 800; }
.basket-items .link-btn { grid-column: 1 / -1; justify-self: start; }
.basket-empty { color: var(--muted); display: block !important; }
.basket-total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; margin: 0 0 16px; }
.basket-total-row strong { font-family: var(--display); font-size: 1.6rem; font-weight: 400; color: var(--gold-bright); }
.basket-checkout { width: 100%; }
.basket-checkout:disabled { background: var(--line); box-shadow: none; color: var(--muted); cursor: default; }
.basket-checkout:disabled::before { display: none; }
.basket-note { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }

/* A coin that flies from the product to the basket. */
.fly {
  position: fixed;
  z-index: 40;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 30%, var(--gold-pale), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 0 20px rgba(245, 184, 46, 0.8);
}

.basket-bar {
  position: fixed;
  z-index: 24;
  right: 16px;
  bottom: 16px;
  display: none;
  padding: 12px 18px 11px;
  font-size: 1rem;
}

@media (max-width: 900px) { .basket-bar.has-items { display: inline-flex; } }

.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--gold-bright); }

.is-busy { cursor: progress; }
.is-busy button { pointer-events: none; opacity: 0.75; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .embers { display: none; }
  html { scroll-behavior: auto; }
}
