@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --accent: #0070f3;
  --accent-dim: rgba(0,112,243,0.08);
  --text-primary: #111111;
  --text-body: #555555;
  --text-secondary: #5a5c63;
  --text-tertiary: #888888;
  --text-faint: #b0b0b0;
  --border: #e5e7eb;
  --font: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --col: 780px;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: var(--accent-dim);
  color: var(--text-primary);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text-body);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ───── Nav ───── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
}

.nav-inner {
  max-width: var(--col);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 2px solid #000;
}

.nav-brand {
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: lowercase;
  margin-right: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  text-transform: lowercase;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.btn-login {
  border: 1px solid var(--border);
  background: none;
  font-family: var(--font);
  font-size: 14px;
  text-transform: lowercase;
  padding: 6px 16px;
  margin-left: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}

.btn-login:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 16px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
}

/* ───── Snap Scroll ───── */
.snap-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  padding-top: 56px;
}

.snap-section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-inner {
  max-width: var(--col);
  width: 100%;
  padding: 48px 32px;
}

/* ───── Headings ───── */
h1, h2 {
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  text-transform: lowercase;
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 28px;
  margin-bottom: 24px;
  border-bottom: 2px solid #000;
  padding-bottom: 12px;
}

/* ───── Hero ───── */
.hero-inner {
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 64px;
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.hero-geometry {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  perspective: 600px;
  transform: translateY(calc(var(--scroll, 0) * 0.3px));
  will-change: transform;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.scroll-arrow {
  display: block;
  width: 1px;
  height: 24px;
  background: var(--text-faint);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ───── 3D Geometry ───── */
.geo-cube {
  width: 80px;
  height: 80px;
  margin: 20px auto;
  border: 2px solid #000;
  transform-style: preserve-3d;
  animation: rotateCube 20s linear infinite;
  position: relative;
}

.geo-cube::before,
.geo-cube::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.geo-cube::after {
  transform: rotateY(45deg);
}

/* geo-square: NO transform here — stays inside its container */
.geo-square {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 400px;
  flex-shrink: 0;
}

.geo-polyhedron {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  transform-style: preserve-3d;
  animation: rotateCube 15s linear infinite;
  position: relative;
}

.geo-polyhedron::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  transform: rotateY(60deg);
}

.geo-grid {
  width: 32px;
  height: 32px;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.3) 0px,
    rgba(255, 255, 255, 0.3) 1px,
    transparent 1px,
    transparent 8px
  ),
  repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.3) 0px,
    rgba(255, 255, 255, 0.3) 1px,
    transparent 1px,
    transparent 8px
  );
  animation: gridShift 10s linear infinite;
}

.geo-octahedron {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  transform: rotate(45deg);
  transform-style: preserve-3d;
  animation: rotateCube 12s linear infinite;
  position: relative;
}

.geo-octahedron::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
}

.geo-wireframe {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  position: relative;
}

.geo-wireframe::before,
.geo-wireframe::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.geo-wireframe::before {
  transform: rotateY(60deg);
}

.geo-wireframe::after {
  transform: rotateX(60deg);
}

/* ───── Keyframes ───── */
@keyframes rotateCube {
  from { transform: rotateX(-20deg) rotateY(0deg); }
  to   { transform: rotateX(-20deg) rotateY(360deg); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

@keyframes gridShift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 8px, 8px 0; }
}

/* ───── Build Cards (scroll-driven, replaces accordion) ───── */
.build-card {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow: hidden;
}

.build-card-header {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 20px;
}

.build-card-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: lowercase;
}

.build-card-body {
  padding: 0 16px 24px;
  padding-left: 100px; /* aligned past the geo-square */
}

.build-card-body p {
  line-height: 1.7;
  color: var(--text-body);
  max-width: 560px;
}

/* ───── How We Work ───── */
.vibe-text {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-primary);
  max-width: 600px;
}

/* ───── Forms ───── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg);
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.form-group textarea {
  resize: vertical;
}

/* ───── Buttons ───── */
.btn {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 24px;
  border: none;
  text-transform: lowercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-primary:hover {
  background: #333;
}

.btn-primary:disabled {
  background: #999;
  cursor: not-allowed;
}

/* ───── Captcha Status ───── */
.captcha-status {
  font-size: 13px;
  color: var(--text-tertiary);
  min-height: 20px;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

/* ───── Form Result ───── */
.form-result {
  margin-top: 12px;
  font-size: 14px;
}

.form-result.success { color: #16a34a; }
.form-result.error   { color: #dc2626; }

/* ───── Consent Overlay ───── */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.consent-overlay.hidden {
  display: none;
}

.consent-box {
  background: #fff;
  padding: 40px;
  max-width: 420px;
  text-align: center;
  line-height: 1.6;
}

.consent-box p {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-body);
}

.consent-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.consent-actions a {
  font-size: 13px;
  color: var(--accent);
}

/* ───── Login Modal ───── */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.modal-box {
  background: #fff;
  padding: 40px;
  max-width: 380px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  line-height: 1;
}

.modal-box h2 {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
}

/* ───── Footer ───── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg);
  border-top: 2px solid #000;
}

.footer-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 12px 32px;
  font-size: 13px;
  color: var(--text-tertiary);
}

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

/* ───── Responsive ───── */
@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 2px solid #000;
    padding: 16px 32px;
    gap: 16px;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero-title {
    font-size: 40px;
  }

  .section-inner {
    padding: 32px 20px;
  }

  h2 {
    font-size: 24px;
  }

  .build-card-body {
    padding-left: 16px;
  }
}

/* ───── Reduced Motion ───── */
@media (prefers-reduced-motion: reduce) {
  .snap-container {
    scroll-snap-type: none;
  }

  .geo-cube,
  .geo-polyhedron,
  .geo-grid,
  .geo-octahedron {
    animation: none;
  }

  .scroll-arrow {
    animation: none;
  }
}

/* ───── Focus Visible ───── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
