/* ========== TPAI Interactive Prototype — Styles ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #182F4C;
  --primary-hover: #0F2035;
  --accent: #6B7280;
  --purple: #B87EFF;
  --purple-deep: #6B4AE8;
  --bg: #FFFFFF;
  --surface: #F7F8FA;
  --surface-2: #EEF1F5;
  --border: #E5E7EB;
  --border-strong: #CFD4DC;
  --dark-bg: #0F2035;
  --text: #182F4C;
  --text-secondary: #6B7280;
  --text-muted: #6B7280;
  --green: #10B981;
  --green-soft: #D1FAE5;
  --red: #EF4444;
  --red-soft: #FEE2E2;
  --amber: #F59E0B;
  --radius-card: 14px;
  --radius-btn: 8px;
  --shadow-sm: 0 2px 8px rgba(15,32,53,0.06);
  --shadow: 0 4px 20px rgba(15,32,53,0.06);
  --shadow-lg: 0 12px 48px rgba(15,32,53,0.10);
  --max-width: 1200px;
  --font: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Swiss flag */
.ch-flag {
  display: inline-block;
  width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='2' fill='%23DC2626'/%3E%3Crect x='4' y='6.5' width='8' height='3' rx='.5' fill='white'/%3E%3Crect x='6.5' y='4' width='3' height='8' rx='.5' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* fade-in */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: .08s; }
.stagger-2 { transition-delay: .16s; }
.stagger-3 { transition-delay: .24s; }

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  border-bottom: 1px solid rgba(229,231,235,0.6);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.header-logo { height: 44px; width: auto; display: block; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}
.nav-link:hover { color: var(--purple-deep); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-large { padding: 15px 30px; font-size: 15px; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f0f0f0; }
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 12px 18px;
}
.btn-ghost:hover { background: var(--surface); }

/* Beam */
.btn-beam {
  position: relative;
  isolation: isolate;
  z-index: 10;
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .3s ease;
}
.btn-beam:hover { transform: translateZ(0) translateY(-2px) scale(1.03); }
.btn-beam > * { position: relative; z-index: 2; }
.btn-beam::before { transition: filter .3s ease, inset .3s ease, padding .3s ease; }
.btn-beam:hover::before {
  inset: -4px;
  padding: 4px;
  border-radius: calc(var(--radius-btn) + 4px);
  filter: brightness(1.5);
}
.btn-beam::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: calc(var(--radius-btn) + 18px);
  background: var(--beam-bg, conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(184,126,255,0.3) 300deg, #B87EFF 330deg, #ffffff 348deg, #B87EFF 360deg, transparent 360deg));
  filter: blur(10px);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: -1;
}
.btn-beam:hover::after { opacity: .85; }
.btn-beam::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-btn) + 2px);
  padding: 2px;
  background: var(--beam-bg, conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(184,126,255,0.3) 300deg, #B87EFF 330deg, #ffffff 348deg, #B87EFF 360deg, transparent 360deg));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.btn-beam:hover::before { opacity: 0; }

body.no-beam .btn-beam::before,
body.no-beam .btn-beam::after { display: none !important; }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: min(92vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 100px 60px 60px;
  overflow: hidden;
  max-width: var(--max-width);
  margin: 0 auto;
  background: transparent;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 60% at 75% 50%, #E6E9F0 0%, #EEF1F5 35%, #F7F8FA 65%, #fff 100%);
  z-index: 0;
  pointer-events: none;
}
.hero-bg {
  position: relative;
  width: 100%;
  height: 520px;
  max-height: 70vh;
  pointer-events: none;
  opacity: 0.98;
  z-index: 1;
  order: 2;
}
body.no-chrome .hero-bg { display: none; }
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  width: 100%;
  order: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-deep);
  background: rgba(184,126,255,0.12);
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
  letter-spacing: -0.005em;
}
.hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero-accent {
  background: linear-gradient(120deg, #6B4AE8 0%, #B87EFF 50%, #182F4C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 560px;
  line-height: 1.55;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: bob 2.4s ease-in-out infinite;
  z-index: 2;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ========== VARIANT SWITCHER ========== */
.variant-switcher {
  position: sticky;
  top: 72px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 90;
  padding: 0;
}
.switcher-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.switcher-tab {
  background: transparent;
  border: none;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-align: left;
  color: var(--text-muted);
  font-family: inherit;
  transition: color .25s ease;
  border-bottom: 2px solid transparent;
  position: relative;
}
.switcher-tab:hover { color: var(--text); }
.switcher-tab.active { color: var(--text); }
.tab-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.tab-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tab-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
}
.switcher-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--primary);
  transition: left .35s cubic-bezier(.22,.61,.36,1), width .35s cubic-bezier(.22,.61,.36,1);
  border-radius: 2px 2px 0 0;
}

/* ========== VARIANTS ========== */
.variant {
  display: none;
  padding: 80px 0 100px;
  background: var(--bg);
}
.variant-active { display: block; animation: variantIn .45s cubic-bezier(.22,.61,.36,1); }
@keyframes variantIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.variant-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.variant-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(184,126,255,0.1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.variant-head h2 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.variant-head p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* ========== TIMELINE (Variant 1) ========== */
.timeline-app {
  max-width: 1040px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fff 0%, #FAFBFC 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.mode-toggle {
  position: relative;
  display: inline-flex;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 28px;
  left: 50%;
  transform: translateX(-50%);
  gap: 0;
}
.mode-btn {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .25s;
}
.mode-btn.active { color: var(--text); }
.mode-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-red { background: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.dot-green { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.mode-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15,32,53,0.08);
  transition: transform .32s cubic-bezier(.22,.61,.36,1);
  z-index: 1;
}
.mode-toggle[data-mode="mit"] .mode-indicator { transform: translateX(100%); }

.timeline-time { text-align: center; margin-bottom: 20px; }
.time-big {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.time-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.timeline-slider-wrap {
  position: relative;
  margin: 0 0 36px;
}
.timeline-markers {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  padding: 0 2px;
}
.timeline-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 10px rgba(15,32,53,0.2);
  transition: transform .2s;
}
.timeline-slider::-webkit-slider-thumb:hover { transform: scale(1.1); }
.timeline-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 10px rgba(15,32,53,0.2);
}
.timeline-progress {
  position: absolute;
  top: 26px;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 3px;
  pointer-events: none;
  width: 0;
}

.scene-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.scene-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all .3s ease;
  position: relative;
}
.scene-ohne { border-top: 3px solid var(--red); }
.scene-mit { border-top: 3px solid var(--green); }
.mode-toggle[data-mode="mit"] ~ .scene-grid .scene-ohne,
body[data-timeline-mode="mit"] .scene-ohne { opacity: 0.4; filter: grayscale(0.3); }
body[data-timeline-mode="ohne"] .scene-mit { opacity: 0.4; filter: grayscale(0.3); }

.scene-header { display: flex; justify-content: space-between; align-items: center; }
.scene-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-red { background: var(--red-soft); color: #991B1B; }
.badge-green { background: var(--green-soft); color: #065F46; }
.scene-context {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.scene-illus {
  height: 120px;
  background: var(--surface);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.scene-illus::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(184,126,255,0.15), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(15,32,53,0.08), transparent 60%);
}

.scene-event {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border-radius: 10px;
  align-items: flex-start;
}
.event-icon { font-size: 24px; flex-shrink: 0; }
.event-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.event-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.scene-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.scene-stat { text-align: center; }
.stat-val {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-val.green { color: var(--green); }
.stat-lbl {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.day-summary { margin-top: 20px; }
.summary-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a5c 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}
.summary-kicker {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 20px;
  align-items: center;
}
.summary-item { }
.summary-num {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.summary-num.negative { color: #FCA5A5; }
.summary-num.positive { color: #6EE7B7; }
.summary-lbl {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}
.summary-arrow {
  font-size: 32px;
  color: rgba(255,255,255,0.4);
  font-weight: 300;
}

/* ========== PROFILER (Variant 2) ========== */
.profiler {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.profiler-progress { margin-bottom: 36px; }
.progress-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .3s;
}
.progress-step span {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all .3s;
}
.progress-step.active { color: var(--primary); }
.progress-step.active span { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(24,47,76,0.1); }
.progress-step.done span { background: var(--green); color: #fff; }
.progress-line {
  height: 3px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  border-radius: 3px;
  transition: width .4s cubic-bezier(.22,.61,.36,1);
}

.prof-step { display: none; animation: stepIn .35s cubic-bezier(.22,.61,.36,1); }
.prof-step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.prof-step h3 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.prof-sub {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 15px;
}

.prof-options { display: grid; gap: 12px; }
.prof-grid { grid-template-columns: repeat(3, 1fr); }
.prof-list { grid-template-columns: 1fr; }

.prof-option {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.prof-option:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(184,126,255,0.15);
}
.prof-option.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(184,126,255,0.06), rgba(24,47,76,0.04));
  box-shadow: 0 0 0 3px rgba(24,47,76,0.08);
}
.prof-option.selected::after {
  content: "✓";
  position: absolute;
  top: 12px; right: 12px;
  width: 22px; height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.prof-option svg {
  width: 28px; height: 28px;
  color: var(--purple-deep);
  margin-bottom: 8px;
}
.opt-emoji { font-size: 28px; margin-bottom: 6px; }
.opt-title { font-size: 15px; font-weight: 700; color: var(--text); }
.opt-hint { font-size: 12px; color: var(--text-muted); }

.prof-row { padding: 18px 22px; }
.row-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 4px;
}
.row-head .opt-hint {
  font-weight: 600;
  color: var(--purple-deep);
  background: rgba(184,126,255,0.1);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
}
.row-desc { font-size: 13px; color: var(--text-secondary); }

/* Hours slider */
.hours-slider-wrap {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
}
.hours-display { margin-bottom: 24px; }
.hours-big {
  font-size: 84px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hours-lbl {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}
.hours-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.hours-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px;
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 12px rgba(15,32,53,0.25);
}
.hours-marks {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
  margin-top: 10px; font-weight: 600;
}
.hours-scale {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  min-height: 20px;
}

/* Navigation */
.prof-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.prof-step-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Result */
.result-card {
  background: linear-gradient(180deg, #fff 0%, #FAFBFC 100%);
}
.result-header { text-align: center; margin-bottom: 32px; }
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.1);
  color: #065F46;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pulse-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
#result-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.result-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a5c 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 28px;
}
.result-savings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.savings-item { text-align: center; }
.savings-num {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.savings-num.green { color: #6EE7B7; }
.savings-num.purple { color: #C9B4FF; }
.savings-lbl {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 8px;
}

.result-solution { margin-bottom: 24px; }
.result-solution h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.solution-list { display: grid; gap: 10px; }
.sol-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 3px solid var(--purple);
}
.sol-emoji { font-size: 24px; flex-shrink: 0; }
.sol-body { flex: 1; }
.sol-name { font-weight: 700; font-size: 14px; }
.sol-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.sol-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(184,126,255,0.15);
  color: var(--purple-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-scenario {
  background: rgba(184,126,255,0.06);
  border: 1px solid rgba(184,126,255,0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
}
.scenario-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
#scenario-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.result-cta {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== JULIA CHAT (Variant 3) ========== */
.julia-demo-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.julia-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.side-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.scenario-picker { display: flex; flex-direction: column; gap: 8px; }
.scn-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .2s;
}
.scn-btn:hover { background: #EEF1F5; transform: translateX(2px); }
.scn-btn.active {
  background: rgba(184,126,255,0.08);
  border-color: var(--purple);
}
.scn-emoji { font-size: 24px; flex-shrink: 0; }
.scn-title { font-size: 14px; font-weight: 700; }
.scn-sub { font-size: 12px; color: var(--text-muted); }

.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insight-item {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color .3s;
}
.insight-check {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  transition: all .3s;
  position: relative;
}
.insight-item.done { color: var(--text); }
.insight-item.done .insight-check {
  background: var(--green);
  border-color: var(--green);
}
.insight-item.done .insight-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.insight-item.active .insight-check {
  border-color: var(--purple);
  background: rgba(184,126,255,0.15);
  animation: pulse-purple 1.4s ease-in-out infinite;
}
@keyframes pulse-purple {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,126,255,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(184,126,255,0); }
}

/* Chat window */
.julia-chat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 620px;
  box-shadow: var(--shadow-lg);
}
.jc-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1a3a5c 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.jc-avatar {
  width: 44px; height: 44px;
  position: relative;
  flex-shrink: 0;
}
.jc-avatar-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #B87EFF, #6B4AE8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}
.jc-status-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  background: var(--green);
  border: 2px solid var(--primary);
  border-radius: 50%;
}
.jc-info { flex: 1; }
.jc-name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.jc-verified { color: #6EE7B7; font-size: 14px; }
.jc-meta { font-size: 11px; opacity: 0.75; margin-top: 2px; }
.jc-online { color: #6EE7B7; font-weight: 600; }
.jc-dialect-pick {
  display: flex;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2px;
}
.dialect-btn {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: none;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
}
.dialect-btn.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.jc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  scroll-behavior: smooth;
}
.jc-messages::-webkit-scrollbar { width: 4px; }
.jc-messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.jc-msg {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  animation: msgIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.jc-msg.bot {
  background: #fff;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.jc-msg.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.jc-msg.system {
  align-self: center;
  background: rgba(184,126,255,0.1);
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

.jc-typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  background: #fff;
  align-self: flex-start;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.jc-typing span {
  width: 7px; height: 7px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s ease-in-out infinite;
}
.jc-typing span:nth-child(2) { animation-delay: .15s; }
.jc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.jc-cta-inline {
  display: inline-block;
  margin-top: 8px;
  background: var(--primary);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.jc-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #FAFBFC;
  min-height: 48px;
}
.jc-quick button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.jc-quick button:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.jc-input-wrap {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.jc-input-wrap input {
  flex: 1;
  border: none;
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.jc-input-wrap input:focus { background: var(--surface-2); }
.jc-send {
  width: 38px; height: 38px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.jc-send:hover { background: var(--primary-hover); }
.jc-send svg { width: 16px; height: 16px; }

.jc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 11px;
  color: var(--text-muted);
  background: #FAFBFC;
  border-top: 1px solid var(--border);
}
.jc-reset {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
}
.jc-reset:hover { color: var(--text); }

/* ========== CTA SECTION ========== */
.cta-section {
  background: linear-gradient(180deg, var(--primary) 0%, #0F2035 100%);
  color: #fff;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute;
  top: -50%; left: -10%;
  width: 120%; height: 100%;
  background: radial-gradient(ellipse at center, rgba(184,126,255,0.15), transparent 70%);
  pointer-events: none;
}
.cta-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.cta-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.cta-section h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.cta-section p {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.cta-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.cta-trust {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

/* ========== FOOTER ========== */
.footer {
  background: #0A1826;
  padding: 40px 0;
  color: #fff;
}
.footer .container {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 20px;
}
.footer-left { display: flex; align-items: center; gap: 20px; }
.footer-logo { height: 32px; opacity: 0.9; }
.footer-tagline { color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-right { display: flex; gap: 20px; }
.footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  transition: color .2s;
}
.footer a:hover { color: #fff; }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ========== TWEAKS PANEL ========== */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(15,32,53,0.2);
  z-index: 500;
  overflow: hidden;
  font-size: 14px;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
}
.tweaks-close {
  background: transparent; border: none; color: #fff;
  font-size: 20px; cursor: pointer; line-height: 1;
}
.tweaks-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tweaks-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.tweaks-body label.tweak-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}
.tweak-colors { display: flex; gap: 6px; }
.tweak-color {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
}
.tweak-color:hover { transform: scale(1.1); }
.tweak-color.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary);
}
.tweaks-body select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
  .julia-demo-grid { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .summary-arrow { display: none; }
  .hero { grid-template-columns: 1fr; padding: 120px 28px 60px; min-height: auto; position: relative; }
  .hero-bg {
    position: absolute !important;
    inset: 0;
    height: 100% !important;
    max-height: none !important;
    opacity: 0.55;
    order: unset;
    z-index: 0;
    pointer-events: none;
  }
  .hero-content { order: 1; position: relative; z-index: 2; }
  .header-nav .nav-link { display: none; }
  .switcher-inner { grid-template-columns: 1fr; }
  .tab-desc { display: none; }
  .switcher-indicator { display: none; }
  .prof-grid { grid-template-columns: repeat(2, 1fr); }
  .variant-switcher { position: relative; top: 0; }
}
@media (max-width: 600px) {
  .prof-grid { grid-template-columns: 1fr; }
  .profiler, .timeline-app { padding: 24px 18px; }
  .time-big { font-size: 48px; }
  .hours-big { font-size: 64px; }
  .result-savings { grid-template-columns: 1fr; }
}

/* ========== HERO 3D CANVAS BG ========== */
/* Dark radial backdrop behind the Three.js canvas so chrome + glass have
   something to reflect/refract against. Without this the transparent canvas
   sits on the page's white body and everything washes out to invisible. */
.hero-bg {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 80% 70% at 60% 45%, rgba(184, 126, 255, 0.28) 0%, rgba(107, 74, 232, 0.12) 40%, transparent 72%),
    radial-gradient(ellipse 90% 90% at 50% 55%, #1A2F52 0%, #0F2035 55%, #081628 100%);
  box-shadow:
    inset 0 0 0 1px rgba(184, 126, 255, 0.15),
    inset 0 40px 80px rgba(15, 32, 53, 0.4),
    0 30px 80px -20px rgba(15, 32, 53, 0.35);
}
.hero-bg canvas {
  display: block;
  position: relative;
  z-index: 1;
}
.hero-bg::after {
  /* subtle vignette so edges fade, keeping attention on the 3D form */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 90% at 50% 50%, transparent 55%, rgba(8, 22, 40, 0.55) 100%);
  pointer-events: none;
  z-index: 2;
}
