/* ═══════════════════════════════════════════════════════════
   zentient.studio — Global Styles
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Background */
  --bg-primary: #0a0e1a;
  --bg-panel: #1E293B;
  --bg-card: #151d2e;
  --border: #334155;
  --border-subtle: rgba(255,255,255,0.06);

  /* Accent */
  --emerald: #10B981;
  --emerald-dim: rgba(16,185,129,0.15);
  --amber: #D97706;
  --amber-dim: rgba(217,119,6,0.15);
  --indigo: #6366F1;
  --indigo-dim: rgba(99,102,241,0.15);
  --cyan: #06B6D4;
  --cyan-dim: rgba(6,182,212,0.12);

  /* Text */
  --text-primary: #F0F0F5;
  --text-secondary: #94A3B8;
  --text-muted: #475569;

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.15; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 1rem;
}

.section-headline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.section-body {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.75;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* ── Gradient Divider ─────────────────────────────────────── */
.gradient-line {
  height: 1px;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--emerald), var(--amber), var(--emerald), transparent);
  opacity: 0.4;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--indigo));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before { opacity: 1; }

/* ── Agent Cards ──────────────────────────────────────────── */
.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.3s;
  transform-style: preserve-3d;
  perspective: 800px;
}

/* Service agents — pop OUT on hover */
.agent-card--service:hover {
  transform: translateY(-8px) translateZ(30px) rotateX(-2deg);
  box-shadow: 0 20px 60px rgba(16,185,129,0.15), 0 0 30px rgba(16,185,129,0.08);
  border-color: var(--emerald);
}

/* Regen agent — depth/portal effect */
.agent-card--regen {
  background: radial-gradient(ellipse at center, #0d1520 0%, var(--bg-card) 70%);
}

.agent-card--regen:hover {
  box-shadow: inset 0 0 60px rgba(6,182,212,0.1), 0 0 30px rgba(6,182,212,0.08);
  border-color: var(--cyan);
}

.agent-card--regen::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(6,182,212,0.08) 0%, transparent 60%);
  pointer-events: none;
  transition: opacity 0.4s;
  opacity: 0;
}

.agent-card--regen:hover::after { opacity: 1; }

/* Agent type badge */
.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.agent-badge--service {
  background: var(--emerald-dim);
  color: var(--emerald);
}

.agent-badge--regen {
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* Agent mesh background */
.agent-mesh {
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  opacity: 0.06;
  pointer-events: none;
  transition: opacity 0.4s;
}

.agent-card:hover .agent-mesh { opacity: 0.15; }

/* Agent card title */
.agent-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.agent-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.agent-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.agent-cta--service {
  background: var(--emerald);
  color: var(--bg-primary);
}

.agent-cta--service:hover {
  background: #34d399;
  box-shadow: 0 0 20px rgba(16,185,129,0.3);
}

.agent-cta--regen {
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
}

.agent-cta--regen:hover {
  background: var(--cyan-dim);
  box-shadow: 0 0 20px rgba(6,182,212,0.2);
}

/* ── Agent Modal / Expanded View ──────────────────────────── */
.agent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.agent-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.agent-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.agent-modal-overlay.active .agent-modal {
  transform: scale(1) translateY(0);
}

/* Regen modal — slides inward instead of popping out */
.agent-modal--regen {
  transform: scale(1.05) translateY(-10px);
}

.agent-modal-overlay.active .agent-modal--regen {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--emerald);
}

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--emerald);
}

.form-submit {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.5rem;
}

.form-submit--service {
  background: var(--emerald);
  color: var(--bg-primary);
}

.form-submit--service:hover {
  box-shadow: 0 0 25px rgba(16,185,129,0.3);
}

/* File drop zone */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.3s;
  cursor: pointer;
}

.file-drop:hover, .file-drop.dragover {
  border-color: var(--emerald);
  color: var(--text-secondary);
  background: var(--emerald-dim);
}

/* ── Journey Questionnaire (Regen) ────────────────────────── */
.journey-step {
  display: none;
}

.journey-step.active {
  display: block;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.journey-progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.journey-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}

.journey-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(6,182,212,0.5);
}

.journey-dot.done {
  background: var(--emerald);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.chip {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chip:hover {
  border-color: var(--cyan);
  color: var(--text-primary);
}

.chip.selected {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.wheel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.wheel-tile {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.wheel-tile:hover {
  border-color: var(--cyan);
}

.wheel-tile.selected {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.journey-response {
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.journey-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  background: var(--cyan);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.journey-cta:hover {
  box-shadow: 0 0 25px rgba(6,182,212,0.3);
}

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-headline {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--emerald);
  color: var(--bg-primary);
}

.btn--primary:hover {
  box-shadow: 0 0 30px rgba(16,185,129,0.3);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── SVG Geometry (Dashboard Viz) ─────────────────────────── */
.geometry-viz {
  width: 100%;
  max-width: 700px;
  margin: 3rem auto;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* ── Fractal Rings (Spirit section) ───────────────────────── */
.fractal-rings {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  position: relative;
  margin: 3rem 0;
}

.fractal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fractal-ring--room {
  width: 60px; height: 60px;
  border-color: var(--emerald);
  background: var(--emerald-dim);
}

.fractal-ring--building {
  width: 120px; height: 120px;
  border-color: var(--amber);
}

.fractal-ring--city {
  width: 200px; height: 200px;
  border-color: var(--indigo);
}

.fractal-ring--planet {
  width: 280px; height: 280px;
  border-color: var(--cyan);
}

.fractal-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: absolute;
  white-space: nowrap;
}

/* ── Proof Section ────────────────────────────────────────── */
.proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.nft-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s;
}

.nft-card:hover {
  border-color: var(--amber);
}

.nft-card--upcoming {
  opacity: 0.6;
}

/* ── Social Proof Bar ─────────────────────────────────────── */
.social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-top: 3rem;
}

.social-proof-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-proof-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

/* ── Join Section ─────────────────────────────────────────── */
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

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

.join-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.join-card:hover {
  border-color: var(--emerald);
  transform: translateY(-4px);
}

.join-card h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.join-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

/* Newsletter form */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.8rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--emerald);
}

.newsletter-form button {
  padding: 0.6rem 1rem;
  background: var(--emerald);
  color: var(--bg-primary);
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
}

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

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

/* ── Scroll Animation States ──────────────────────────────── */
.reveal {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 4rem 0; }
  .stat-value { font-size: 2rem; }
  .agent-card { padding: 1.5rem; }

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

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; filter: none; transform: none; }
  .stagger-item { opacity: 1; transform: none; }
}
