/* A fixed full-window stage (shader sky + 2D scenery canvas) with one glass plate of content at a
   time, swapped with Flash-style transitions. Each album's realm re-skins the colours and type. */

:root {
  color-scheme: dark;
  --ink: #140f0c;
  --plate: rgba(20, 15, 12, 0.74);
  --line: rgba(232, 147, 90, 0.38);
  --text: #f3e4cf;
  --muted: #d6c0a4;
  --accent: #e8935a;
  --accent-ink: #140f0c;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --rune: 'Noto Sans Runic', 'Noto Sans Egyptian Hieroglyphs', 'Segoe UI Historic', sans-serif;
  --fs-sm: 15px;
  --fs-base: 20px;
  --fs-lg: 26px;
  --fs-xl: clamp(32px, 5vw, 48px);
  --fs-hero: clamp(54px, 12vw, 140px);
}

body[data-realm="norse"] {
  --plate: rgba(5, 13, 21, 0.74);
  --line: rgba(143, 227, 196, 0.38);
  --text: #e8f1ee;
  --muted: #b8cbd0;
  --accent: #8fe3c4;
  --accent-ink: #06121c;
  --display: 'Uncial Antiqua', Georgia, serif;
}

body[data-realm="olympus"] {
  --plate: rgba(22, 24, 50, 0.76);
  --line: rgba(240, 192, 96, 0.42);
  --text: #f8eedc;
  --muted: #ddd1ba;
  --accent: #f0c060;
  --accent-ink: #1a1d3a;
  --display: 'Cinzel', Georgia, serif;
}

body[data-realm="egypt"] {
  --plate: rgba(12, 14, 30, 0.76);
  --line: rgba(232, 194, 106, 0.4);
  --text: #f6ecd6;
  --muted: #d4c7aa;
  --accent: #e8c26a;
  --accent-ink: #0c1024;
  --display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
}

body[data-realm="underworld"] {
  --plate: rgba(15, 8, 23, 0.76);
  --line: rgba(226, 98, 124, 0.4);
  --text: #f1e6f6;
  --muted: #c9b8d6;
  --accent: #ec7a92;
  --accent-ink: #12081a;
  --display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--fs-base);
  overflow: hidden;
  transition: color 0.6s;
}

canvas.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#fx {
  pointer-events: none;
}

.app {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 16px;
  max-width: 1240px;
  width: 100%;
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  padding: 4px;
}

.logo span {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.logo svg {
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.logo:hover svg {
  transform: rotate(180deg);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 14px;
  min-height: 44px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.35s;
  box-shadow: 0 0 10px var(--accent);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--accent);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--plate);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

/* Only on small screens (see the end of this file). Listen sits in the bar on wide screens
   and in the menu on small ones, so there's one link for each place. */
.menu-btn,
.menu-only {
  display: none;
}

.pill[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.eq {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
}

.eq i {
  width: 2px;
  background: currentColor;
  height: 3px;
}

.pill[aria-pressed="true"] .eq i {
  animation: eq 0.9s infinite ease-in-out alternate;
}

.eq i:nth-child(2) { animation-delay: 0.2s !important; }
.eq i:nth-child(3) { animation-delay: 0.45s !important; }

@keyframes eq {
  to { height: 12px; }
}

@keyframes eq-icon {
  from { height: 3px; }
  to { height: 14px; }
}

/* ---------- Panels ---------- */

main {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  justify-content: center;
}

.panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-block: 12px 32px;
  outline: none;
}

.panel.center {
  align-items: center;
}

.panel.in {
  animation: panel-in 0.7s cubic-bezier(0.16, 0.84, 0.3, 1) both;
}

.panel.out {
  animation: panel-out 0.32s ease-in both;
  pointer-events: none;
}

@keyframes panel-in {
  from { opacity: 0; transform: scale(1.06) translateY(10px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes panel-out {
  to { opacity: 0; transform: scale(0.94); filter: blur(6px); }
}

.plate {
  position: relative;
  width: 100%;
  max-width: 1040px;
  background: var(--plate);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(20px, 4vw, 48px);
  transition: background 0.8s, border-color 0.8s;
}

.plate::before,
.plate::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
  pointer-events: none;
}

.plate::before {
  top: -6px;
  left: -6px;
  border-right: 0;
  border-bottom: 0;
}

.plate::after {
  bottom: -6px;
  right: -6px;
  border-left: 0;
  border-top: 0;
}

.plate.narrow {
  max-width: 860px;
}

/* ---------- Type ---------- */

.kicker {
  font-family: 'Cinzel', serif;
  font-size: var(--fs-sm);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
  line-height: 1.08;
}

h2 {
  font-size: var(--fs-xl);
}

p {
  margin: 0;
  line-height: 1.6;
  max-width: 62ch;
}

.lede {
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--muted);
  line-height: 1.45;
}

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

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stack.loose {
  gap: 32px;
}

.stack.tight {
  gap: 8px;
}

.centered {
  align-items: center;
  text-align: center;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transition: box-shadow 0.3s, transform 0.2s;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--muted);
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}

.btn:hover::after {
  left: 130%;
}

.btn:hover {
  box-shadow: 0 0 24px var(--accent);
  transform: translateY(-1px);
}

/* ---------- Home ---------- */

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-inline: 8px;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: var(--fs-hero);
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 40px rgba(232, 147, 90, 0.45);
}

.letters span {
  display: inline-block;
  animation: rise 1s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.4em) scale(0.8); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: none; }
}

.hero .lede {
  max-width: 34ch;
}

/* ---------- Albums ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 24px;
  perspective: 900px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
}

.cover {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.cover svg,
.cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover .cover::after,
.card:focus-visible .cover::after {
  opacity: 1;
}

.card .myth {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.card .name {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 24px;
}

/* ---------- About, shows, contact ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  align-items: start;
}

.cols > * {
  min-width: 0;
}

.members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* A one-person line-up gets a single, larger portrait. */
.members.solo {
  grid-template-columns: minmax(0, 380px);
  justify-content: center;
}

.member {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.member.has-photo {
  aspect-ratio: 9 / 16;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.member img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member figcaption {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}

/* Darken the foot of the portrait so the caption reads over it. */
.member.has-photo figcaption {
  padding: 48px 16px 16px;
  background: linear-gradient(transparent, rgba(10, 6, 4, 0.85));
  color: var(--text);
}

.member strong {
  color: var(--text);
  font-size: 14px;
}

.member.has-photo strong {
  font-size: 18px;
  color: var(--accent);
}

.shows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.show {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.show:last-child {
  border-bottom: 1px solid var(--line);
}

.show .date {
  flex: 0 0 110px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.show .where {
  flex: 1 1 220px;
  min-width: 0;
  font-size: var(--fs-lg);
}

.email-text {
  font-family: 'Cinzel', serif;
  font-size: var(--fs-lg);
  color: var(--accent);
  overflow-wrap: anywhere;
}

/* ---------- Album ---------- */

.album-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.album-top > * {
  min-width: 0;
}

.album-cover {
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

.runeline {
  font-family: var(--rune), 'Cinzel', serif;
  letter-spacing: 0.4em;
  color: var(--accent);
  font-size: 20px;
}

.album h1 {
  font-size: clamp(40px, 6vw, 72px);
}

.spotify-embed {
  border: 0;
  border-radius: 12px;
  display: block;
}

.embed-placeholder {
  border: 1px dashed var(--line);
  padding: 24px;
  color: var(--muted);
  font-style: italic;
}

.tracks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tracks li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 24px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: track-in 0.5s ease-out forwards;
}

.tracks li:last-child {
  border-bottom: 1px solid var(--line);
}

@keyframes track-in {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}

.tracks .num {
  flex: 0 0 44px;
  font-family: var(--rune), 'Cinzel', serif;
  color: var(--accent);
  font-size: 20px;
}

.tracks .tt {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tracks .title {
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.2;
}

/* The myth the song draws on, and any interlude or bonus-track tag. */
.tracks .myth-name {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.tracks .tag {
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.tracks .story {
  flex: 1 1 320px;
  min-width: 0;
  font-style: italic;
  color: var(--muted);
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 8px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.divider span {
  font-family: var(--rune), 'Cinzel', serif;
  color: var(--accent);
  letter-spacing: 0.4em;
}

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

.ticker {
  border-top: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  padding-block: 10px;
  margin-inline: -16px;
  background: var(--plate);
}

.ticker div {
  display: inline-block;
  padding-left: 100%;
  animation: tick 38s linear infinite;
}

@keyframes tick {
  to { transform: translateX(-100%); }
}

/* ---------- Intro ---------- */

#intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: #0c0806;
  padding-inline: 16px;
  text-align: center;
  transition: opacity 0.9s, filter 0.9s;
}

#intro[hidden] {
  display: none;
}

#intro.gone {
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
}

.intro-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(40px, 10vw, 96px);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  color: #f3e4cf;
  margin: 0;
  max-width: none;
}

.intro-title span {
  opacity: 0;
  animation-fill-mode: forwards;
}

.loader {
  width: min(360px, 80vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar {
  height: 3px;
  background: rgba(232, 147, 90, 0.2);
  position: relative;
  overflow: hidden;
}

.bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #e8935a;
  box-shadow: 0 0 12px #e8935a;
}

.status {
  display: flex;
  justify-content: space-between;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d6c0a4;
  font-variant-numeric: tabular-nums;
}

.enter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s;
}

.enter.on {
  opacity: 1;
  visibility: visible;
}

#intro .skip {
  position: absolute;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: none;
  border: 0;
  color: #d6c0a4;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  padding: 0 12px;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 16px;
  background: var(--ink);
}

/* ---------- Small screens and calm ---------- */

/* Too narrow for the links in one row: fold them into a dropdown under the header bar. */
@media (max-width: 960px) {
  .site-header {
    position: relative;
    z-index: 5;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .menu-btn,
  #sound-btn {
    display: inline-flex;
    justify-content: center;
    width: 44px;
    padding: 0;
  }

  /* Without its label the button needs a recognisable icon: stepped bars that dance when on.
     The label stays for screen readers. */
  #sound-btn .eq { height: 14px; }
  #sound-btn .eq i { width: 3px; }
  #sound-btn .eq i:nth-child(1) { height: 6px; }
  #sound-btn .eq i:nth-child(2) { height: 14px; }
  #sound-btn .eq i:nth-child(3) { height: 9px; }
  #sound-btn[aria-pressed="true"] .eq i { animation-name: eq-icon; }

  #sound-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .menu-icon {
    display: grid;
    gap: 4px;
    width: 18px;
  }

  .menu-icon i {
    height: 2px;
    background: currentColor;
    transition: transform 0.25s, opacity 0.25s;
  }

  .menu-btn[aria-expanded="true"] {
    border-color: var(--accent);
    color: var(--accent);
  }

  .menu-btn[aria-expanded="true"] .menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Hidden menus are `visibility: hidden`, so their links leave the tab order too. */
  #site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--plate);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0s 0.25s;
  }

  .site-header.menu-open #site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.25s, transform 0.25s;
  }

  #site-nav .nav-link {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
  }

  /* The current page gets a bar at the left instead of an underline. */
  #site-nav .nav-link::after {
    left: 0;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 2px;
    height: auto;
  }

  .bar-only {
    display: none;
  }

  #site-nav .menu-only {
    display: inline-flex;
    justify-content: center;
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .logo span { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker div {
    animation: none;
    padding-left: 0;
  }
}

/* Egyptian numerals are fine strokes: give them more size. */
body[data-realm="egypt"] .tracks .num {
  font-size: 30px;
  line-height: 1;
}
