/* Sporewright marketing site. Hand-written, no build step. */

/* ---------- Fonts (self-hosted, OFL: /assets/fonts/OFL.txt, OFL-Nunito.txt) ---------- */
@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo2-bold-latin.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo2-semibold-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #060a1b;
  --bg-2: #0a0b20;
  --bg-deep: #04060f;
  --abyss: #120a24;
  --panel: rgba(16, 20, 44, 0.72);
  --panel-2: rgba(10, 12, 30, 0.82);
  --line: rgba(125, 249, 255, 0.14);
  --line-strong: rgba(125, 249, 255, 0.32);

  --teal: #39f2d0;
  --cyan: #7df9ff;
  --violet: #9b5cff;
  --spore: #b07cff;
  --nectar: #ffc857;
  --pink: #ff4fa3;
  --thorn: #ff6b5a;
  --bark: #6bd66b;
  --root: #ffc857;
  --blight: #b4d334;
  --rot: #ff6a3d;
  --crimson: #ff3355;

  --text: #e8eefb;
  --muted: #a9b5d3;
  --faint: #7f8bab;

  --f-display: "Baloo 2", "Nunito", ui-rounded, system-ui, sans-serif;
  --f-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --section-pad: clamp(64px, 8vw, 112px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --glow-teal: 0 0 0 1px rgba(57, 242, 208, 0.35), 0 10px 40px -8px rgba(57, 242, 208, 0.55);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: #fff;
}
h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p {
  margin: 0 0 1em;
  text-wrap: pretty;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}
::selection {
  background: rgba(57, 242, 208, 0.35);
  color: #fff;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--teal);
  color: #03121a;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Ambient spores canvas */
.spores-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--btn-bg);
  color: var(--text);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(125, 249, 255, 0.1);
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.96);
}
.btn--primary {
  border: 0;
  color: #03121a;
  background: linear-gradient(180deg, #6bffe2 0%, var(--teal) 55%, #22c9ab 100%);
  box-shadow: var(--glow-teal), inset 0 -3px 0 rgba(0, 60, 50, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.btn--primary:hover {
  color: #021016;
  background: linear-gradient(180deg, #8dffe9 0%, #4ff7d8 55%, #2ad7b8 100%);
  box-shadow: 0 0 0 1px rgba(57, 242, 208, 0.5), 0 14px 50px -6px rgba(57, 242, 208, 0.75),
    inset 0 -3px 0 rgba(0, 60, 50, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.btn--ghost {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn__play {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: -0.5em;
  border-radius: 50%;
  background: rgba(125, 249, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(125, 249, 255, 0.45), 0 0 18px rgba(125, 249, 255, 0.5);
}
.btn__play::after {
  content: "";
  margin-left: 3px;
  border-left: 10px solid var(--cyan);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled,
.site-header.is-open,
.site-header--solid {
  background: rgba(6, 9, 24, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin-right: auto;
}
.nav__brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 16px rgba(57, 242, 208, 0.35);
}
.nav__brand.is-missing img {
  display: none;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover,
.nav__links a[aria-current="page"],
.nav__links a.is-active {
  color: #fff;
  background: rgba(125, 249, 255, 0.08);
}
.nav__cta {
  min-height: 42px;
  padding: 0.55em 1.1em;
  font-size: 0.98rem;
}
.nav__toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  place-items: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s, background 0.2s;
}
.nav__toggle span {
  position: relative;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__toggle span::before {
  top: -6px;
}
.nav__toggle span::after {
  top: 6px;
}
.nav__toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav__toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .nav__toggle {
    display: grid;
  }
  .nav__cta {
    display: none;
  }
  .nav__menu {
    position: fixed;
    inset: 68px 0 auto 0;
    max-height: calc(100vh - 68px);
    overflow: auto;
    padding: 12px var(--gutter) 24px;
    background: rgba(6, 9, 24, 0.97);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 1px 0 var(--line);
    display: none;
  }
  .site-header.is-open .nav__menu {
    display: block;
  }
  .nav__links {
    flex-direction: column;
    align-items: stretch;
  }
  .nav__links a {
    padding: 14px 12px;
    font-size: 1.1rem;
    border-radius: 12px;
  }
  .nav__menu .btn {
    width: 100%;
    margin-top: 12px;
  }
}
@media (min-width: 1081px) {
  .nav__menu {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .nav__menu .nav__menu-cta {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: max(640px, min(100svh, 1100px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}
.hero__art,
.hero__art img,
.hero__loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__art {
  z-index: -3;
}
.hero__art img {
  object-fit: cover;
  object-position: 72% 50%;
}
.hero__loop {
  z-index: -2;
  object-fit: cover;
  object-position: 25% 50%;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.hero__loop.is-playing {
  opacity: 1;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 10, 27, 0.92) 0%, rgba(6, 10, 27, 0.7) 32%, rgba(6, 10, 27, 0) 62%),
    linear-gradient(180deg, rgba(6, 10, 27, 0.55) 0%, rgba(6, 10, 27, 0) 18%, rgba(6, 10, 27, 0) 70%, var(--bg) 100%);
}
.hero__inner {
  position: relative;
  width: 100%;
  min-width: 0;
  padding-top: 110px;
  padding-bottom: 140px;
}
.hero__content {
  max-width: 600px;
}
.hero__logo {
  margin: 0 0 6px -5.4%;
  width: min(600px, 108%);
}
.hero__logo img {
  width: 100%;
  aspect-ratio: 1376 / 360;
  object-fit: cover;
  object-position: 50% 46%;
  filter: drop-shadow(0 6px 30px rgba(57, 242, 208, 0.35));
}
.wordmark-fallback {
  display: none;
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #c9fff5, var(--teal) 50%, #2aa6c9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(57, 242, 208, 0.45));
}
.hero__logo.is-missing img {
  display: none;
}
.hero__logo.is-missing .wordmark-fallback {
  display: block;
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  margin: 0 0 18px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(6, 10, 27, 0.8);
}
.hero__title em {
  font-style: normal;
  color: var(--teal);
  text-shadow: 0 0 28px rgba(57, 242, 208, 0.55);
}
.hero__title em.blight {
  color: #ff8a6b;
  text-shadow: 0 0 28px rgba(255, 51, 85, 0.5);
}
.hero__lede {
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  color: #d4ddf2;
  max-width: 34em;
  margin-bottom: 28px;
  text-shadow: 0 1px 16px rgba(6, 10, 27, 0.9);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 8px 14px 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(3, 5, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  line-height: 1.1;
}
.store-badge svg {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}
.store-badge small {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nectar);
}
.store-badge strong {
  display: block;
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.hero__facts {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 1;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}
.facts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.facts b {
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
}
.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 30px;
  z-index: 1;
  width: 26px;
  height: 42px;
  border-radius: 14px;
  border: 2px solid rgba(125, 249, 255, 0.45);
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--cyan);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (max-aspect-ratio: 4/5) {
  .hero {
    align-items: stretch;
    min-height: max(680px, min(100svh, 960px));
  }
  .hero__art img,
  .hero__loop {
    object-position: 50% 100%;
  }
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(6, 10, 27, 0.9) 0%, rgba(6, 10, 27, 0.55) 30%, rgba(6, 10, 27, 0) 46%, rgba(6, 10, 27, 0) 62%, rgba(6, 10, 27, 0.85) 84%, var(--bg) 100%);
  }
  .hero__inner {
    display: flex;
    flex-direction: column;
    padding-top: 84px;
    padding-bottom: 28px;
  }
  .hero__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: none;
    text-align: center;
    align-items: center;
  }
  .hero__logo {
    margin: 0 auto 4px;
    width: min(440px, 104%);
  }
  .hero__logo img {
    object-position: center;
  }
  .hero__lede {
    font-size: 1.02rem;
    margin-bottom: 0;
  }
  .hero__bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 24px;
  }
  .hero__actions,
  .stores {
    justify-content: center;
  }
  .hero__facts,
  .scroll-cue {
    display: none;
  }
}
@media (max-width: 420px) {
  .hero__actions .btn {
    flex: 1 1 100%;
  }
  .store-badge {
    min-width: 0;
    flex: 1 1 0;
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: var(--section-pad);
}
.section--abyss {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(155, 92, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--abyss) 50%, var(--bg) 100%);
}
.section--deep {
  background: var(--bg-deep);
}
/* organic mycelium edge on top of a section */
.edge-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -39px;
  height: 40px;
  background: inherit;
  background: var(--edge-color, var(--bg-deep));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V30c40-2 70-16 118-16 52 0 70 18 120 18s74-24 136-24c58 0 80 20 128 20 44 0 60-10 100-10 46 0 62 16 108 16 50 0 80-26 150-26 64 0 86 22 140 22 42 0 64-12 104-12 48 0 70 20 122 20 38 0 70-14 114-14V40z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V30c40-2 70-16 118-16 52 0 70 18 120 18s74-24 136-24c58 0 80 20 128 20 44 0 60-10 100-10 46 0 62 16 108 16 50 0 80-26 150-26 64 0 86 22 140 22 42 0 64-12 104-12 48 0 70 20 122 20 38 0 70-14 114-14V40z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(57, 242, 208, 0.06);
  color: var(--cyan);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal), 0 0 2px #fff;
}
.eyebrow--blight {
  color: #ffb49c;
  border-color: rgba(255, 106, 61, 0.4);
  background: rgba(255, 51, 85, 0.07);
}
.eyebrow--blight::before {
  background: var(--rot);
  box-shadow: 0 0 10px var(--rot);
}
.h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  color: #fff;
}
.h2 .glow {
  color: var(--teal);
  text-shadow: 0 0 30px rgba(57, 242, 208, 0.45);
}
.h2 .glow-violet {
  color: var(--spore);
  text-shadow: 0 0 30px rgba(155, 92, 255, 0.55);
}
.h2 .glow-rot {
  color: #ff8a6b;
  text-shadow: 0 0 30px rgba(255, 51, 85, 0.5);
}
.lede {
  font-size: clamp(1.06rem, 1.4vw, 1.2rem);
  color: var(--muted);
}

.panel {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 26, 58, 0.75), rgba(10, 12, 30, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}

/* reveal on scroll (only when JS is on and motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: var(--d, 0s);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- The loop ---------- */
.loop {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: beat;
}
.loop-wrap {
  position: relative;
}
.vein-flow {
  animation: vein 6s linear infinite;
}
@keyframes vein {
  to { stroke-dashoffset: -140; }
}
.loop__vein {
  position: absolute;
  left: 6%;
  width: 88%;
  top: 58px;
  height: 40px;
  z-index: 0;
  pointer-events: none;
}
.beat {
  position: relative;
  z-index: 1;
  padding: 28px 24px 26px;
  counter-increment: beat;
}
.beat__icon {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(57, 242, 208, 0.22), rgba(10, 12, 30, 0.95) 68%);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 40px -6px rgba(57, 242, 208, 0.5);
}
.beat__icon img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}
.beat__icon.is-missing img {
  visibility: hidden;
}
.beat__icon::after {
  content: counter(beat, decimal-leading-zero);
  position: absolute;
  right: -6px;
  top: -4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--cyan);
}
.beat h3 {
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 8px;
}
.beat p {
  color: var(--muted);
  margin: 0;
}
.beat .kw {
  font-weight: 800;
}
.kw--nectar { color: var(--nectar); }
.kw--spores { color: #c9a6ff; }
.kw--thorn { color: #ff8b7d; }
.kw--bark { color: #8be58b; }
.kw--root { color: var(--root); }
.kw--teal { color: var(--teal); }

@media (max-width: 960px) {
  .loop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .loop__vein {
    display: none;
  }
}
@media (max-width: 560px) {
  .loop {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .beat {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 0 16px;
    padding: 20px 18px;
  }
  .beat__icon {
    width: 72px;
    height: 72px;
    grid-row: span 2;
    margin: 0;
  }
  .beat__icon img {
    width: 48px;
    height: 48px;
  }
  .beat h3 {
    font-size: 1.45rem;
    margin: 2px 0 4px;
  }
}

.currencies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.currencies li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.currencies img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.currencies .is-missing img {
  display: none;
}

/* ---------- Spire ---------- */
.section--spire {
  background:
    radial-gradient(60% 50% at 30% 45%, rgba(57, 242, 208, 0.1), transparent 70%),
    var(--bg-deep);
  --edge-color: var(--bg-deep);
  overflow: hidden;
}
.section--spire .bg-tex {
  position: absolute;
  inset: 0;
  background: url("/assets/img/bg-mycelium.webp") center / cover no-repeat;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}
.spire-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.viewer {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(50% 36% at 50% 80%, rgba(57, 242, 208, 0.28), transparent 70%),
    radial-gradient(70% 60% at 50% 40%, rgba(155, 92, 255, 0.2), transparent 70%),
    #070a1c;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(57, 242, 208, 0.35);
}
/* range rings: the in-game range ring motif */
.rings {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 130%;
  aspect-ratio: 1;
  transform: translateX(-50%) scaleY(0.32);
  transform-origin: 50% 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 46px, rgba(57, 242, 208, 0.22) 47px 48px, transparent 49px 60px);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%);
  mask-image: radial-gradient(circle, #000 20%, transparent 70%);
  pointer-events: none;
}
.rings::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 2px solid rgba(57, 242, 208, 0.6);
  box-shadow: 0 0 30px rgba(57, 242, 208, 0.6), inset 0 0 30px rgba(57, 242, 208, 0.4);
}
@media (prefers-reduced-motion: no-preference) {
  .rings::after {
    animation: ring-pulse 3.2s ease-in-out infinite;
  }
}
@keyframes ring-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
.viewer__poster,
.viewer model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.viewer__poster {
  display: grid;
  place-items: end center;
  padding: 6% 8% 12%;
}
.viewer__poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 0 30px rgba(57, 242, 208, 0.35));
  transition: opacity 0.35s;
}
.viewer.is-3d .viewer__poster {
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
}
.viewer model-viewer {
  --poster-color: transparent;
  --progress-bar-color: var(--teal);
  background: transparent;
  opacity: 0;
  transition: opacity 0.6s;
}
.viewer.is-3d model-viewer {
  opacity: 1;
}
/* CSS spire silhouette, shown only if a stage render is missing */
.viewer__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: end center;
  padding-bottom: 14%;
}
.viewer__poster.is-missing img {
  opacity: 0;
}
.viewer__poster.is-missing + .viewer__fallback {
  display: grid;
}
.viewer__fallback span {
  --h: calc(28% + var(--stage, 1) * 10%);
  display: block;
  width: 18%;
  height: var(--h);
  border-radius: 50% 50% 12px 12px / 30% 30% 12px 12px;
  background: linear-gradient(180deg, var(--spore), var(--teal) 40%, #0f5a57);
  box-shadow: 0 0 60px rgba(57, 242, 208, 0.5);
  transition: height 0.5s var(--ease-out);
}
.viewer__hud {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}
.viewer__stage-label {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(6, 9, 24, 0.7);
  border: 1px solid var(--line);
}
.viewer__stage-label small {
  display: block;
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.viewer__hint {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(6, 9, 24, 0.7);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.4s;
}
.viewer.is-3d .viewer__hint {
  opacity: 1;
}
.stage-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 6px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(6, 9, 24, 0.6);
}
.stage-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 56px;
  padding: 8px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.stage-btn small {
  font-family: var(--f-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stage-btn:hover {
  color: #fff;
  background: rgba(125, 249, 255, 0.07);
}
.stage-btn[aria-pressed="true"] {
  color: #03121a;
  background: linear-gradient(180deg, #6bffe2, var(--teal));
  box-shadow: 0 0 24px -4px rgba(57, 242, 208, 0.7);
}
.growth {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  border-left: 2px solid rgba(57, 242, 208, 0.18);
}
.growth li {
  position: relative;
  padding: 10px 0 10px 24px;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.25s;
}
.growth li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 19px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid rgba(57, 242, 208, 0.4);
  transition: background 0.25s, box-shadow 0.25s;
}
.growth li.is-active {
  color: var(--text);
}
.growth li.is-active::before {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 14px var(--teal);
}
.growth h3 {
  font-size: 1.3rem;
  margin: 0 0 2px;
  color: inherit;
}
.growth li.is-active h3 {
  color: #fff;
}
.growth h3 span {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal);
  margin-left: 6px;
}
.growth p {
  margin: 0;
  font-size: 0.98rem;
}
.markers {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.markers li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--muted);
}
.markers img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.markers b {
  color: #fff;
}
@media (max-width: 900px) {
  .spire-grid {
    grid-template-columns: 1fr;
  }
  .viewer {
    aspect-ratio: 1 / 1.05;
    max-height: 72vh;
    width: 100%;
    margin-inline: auto;
  }
}

/* ---------- Upgrades ---------- */
.section--upgrades {
  background:
    radial-gradient(60% 40% at 80% 20%, rgba(155, 92, 255, 0.12), transparent 70%),
    var(--bg);
  --edge-color: var(--bg);
}
.trees {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.tablist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.tab {
  --c: var(--thorn);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 8%, rgba(6, 9, 24, 0.9));
  color: var(--c);
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.tab img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.tab.is-missing img {
  display: none;
}
.tab--bark { --c: var(--bark); }
.tab--root { --c: var(--root); }
.tab:hover {
  background: color-mix(in srgb, var(--c) 16%, rgba(6, 9, 24, 0.9));
}
.tab[aria-selected="true"] {
  background: var(--c);
  color: #160a08;
  box-shadow: 0 0 30px -6px var(--c), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.tab:active {
  transform: scale(0.97);
}
.tabpanel {
  --c: var(--thorn);
  padding: 8px;
}
.tabpanel--bark { --c: var(--bark); }
.tabpanel--root { --c: var(--root); }
.tabpanel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 12px 10px;
  color: var(--c);
  font-weight: 800;
}
.tabpanel__head span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}
.upgs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.upg {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 7%, transparent), rgba(255, 255, 255, 0.015));
}
.upg__icon {
  grid-row: span 2;
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, transparent), rgba(6, 9, 24, 0.9) 72%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.upg__icon img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}
.upg__icon.is-missing img {
  display: none;
}
.upg__icon.is-missing::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 14px var(--c);
}
.upg h4 {
  margin: 0;
  font-size: 1.12rem;
  color: #fff;
  line-height: 1.15;
}
.upg p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--muted);
}
.upg__tag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--faint);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}
.upg__tag--start {
  color: var(--teal);
  border-color: rgba(57, 242, 208, 0.35);
}
.upg__tag--ws {
  color: #c9a6ff;
  border-color: rgba(176, 124, 255, 0.45);
}
.trees__side .lede {
  margin-bottom: 20px;
}
.econ {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.econ li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
}
.econ img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.econ .is-missing img {
  visibility: hidden;
}
.econ h3 {
  font-size: 1.2rem;
  margin: 0 0 2px;
}
.econ p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .trees {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .upgs {
    grid-template-columns: 1fr;
  }
  .tab {
    font-size: 1rem;
    letter-spacing: 0.03em;
    min-height: 56px;
  }
  .tab img {
    width: 24px;
    height: 24px;
  }
}

/* ---------- Bestiary ---------- */
.section--blight {
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 51, 85, 0.1), transparent 70%),
    #07060f;
  --edge-color: #07060f;
  overflow: hidden;
}
.section--blight .bg-tex {
  position: absolute;
  inset: 0;
  background: url("/assets/img/bg-blight.webp") center / cover no-repeat;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  pointer-events: none;
}
.boss {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(20px, 4vw, 44px);
  margin-bottom: 20px;
  border-radius: 28px;
  border: 1px solid rgba(255, 51, 85, 0.35);
  background:
    radial-gradient(60% 80% at 25% 60%, rgba(255, 51, 85, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(40, 10, 20, 0.7), rgba(12, 6, 14, 0.9));
  box-shadow: 0 0 80px -30px rgba(255, 51, 85, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.boss__art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.boss__art::before {
  content: "";
  position: absolute;
  inset: 12% 8% 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 70%, rgba(255, 51, 85, 0.45), transparent 65%);
}
.boss__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 24px rgba(255, 51, 85, 0.35));
}
.boss__banner {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 51, 85, 0.14);
  border: 1px solid rgba(255, 51, 85, 0.5);
  color: #ffb3c0;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.92rem;
}
.boss h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
}
.boss p {
  color: #d7c9d6;
}
.boss__traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.boss__traits li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0dfe6;
}
.boss--matriarch {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border-color: rgba(176, 124, 255, 0.35);
  background:
    radial-gradient(60% 80% at 75% 60%, rgba(155, 92, 255, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(26, 10, 36, 0.7), rgba(12, 6, 18, 0.9));
  box-shadow: 0 0 80px -30px rgba(155, 92, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.boss--matriarch .boss__art {
  order: 2;
}
.boss--matriarch .boss__art::before {
  background: radial-gradient(circle at 50% 70%, rgba(155, 92, 255, 0.45), transparent 65%);
}
.boss--matriarch .boss__banner {
  background: rgba(155, 92, 255, 0.14);
  border-color: rgba(176, 124, 255, 0.5);
  color: #dac6ff;
}
.bestiary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.foe {
  --tier: var(--teal);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(24, 18, 34, 0.85), rgba(10, 8, 16, 0.92));
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.foe:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tier) 50%, transparent);
  box-shadow: 0 20px 50px -24px color-mix(in srgb, var(--tier) 60%, transparent);
}
.foe__art {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: -4px -6px 10px;
  display: grid;
  place-items: center;
}
.foe__art::before {
  content: "";
  position: absolute;
  inset: 20% 14% 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 65%, color-mix(in srgb, var(--rim, #9b5cff) 40%, transparent), transparent 66%);
}
.foe__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.7));
  transition: transform 0.4s var(--ease-out);
}
.foe:hover .foe__art img {
  transform: scale(1.05) rotate(-1.5deg);
}
/* missing render: glowing eyes in the dark (the Blight reads by its eyes) */
.foe__art.is-missing img,
.boss__art.is-missing img {
  display: none;
}
.foe__art.is-missing::after,
.boss__art.is-missing::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  width: 46px;
  height: 12px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 8px 6px, #ffe07a 0 3px, var(--rot) 4px, transparent 7px),
    radial-gradient(circle at 38px 6px, #ffe07a 0 3px, var(--rot) 4px, transparent 7px);
  filter: drop-shadow(0 0 8px var(--rot));
}
.foe__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #d9dcea;
  background: rgba(255, 255, 255, 0.04);
}
.chip--tier {
  color: var(--tier);
  border-color: color-mix(in srgb, var(--tier) 45%, transparent);
  background: color-mix(in srgb, var(--tier) 9%, transparent);
}
.chip--tier::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tier);
  box-shadow: 0 0 8px var(--tier);
}
.foe h3 {
  font-size: 1.4rem;
  margin: 0 0 6px;
  color: #fff;
}
.foe p {
  margin: 0;
  font-size: 0.97rem;
  color: #b9b4c8;
  line-height: 1.5;
}
.foe .counter {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.88rem;
  color: var(--teal);
  font-weight: 700;
}
.variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.variants .panel {
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(24, 18, 34, 0.7), rgba(10, 8, 16, 0.85));
}
.variants h3 {
  font-size: 1.2rem;
  margin: 0 0 4px;
}
.variants p {
  margin: 0;
  color: #b9b4c8;
  font-size: 0.96rem;
}
@media (max-width: 800px) {
  .boss,
  .boss--matriarch {
    grid-template-columns: 1fr;
  }
  .boss--matriarch .boss__art {
    order: 0;
  }
  .boss__art {
    aspect-ratio: auto;
    height: 280px;
    width: 100%;
  }
  .variants {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .bestiary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .foe {
    padding: 12px 12px 14px;
  }
  .foe h3 {
    font-size: 1.12rem;
  }
  .foe p {
    font-size: 0.86rem;
  }
  .foe .counter {
    font-size: 0.8rem;
  }
  .chip {
    font-size: 0.66rem;
    padding: 2px 7px;
  }
}

/* ---------- Tiers ---------- */
.section--tiers {
  background:
    radial-gradient(50% 40% at 15% 30%, rgba(57, 242, 208, 0.08), transparent 70%),
    radial-gradient(50% 40% at 90% 70%, rgba(255, 51, 85, 0.07), transparent 70%),
    var(--bg);
  --edge-color: var(--bg);
}
.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.journey::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 29px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #39f2d0, #1fd1a5, #9b5cff, #ffb347, #ff3355, #dde8ff);
  box-shadow: 0 0 18px rgba(155, 92, 255, 0.5);
}
.tier {
  --a: var(--teal);
  position: relative;
  display: flex;
  flex-direction: column;
}
.tier__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a) 40%, #060a1b), #060a1b 72%);
  border: 2px solid var(--a);
  box-shadow: 0 0 24px -2px var(--a), inset 0 0 14px color-mix(in srgb, var(--a) 40%, transparent);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
}
.tier__card {
  flex: 1;
  padding: 16px 16px 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--a) 30%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--a) 10%, rgba(10, 12, 30, 0.9)), rgba(8, 10, 24, 0.92) 60%);
}
.tier h3 {
  font-size: 1.28rem;
  margin: 0 0 4px;
  color: #fff;
}
.tier__unlock {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--a);
}
.tier ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.45;
}
.tier li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 5px;
}
.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a);
}
@media (max-width: 1100px) {
  .journey {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 28px;
  }
  .journey::before {
    display: none;
  }
}
@media (max-width: 640px) {
  .journey {
    grid-template-columns: 1fr;
    row-gap: 12px;
    padding-left: 0;
  }
  .journey::before {
    display: block;
    left: 29px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, #39f2d0, #1fd1a5, #9b5cff, #ffb347, #ff3355, #dde8ff);
  }
  .tier {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 14px;
    align-items: start;
  }
  .tier__node {
    margin: 6px 0 0;
  }
}

/* ---------- Gallery ---------- */
.section--gallery {
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(57, 242, 208, 0.08), transparent 70%),
    var(--bg-deep);
  --edge-color: var(--bg-deep);
  overflow: hidden;
}
.carousel {
  position: relative;
}
.carousel__track {
  display: flex;
  gap: clamp(16px, 2.4vw, 28px);
  margin: 0;
  padding: 20px max(var(--gutter), calc((100vw - var(--maxw)) / 2)) 30px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar {
  display: none;
}
.carousel__track:focus-visible {
  outline-offset: -3px;
}
.shot {
  flex: 0 0 auto;
  width: clamp(220px, 62vw, 280px);
  scroll-snap-align: start;
}
.shot.is-missing {
  display: none;
}
.phone {
  display: block;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 34px;
  background: linear-gradient(160deg, #2a3358, #0d1024 40%, #1a1f3c);
  box-shadow: 0 0 0 1px rgba(125, 249, 255, 0.22), 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 50px -20px rgba(57, 242, 208, 0.5);
  cursor: zoom-in;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.phone:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(125, 249, 255, 0.5), 0 40px 70px -24px rgba(0, 0, 0, 0.9), 0 0 60px -14px rgba(57, 242, 208, 0.7);
}
.phone img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 27px;
  background: #0a0d20;
}
.shot figcaption {
  margin-top: 14px;
  padding-inline: 6px;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.carousel__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
.icon-btn:hover {
  background: rgba(125, 249, 255, 0.1);
  border-color: var(--cyan);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dots {
  display: flex;
  gap: 8px;
  margin: 0 8px;
}
.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s, width 0.2s;
}
.dots span.is-on {
  width: 22px;
  border-radius: 6px;
  background: var(--teal);
}

/* Lightbox + trailer dialogs */
dialog {
  color: var(--text);
}
.modal {
  width: min(96vw, 1100px);
  max-width: none;
  max-height: 96vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.modal::backdrop {
  background: rgba(2, 3, 10, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal__close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 3;
}
.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox__figure img {
  width: auto;
  max-width: 92vw;
  height: min(82vh, 1920px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(125, 249, 255, 0.25), 0 30px 80px rgba(0, 0, 0, 0.8);
  background: #0a0d20;
}
.lightbox__figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
  max-width: 60ch;
}
.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__nav--prev {
  left: 14px;
}
.lightbox__nav--next {
  right: 14px;
}
@media (max-width: 600px) {
  .lightbox__nav {
    top: auto;
    bottom: 14px;
    transform: none;
  }
  .lightbox__figure img {
    height: auto;
    max-height: 74vh;
    width: min(88vw, calc(74vh * 9 / 16));
  }
}
.trailer__frame {
  position: relative;
  display: grid;
  place-items: center;
}
.trailer__frame video {
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(125, 249, 255, 0.25), 0 30px 80px rgba(0, 0, 0, 0.8);
}
.trailer__fallback {
  padding: 40px 28px;
  text-align: center;
  max-width: 480px;
}
.trailer__fallback h2 {
  font-size: 2rem;
}

/* ---------- Features strip ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.feature {
  padding: 24px 22px 22px;
  overflow: hidden;
}
.feature h3 {
  font-size: 1.4rem;
  color: #fff;
  margin: 14px 0 6px;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.feature__visual {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
}
.feature__visual img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.feature__visual.is-missing img {
  visibility: hidden;
}
.speed-chips {
  display: flex;
  gap: 6px;
}
.speed-chips span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 9, 24, 0.8);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--cyan);
}
.speed-chips span:last-child {
  background: linear-gradient(180deg, #6bffe2, var(--teal));
  color: #03121a;
  border: 0;
  box-shadow: 0 0 20px -4px var(--teal);
}
.offline-pop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(176, 124, 255, 0.4);
  background: rgba(155, 92, 255, 0.1);
  font-weight: 800;
  color: #d9c4ff;
  font-size: 0.95rem;
  line-height: 1.2;
}
.offline-pop img {
  width: 34px;
  height: 34px;
}
.big-num {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--nectar);
  text-shadow: 0 0 24px rgba(255, 200, 87, 0.45);
}
@media (max-width: 1000px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(16, 20, 44, 0.55);
  transition: border-color 0.2s, background 0.2s;
}
.faq details[open] {
  border-color: var(--line-strong);
  background: rgba(16, 20, 44, 0.85);
}
.faq summary {
  position: relative;
  display: block;
  padding: 18px 56px 18px 22px;
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.3;
  color: #fff;
  list-style: none;
  border-radius: 18px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -9px;
  border-right: 2.5px solid var(--teal);
  border-bottom: 2.5px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 0.25s;
}
.faq details[open] summary::after {
  transform: rotate(225deg);
  margin-top: -3px;
}
.faq details > div {
  padding: 0 22px 18px;
  color: var(--muted);
}
.faq details > div p:last-child {
  margin: 0;
}
@media (max-width: 900px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Pre-register ---------- */
.section--cta {
  padding-block: clamp(64px, 9vw, 120px);
}
.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 5vw, 60px);
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(60% 90% at 0% 100%, rgba(57, 242, 208, 0.22), transparent 60%),
    radial-gradient(50% 80% at 100% 0%, rgba(155, 92, 255, 0.28), transparent 60%),
    linear-gradient(180deg, #0f1230, #080a1c);
  box-shadow: 0 40px 100px -40px rgba(57, 242, 208, 0.45);
}
.cta .rings {
  left: 0;
  bottom: -40%;
  width: 90%;
  transform: translateX(-30%) scaleY(0.5);
  opacity: 0.6;
}
.cta > :not(.rings) {
  position: relative;
}
.cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}
.form {
  display: grid;
  gap: 12px;
}
.form label {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text);
}
.field {
  display: grid;
  gap: 6px;
}
.input,
.select {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(125, 249, 255, 0.28);
  background: rgba(3, 5, 14, 0.7);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder {
  color: #7a86a6;
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(57, 242, 208, 0.2);
}
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal) 50%), linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.select option {
  background: #0a0d20;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600 !important;
  color: var(--muted) !important;
  font-size: 0.9rem !important;
  line-height: 1.45;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--teal);
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
}
.form .btn {
  width: 100%;
}
.form-status {
  min-height: 1.5em;
  margin: 2px 0 0;
  font-weight: 700;
  color: var(--teal);
}
.form-status.is-error {
  color: #ff9a8a;
}
.form-status.is-soon {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 200, 87, 0.08);
  border: 1px solid rgba(255, 200, 87, 0.35);
  color: var(--nectar);
}
@media (max-width: 860px) {
  .cta {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 40px;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer-brand img {
  width: 240px;
  aspect-ratio: 1376 / 360;
  object-fit: cover;
  object-position: 50% 46%;
  margin: 0 0 10px -13px;
}
.footer-brand.is-missing img {
  display: none;
}
.footer-brand.is-missing .wordmark-fallback {
  display: block;
  font-size: 2rem;
}
.site-footer h2 {
  font-size: 0.8rem;
  font-family: var(--f-body);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.site-footer a {
  color: var(--text);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--cyan);
  text-decoration: underline;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--faint);
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Sub pages (press, privacy, 404) ---------- */
.page-hero {
  position: relative;
  padding: 140px 0 56px;
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(155, 92, 255, 0.2), transparent 70%),
    radial-gradient(50% 70% at 10% 20%, rgba(57, 242, 208, 0.14), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: #fff;
}
.page-hero .rings {
  left: auto;
  right: -20%;
  bottom: -60%;
  width: 70%;
  transform: scaleY(0.5);
  opacity: 0.5;
}
.prose {
  max-width: 760px;
}
.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: #fff;
  margin-top: 1.6em;
}
.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.4em;
}
.prose p,
.prose li {
  color: #cdd6ec;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li {
  margin-bottom: 0.4em;
}
.notice {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 200, 87, 0.45);
  background: rgba(255, 200, 87, 0.08);
  color: #ffe2a3;
  font-weight: 600;
}
.notice strong {
  color: var(--nectar);
}
.press-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
.factsheet {
  position: sticky;
  top: 90px;
  padding: 22px;
}
.factsheet dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.factsheet dt {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.factsheet dd {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 600;
}
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.dl-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(16, 20, 44, 0.6);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.dl-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  color: #fff;
}
.dl-card__img {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(57, 242, 208, 0.12), #070a1c 70%);
}
.dl-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.dl-card__img--cover img {
  object-fit: cover;
}
.dl-card__img--tall {
  aspect-ratio: 9 / 16;
}
.dl-card span {
  display: block;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}
.dl-card small {
  display: block;
  color: var(--faint);
  font-weight: 600;
}
.dl-grid .is-missing {
  display: none;
}
.press-video {
  width: 100%;
  max-width: 320px;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 0 0 1px var(--line-strong);
}
@media (max-width: 900px) {
  .press-grid {
    grid-template-columns: 1fr;
  }
  .factsheet {
    position: static;
  }
}

.notfound {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px var(--gutter) 60px;
  background:
    radial-gradient(50% 50% at 50% 60%, rgba(57, 242, 208, 0.12), transparent 70%),
    var(--bg);
}
.notfound .big {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(6rem, 22vw, 12rem);
  line-height: 0.9;
  background: linear-gradient(180deg, #c9fff5, var(--teal) 50%, #1c5f71);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(57, 242, 208, 0.4));
  margin: 0;
}

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
  .spores-canvas {
    display: none;
  }
}
