/* =============================================================================
   House of Mystics — DESIGN
   To restyle, the palette lives right here in :root.
   ========================================================================== */
:root {
  --void:        #05060d;   /* deepest background */
  --night:       #0b0d1c;   /* panels */
  --night-2:     #12152b;   /* raised panels */
  --line:        #232846;   /* borders */
  --ink:         #e8e9f5;   /* primary text */
  --ink-soft:    #a6a9c8;   /* secondary text */
  --ink-faint:   #6b6f93;   /* greyed / disabled */
  --gold:        #d9b56b;   /* primary accent */
  --gold-soft:   #f0d8a0;
  --violet:      #8a6cff;   /* secondary accent */
  --violet-soft: #b9a6ff;
  --cyan:        #5fe0d0;   /* tertiary accent */
  --danger:      #ff7a93;
  --radius:      14px;
  --maxw:        1080px;
  --font-display: "Cinzel", Georgia, serif;
  --font-body:    "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--void);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Starfield: pure CSS, no image files -------------------------------- */
.starfield {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(138,108,255,0.18), transparent 60%),
    radial-gradient(1000px 700px at 0% 110%, rgba(95,224,208,0.10), transparent 55%),
    radial-gradient(900px 900px at 50% 50%, rgba(217,181,107,0.06), transparent 70%),
    var(--void);
}
.starfield::before, .starfield::after {
  content: ""; position: absolute; inset: -50%;
  background-repeat: repeat;
}
.starfield::before {
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.2px 1.2px at 120px 90px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.6px 1.6px at 200px 160px, rgba(217,181,107,0.8), transparent),
    radial-gradient(1px 1px at 300px 50px, rgba(255,255,255,0.5), transparent);
  background-size: 340px 340px;
  animation: drift 220s linear infinite;
}
.starfield::after {
  background-image:
    radial-gradient(1px 1px at 60px 120px, rgba(185,166,255,0.7), transparent),
    radial-gradient(1.3px 1.3px at 180px 40px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 260px 220px, rgba(95,224,208,0.6), transparent);
  background-size: 480px 480px;
  animation: drift 360s linear infinite reverse;
  opacity: 0.7;
}
@keyframes drift { to { transform: translate3d(-340px, -340px, 0); } }
@media (prefers-reduced-motion: reduce) {
  .starfield::before, .starfield::after { animation: none; }
}

/* ---- Layout primitives -------------------------------------------------- */
.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.section { padding: 3.5rem 0; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 .4rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.eyebrow {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .28em; font-size: .72rem; color: var(--gold);
  margin: 0 0 .6rem;
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.3rem; border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  border: 1px solid var(--line); background: var(--night-2); color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--gold); color: var(--ink); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #b9914a); color: #14110a; border-color: transparent; }
.btn-gold:hover { color: #14110a; }
.btn-ghost { background: transparent; }
.btn-soon { opacity: .55; cursor: not-allowed; }
.btn-soon:hover { transform: none; border-color: var(--line); }

/* ---- Cards & grids ------------------------------------------------------ */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--night-2), var(--night));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--violet); }
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; }

.pill {
  display: inline-block; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .22rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: rgba(255,255,255,.02);
}
.pill-type { color: var(--violet-soft); border-color: rgba(138,108,255,.4); }
.pill-live { color: var(--cyan); border-color: rgba(95,224,208,.4); }
.pill-soon { color: var(--ink-faint); }

/* ---- Site chrome (app.html) -------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(5,6,13,.72);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.brand { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); white-space: nowrap; }
.brand b { color: var(--gold); }
.nav { display: flex; gap: .3rem; flex-wrap: wrap; margin-left: auto; }
.nav a {
  padding: .4rem .8rem; border-radius: 999px; color: var(--ink-soft);
  font-size: .9rem; font-weight: 500;
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav a.active { color: var(--gold); background: rgba(217,181,107,.1); }

/* ---- Media (YouTube) ---------------------------------------------------- */
.embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-soon {
  display: grid; place-items: center; aspect-ratio: 16/9; border-radius: var(--radius);
  border: 1px dashed var(--line); color: var(--ink-faint);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 12px, transparent 12px 24px);
  font-family: var(--font-display); letter-spacing: .15em; text-transform: uppercase; font-size: .8rem;
}

/* ---- Hero / gate (index, welcome) -------------------------------------- */
.gate { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.gate .mark { font-size: .8rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); }
.gate h1 { margin-top: .6rem; }
.gate p { color: var(--ink-soft); max-width: 46ch; margin: .4rem auto 2rem; }
.gate p.tagline-text { max-width: 120ch; }
.doors { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.door {
  min-width: 240px; padding: 1.6rem; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--night-2), var(--night));
  transition: transform .18s ease, border-color .18s ease;
}
.door:hover { transform: translateY(-3px); border-color: var(--gold); }
.door .k { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.door .d { color: var(--ink-soft); font-size: .9rem; margin-top: .3rem; }

/* ---- Tour steps (welcome) ---------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 1rem; margin-top: 2rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display);
  color: #14110a; background: linear-gradient(135deg, var(--gold), #b9914a);
}

/* ---- Detail bits -------------------------------------------------------- */
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.metarow { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0 1.2rem; }
.divider { height: 1px; background: var(--line); margin: 2.4rem 0; border: 0; }
.breath-note {
  display: flex; align-items: center; gap: .6rem; margin: 1rem 0;
  padding: .7rem 1rem; border-radius: var(--radius);
  border: 1px solid rgba(95,224,208,.3); color: var(--cyan);
  background: rgba(95,224,208,.06); font-size: .9rem;
}

/* tempo grid */
.tempo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
@media (max-width: 560px) { .tempo-grid { grid-template-columns: repeat(3, 1fr); } }
.tempo {
  aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); font-family: var(--font-display); font-size: 1.15rem;
  background: var(--night-2); color: var(--ink);
}
.tempo.on { border-color: var(--gold); color: var(--gold-soft); cursor: pointer; }
.tempo.on:hover { background: rgba(217,181,107,.1); }
.tempo.off { color: var(--ink-faint); opacity: .5; }

.lyric-table { width: 100%; border-collapse: collapse; }
.lyric-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.lyric-table .l { font-family: var(--font-display); color: var(--ink); width: 42%; }
.lyric-table .m { color: var(--ink-soft); }

/* ---- Footer ------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding: 2.4rem 0; color: var(--ink-faint); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.social { display: flex; gap: .8rem; flex-wrap: wrap; }

.center { text-align: center; }
.mt1 { margin-top: 1rem; } .mt2 { margin-top: 2rem; }
.stack > * + * { margin-top: 1rem; }
