/* worldboss — public site
   Palette: a raid that ends at 2 a.m. Deep violet night, bone text,
   spectral teal (the Ghost King), Valor gold, HP red. */

@font-face {
  font-family: "Grenze Gotisch";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/grenze-gotisch-latin.woff2") format("woff2");
}

:root {
  --night: #14121f;
  --panel: #1d1a2e;
  --panel-2: #262138;
  --line: #373152;
  --bone: #eae6f2;
  --mist: #aaa1c5;
  --spectral: #8ef0d4;
  --valor: #f0b44c;
  --hp: #e4574c;
  --hp-deep: #7e2a30;
  --display: "Grenze Gotisch", "Palatino", serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }

a { color: var(--spectral); text-underline-offset: 3px; }
a:hover { color: var(--bone); }

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

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--spectral);
  color: var(--night);
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
  transition: top 120ms ease-out;
}
.skip-link:focus { top: 0; }

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

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--bone);
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; }

/* the mark is pixel art — keep its edges hard at every size */
.brand img, .embed-author img, .boss-art, .mascot img {
  image-rendering: pixelated;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--bone); }

/* ---------- hero ---------- */

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 4.75rem);
  margin-bottom: 0.35em;
}

.hero .tagline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  color: var(--spectral);
  margin-bottom: 0.9em;
}

.hero .lede { color: var(--mist); max-width: 34em; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.button.primary { background: var(--spectral); color: var(--night); }
.button.primary:hover { background: var(--bone); color: var(--night); }
.button.ghost {
  color: var(--bone);
  border: 1px solid var(--line);
}
.button.ghost:hover { border-color: var(--spectral); color: var(--spectral); }

/* ---------- the living embed (hero figure) ---------- */

.channel {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.8);
}

.channel-bar {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--mist);
}

.embed {
  margin: 1rem;
  padding: 0.9rem 1rem 1rem;
  background: var(--panel-2);
  border-left: 3px solid var(--spectral);
  border-radius: 6px;
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--mist);
  margin-bottom: 0.6rem;
}
.embed-author img { width: 20px; height: 20px; }
.app-badge {
  background: var(--spectral);
  color: var(--night);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.embed-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.embed-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.1;
  margin: 0 0 0.1em;
}
.embed .epithet {
  font-style: italic;
  color: var(--mist);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.boss-art {
  width: 64px;
  height: 64px;
  flex: none;
  padding: 6px;
  background: var(--night);
  border-radius: 8px;
}

.hp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.hp-row .phase { color: var(--valor); }

.hp-track {
  height: 14px;
  border-radius: 7px;
  background: var(--hp-deep);
  border: 1px solid var(--line);
  overflow: hidden;
}
.hp-fill {
  height: 100%;
  width: 62%;
  border-radius: 7px 0 0 7px;
  background: linear-gradient(90deg, var(--hp), #f07f62);
  animation: drain 2.6s steps(8, jump-end) 600ms both;
}
@keyframes drain {
  from { width: 100%; }
  to { width: 62%; }
}

.embed-foot {
  display: flex;
  gap: 1.4rem;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--mist);
}
.embed-foot .valor { color: var(--valor); }

.log {
  margin: 0 1rem 1rem;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--mist);
}
.log li {
  padding-block: 0.22rem;
  animation: rise 500ms ease-out both;
}
.log li:nth-child(1) { animation-delay: 3.3s; }
.log li:nth-child(2) { animation-delay: 3.8s; }
.log li:nth-child(3) { animation-delay: 4.3s; }
.log .who { color: var(--bone); }
.log .dmg { color: var(--hp); }
.log .event { color: var(--spectral); }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section + .section { border-top: 1px solid var(--line); }

.section h2 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin-bottom: 0.2em;
}
.section .kicker {
  color: var(--mist);
  max-width: 40em;
  margin-bottom: 2.5rem;
}

/* stat band — the page's one saturated move, full-bleed on indigo */

.stats {
  background:
    radial-gradient(900px 420px at 85% -40%, rgb(126 91 220 / 0.35), transparent 64%),
    #2b2554;
  padding-block: 2.5rem;
}
.stats dl {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin: 0;
}
.stats dl > div { display: flex; flex-direction: column-reverse; }
.stats dd {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  line-height: 1.1;
  margin: 0;
}
.stats dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(234 230 242 / 0.64);
  margin-top: 0.6rem;
}

/* the week — numbered rows, rule-parted; a real sequence earns real numbers */

.beats {
  margin: 0;
  padding: 0;
  list-style: none;
}
.beats li {
  display: grid;
  grid-template-columns: minmax(4rem, 9rem) minmax(0, 24rem) minmax(0, 1fr);
  gap: 1rem clamp(1.5rem, 4vw, 4.5rem);
  align-items: baseline;
  padding-block: 2rem;
}
.beats li + li { border-top: 1px solid var(--line); }
.beat-num {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--spectral);
}
.beats h3 { font-size: 1.6rem; margin: 0; }
.beats p { color: var(--mist); font-size: 0.98rem; margin: 0; max-width: 52ch; }

/* features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.features li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 0.5rem;
}
.features h3 { font-size: 1.3rem; color: var(--spectral); }
.features h3 .glyph { color: var(--valor); }
.features p { color: var(--mist); font-size: 0.95rem; }

/* mascot */

.mascot .wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.mascot > .wrap > img {
  width: clamp(120px, 16vw, 180px);
  height: auto;
  animation: hover-bob 4s ease-in-out infinite;
}
.states {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem clamp(1rem, 2vw, 1.75rem);
  margin: 2rem 0 0;
  padding: 0;
}
.state {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.state img {
  width: clamp(56px, 6vw, 84px);
  height: auto;
  image-rendering: pixelated;
}
.state figcaption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}
.state.enraged figcaption { color: var(--hp); }
@keyframes hover-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.mascot blockquote {
  margin: 1rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--valor);
  font-style: italic;
  color: var(--mist);
}

/* privacy strip */

.trust {
  background: var(--panel);
}
.trust p { color: var(--mist); max-width: 44em; }
.trust strong { color: var(--bone); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  color: var(--mist);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

/* ---------- legal pages ---------- */

.legal {
  max-width: 44rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.25rem); }
.legal .effective {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--mist);
  margin-bottom: 2.5rem;
}
.legal h2 {
  font-size: 1.6rem;
  margin-top: 2.2em;
}
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4em; }
.legal p, .legal li { color: var(--mist); }
.legal strong { color: var(--bone); }

/* ---------- responsive ---------- */

@media (max-width: 56rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .beats li { grid-template-columns: 1fr; gap: 0.5rem; }
  .features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 36rem) {
  .features { grid-template-columns: 1fr; }
  .stats dl { grid-template-columns: 1fr 1fr; justify-content: start; }
  .mascot .wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .mascot blockquote { text-align: left; }
  .site-footer .wrap, .site-footer ul { justify-content: center; }
  .site-footer ul { margin-left: 0; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hp-fill, .log li, .mascot img {
    animation: none;
  }
}
