/* =========================================================
   AnantrixLabs — Cosmic Gen
   Design tokens
   ========================================================= */
:root {
  /* Surface */
  --bg: #0a0a0f;
  --bg-elev: #0f0f17;
  --surface: #14141d;
  --surface-2: #1a1a25;
  --surface-3: #20202c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.22);

  /* Text */
  --text: #ededed;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-dim: #52525b;

  /* Brand */
  --violet: #8b5cf6;
  --violet-2: #7c3aed;
  --violet-dim: rgba(139, 92, 246, 0.18);
  --cyan: #06b6d4;
  --cyan-2: #0891b2;
  --cyan-dim: rgba(6, 182, 212, 0.18);

  --grad: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(139, 92, 246, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--violet);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
  --t-slow: 420ms;

  /* Layout */
  --container: 1200px;
  --container-narrow: 960px;
  --nav-h: 64px;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }

/* Accessibility helpers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 100;
  padding: 12px 16px; background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: rgba(139, 92, 246, 0.35); color: #fff; }

/* =========================================================
   Container & section primitives
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}
@media (min-width: 768px) { .container { padding-inline: 32px; } }
@media (min-width: 1280px) { .container { padding-inline: 40px; } }

.section { padding: 80px 0; position: relative; }
@media (min-width: 768px) { .section { padding: 120px 0; } }
.section-dark { background: var(--bg-elev); }
.section-dark + .section-dark { background: var(--bg); }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
@media (min-width: 768px) { .section-head { margin-bottom: 72px; } }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  margin-bottom: 20px;
}

.section-sub {
  color: var(--text-2);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  border: 1px solid transparent;
  user-select: none;
  cursor: pointer;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-lg { padding: 14px 24px; min-height: 52px; font-size: 16px; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(139, 92, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -8px rgba(139, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--border-bright); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--text); }

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color var(--t-med) var(--ease), border-color var(--t-med) var(--ease), backdrop-filter var(--t-med) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header[data-elevate="on"] {
  background: rgba(10, 10, 15, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 6px 4px;
}
.brand-mark { color: var(--violet); display: inline-flex; }
.brand:hover .brand-mark { color: var(--cyan); transition: color var(--t-med) var(--ease); }

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.nav-cta { display: none; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 1024px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  margin-left: auto;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--text);
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.04); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(10, 10, 15, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 16px 24px 24px;
  border-bottom: 1px solid var(--border);
  z-index: 49;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  display: block;
  padding: 14px 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  border-radius: var(--r-md);
}
.mobile-menu a:hover { background: rgba(255, 255, 255, 0.04); }
.mobile-menu .btn-full { margin-top: 8px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 96px;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 768px) { .hero { padding-top: calc(var(--nav-h) + 120px); padding-bottom: 140px; } }

.hero-bg {
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 60%),
    radial-gradient(50% 40% at 90% 20%, rgba(6, 182, 212, 0.14) 0%, transparent 60%),
    radial-gradient(80% 60% at 50% 100%, rgba(139, 92, 246, 0.10) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}

/* Two-column hero layout: text + studio mockup.
   Stacks on mobile, splits at 1024+.
   ----------------------------------------------------------------- */
.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
.hero-text {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .hero-layout {
    grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
  }
  .hero-text {
    text-align: left;
    max-width: none;
    margin: 0;
  }
  .hero-text .hero-cta { justify-content: flex-start; }
  .hero-text .hero-meta { margin: 0; max-width: 540px; }
  .hero-text .hero-sub { margin-left: 0; }
}

.motto {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}
.motto-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.motto-tick {
  width: 22px;
  height: 1px;
  background: var(--grad);
  display: inline-block;
  flex-shrink: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 28px;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.eyebrow:hover { border-color: var(--border-strong); color: var(--text); }
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0.06); }
}

.hero-title {
  font-size: clamp(2.4rem, 6.5vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 24px;
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  color: var(--text-2);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  border-radius: var(--r-xl);
  background: rgba(20, 20, 29, 0.6);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (min-width: 640px) { .hero-meta { grid-template-columns: repeat(4, 1fr); gap: 0; } }
.hero-meta li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-md);
}
@media (min-width: 640px) {
  .hero-meta li + li { border-left: 1px solid var(--border); }
}
.meta-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.meta-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
  text-align: center;
}

/* =========================================================
   Studio Mockup (Cosmic Gen Studio preview)
   The hero's right-column UI: titlebar + sidebars + viewport
   + statusbar. The 3D canvas lives inside .studio-viewport.
   ========================================================= */
.studio-mockup {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(22, 22, 32, 0.72) 0%, rgba(15, 15, 22, 0.92) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.7),
    0 0 60px -20px rgba(139, 92, 246, 0.25);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
@media (min-width: 1024px) {
  .studio-mockup { max-width: 640px; margin: 0; }
}

/* --- Titlebar --- */
.studio-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 13px;
}
.studio-led {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18), 0 0 8px rgba(16, 185, 129, 0.6);
  flex-shrink: 0;
}
.studio-app {
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.studio-version {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.studio-tagline {
  display: none;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@media (min-width: 768px) { .studio-tagline { display: inline; } }

/* --- Body grid --- */
.studio-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 320px;
}
@media (min-width: 1024px) {
  .studio-body { grid-template-columns: 168px minmax(0, 1fr) 168px; min-height: 380px; }
}

/* --- Sidebars (shared) --- */
.studio-left, .studio-right {
  display: none;
  flex-direction: column;
  padding: 16px;
  gap: 18px;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(0, 0, 0, 0.12);
}
@media (min-width: 1024px) {
  .studio-left, .studio-right { display: flex; }
  .studio-left { border-right: 1px solid var(--border); }
  .studio-right { border-left: 1px solid var(--border); }
}

.panel-block { display: flex; flex-direction: column; gap: 8px; }
.panel-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* --- Thumbnail input list --- */
.thumb-list { display: flex; flex-direction: column; gap: 3px; }
.thumb {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12px;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.thumb.is-active {
  background: rgba(139, 92, 246, 0.16);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.32);
}
.thumb-swatch {
  width: 22px; height: 22px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--grad);
  opacity: 0.85;
  position: relative;
}
.thumb-swatch::after {
  content: "";
  position: absolute; inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 2px;
}
.thumb-swatch.s-knot    { background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%); }
.thumb-swatch.s-mech    { background: linear-gradient(135deg, #475569 0%, #06b6d4 100%); }
.thumb-swatch.s-sword   { background: linear-gradient(135deg, #94a3b8 0%, #f97316 100%); }
.thumb-swatch.s-tower   { background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%); }
.thumb-swatch.s-figure  { background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%); }
.thumb-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Pipeline checklist --- */
.pipe-list { display: flex; flex-direction: column; gap: 6px; }
.pipe {
  position: relative;
  padding-left: 22px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.pipe::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--text-dim);
  background: transparent;
  transition: background-color var(--t-fast) var(--ease);
}
.pipe.done { color: var(--text-2); }
.pipe.done::before {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}
.pipe.active { color: var(--cyan); }
.pipe.active::before {
  border-color: var(--cyan);
  background: transparent;
  box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
  animation: pipe-pulse 1.6s ease-out infinite;
}
@keyframes pipe-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  100% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0); }
}

/* --- Viewport (Three.js canvas container) --- */
.studio-viewport {
  position: relative;
  background-color: #050509;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(50% 60% at 50% 110%, rgba(139, 92, 246, 0.12) 0%, transparent 65%);
  background-size: 32px 32px, 32px 32px, auto;
  min-height: 280px;
  overflow: hidden;
}
@media (min-width: 1024px) { .studio-viewport { min-height: 380px; } }
@media (max-width: 640px)  { .studio-viewport { min-height: 240px; } }

.studio-viewport canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  /* Soft cyan/violet halo — the cheap "bloom" trick used by Linear,
     Pitch and many premium product sites. Layered drop-shadows on the
     canvas glow outward from bright pixels, so additive particles and
     matcap rim highlights read as luminous, not flat. */
  filter:
    drop-shadow(0 0 14px rgba(103, 232, 249, 0.20))
    drop-shadow(0 0 28px rgba(139, 92, 246, 0.18));
}
@media (prefers-reduced-motion: reduce) {
  .studio-viewport canvas { filter: none; }
}
.viewport-tools {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 1;
}
.vt {
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(10, 10, 15, 0.55);
  color: var(--text-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.vt:hover { color: var(--text); border-color: var(--border-strong); }

/* --- Right sidebar: export controls --- */
.select-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}
.select-field svg { color: var(--text-3); }

.slider-mock { display: flex; flex-direction: column; gap: 6px; }
.slider-track {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-pill);
}
.slider-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 70%;
  background: var(--grad);
  border-radius: var(--r-pill);
}
.slider-knob {
  position: absolute;
  left: 70%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.slider-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stat-grid li {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-2);
}
.stat-value {
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: -0.005em;
}

.studio-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  border-radius: 6px;
  letter-spacing: -0.005em;
  box-shadow: 0 6px 18px -6px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  user-select: none;
}

/* --- Statusbar --- */
.studio-statusbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  background: rgba(0, 0, 0, 0.32);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: -0.005em;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
  flex-shrink: 0;
  animation: status-pulse 2.4s ease-out infinite;
}
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(6, 182, 212, 0.04); }
}
.status-text { color: var(--text-2); }

/* =========================================================
   Trust strip
   ========================================================= */
.trust {
  padding: 32px 0 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.trust-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 16px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 28px;
  color: var(--text-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
}
.trust-row li { position: relative; padding: 4px 0; opacity: 0.85; }

/* =========================================================
   Pipeline (3-step)
   ========================================================= */
.pipeline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .pipeline { flex-direction: row; align-items: stretch; gap: 8px; }
  .pipeline-step { flex: 1; }
  .pipeline-arrow { flex: 0 0 auto; }
}
.pipeline-step {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.pipeline-step::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.pipeline-step:hover { transform: translateY(-2px); }
.pipeline-step:hover::before { opacity: 0.5; }
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-3);
  margin-bottom: 16px;
}
.pipeline-step h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.pipeline-step p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
}
.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  padding: 4px 0;
  transform: rotate(90deg);
}
@media (min-width: 900px) { .pipeline-arrow { transform: none; padding: 0 4px; } }

/* =========================================================
   Bento grid
   ========================================================= */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .bento-feature { grid-column: span 2; grid-row: span 2; }
}

.bento-card {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease), background-color var(--t-med) var(--ease);
}
.bento-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(40% 50% at 100% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
}
.bento-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.bento-card:hover::after { opacity: 1; }

.bento-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.bento-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}
.bento-feature h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.bento-card p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}
.bento-bullets {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 640px) { .bento-bullets { grid-template-columns: 1fr 1fr; } }
.bento-bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}
.bento-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0.7;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

/* Featured Geometry card: text + live 3D mesh preview */
.bento-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .bento-feature {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 20px;
  }
}
.bento-feature-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bento-preview {
  position: relative;
  min-height: 220px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(139, 92, 246, 0.10) 0%, transparent 70%),
    rgba(0, 0, 0, 0.30);
  border: 1px solid var(--border);
  overflow: hidden;
}
@media (min-width: 1024px) { .bento-preview { min-height: 280px; } }

#bento-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* Same soft-bloom trick as the hero canvas — drop-shadow filters
     on bright pixels bleed outward, so the helmet's specular metal
     highlights glow rather than ending hard at the silhouette. */
  filter:
    drop-shadow(0 0 12px rgba(103, 232, 249, 0.18))
    drop-shadow(0 0 22px rgba(139, 92, 246, 0.14));
}
@media (prefers-reduced-motion: reduce) {
  #bento-canvas { filter: none; }
}
.bento-preview-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 35% at 30% 30%, rgba(139, 92, 246, 0.18), transparent 65%),
    radial-gradient(40% 35% at 70% 70%, rgba(6, 182, 212, 0.16), transparent 65%);
  pointer-events: none;
}

/* =========================================================
   Use cases
   ========================================================= */
.use-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .use-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .use-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.use-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.use-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.use-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--grad-soft);
  color: var(--text);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.use-card h3 { font-size: 1.125rem; margin-bottom: 8px; }
.use-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

/* =========================================================
   Infrastructure
   ========================================================= */
.infra-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 640px) { .infra-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .infra-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.infra-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-med) var(--ease);
}
.infra-card:hover { border-color: var(--border-strong); }
.kpi {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 6px;
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin-bottom: 12px;
}
.infra-card p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.6;
}

.infra-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 18px 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.6;
}
.infra-note svg { color: var(--cyan); margin-top: 2px; flex-shrink: 0; }

/* =========================================================
   Roadmap
   ========================================================= */
.roadmap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 900px) { .roadmap { grid-template-columns: repeat(3, 1fr); } }

.roadmap-item {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.roadmap-item:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.roadmap-item.is-current { background: linear-gradient(180deg, rgba(139, 92, 246, 0.07) 0%, var(--surface) 60%); border-color: rgba(139, 92, 246, 0.35); }
.roadmap-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.is-current .roadmap-tag { color: var(--violet); }
.roadmap-item h3 { font-size: 1.25rem; margin-bottom: 8px; }
.roadmap-item > p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
.roadmap-item ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
}
.roadmap-item ul li::before {
  content: "";
  position: absolute;
  left: 6px; top: 9px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-3);
}
.is-current ul li::before { background: var(--violet); }

/* =========================================================
   Team
   ========================================================= */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}
@media (min-width: 768px) { .team-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.team-card {
  padding: 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.team-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.team-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--grad-soft);
  color: var(--text);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.team-card h3 { font-size: 1.125rem; margin-bottom: 8px; }
.team-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }

/* =========================================================
   Contact / form
   ========================================================= */
.contact { padding-bottom: 120px; }
.contact-card {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
@media (min-width: 640px) { .contact-card { padding: 64px 48px; } }
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 20% 0%, rgba(139, 92, 246, 0.14) 0%, transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(6, 182, 212, 0.10) 0%, transparent 60%);
  pointer-events: none;
}
.contact-card > * { position: relative; }
.contact-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 12px 0 12px;
}
.contact-sub { color: var(--text-2); font-size: 16px; line-height: 1.6; max-width: 460px; margin: 0 auto 32px; }

.access-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}
@media (min-width: 560px) {
  .access-form { grid-template-columns: 1.4fr 1fr; }
  .access-form .btn { grid-column: 1 / -1; }
  .access-form .form-hint { grid-column: 1 / -1; }
}

.access-form input,
.access-form select {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.access-form input::placeholder { color: var(--text-3); }
.access-form input:hover, .access-form select:hover { border-color: var(--border-bright); }
.access-form input:focus, .access-form select:focus {
  outline: none;
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}
.access-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23a1a1aa' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
  cursor: pointer;
}
.access-form .form-hint {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  margin-top: 4px;
}
.access-form.is-success .form-hint { color: var(--success); }
.access-form.is-error .form-hint { color: var(--danger); }

.contact-direct {
  margin-top: 28px;
  color: var(--text-3);
  font-size: 14px;
}
.contact-direct a {
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border-bright);
  padding-bottom: 1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.contact-direct a:hover { color: var(--cyan); border-color: var(--cyan); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 40px 0 32px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
@media (min-width: 900px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}
.footer-brand .brand-mark { color: var(--violet); }
.footer-motto {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  font-size: 14px;
}
.footer-nav a {
  color: var(--text-2);
  transition: color var(--t-fast) var(--ease);
}
.footer-nav a:hover { color: var(--text); }
.footer-meta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
}
.footer-credit { font-size: 11px; opacity: 0.7; }
.footer-credit a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--text); }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Motion preferences
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Forced colors / high contrast
   ========================================================= */
@media (forced-colors: active) {
  .btn-primary { forced-color-adjust: none; background: CanvasText; color: Canvas; }
  .gradient-text { -webkit-text-fill-color: CanvasText; color: CanvasText; }
}
