/* =============================================
   Starset Solutions — Onboarding Funnel
   ============================================= */

:root {
  --bg: #08090D;
  --surface: #111318;
  --surface-hover: #181A21;
  --border: #1E2030;
  --border-active: #2A2D3E;
  --text: #E5E7EB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --accent: #C8A84E;
  --accent-hover: #D4B55C;
  --accent-glow: rgba(200, 168, 78, 0.15);

  /* Seven element colors */
  --c-offer: #C8A84E;
  --c-economics: #10B981;
  --c-demand: #F59E0B;
  --c-delivery: #3B82F6;
  --c-people: #EC4899;
  --c-systems: #8B5CF6;
  --c-direction: #EF4444;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Navigation ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,9,13,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-brand .brand-mark {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #A08030);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--bg);
}

.nav-tagline {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  font-size: 0.85rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  font-weight: 500;
}

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

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

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

.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

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

.btn-secondary:hover { border-color: var(--text-muted); background: var(--surface-hover); }

.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ===== Section ===== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, background 0.2s;
}

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

/* ===== Starset Seven Grid ===== */
.seven-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.element-card {
  position: relative;
  overflow: hidden;
}

.element-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
}

.element-card .element-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.element-card .element-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.element-card .element-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Per-element accent colors */
.el-offer::before { background: var(--c-offer); }
.el-economics::before { background: var(--c-economics); }
.el-demand::before { background: var(--c-demand); }
.el-delivery::before { background: var(--c-delivery); }
.el-people::before { background: var(--c-people); }
.el-systems::before { background: var(--c-systems); }
.el-direction::before { background: var(--c-direction); }

.el-offer .element-name { color: var(--c-offer); }
.el-economics .element-name { color: var(--c-economics); }
.el-demand .element-name { color: var(--c-demand); }
.el-delivery .element-name { color: var(--c-delivery); }
.el-people .element-name { color: var(--c-people); }
.el-systems .element-name { color: var(--c-systems); }
.el-direction .element-name { color: var(--c-direction); }

/* ===== Industry Presets ===== */
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.preset-btn {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border-active);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.preset-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ===== Assessment Sliders ===== */
.assessment-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 650px;
  margin: 0 auto;
}

.assessment-item {
  display: grid;
  grid-template-columns: 1fr 140px 40px;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.assessment-item .item-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.assessment-item .item-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  grid-column: 1;
}

.assessment-item input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 6px;
}

.assessment-item .score {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  min-width: 40px;
}

/* Element-specific slider colors */
.slider-offer input { accent-color: var(--c-offer); }
.slider-economics input { accent-color: var(--c-economics); }
.slider-demand input { accent-color: var(--c-demand); }
.slider-delivery input { accent-color: var(--c-delivery); }
.slider-people input { accent-color: var(--c-people); }
.slider-systems input { accent-color: var(--c-systems); }
.slider-direction input { accent-color: var(--c-direction); }

.slider-offer .score { color: var(--c-offer); }
.slider-economics .score { color: var(--c-economics); }
.slider-demand .score { color: var(--c-demand); }
.slider-delivery .score { color: var(--c-delivery); }
.slider-people .score { color: var(--c-people); }
.slider-systems .score { color: var(--c-systems); }
.slider-direction .score { color: var(--c-direction); }

/* ===== Results ===== */
.results {
  display: none;
  margin-top: 40px;
}

.results.visible { display: block; }

.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  margin: 0 auto 32px;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.diag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}

.diag-card .diag-score {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.diag-card .diag-label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.diag-card .diag-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Ticket / Work Order ===== */
.ticket-form {
  max-width: 600px;
  margin: 0 auto;
}

.ticket-form textarea {
  width: 100%;
  min-height: 140px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s;
}

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

.ticket-form textarea::placeholder {
  color: var(--text-dim);
}

.work-order {
  display: none;
  margin-top: 32px;
}

.work-order.visible { display: block; }

.wo-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.wo-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.wo-items { display: flex; flex-direction: column; gap: 10px; }

.wo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wo-item .wo-priority {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.wo-item .wo-element {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.wo-item .wo-action {
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* ===== Connect ===== */
.connect-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.connect-card {
  text-align: center;
  padding: 36px 24px;
}

.connect-card .connect-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.connect-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.connect-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ===== Banner CTA ===== */
.cta-banner {
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(135deg, rgba(200,168,78,0.08), rgba(200,168,78,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 60px 0;
}

.cta-banner h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.cta-banner p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 40px 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* ===== Step indicator ===== */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 0;
}

.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: all 0.3s;
}

.step-dot.done {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.step-dot.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.step-line {
  width: 40px; height: 2px;
  background: var(--border);
  margin: 0 6px;
}

.step-line.done { background: var(--accent); }

.step-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 48px 0 36px; }
  .section { padding: 48px 0; }
  .seven-grid { grid-template-columns: 1fr; }
  .assessment-item { grid-template-columns: 1fr 100px 32px; gap: 8px; }
  .nav-links { display: none; }
  .connect-options { grid-template-columns: 1fr; }
  .step-line { width: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .container { padding: 0 16px; }
}