:root {
  --bg: #04070f;
  --bg-elevated: #0a101c;
  --ink: #f4f6fb;
  --muted: rgba(232, 236, 246, 0.68);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #9fd4ff;
  --accent-deep: #3d8ec9;
  --glow: #6eb8ef;
  --solid: #f5f7fc;
  --solid-ink: #071018;
  --radius: 10px;
  --font-display: "Unbounded", "Trebuchet MS", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --max: 1120px;
  --narrow: 720px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  background: var(--bg);
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.55rem, 3.4vw, 2.45rem);
  text-transform: uppercase;
}

h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

li + li {
  margin-top: 0.35rem;
}

/* Atmosphere */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 70% 20%, rgba(55, 110, 170, 0.28), transparent 55%),
    radial-gradient(90% 70% at 20% 80%, rgba(20, 70, 110, 0.22), transparent 50%),
    linear-gradient(180deg, #02050b 0%, #07111d 45%, #04070f 100%);
}

.cosmos__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite alternate;
}

.cosmos__glow--a {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: 8%;
  right: 8%;
  background: radial-gradient(circle, rgba(110, 184, 239, 0.45), transparent 70%);
}

.cosmos__glow--b {
  width: min(45vw, 420px);
  height: min(45vw, 420px);
  bottom: 18%;
  left: 5%;
  background: radial-gradient(circle, rgba(70, 130, 190, 0.35), transparent 70%);
  animation-delay: -7s;
}

.cosmos__star {
  position: absolute;
  top: 22%;
  right: 28%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 18px 6px rgba(159, 212, 255, 0.85),
    0 0 60px 20px rgba(100, 170, 230, 0.35);
  animation: pulse 4.5s ease-in-out infinite;
}

.cosmos__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-24px, 18px, 0) scale(1.08);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

/* Chrome */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  background: rgba(4, 7, 15, 0.55);
  border-bottom: 1px solid transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar__nav {
  display: none;
  gap: 1.25rem;
  margin-left: auto;
  margin-right: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.topbar .btn {
  margin-left: auto;
}

@media (min-width: 860px) {
  .topbar__nav {
    display: flex;
  }

  .topbar .btn {
    margin-left: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--solid {
  background: var(--solid);
  color: var(--solid-ink);
}

.btn--solid:hover {
  background: #ffffff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--ink);
  width: 100%;
}

.btn--outline:hover {
  border-color: #fff;
}

/* Sections */
.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.section__inner--narrow {
  width: min(100%, var(--narrow));
  text-align: center;
}

.section__inner--narrow .btn {
  margin-top: 0.5rem;
}

.section__text {
  max-width: 42rem;
  font-size: 1.05rem;
}

.section__text--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Hero — one composition, text left + visual right */
.hero {
  min-height: calc(100svh - 4.5rem);
  display: grid;
  align-items: center;
  padding: clamp(2.5rem, 8vh, 5rem) clamp(1.5rem, 5vw, 3.5rem) clamp(3rem, 8vh, 5rem);
}

.hero__inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.hero__copy {
  width: min(100%, 560px);
  padding-left: clamp(0.35rem, 1.5vw, 1rem);
}

.hero__visual {
  position: relative;
  justify-self: stretch;
  width: min(100%, 640px);
  margin-inline: auto;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: hero-visual-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(196, 176, 138, 0.07),
    rgba(158, 184, 208, 0.1) 45%,
    transparent 72%
  );
  filter: blur(44px);
  z-index: -1;
  pointer-events: none;
}

.hero__scene {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  background: transparent;
  overflow: visible;
}

.hero__scene-mark {
  fill: #d8c9a6;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

@keyframes hero-visual-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1.12);
  }
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .hero__visual {
    width: min(100%, 760px);
    max-width: min(52vw, 780px);
    margin-inline: 0;
    justify-self: end;
  }

  .hero__copy {
    padding-left: clamp(0.75rem, 2.5vw, 1.75rem);
  }
}

@media (max-width: 899px) {
  .hero__inner {
    grid-template-rows: auto auto;
  }

  .hero__visual {
    order: 2;
    margin-top: 0.5rem;
  }

  .hero__copy {
    order: 1;
  }
}

.hero__title {
  display: grid;
  gap: 0.15em;
  margin-bottom: 1.25rem;
  font-size: clamp(2.4rem, 8vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hero__title span {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero__title span:nth-child(1) {
  animation-delay: 0.08s;
}
.hero__title span:nth-child(2) {
  animation-delay: 0.18s;
}
.hero__title span:nth-child(3) {
  animation-delay: 0.28s;
}
.hero__title span:nth-child(4) {
  animation-delay: 0.38s;
}

.hero__lead {
  max-width: 34rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

.hero .btn {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.72s forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Method pillars */
.pillars {
  list-style: none;
  display: grid;
  gap: 1.5rem;
  margin: 2.75rem 0 0;
  padding: 0;
}

@media (min-width: 800px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.pillar {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.pillar__n {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.pillar p {
  margin-bottom: 0;
}

/* Arcanes */
.arcanes {
  text-align: center;
}

.arcanes__quote {
  margin: 0 auto 2rem;
  max-width: 38rem;
  color: rgba(244, 246, 251, 0.78);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.55;
}

.arcanes h2 {
  margin-bottom: 0.65rem;
}

/* Dashboard */
.dashboard h2,
.aspects h2,
.lots h2,
.privacy h2,
.signup h2 {
  text-align: center;
}

.dashboard .section__text {
  margin-bottom: 0;
}

.star-stage {
  display: grid;
  place-items: center;
  margin: 2.5rem auto 2rem;
  width: min(100%, 420px);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.star-stage.is-drawn {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.star-stage__svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 22px rgba(158, 184, 208, 0.22));
}

.star-stage__line {
  /* --star-len set in main.js from getTotalLength() (~3666); old hard-coded 2200 truncated the octagram */
  stroke-dasharray: var(--star-len, 3700);
  stroke-dashoffset: var(--star-len, 3700);
  fill: rgba(184, 206, 224, 0);
  fill-opacity: 0;
  transition: none;
}

.star-stage.is-drawn .star-stage__line {
  animation:
    draw-star 2.6s ease forwards,
    fill-star 0.9s ease 2.35s forwards;
}

.star-stage.is-drawn.is-complete .star-stage__line {
  animation: none;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  fill: rgba(184, 206, 224, 0.48);
  fill-opacity: 1;
}

.star-stage__nums text {
  fill: #e8eef5;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0;
}

.star-stage.is-drawn .star-stage__nums text {
  animation: star-nums-in 0.7s ease 1.5s forwards;
}

.star-stage.is-drawn.is-complete .star-stage__nums text {
  animation: none;
  opacity: 1;
}

.star-stage__nums text.is-master {
  fill: #d8c9a6;
  font-weight: 600;
}

.star-stage__core {
  opacity: 0.85;
}

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

@keyframes fill-star {
  to {
    fill: rgba(184, 206, 224, 0.48);
    fill-opacity: 1;
  }
}

@keyframes star-nums-in {
  to {
    opacity: 1;
  }
}

.steps {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.step {
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--line);
}

.step p,
.step ul {
  margin-bottom: 0;
}

/* Aspects — rows, not card spam */
.aspect-list {
  display: grid;
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.aspect {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .aspect {
    grid-template-columns: 220px 1fr;
    align-items: baseline;
    gap: 2rem;
  }
}

.aspect p {
  margin: 0;
}

/* Lots — one featured purchase card */
.lot-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  justify-content: center;
}

.lot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(100%, 420px);
  margin-inline: auto;
  padding: 1.5rem 1.35rem 1.35rem;
  background: rgba(10, 16, 28, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.lot--featured {
  border-color: rgba(159, 212, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(159, 212, 255, 0.12), 0 20px 50px rgba(0, 0, 0, 0.25);
}

.lot__badge {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lot__price {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: 0.04em;
}

.lot__amount {
  font-weight: 600;
}

.lot ul {
  flex: 1;
  padding-left: 1.1rem;
  margin-bottom: 0.5rem;
}

.lot .btn--solid {
  width: 100%;
}

/* Buy modal */
.buy-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.buy-modal[hidden] {
  display: none;
}

.buy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 11, 0.72);
  backdrop-filter: blur(8px);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.buy-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 1.75rem 1.5rem 1.5rem;
  background: linear-gradient(165deg, rgba(14, 22, 36, 0.98), rgba(7, 12, 22, 0.98));
  border: 1px solid rgba(159, 212, 255, 0.28);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.buy-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.buy-modal__close:hover {
  color: var(--ink);
}

.buy-modal h2 {
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  text-transform: uppercase;
}

.buy-modal__lead {
  margin-bottom: 1rem;
  font-size: 0.98rem;
}

.buy-modal__lot,
.buy-modal__email {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 246, 251, 0.88);
  font-size: 0.95rem;
}

.buy-form {
  display: grid;
  gap: 0.85rem;
  text-align: left;
}

.buy-form label {
  display: grid;
  gap: 0.4rem;
}

.buy-form label span {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.buy-form input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  outline: none;
}

.buy-form input:focus {
  border-color: rgba(159, 212, 255, 0.65);
}

.buy-form .btn {
  width: 100%;
  margin-top: 0.2rem;
}

.form-note--error {
  color: #ffb4b4;
  text-align: left;
  min-height: 0;
}

.buy-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.buy-actions .btn {
  width: 100%;
}

body.is-buy-open {
  overflow: hidden;
}

/* Signup form */
.signup-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
  text-align: left;
}

.signup-form label {
  display: grid;
  gap: 0.4rem;
}

.signup-form label span {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.signup-form input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  outline: none;
}

.signup-form input:focus {
  border-color: rgba(159, 212, 255, 0.65);
}

.signup-form .btn {
  width: 100%;
  margin-top: 0.35rem;
}

.form-note {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent);
  text-align: center;
}

/* Footer */
.footer {
  padding: 3rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
  border-top: 1px solid var(--line);
}

.footer__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

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

.footer__mail a {
  color: var(--muted);
}

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

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

.footer__legal {
  margin: 0;
  max-width: 40rem;
  font-size: 0.85rem;
  color: rgba(232, 236, 246, 0.45);
}

.footer__links a[aria-current="page"] {
  color: var(--ink);
}

/* Legal document pages */
.legal-page .topbar {
  position: relative;
}

.legal {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.25rem 4rem;
}

.legal__inner {
  width: min(100%, var(--narrow));
  margin: 0 auto;
}

.legal__crumb {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.legal__crumb a {
  color: var(--muted);
}

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

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.legal__meta {
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
  color: rgba(232, 236, 246, 0.45);
}

.legal h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  text-align: left;
  text-transform: none;
  letter-spacing: 0.01em;
}

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

.legal ul,
.legal ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.45rem;
}

.legal li::marker {
  color: rgba(159, 212, 255, 0.55);
}

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

.legal code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 236, 246, 0.88);
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

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

.legal__contact {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 16, 28, 0.65);
  color: var(--ink);
  font-size: 0.95rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal {
  opacity: 1;
  transform: none;
}

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

  .cosmos__glow,
  .cosmos__star,
  .hero__title span,
  .hero__lead,
  .hero .btn,
  .hero__visual,
  .star-stage.is-drawn .star-stage__line,
  .star-stage.is-drawn .star-stage__nums text {
    animation: none !important;
  }

  .star-stage.is-drawn .star-stage__line,
  .star-stage.is-drawn.is-complete .star-stage__line {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    fill: rgba(184, 206, 224, 0.48);
    fill-opacity: 1;
  }

  .hero__title span,
  .hero__lead,
  .hero .btn,
  .hero__visual,
  .star-stage,
  .star-stage__nums text,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
