/* ============ Base ============ */
:root {
  --bg: #050507;
  --surface: #0c0c10;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(196, 181, 253, 0.42);
  --text: #f4f4f5;
  --muted: #8c8c96;
  --subtle: #55555f;
  --accent: #c4b5fd;
  --accent-2: #818cf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

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

/* ============ Scroll pages ============ */
.scroller {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: none;
}

.page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 5rem 1.5rem;
  overflow: hidden;
}

.page-inner {
  width: min(100%, 70rem);
}

/* ============ Right-side nav ============ */
.dots {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(-50%);
}

.dots a {
  position: relative;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease, background 0.25s ease;
}

.dots a::before {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: 1.2rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.dots a:hover::before { opacity: 1; }
.dots a:hover { background: rgba(255, 255, 255, 0.65); }
.dots a.is-active { background: var(--accent); transform: scale(1.4); }

/* ============ Typography ============ */
.label {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.title span {
  color: var(--subtle);
}

.section-copy {
  max-width: 28rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ============ Hero ============ */
.hero {
  background:
    radial-gradient(ellipse at 50% 45%, #11111a 0%, #09090d 45%, #030304 100%);
  text-align: center;
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 8% 16%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 29% 73%, #b8b8df 0 1px, transparent 1.5px),
    radial-gradient(circle at 47% 25%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 68% 64%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 87% 17%, #b8b8df 0 1px, transparent 1.5px),
    radial-gradient(circle at 14% 48%, #fff 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 76% 39%, #fff 0 0.7px, transparent 1.2px),
    radial-gradient(circle at 37% 88%, #b8b8df 0 0.7px, transparent 1.2px);
  background-size: 260px 260px, 330px 330px, 390px 390px, 300px 300px, 430px 430px, 180px 180px, 220px 220px, 250px 250px;
  animation: drift 24s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 70px 100px, -80px 60px, 50px -90px, -40px 120px, 70px -60px, 50px 90px, -50px -90px, 80px 50px; }
}

.hero-glow {
  position: absolute;
  z-index: 0;
  width: 35rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.08);
  filter: blur(90px);
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  margin: 0;
  font-size: clamp(4.5rem, 16vw, 12rem);
  font-weight: 600;
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.hero h1 span {
  color: var(--accent);
}

.hero-copy {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.version {
  position: absolute;
  bottom: 1.5rem;
  margin: 0;
  color: var(--subtle);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.version span { padding: 0 0.3rem; }

/* ============ Buttons ============ */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.25rem;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.button--primary {
  background: var(--text);
  color: #09090b;
}

.button--primary:hover {
  box-shadow: 0 0 30px rgba(196, 181, 253, 0.22);
  transform: translateY(-3px);
}

/* ============ Features ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 3rem;
}

.feature-card {
  min-height: 15rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: rgba(196, 181, 253, 0.035);
  transform: translateY(-5px);
}

.card-number {
  margin: 0 0 3rem;
  color: var(--subtle);
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.feature-card p:last-child {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* ============ Terminal ============ */
.interface-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: clamp(2rem, 8vw, 8rem);
}

.terminal {
  overflow: hidden;
  border: 1px solid rgba(196, 181, 253, 0.22);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35), 0 0 3rem rgba(129, 140, 248, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.6rem;
  padding: 0 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.terminal-bar span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #44444e;
}

.terminal-bar span:first-child { background: #f472b6; }
.terminal-bar span:nth-child(2) { background: #a78bfa; }
.terminal-bar span:nth-child(3) { background: #60a5fa; }

.terminal-bar p {
  margin: 0 0 0 0.35rem;
  color: var(--subtle);
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
}

.terminal pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  color: #d4d4db;
  font-family: 'DM Mono', monospace;
  font-size: clamp(0.62rem, 1.1vw, 0.82rem);
  line-height: 1.8;
}

.muted { color: #60606a; }
.accent { color: var(--accent); }
.bright { color: #eeeeef; }
.prompt { color: #c4b5fd; }

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ============ Links / footer ============ */
.links-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 2rem;
}

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li { border-top: 1px solid var(--border); }

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  color: #c8c8ce;
  font-size: 1.05rem;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.link-list a:hover { color: var(--accent); padding-left: 0.5rem; }
.link-list span { color: var(--subtle); }

.footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--subtle);
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
}

.footer p { margin: 0; }

/* ============ Reveal animations ============ */
.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(24px);
  transition: opacity 0.75s ease, filter 0.75s ease, transform 0.75s ease;
}

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

.feature-card:nth-child(2) { transition-delay: 0.08s; }
.feature-card:nth-child(3) { transition-delay: 0.16s; }
.feature-card:nth-child(4) { transition-delay: 0.24s; }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card { min-height: 11rem; }
  .card-number { margin-bottom: 1.5rem; }
  .interface-layout, .links-inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page { padding: 3rem 1.4rem; }
  .dots { display: none; }
  .feature-grid { grid-template-columns: 1fr; gap: 0.6rem; margin-top: 2rem; }
  .feature-card { min-height: auto; }
  .footer { flex-direction: column; gap: 0.5rem; margin-top: 2rem; }
  .hero h1 { letter-spacing: -0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars, .cursor { animation: none !important; }
}