:root {
  --bg: #05010d;
  --bg2: #12061f;
  --ink: #f8f1ff;
  --muted: #c9b7e6;
  --muted-dim: #8f7cad;
  --signal: #2de2e6;
  --violet: #7c6cff;
  --heat: #ff3cac;
  --panel: rgba(12, 5, 26, 0.82);
  --panel-border: rgba(124, 108, 255, 0.22);
  --line: rgba(255, 60, 172, 0.2);
  --display: "Chakra Petch", "Segoe UI", sans-serif;
  --ui: "Sora", "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
}

body.home {
  min-height: 100vh;
}

.stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--signal);
  color: #041416;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

a {
  color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #7ef0f3;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(20px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 1, 13, 0.65);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo img {
  border-radius: 10px;
}

.bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  justify-content: flex-end;
}

.bar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.bar nav a:hover {
  color: var(--ink);
}

main {
  flex: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 6vw, 72px) 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted-dim);
  font-size: 0.95rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
}

h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 10px;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 22px;
  border: 1px solid var(--panel-border);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--signal), #1bc4c8);
  color: #041416;
  border-color: transparent;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #4aeef2, var(--signal));
  color: #041416;
}

.btn.soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.btn.ghost {
  background: rgba(124, 108, 255, 0.12);
}

.btn.ghost:hover {
  background: rgba(124, 108, 255, 0.22);
  border-color: var(--violet);
}

.hero-stats {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-stats strong {
  color: var(--ink);
  font-weight: 600;
}

.preview {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview-chrome {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.preview-chrome .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.preview-body {
  display: grid;
  grid-template-columns: 108px 1fr;
  min-height: 280px;
}

.preview-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted-dim);
}

.preview-nav .on {
  color: var(--signal);
  font-weight: 600;
}

.preview-main {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.meter {
  font-size: 0.72rem;
}

.meter .label {
  color: var(--muted-dim);
}

.meter .value {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  margin: 2px 0 6px;
}

.bar-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--signal), var(--violet));
}

.bar-track.empty i {
  display: none;
}

.pulse-line {
  width: 100%;
  height: 56px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.preview-table th {
  text-align: left;
  color: var(--muted-dim);
  font-weight: 500;
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--line);
}

.preview-table td {
  padding: 7px 8px 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.preview-table td:first-child {
  color: var(--ink);
}

.preview figcaption {
  padding: 10px 16px 14px;
  font-size: 0.75rem;
  color: var(--muted-dim);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 58ch;
  margin-bottom: 28px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.bento {
  padding: 24px clamp(20px, 6vw, 72px) 64px;
  max-width: 1280px;
  margin: 0 auto;
}

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

.tile {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.tile.wide {
  grid-column: 1 / -1;
  border-color: rgba(45, 226, 230, 0.25);
  background: linear-gradient(145deg, rgba(45, 226, 230, 0.06), var(--panel));
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.note {
  padding: 0 clamp(20px, 6vw, 72px) 72px;
  max-width: 720px;
  margin: 0 auto;
}

.note p {
  color: var(--muted);
  margin: 0 0 12px;
}

.legal {
  padding: 48px clamp(20px, 6vw, 72px) 72px;
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2rem;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 28px 0 6px;
}

.legal a {
  color: inherit;
  text-underline-offset: 3px;
}

.legal p,
.legal li {
  color: var(--muted);
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 24px clamp(20px, 6vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 0.9rem;
  background: rgba(5, 1, 13, 0.5);
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .preview {
    order: -1;
    max-width: 520px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .tile.wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .bar nav {
    gap: 4px 14px;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .preview-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .preview-meters {
    grid-template-columns: 1fr;
  }
}

.preview.shot {
  padding: 0;
  overflow: hidden;
}

.preview.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Landing v3: hero, platforms, motion ---------- */

/* Glows and floating chips may poke past the viewport; clip without breaking sticky. */
main {
  overflow-x: clip;
}

.hero-xl {
  grid-template-columns: 1.05fr 1fr;
  min-height: min(88vh, 860px);
}

.eyebrow.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(124, 108, 255, 0.1);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(45, 226, 230, 0.6);
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  to {
    box-shadow: 0 0 0 10px rgba(45, 226, 230, 0);
  }
}

.hero-xl h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  margin-top: 18px;
}

.grad {
  display: block;
  background: linear-gradient(100deg, var(--signal), var(--violet) 40%, var(--heat) 70%, var(--signal));
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s linear infinite;
}

@keyframes sheen {
  to {
    background-position: -250% 0;
  }
}

.btn.glow {
  box-shadow: 0 0 0 1px rgba(45, 226, 230, 0.4), 0 10px 40px rgba(45, 226, 230, 0.35);
}

.btn:not(.soon):hover {
  transform: translateY(-2px);
}

.cta.center {
  justify-content: center;
}

/* All platforms on one row: tiles shrink to fit instead of wrapping. */
.hero-os {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 42px));
  gap: clamp(4px, 1vw, 8px);
  margin: 34px 0 0;
  padding: 0;
}

.hero-os li {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 28%;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hero-os li:hover {
  color: var(--signal);
  border-color: rgba(45, 226, 230, 0.5);
  transform: translateY(-3px);
}

.marquee svg,
.chip svg {
  width: 20px;
  height: 20px;
}

.hero-os svg {
  width: 48%;
  height: 48%;
}

/* Screenshot stage */

.stage {
  position: relative;
  perspective: 1400px;
}

.stage .preview {
  position: relative;
  z-index: 1;
  transform: rotateY(var(--ry, -8deg)) rotateX(var(--rx, 4deg));
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(124, 108, 255, 0.3);
}

.halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--signal), var(--violet), var(--heat), var(--signal));
  filter: blur(70px);
  opacity: 0.45;
  animation: spin 18s linear infinite;
}

.chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(12, 5, 26, 0.88);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--signal);
  font-size: 0.82rem;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}

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

.chip b {
  color: var(--ink);
  font-weight: 600;
}

.chip-a {
  top: -4%;
  left: -6%;
}

.chip-b {
  bottom: 10%;
  right: -7%;
  color: var(--heat);
  animation-delay: -2s;
}

.chip-c {
  bottom: -5%;
  left: 8%;
  color: var(--violet);
  animation-delay: -4s;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Marquee */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(12, 5, 26, 0.6);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 30px;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.marquee span:nth-child(3n + 1) svg {
  color: var(--signal);
}

.marquee span:nth-child(3n + 2) svg {
  color: var(--violet);
}

.marquee span:nth-child(3n) svg {
  color: var(--heat);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px clamp(20px, 6vw, 72px) 24px;
}

.stats div {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
}

.stats strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--signal), var(--heat));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Platforms: orbit + cards */

.universe {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) 1.15fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px clamp(20px, 6vw, 72px);
  scroll-margin-top: 80px;
}

.orbit {
  position: sticky;
  top: 110px;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  margin: 0 auto;
  container-type: inline-size;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(124, 108, 255, 0.35);
}

.orbit::before {
  inset: 24%;
}

.orbit::after {
  inset: 5%;
  border-color: rgba(45, 226, 230, 0.25);
}

.orbit-core {
  position: absolute;
  inset: 39%;
  display: grid;
  place-items: center;
  border-radius: 28%;
  box-shadow: 0 0 80px rgba(124, 108, 255, 0.6), 0 0 160px rgba(255, 60, 172, 0.25);
  animation: breathe 4s ease-in-out infinite;
}

.orbit-core img {
  width: 100%;
  height: 100%;
}

@keyframes breathe {
  50% {
    transform: scale(1.06);
  }
}

.ring {
  position: absolute;
  inset: 0;
  animation: spin 40s linear infinite;
}

.ring-2 {
  animation-duration: 60s;
  animation-direction: reverse;
}

.ring i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14cqw;
  height: 14cqw;
  margin: -7cqw 0 0 -7cqw;
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
}

.ring-1 i {
  --r: 26cqw;
}

.ring-2 i {
  --r: 45cqw;
}

.ring i span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 30%;
  background: rgba(12, 5, 26, 0.92);
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  color: var(--ink);
  animation: spin 40s linear infinite reverse;
}

.ring-2 i span {
  animation-duration: 60s;
  animation-direction: normal;
  color: var(--signal);
}

.ring i svg {
  width: 50%;
  height: 50%;
}

.os-group {
  margin-top: 30px;
}

.os-group h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-dim);
  margin-bottom: 12px;
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.os-card,
.tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.os-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.os-card::before,
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--mx, -100px) var(--my, -100px), rgba(45, 226, 230, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.os-card:hover::before,
.tile:hover::before {
  opacity: 1;
}

.os-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 226, 230, 0.45);
}

.os-card > svg {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: rgba(124, 108, 255, 0.14);
  color: var(--ink);
}

.os-card.hot {
  border-color: rgba(45, 226, 230, 0.35);
  background: linear-gradient(145deg, rgba(45, 226, 230, 0.08), var(--panel));
}

.os-card.hot > svg {
  background: rgba(45, 226, 230, 0.18);
  color: var(--signal);
}

.os-card h4 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
}

.os-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Bento upgrades */

.bento-grid {
  grid-template-columns: repeat(4, 1fr);
}

.tile.wide {
  grid-column: span 4;
}

.tile-art {
  height: 70px;
  margin: -6px -8px 14px;
}

.tile-art svg {
  width: 100%;
  height: 100%;
}

.spark {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}

.js .tile.in .spark {
  animation: draw 2.4s ease-out forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.finale {
  text-align: center;
  max-width: 760px;
  padding-top: 32px;
}

.finale h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

/* Scroll reveal (only when JS runs) */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile.wide {
    grid-column: span 2;
  }
}

@media (max-width: 960px) {
  .hero-xl {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .stage {
    order: -1;
    max-width: 560px;
    width: 100%;
    margin: 12px auto 24px;
  }

  .stage .preview {
    order: 0;
    max-width: none;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .universe {
    grid-template-columns: 1fr;
  }

  .orbit {
    position: relative;
    top: 0;
    max-width: 400px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .tile.wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .chip-a {
    left: 0;
  }

  .chip-b {
    right: 0;
  }

  .chip {
    font-size: 0.75rem;
    padding: 7px 10px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stats div {
    padding: 16px 14px;
  }

  .os-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grad,
  .halo,
  .chip,
  .marquee-track,
  .ring,
  .ring i span,
  .orbit-core,
  .live-dot {
    animation: none;
  }

  .spark {
    stroke-dashoffset: 0;
  }

  .js .tile.in .spark {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .stage .preview {
    transform: none;
  }
}

a.os-card {
  color: var(--ink);
  text-decoration: none;
}

a.os-card:hover {
  color: var(--ink);
}

a.os-card:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

a.os-card p {
  color: var(--signal);
}
