/* ===== Tokens ===== */
:root {
  --bg: #0e0e10;
  --bg-raised: #15151a;
  --text: #ede9e3;
  --text-dim: #9a968f;
  --accent: #7b6cf6;
  --accent-soft: #7b6cf63a;
  --amber: #f2a65a;
  --line: #2a2a30;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 80% 20%, var(--accent-soft), transparent 45%);
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
}

.mark {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text);
}

.mark span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
}

.topbar-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.topbar-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ===== Hero ===== */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5) var(--space-5);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 var(--space-2);
  letter-spacing: 0.02em;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 460px;
  margin: 0 0 var(--space-4);
}

/* ===== Form ===== */
.signup {
  display: flex;
  gap: 10px;
  max-width: 440px;
}

.signup input {
  flex: 1;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.signup input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.signup input::placeholder { color: #5e5b56; }

.signup button {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  background: var(--accent);
  color: #0e0e10;
  border: none;
  padding: 14px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
  white-space: nowrap;
}

.signup button:hover { background: #8f82ff; }
.signup button:active { transform: scale(0.97); }

.signup button:focus-visible,
.topbar-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin: var(--space-2) 0 0;
}

/* ===== 3D Hedron ===== */
.hero-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

.scene {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow {
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  filter: blur(10px);
  z-index: 0;
}

.solid {
  position: relative;
  width: 140px;
  height: 140px;
  transform-style: preserve-3d;
  animation: spin 16s linear infinite;
  z-index: 1;
}

.face {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid var(--accent);
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%);
  clip-path: polygon(50% 0%, 100% 38%, 80% 100%, 20% 100%, 0% 38%);
}

.f1 { transform: rotateY(0deg) translateZ(60px); }
.f2 { transform: rotateY(72deg) translateZ(60px); }
.f3 { transform: rotateY(144deg) translateZ(60px); }
.f4 { transform: rotateY(216deg) translateZ(60px); }
.f5 { transform: rotateY(288deg) translateZ(60px); }
.f6 { transform: rotateX(90deg) translateZ(60px); opacity: 0.5; }

@keyframes spin {
  from { transform: rotateY(0deg) rotateX(8deg); }
  to   { transform: rotateY(360deg) rotateX(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .solid { animation: none; }
}

/* ===== Footer ===== */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: var(--space-3);
}

.footer-links a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: var(--space-3) var(--space-3) var(--space-5);
    text-align: left;
  }
  .hero-stage { order: -1; margin-bottom: var(--space-2); }
  .scene { width: 180px; height: 180px; }
  .solid, .face { width: 110px; height: 110px; }
  .f1, .f2, .f3, .f4, .f5, .f6 { transform-origin: center; }
  .topbar { padding: var(--space-2) var(--space-3); }
  .footer { padding: var(--space-3); flex-wrap: wrap; gap: var(--space-2); }
  .signup { flex-direction: column; }
  .signup button { width: 100%; }
}
