:root {
  --bg: #04060c;
  --bg-panel: rgba(12, 16, 28, 0.82);
  --fg: #f0f7ff;
  --muted: #8b95a7;
  --accent: #7800ff;
  --accent-alt: #3f9dff;
  --border: rgba(120, 0, 255, 0.3);
  --shadow: rgba(120, 0, 255, 0.18);
  font-family: "IBM Plex Mono", "Fira Mono", Consolas, "Courier New", monospace;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  background: radial-gradient(circle at 20% 0%, rgba(120, 0, 255, 0.12), transparent 60%),
              radial-gradient(circle at 80% 10%, rgba(63, 157, 255, 0.12), transparent 65%),
              var(--bg);
}

.background-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.background-video__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.3) brightness(0.6);
}

.background-video__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 4, 16, 0.6), rgba(7, 4, 16, 0.9));
}

.faint-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  mix-blend-mode: screen;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem clamp(1.5rem, 4vw, 4rem);
  background: rgba(4, 6, 12, 0.72);
  border-bottom: 1px solid rgba(120, 0, 255, 0.3);
  box-shadow: 0 16px 40px -30px rgba(120, 0, 255, 0.45);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent-alt);
}

.topbar__nav {
  display: flex;
  gap: 1.8rem;
}

.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.topbar__nav a:hover {
  color: var(--accent);
}

/* Topbar Auth Buttons */
.topbar__auth {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn--ghost {
  color: var(--fg);
  border-color: rgba(120, 0, 255, 0.4);
  background: rgba(120, 0, 255, 0.1);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: rgba(120, 0, 255, 0.2);
  box-shadow: 0 0 15px var(--shadow);
  color: var(--accent);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
  border: none;
  box-shadow: 0 4px 12px var(--shadow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(120, 0, 255, 0.15);
  border-radius: 6px;
  border: 1px solid rgba(120, 0, 255, 0.3);
}

.topbar__user-name {
  color: var(--accent-alt);
  font-weight: 600;
  font-size: 0.9rem;
}

.topbar__user-progress {
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.btn--logout {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
}

.btn--logout:hover {
  background: rgba(255, 107, 107, 0.25);
  border-color: #ff6b6b;
}

.wrap {
  position: relative;
  z-index: 2;
  padding: 4rem clamp(1.5rem, 4vw, 5rem) 5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 5rem);
  backdrop-filter: blur(2px);
}

.hero {
  max-width: 840px;
}

.hero__eyebrow {
  color: var(--accent-alt);
  letter-spacing: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__lead {
  margin: 0 0 2rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.hero__stats div {
  min-width: 120px;
  background: rgba(8, 6, 18, 0.78);
  border: 1px solid rgba(120, 0, 255, 0.4);
  border-radius: 1rem;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 25px 35px -32px rgba(120, 0, 255, 0.4);
}

.stat__value {
  font-size: 1.8rem;
  color: var(--accent);
  display: block;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.labs__header h2,
.roadmap h2 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 0.6rem;
}

.labs__header p {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 64ch;
  line-height: 1.6;
}

.labs__grid {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lab-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(9, 7, 18, 0.82);
  border: 1px solid rgba(120, 0, 255, 0.35);
  border-radius: 1.2rem;
  padding: 1.7rem;
  box-shadow: 0 28px 40px -30px rgba(120, 0, 255, 0.35);
  min-height: 240px;
  transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.45s ease;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

.lab-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(120, 0, 255, 0.5), rgba(63, 157, 255, 0.4));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -2;
}

.lab-card:hover::before {
  opacity: 0.25;
}

.lab-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}

.lab-card__tag {
  color: var(--accent-alt);
}

.lab-card__status {
  color: var(--accent);
}

.lab-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.lab-card__desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.lab-card__link {
  align-self: flex-start;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 0, 255, 0.5);
  color: var(--fg);
  background: rgba(120, 0, 255, 0.18);
  transition: background 0.2s ease, color 0.2s ease;
}

.lab-card__link:hover {
  background: rgba(120, 0, 255, 0.35);
  color: var(--accent-alt);
}

.lab-card--soon .lab-card__link {
  pointer-events: none;
}

.lab-card__link--disabled {
  border-color: rgba(139, 149, 167, 0.3);
  color: rgba(139, 149, 167, 0.8);
  background: rgba(139, 149, 167, 0.15);
}

.lab-card--soon .lab-card__status {
  color: rgba(139, 149, 167, 0.9);
}

.roadmap__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.roadmap__item {
  background: rgba(9, 7, 18, 0.78);
  border: 1px solid rgba(63, 157, 255, 0.32);
  border-radius: 1.1rem;
  padding: 1.2rem 1.5rem;
  color: var(--muted);
  line-height: 1.55;
  box-shadow: 0 20px 36px -28px rgba(63, 157, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.roadmap__item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(120, 0, 255, 0.16), rgba(63, 157, 255, 0.12));
  opacity: 0.85;
  pointer-events: none;
}

.roadmap__item h3 {
  margin: 0;
  position: relative;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-alt);
}

.roadmap__item p {
  margin: 0;
  position: relative;
}

.roadmap__tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.roadmap__tag {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 0, 255, 0.35);
  background: rgba(120, 0, 255, 0.16);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--fg);
}

.roadmap__tag--priority {
  border-color: rgba(255, 95, 109, 0.6);
  background: rgba(255, 95, 109, 0.2);
  color: #ff9aa6;
}

.roadmap__tag--inflight {
  border-color: rgba(63, 157, 255, 0.6);
  background: rgba(63, 157, 255, 0.18);
  color: var(--accent-alt);
}

.roadmap__tag--planned {
  border-color: rgba(139, 149, 167, 0.35);
  background: rgba(139, 149, 167, 0.16);
  color: rgba(139, 149, 167, 0.85);
}

.footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}

.footer__support {
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(63, 157, 255, 0.45);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(63, 157, 255, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.footer__support:hover {
  transform: translateY(-3px);
  background: rgba(63, 157, 255, 0.22);
  box-shadow: 0 18px 28px -20px rgba(63, 157, 255, 0.5);
}

.footer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(63, 157, 255, 0.9), rgba(120, 0, 255, 0.7));
  color: #fff;
  box-shadow: 0 8px 16px -10px rgba(63, 157, 255, 0.6);
}

.footer__icon svg {
  width: 1rem;
  height: 1rem;
}

.glitch {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 2px rgba(120, 0, 255, 0.5);
  animation: glitch-skew 3.5s infinite linear alternate;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.6;
  clip-path: inset(0 0 0 0);
}

.glitch::before {
  color: rgba(120, 0, 255, 0.7);
  transform: translate(-2px, 1px);
  animation: glitch-before 2.8s infinite linear alternate;
}

.glitch::after {
  color: rgba(63, 157, 255, 0.7);
  transform: translate(2px, -1px);
  animation: glitch-after 3.2s infinite linear alternate;
}

.cta-panel {
  background: rgba(9, 7, 18, 0.78);
  border: 1px solid rgba(120, 0, 255, 0.3);
  border-radius: 1.2rem;
  padding: clamp(1.8rem, 4vw, 2.4rem);
  box-shadow: 0 32px 45px -35px rgba(120, 0, 255, 0.35);
  text-align: center;
}

.cta-panel h2 {
  margin-top: 0;
}

.cta-panel a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(63, 157, 255, 0.4);
  color: var(--fg);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 1.4rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.cta-panel a:hover {
  background: rgba(63, 157, 255, 0.2);
  color: var(--accent-alt);
}

[data-animate] {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.animations-enabled [data-animate] {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
}

body.animations-enabled [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.roadmap-page {
  padding: 3rem clamp(1.5rem, 4vw, 4rem) 4rem;
}

body.roadmap-page .topbar {
  position: static;
  margin-bottom: 2.5rem;
}

.roadmap-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  gap: clamp(2.4rem, 5vw, 3.5rem);
}

.roadmap-hero {
  display: grid;
  gap: 1.6rem;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(120, 0, 255, 0.22), rgba(63, 157, 255, 0.18));
  border: 1px solid rgba(120, 0, 255, 0.35);
  box-shadow: 0 28px 50px -32px rgba(120, 0, 255, 0.45);
  position: relative;
}

.roadmap-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
}

.roadmap-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.roadmap-hero::after {
  content: '';
  position: absolute;
  inset: 1.2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.roadmap-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.roadmap-stats > div {
  min-width: 120px;
  padding: 1rem 1.4rem;
  border-radius: 1rem;
  background: rgba(9, 7, 18, 0.78);
  border: 1px solid rgba(63, 157, 255, 0.4);
  box-shadow: 0 18px 36px -24px rgba(63, 157, 255, 0.45);
  position: relative;
}

body.roadmap-page .stat__value {
  font-size: 1.7rem;
  color: var(--accent-alt);
}

.roadmap-stats > div::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.roadmap-phase {
  background: rgba(9, 7, 18, 0.8);
  border: 1px solid rgba(120, 0, 255, 0.28);
  border-radius: 1.3rem;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  display: grid;
  gap: 1.8rem;
  position: relative;
}

.roadmap-phase::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 1.6rem;
  bottom: 1.6rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(120, 0, 255, 0.8), rgba(63, 157, 255, 0.5));
}

.roadmap-phase:nth-of-type(2)::before { background: linear-gradient(180deg, rgba(63, 157, 255, 0.8), rgba(120, 0, 255, 0.5)); }
.roadmap-phase:nth-of-type(3)::before { background: linear-gradient(180deg, rgba(65, 214, 133, 0.85), rgba(63, 157, 255, 0.4)); }
.roadmap-phase:nth-of-type(4)::before { background: linear-gradient(180deg, rgba(255, 95, 109, 0.85), rgba(120, 0, 255, 0.45)); }
.roadmap-phase:nth-of-type(5)::before { background: linear-gradient(180deg, rgba(255, 176, 67, 0.85), rgba(120, 0, 255, 0.45)); }

.roadmap-phase header {
  display: grid;
  gap: 0.8rem;
}

.roadmap-phase__range {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(63, 157, 255, 0.4);
  color: var(--accent-alt);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  background: rgba(63, 157, 255, 0.12);
}

.roadmap-phase h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.roadmap-phase header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.module-list {
  display: grid;
  gap: 1.4rem;
}

.module {
  padding: 1.2rem 1.4rem;
  border-radius: 1rem;
  background: rgba(5, 6, 13, 0.72);
  border: 1px solid rgba(120, 0, 255, 0.22);
  display: grid;
  gap: 0.9rem;
  position: relative;
}

.module h3 {
  margin: 0;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-alt);
}

.module dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.module dl div {
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  background: rgba(8, 6, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.module dl div:nth-child(odd) {
  background: rgba(63, 157, 255, 0.08);
  border-color: rgba(63, 157, 255, 0.14);
}

.module dl div:nth-child(even) {
  background: rgba(120, 0, 255, 0.08);
  border-color: rgba(120, 0, 255, 0.14);
}

.module dl div:last-child {
  background: rgba(65, 214, 133, 0.12);
  border-color: rgba(65, 214, 133, 0.24);
}

.module dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(140, 220, 255, 0.7);
}

.module dd {
  margin: 0;
  color: var(--fg);
  line-height: 1.5;
}

@media (max-width: 720px) {
  body.roadmap-page {
    padding: 2.4rem 1.4rem 3rem;
  }

  .roadmap-stats > div {
    flex: 1 1 110px;
  }

  .module {
    padding: 1.1rem 1.2rem;
  }

  .module dl div {
    padding: 0.55rem 0.65rem;
  }
}

.lab-card[data-tilt],
.panel[data-tilt],
.hero__visual[data-tilt] {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .lab-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 60px -35px rgba(120, 0, 255, 0.5);
  }

  .panel[data-animate]:hover,
  .hero__visual:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 60px -35px rgba(120, 0, 255, 0.45);
  }
}

@keyframes glitch-skew {
  0%, 100% { transform: skew(0.5deg); }
  50% { transform: skew(-0.5deg); }
}

@keyframes glitch-before {
  0% { clip-path: inset(0 0 80% 0); }
  20% { clip-path: inset(20% 0 40% 0); }
  40% { clip-path: inset(60% 0 10% 0); }
  60% { clip-path: inset(10% 0 70% 0); }
  80% { clip-path: inset(40% 0 30% 0); }
  100% { clip-path: inset(5% 0 20% 0); }
}

@keyframes glitch-after {
  0% { clip-path: inset(80% 0 0 0); }
  20% { clip-path: inset(40% 0 20% 0); }
  40% { clip-path: inset(10% 0 60% 0); }
  60% { clip-path: inset(70% 0 10% 0); }
  80% { clip-path: inset(30% 0 40% 0); }
  100% { clip-path: inset(20% 0 5% 0); }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    gap: 0.8rem;
  }

  .topbar__nav {
    gap: 1rem;
  }

  .hero__stats {
    gap: 1rem;
  }

  .lab-card {
    min-height: auto;
  }
}
