/* VEP — Radical immersive landing */

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

:root {
  color-scheme: dark;
  --bg: #060608;
  --line: rgba(255,255,255,0.08);
  --line-bright: rgba(255,255,255,0.2);
  --accent: #5b8def;
  --accent-glow: rgba(91,141,239,0.4);
  --surface: rgba(255,255,255,0.03);
  --text: #f1f5f9;
  --text2: rgba(255,255,255,0.70);
  --text3: rgba(255,255,255,0.58);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 768px) {
  html, body { height: auto; overflow: auto; overflow-x: hidden; }
}
/* Small mobile overrides moved to bottom of file */

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 6px 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-to-content:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ════════════════════════════════════════
   ASSEMBLY ANIMATION — blocks fly in
   ════════════════════════════════════════ */
.assembly-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.assembly-overlay.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.assembly-logo {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 8px;
  color: var(--text);
  animation: logo-pulse 1.2s var(--ease) forwards;
}

@keyframes logo-pulse {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* ════════════════════════════════════════
   ANIM BLOCKS — fly in from edges
   ════════════════════════════════════════ */
.anim-block {
  opacity: 0;
  transition: all 0.8s var(--ease);
}

.anim-block[data-from="left"]  { transform: translateX(-60px); }
.anim-block[data-from="right"] { transform: translateX(60px); }
.anim-block[data-from="top"]   { transform: translateY(-40px); }
.anim-block[data-from="bottom"]{ transform: translateY(40px); }
.anim-block[data-from="scale"] { transform: scale(0.7); }

.anim-block.in {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
}

/* ════════════════════════════════════════
   LAYOUT SHELL
   ════════════════════════════════════════ */
.vep-shell {
  display: grid;
  grid-template-rows: 44px 1fr 36px;
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ─── TOPBAR ─── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.topbar-left { display: flex; align-items: center; gap: 8px; }

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text);
  text-decoration: none;
}

.brand-sep { color: var(--text3); font-weight: 300; font-size: 18px; }
.brand-sub { font-size: 12px; color: #94a3b8; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }

.topbar-right { display: flex; align-items: center; gap: 24px; }
.topbar-link { font-size: 13px; color: var(--text2); letter-spacing: 0.5px; transition: color 0.2s; text-decoration: none; }
.topbar-link:hover { color: var(--text); }

.top-cta {
  font-size: 12px;
  color: #fff;
  background: #3b82f6;
  padding: 7px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s var(--ease);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.top-cta:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

/* ─── MAIN GRID ─── */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  overflow: hidden;
}

/* ─── LEFT: USE CASES ─── */
.col-cases {
  display: flex;
  flex-direction: column;
  border-right: none;
  overflow: hidden;
}

.case {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.5s var(--ease);
  position: relative;
  overflow: hidden;
}

.case:last-child { border-bottom: none; }

/* Subtle left accent per use case */
.case[data-case="support"] { border-left: 2px solid rgba(74,222,128,0.3); }
.case[data-case="sales"] { border-left: 2px solid rgba(251,191,36,0.3); }
.case[data-case="research"] { border-left: 2px solid rgba(139,92,246,0.3); }
.case[data-case="ops"] { border-left: 2px solid rgba(244,63,94,0.3); }
.case[data-case="personal"] { border-left: 2px solid rgba(56,189,248,0.3); }

/* Feature card accents */
.case[data-feature="memory"] { border-left: 2px solid rgba(99,102,241,0.3); }
.case[data-feature="tokens"] { border-left: 2px solid rgba(251,191,36,0.3); }
.case[data-feature="authority"] { border-left: 2px solid rgba(74,222,128,0.3); }
.case[data-feature="learning"] { border-left: 2px solid rgba(56,189,248,0.3); }
.case[data-feature="onprem"] { border-left: 2px solid rgba(244,114,182,0.3); }
.case[data-feature="audit"] { border-left: 2px solid rgba(168,85,247,0.3); }

/* Hover gradient */
.case::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(91,141,239,0.06) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.case:hover::before { opacity: 1; }
.case:hover { border-color: var(--line-bright); }

/* Active case — expanded to show workflow */
.case.active {
  flex: 2.5;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 20px;
  gap: 8px;
  background: rgba(91,141,239,0.04);
}

.case.active .case-icon { position: absolute; top: 12px; right: 12px; }
.case.active .case-body h2 { color: var(--accent); }
.case[data-case="support"].active .case-body h2 { color: #4ade80; }
.case[data-case="sales"].active .case-body h2 { color: #fbbf24; }
.case[data-case="research"].active .case-body h2 { color: #8b5cf6; }
.case[data-case="ops"].active .case-body h2 { color: #f43f5e; }
.case[data-case="personal"].active .case-body h2 { color: #38bdf8; }

/* Feature card active heading colors */
.case[data-feature="memory"].active .case-body h2 { color: #818cf8; }
.case[data-feature="tokens"].active .case-body h2 { color: #fbbf24; }
.case[data-feature="authority"].active .case-body h2 { color: #4ade80; }
.case[data-feature="learning"].active .case-body h2 { color: #38bdf8; }
.case[data-feature="onprem"].active .case-body h2 { color: #f472b6; }
.case[data-feature="audit"].active .case-body h2 { color: #a855f7; }

.case-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
  border-radius: 50%;
  background: #1e293b;
  transition: all 0.4s var(--ease);
  position: relative;
  z-index: 1;
}

.case-icon svg {
  width: 18px;
  height: 18px;
  color: #f8fafc;
  stroke-width: 2;
  transition: color 0.3s;
}

.case:hover .case-icon {
  background: rgba(91,141,239,0.12);
  box-shadow: 0 0 12px rgba(91,141,239,0.15);
}

.case:hover .case-icon svg { color: var(--accent); }
.case[data-case="support"]:hover .case-icon svg { color: #4ade80; }
.case[data-case="sales"]:hover .case-icon svg { color: #fbbf24; }
.case[data-case="research"]:hover .case-icon svg { color: #8b5cf6; }
.case[data-case="ops"]:hover .case-icon svg { color: #f43f5e; }
.case[data-case="personal"]:hover .case-icon svg { color: #38bdf8; }

/* Feature card hover icon colors */
.case[data-feature="memory"]:hover .case-icon svg { color: #818cf8; }
.case[data-feature="tokens"]:hover .case-icon svg { color: #fbbf24; }
.case[data-feature="authority"]:hover .case-icon svg { color: #4ade80; }
.case[data-feature="learning"]:hover .case-icon svg { color: #38bdf8; }
.case[data-feature="onprem"]:hover .case-icon svg { color: #f472b6; }
.case[data-feature="audit"]:hover .case-icon svg { color: #a855f7; }

.case-body { position: relative; z-index: 1; min-width: 0; max-width: 520px; }
.case-body h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; transition: color 0.3s; line-height: 1.3; color: #ffffff; }
.case-body p { font-size: 15px; color: #e2e8f0; line-height: 1.7; margin-top: 6px; }

/* Show full text in collapsed state on desktop */
.case:not(.active) .case-body p {
  display: block;
}

/* Workflow expand */
.case-expand {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  width: 100%;
  animation: expand-in 0.5s var(--ease);
}

.case.active .case-expand { display: block; }

@keyframes expand-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Metric badge inside case body */
.case-metric {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: #93c5fd;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 9999px;
  padding: 4px 12px;
  letter-spacing: 0.3px;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Workflow steps inside expanded case */
.workflow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.wf-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.wf-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: rgba(91,141,239,0.12);
  border: 1px solid rgba(91,141,239,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}

.wf-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text2);
}

.wf-text strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  margin-bottom: 1px;
}

.wf-line {
  width: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
}

.wf-line::after {
  content: '';
  width: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ─── CENTER: PORTAL ─── */
.col-portal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-right: none;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
}

.portal {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
}

.ring-1 {
  width: 200px; height: 200px;
  border-color: rgba(255,255,255,0.04);
  animation: ring-rotate 20s linear infinite;
}

.ring-2 {
  width: 150px; height: 150px;
  border-color: rgba(91,141,239,0.12);
  animation: ring-rotate 15s linear infinite reverse;
}

.ring-3 {
  width: 100px; height: 100px;
  border-color: rgba(91,141,239,0.2);
  animation: ring-rotate 10s linear infinite;
}

@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}

.portal-core {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(200,220,255,0.6) 30%, rgba(91,141,239,0.3) 60%, transparent 80%);
  box-shadow:
    0 0 40px rgba(255,255,255,0.3),
    0 0 80px rgba(91,141,239,0.2),
    0 0 120px rgba(91,141,239,0.1);
  animation: core-pulse 3s ease-in-out infinite alternate;
}

@keyframes core-pulse {
  from { transform: scale(0.9); box-shadow: 0 0 40px rgba(255,255,255,0.2), 0 0 80px rgba(91,141,239,0.15); }
  to { transform: scale(1.1); box-shadow: 0 0 60px rgba(255,255,255,0.4), 0 0 120px rgba(91,141,239,0.3), 0 0 200px rgba(91,141,239,0.1); }
}

.portal-text {
  position: absolute;
  bottom: -40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portal-label { font-size: 18px; font-weight: 700; letter-spacing: 1.5px; margin: 0; color: #ffffff; }
.portal-label-sub { font-size: 12px; color: #94a3b8; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; }

.stats-row {
  display: flex;
  gap: 0;
  margin-top: 60px;
  width: 100%;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.stat + .stat { border-left: 1px solid var(--line); }
.stat-val { display: block; font-size: 22px; font-weight: 700; letter-spacing: 1px; color: var(--accent); }
.stat-label { display: block; font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; font-weight: 500; }

/* ─── RIGHT: CHAT ─── */
.col-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Employee avatars */
.chat-employees {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.emp-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text2);
  cursor: pointer;
  padding: 0;
  transition: all 0.3s var(--ease);
}

.emp-avatar:hover { border-color: var(--accent-glow); color: var(--text); }
.emp-avatar.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.emp-status {
  font-size: 12px;
  color: var(--text3);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.emp-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.chat-messages::-webkit-scrollbar { width: 2px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }

.msg {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  animation: msg-pop 0.4s var(--ease-bounce);
}

@keyframes msg-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  color: rgba(255,255,255,0.85);
  border-bottom-left-radius: 3px;
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(91,141,239,0.2), rgba(91,141,239,0.08));
  border: 1px solid rgba(91,141,239,0.2);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.msg.typing {
  align-self: flex-start;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  padding: 12px 18px;
}

.typing-dots { display: flex; gap: 5px; align-items: center; }
.typing-dots span {
  width: 5px; height: 5px;
  background: var(--text3);
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Voice visualizer */
.voice-viz {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: rgba(91,141,239,0.04);
}

.voice-viz.hidden { display: none; }

.viz-bar {
  width: 3px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  animation: viz-wave 0.8s ease-in-out infinite alternate;
}

.viz-bar:nth-child(1) { animation-delay: 0s; height: 8px; }
.viz-bar:nth-child(2) { animation-delay: 0.1s; height: 14px; }
.viz-bar:nth-child(3) { animation-delay: 0.2s; height: 10px; }
.viz-bar:nth-child(4) { animation-delay: 0.3s; height: 18px; }
.viz-bar:nth-child(5) { animation-delay: 0.2s; height: 10px; }
.viz-bar:nth-child(6) { animation-delay: 0.1s; height: 14px; }
.viz-bar:nth-child(7) { animation-delay: 0s; height: 8px; }

@keyframes viz-wave {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(1.2); }
}

.viz-label { font-size: 10px; color: var(--accent); margin-left: 10px; letter-spacing: 0.5px; }

/* Chat input */
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  margin-top: 16px;
}

.mic-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: all 0.3s var(--ease);
}

.mic-btn svg { width: 18px; height: 18px; color: var(--text3); transition: color 0.2s; }
.mic-btn:hover svg { color: var(--accent); }

.mic-btn.recording {
  background: rgba(239,68,68,0.1);
  animation: mic-pulse 1.5s ease-in-out infinite;
}

.mic-btn.recording svg { color: #ef4444; }

@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

.chat-input input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  outline: none;
  color: var(--text);
  padding: 14px 16px;
  min-height: 48px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input input:focus { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }

.chat-input input::placeholder { color: var(--text3); }

/* Chat suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  margin-top: auto;
}
.chat-suggest-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-weight: 600;
  width: 100%;
}
.chat-suggest-chip {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 20px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 12px 20px;
  min-height: 44px;
  max-width: fit-content;
  display: inline-flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.chat-suggest-chip:hover {
  background: #2563eb;
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
}

.send-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
}
.send-btn:active { background: rgba(59,130,246,0.25); transform: scale(0.95); }

.send-btn svg { width: 18px; height: 18px; color: #60a5fa; }
.send-btn:hover { background: rgba(91,141,239,0.1); }

/* ─── BOTTOM BAR ─── */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-top: 1px solid var(--line);
}

/* Legacy .bottom-features replaced by .bottom-items */

.dot-sep {
  width: 3px;
  height: 3px;
  background: #64748b;
  border-radius: 50%;
  flex-shrink: 0;
}

.bottom-cta {
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(91,141,239,0.3);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.bottom-cta:hover { background: rgba(91,141,239,0.1); border-color: var(--accent); color: #7aa8ff; transform: translateY(-1px); }

/* ─── MODAL ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
}

.modal.hidden { display: none; }

.modal-content {
  background: #0a0a0f;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  position: relative;
  animation: modal-in 0.5s var(--ease);
  box-shadow: 0 0 60px rgba(91,141,239,0.05);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text3); font-size: 20px; cursor: pointer;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: all 0.2s;
}
.modal-close:hover { color: #fff; background: var(--surface); }

.modal h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.modal .subtitle { font-size: 12px; color: var(--text2); margin-bottom: 24px; }

.form-field {
  position: relative;
  margin-bottom: 10px;
}
.form-field label {
  position: absolute;
  top: -7px;
  left: 12px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface);
  padding: 0 4px;
  z-index: 1;
  pointer-events: none;
}
.modal input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.modal input:focus { border-color: var(--accent); }
.modal input:focus + label,
.form-field:focus-within label { color: var(--accent); }
.modal input::placeholder { color: var(--text3); }

.submit-btn {
  width: 100%;
  background: #fff;
  color: var(--bg);
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  margin-top: 4px;
}
.submit-btn:hover { background: var(--accent); color: #fff; }

/* OAuth social login */
.oauth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 12px;
  color: rgba(255,255,255,0.4); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
}
.oauth-divider::before, .oauth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.12);
}
.oauth-buttons { display: flex; gap: 10px; margin-bottom: 8px; }
.oauth-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: all 0.2s ease;
  font-family: inherit;
}
.oauth-google {
  background: #fff; color: #333; border: 1px solid rgba(0,0,0,0.1);
}
.oauth-google:hover { background: #f5f5f5; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.oauth-github {
  background: #24292f; color: #fff; border: 1px solid rgba(255,255,255,0.1);
}
.oauth-github:hover { background: #333940; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.oauth-microsoft {
  background: #f3f3f3; color: #333; border: 1px solid rgba(0,0,0,0.1);
}
.oauth-microsoft:hover { background: #e6e6e6; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.oauth-linkedin {
  background: #0A66C2; color: #fff; border: 1px solid rgba(255,255,255,0.1);
}
.oauth-linkedin:hover { background: #004182; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.error-msg { color: #ef4444; font-size: 11px; text-align: center; margin-top: 8px; display: none; }
.success-msg { color: #4ade80; font-size: 11px; text-align: center; margin-top: 8px; display: none; }
.verify-section { display: none; }
.verify-section.active { display: block; }
.verify-section input { text-align: center; font-size: 22px; letter-spacing: 6px; }

/* Loading spinner */
.btn-loading { pointer-events: none; opacity: 0.7; }
.btn-loading::after {
  content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 6px;
  border: 2px solid transparent; border-top: 2px solid currentColor; border-radius: 50%;
  animation: spin 0.6s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── PORTAL INTERACTION ─── */

/* Drag hint */
.portal-hint {
  position: absolute;
  bottom: -72px;
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.portal-hint.visible {
  animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* Portal hover glow */
.portal.hovering .portal-core {
  transform: scale(1.15);
  box-shadow:
    0 0 60px rgba(255,255,255,0.4),
    0 0 120px rgba(91,141,239,0.3),
    0 0 200px rgba(91,141,239,0.15);
}

.portal.hovering .ring-1 { animation-duration: 8s; }
.portal.hovering .ring-2 { animation-duration: 6s; }
.portal.hovering .ring-3 { animation-duration: 4s; }

.portal.dragging { cursor: grabbing; }
.portal.dragging .portal-core { cursor: grabbing; }
.portal-core { cursor: grab; transition: transform 0.3s, box-shadow 0.3s; }

/* Portal expanded — fullscreen */
.portal-world {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: linear-gradient(135deg, #060810 0%, #0a1628 40%, #0d0a1e 100%);
  padding: 40px;
  overflow-y: auto;
  animation: pw-open 0.8s var(--ease);
}

.portal-world.active { display: flex; flex-direction: column; }

@keyframes pw-open {
  from { clip-path: circle(0% at 50% 50%); opacity: 0; }
  to { clip-path: circle(150% at 50% 50%); opacity: 1; }
}

.pw-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: rgba(6,6,8,0.8);
  border: 1px solid var(--line);
  color: var(--text2);
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 201;
  transition: all 0.2s;
}

.pw-close:hover { color: #fff; border-color: var(--accent); background: rgba(91,141,239,0.1); }

.pw-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pw-company { font-size: 20px; font-weight: 600; }

.pw-badge {
  font-size: 12px;
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.pw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  flex: 1;
}

.pw-workers { display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; }

.pw-worker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.pw-worker:hover { border-color: var(--accent-glow); }

.pw-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
  animation: pulse-dot 2s ease-in-out infinite;
  min-width: 8px;
}

.pw-role { color: var(--text3); font-size: 12px; margin-left: 4px; }
.pw-count { margin-left: auto; font-size: 12px; color: var(--accent); white-space: nowrap; }

.pw-feed, .pw-authority { display: flex; flex-direction: column; gap: 8px; }

.pw-feed-title, .pw-auth-title {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.pw-entry, .pw-auth-item {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-check { color: #4ade80; font-weight: 700; font-size: 14px; }

.pw-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  min-width: 14px;
}

/* Staggered entry animations */
.pw-anim {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  transition-delay: var(--delay, 0s);
}

.portal-world.active .pw-anim {
  opacity: 1;
  transform: translateY(0);
}

.pw-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pw-tagline {
  font-size: 14px;
  color: var(--text2);
  letter-spacing: 1px;
}

.pw-cta {
  display: inline-block;
  padding: 12px 32px;
  background: #fff;
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.pw-cta:hover { background: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(91,141,239,0.3); }

/* ─── PANEL SWAP (Use Cases ↔ Features) ─── */
.panel-group {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.panel-features { display: none; }

/* Features mode: swap panels */
.vep-shell.mode-features .panel-cases { display: none; }
.vep-shell.mode-features .panel-features { display: flex; }

/* Smooth transition for panel swap */
.panel-group { animation: panel-enter 0.4s var(--ease); }
@keyframes panel-enter {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Bottom bar item swap */
.bottom-items {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bottom-items-features { display: none; }
.vep-shell.mode-features .bottom-items-cases { display: none; }
.vep-shell.mode-features .bottom-items-features { display: flex; }

/* Bottom items as buttons */
.bottom-item {
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.3s var(--ease);
  font-family: inherit;
  white-space: nowrap;
}
.bottom-item:hover {
  color: var(--accent);
  border-color: rgba(91,141,239,0.2);
  background: rgba(91,141,239,0.05);
}

.bottom-item:active {
  transform: scale(0.95);
}

/* Mode indicator dots */
.mode-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mode-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--text3);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
.mode-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.bottom-legal {
  display: flex;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}
.bottom-legal-link {
  font-size: 11px;
  color: var(--text3);
  text-decoration: none;
  transition: color 0.2s;
}
.bottom-legal-link:hover { color: var(--text2); }

/* Form validation states */
input[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}
.field-error { color: #ef4444; font-size: 11px; margin: 4px 0 0; display: none; }

/* ─── MOBILE HERO (hidden on desktop) ─── */
.mobile-hero { display: none; }

/* ─── TABLET & MOBILE ─── */
@media (max-width: 900px) {
  html, body { overflow-x: hidden; height: auto; overflow-y: auto; width: 100%; }

  /* Prevent ALL horizontal overflow on mobile */
  .vep-shell, .main-grid, .col-cases, .col-chat, .col-portal,
  .panel-group, .topbar, .bottombar, .mobile-hero {
    max-width: 100%;
    overflow-x: hidden;
  }
  .vep-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: 52px auto auto 0;
  }

  /* Mobile hero — visible */
  .mobile-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 32px 20px 28px;
    background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 70%);
    border-bottom: 1px solid var(--line);
  }

  .mobile-hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--text);
    text-wrap: balance;
  }

  .mobile-hero-sub {
    font-size: 15px;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .mobile-hero-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: #3b82f6;
    color: #fff;
    padding: 16px 32px;
    min-height: 52px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(59,130,246,0.4);
    transition: all 0.3s var(--ease);
  }

  .mobile-hero-cta:hover { background: #7aa8ff; transform: translateY(-1px); }

  /* Scroll hint after hero */
  .mobile-hero::after {
    content: '';
    width: 20px;
    height: 20px;
    border-right: 1.5px solid rgba(255,255,255,0.3);
    border-bottom: 1.5px solid rgba(255,255,255,0.3);
    transform: rotate(45deg);
    margin-top: 28px;
    align-self: center;
    animation: scroll-hint 2s ease-in-out infinite;
  }
  @keyframes scroll-hint {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
    50% { transform: rotate(45deg) translateY(5px); opacity: 0.7; }
  }

  .main-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow-y: auto;
    gap: 0;
  }

  /* Stats row — show above cards */
  .col-portal {
    order: -1;
    border-right: none;
    border-bottom: 1px solid var(--line);
    min-height: auto;
    overflow: visible;
    padding-bottom: 8px;
    background: rgba(255,255,255,0.02);
  }

  .portal { display: none; }
  .portal-text { display: none; }
  .portal-hint { display: none; }

  .stats-row {
    margin-top: 0;
    border-top: none;
  }

  .stat { padding: 16px 8px; }
  .stat + .stat { border-left: 1px solid rgba(255,255,255,0.15); }
  .stat-val { font-size: 24px; font-weight: 800; }
  .stat-label { font-size: 12px; letter-spacing: 0.08em; color: #94a3b8; font-weight: 500; margin-top: 6px; text-transform: uppercase; }

  /* Cards section */
  .col-cases {
    border-right: none;
    min-height: auto;
    overflow: visible;
  }

  .case {
    padding: 24px 20px;
    gap: 16px;
    flex: none;
    min-height: auto;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
  }

  .case:active {
    transform: scale(0.99);
    background: rgba(255,255,255,0.02);
  }

  .case.active {
    flex: none;
    padding: 28px 20px;
  }

  .case-body {
    max-width: none;
    min-width: 0;
    overflow: hidden;
    flex: 1;
  }

  .case-body h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-bottom: 8px;
    text-wrap: balance;
  }

  .case-body p {
    font-size: 15px;
    line-height: 1.6;
    color: #d1d5db;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .case:not(.active) .case-body {
    position: relative;
  }
  .case:not(.active) .case-body p {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    color: #e2e8f0;
  }
  .case:not(.active) .case-body p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 14px;
    background: linear-gradient(transparent, var(--bg));
    pointer-events: none;
  }

  .case-metric {
    font-size: 11px;
    padding: 8px 14px;
    max-width: 100%;
    white-space: normal;
    line-height: 1.5;
    border-radius: 8px;
  }

  /* Section separator between cards and chat */
  .col-cases {
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  /* Workflow steps stack vertically on mobile */
  .workflow {
    flex-direction: column;
    gap: 12px;
  }

  .wf-step {
    flex: none;
    gap: 10px;
  }

  .wf-line {
    width: auto;
    min-width: auto;
    height: 16px;
    padding: 0 0 0 10px;
  }

  .wf-line::after {
    width: 1px;
    height: 12px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
  }

  .wf-text { font-size: 13px; }
  .wf-text strong { font-size: 13px; }

  /* Hide nav links on mobile — keep only Login + CTA */
  .topbar-link { display: none !important; }

  /* Chat panel */
  .col-chat {
    min-height: 280px;
    max-height: none;
    border-top: 2px solid rgba(91,141,239,0.35);
    padding-top: 0;
    background: linear-gradient(180deg, rgba(91,141,239,0.04) 0%, transparent 100px);
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
  }

  .chat-messages {
    padding: 12px 14px;
    min-height: 160px;
    max-height: 300px;
    overflow-y: auto;
  }

  .msg {
    max-width: 90%;
    font-size: 14px;
    line-height: 1.45;
    padding: 12px 16px;
  }

  .chat-suggest-chip {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 44px;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
  }

  .chat-suggest-label { font-size: 11px; }

  /* Bottom bar — hide on mobile (content duplicated in footer/sections) */
  .bottombar {
    display: none;
  }

  .bottom-items {
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
  }
  .bottom-items::-webkit-scrollbar { display: none; }

  .bottom-item {
    font-size: 11px;
    padding: 6px 10px;
    letter-spacing: 0.5px;
  }

  .bottom-cta {
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mode-dots { flex-shrink: 0; }

  /* Portal world overlay — mobile-friendly */
  .portal-world { padding: 20px 16px; }
  .pw-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .pw-header { margin-bottom: 20px; }
  .pw-company { font-size: 18px; }
  .pw-close { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 20px; }

  /* Modal — full width on mobile */
  .modal-content {
    margin: 16px;
    padding: 24px 20px;
    max-width: none;
    border-radius: 12px;
  }

  /* Social proof responsive */
  .social-proof { padding: 48px 20px; }
  .social-proof-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
  .social-proof-metrics { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sp-metric { padding: 20px 16px; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .sp-metric-val { font-size: 32px; font-weight: 800; }
  .sp-metric-label { font-size: 13px; color: #c9cdd3; min-height: 44px; display: flex; align-items: center; text-align: center; justify-content: center; }
  .sp-cta-row { flex-direction: column; gap: 12px; margin-top: 8px; }
  .sp-cta-primary, .sp-cta-secondary { width: 100%; text-align: center; min-height: 48px; padding: 14px 32px; font-size: 15px; }

  /* Footer responsive */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .footer-links a { font-size: 14px; padding: 6px 0; min-height: 48px; display: flex; align-items: center; }
  .footer-desc { font-size: 14px; color: rgba(255,255,255,0.55); }
  .footer-bottom { font-size: 13px; color: rgba(255,255,255,0.55); }

  /* Mode tabs responsive */
  .mode-tabs { flex-shrink: 0; }
}

/* ─── SMALL MOBILE (≤480px) ─── */
@media (max-width: 480px) {
  .brand-sub, .brand-sep { display: none; }

  .topbar { padding: 0 12px; }
  .topbar-right { gap: 14px; }
  .topbar-link { font-size: 12px; }
  .top-cta { padding: 8px 16px; font-size: 12px; min-height: 44px; display: inline-flex; align-items: center; }

  .mobile-hero { padding: 32px 20px 28px; }
  .mobile-hero-title { font-size: 26px; }
  .mobile-hero-sub { font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
  .mobile-hero-cta { padding: 14px 24px; font-size: 15px; min-height: 52px; }

  .case-metric { white-space: normal; }

  .stat-val { font-size: 20px; }

  .case { padding: 16px; }
  .case.active { padding: 20px 16px; }
  .case-body h2 { font-size: 16px; }
  .case-body p { font-size: 14px; }
  .case-icon { display: none; }

  .col-chat { max-height: none; }

  .chat-employees { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .emp-avatar { width: 36px; height: 36px; min-width: 36px; font-size: 12px; }
  .emp-status { font-size: 11px; }
  .chat-msg-count { width: 100%; text-align: center; margin-left: 0; }

  .chat-input input { font-size: 14px; padding: 10px 8px; }

  .bottombar { padding: 0 8px; }
  .bottom-item { font-size: 10px; padding: 4px 8px; }
  .bottom-cta { font-size: 11px; }

  .topbar-login { padding: 8px 18px; font-size: 13px; min-height: 44px; min-width: 72px; display: inline-flex; align-items: center; justify-content: center; }
  .social-proof-metrics { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .sp-metric { padding: 20px 16px; }
  .sp-metric-val { font-size: 32px; font-variant-numeric: tabular-nums; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-col:first-child { grid-column: span 2; }
  .footer-links a { min-height: 48px; padding: 8px 0; }
  .mode-tab { font-size: 10px; padding: 4px 10px; }

  /* Chevron at top-right on small screens to avoid metric overlap */
  .case:not(.active)::after {
    bottom: auto;
    top: 16px;
    right: 16px;
  }
}

/* ─── LOGIN BUTTON ─── */
.topbar-login {
  font-size: 13px;
  color: #fff;
  border: 1.5px solid var(--accent);
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  min-height: 36px;
  transition: all 0.3s var(--ease);
}
.topbar-login:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(91,141,239,0.4);
}

/* ─── MOBILE HERO BUTTONS ─── */
.mobile-hero-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.mobile-hero-demo {
  display: block;
  width: 100%;
  color: #93b4f5;
  background: transparent;
  border: 1.5px solid rgba(91,141,239,0.85);
  background: rgba(91,141,239,0.06);
  padding: 12px 28px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s var(--ease);
}
.mobile-hero-demo:hover {
  background: rgba(91,141,239,0.08);
  border-color: var(--accent);
}

/* ─── FIRST CHAT CHIP HIGHLIGHT ─── */
.chat-suggest-chip:first-of-type {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.3);
  color: #93c5fd;
}

/* ─── CHAT SECTION TITLE (mobile) ─── */
.chat-section-title {
  display: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding: 24px 16px 12px;
  margin: 0;
}
@media (max-width: 900px) {
  .chat-section-title { display: block; }
}

/* ─── CARD EXPAND INDICATOR (mobile) ─── */
@media (max-width: 900px) {
  .case:not(.active) {
    position: relative;
  }
  .case:not(.active)::after {
    content: '';
    position: absolute;
    bottom: 16px;
    right: 20px;
    width: 28px;
    height: 28px;
    border: 1.5px solid rgba(255,255,255,0.55);
    border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.7)' stroke-width='2'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") center/14px no-repeat;
  }
  .case.active::after {
    content: none;
  }
  .case:first-child:not(.active)::after {
    animation: chevron-attention 2s ease-in-out 1.5s 2;
  }
  @keyframes chevron-attention {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.15); opacity: 0.9; }
  }
}

/* ─── CHAT MESSAGE COUNTER ─── */
.chat-msg-count {
  font-size: 11px;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 9999px;
  padding: 4px 12px;
  margin-left: auto;
  white-space: nowrap;
}

/* ─── MODE TABS (replaces dots) ─── */
.mode-tabs {
  display: flex;
  gap: 2px;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
}
.mode-tab {
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text3);
  background: transparent;
  border: none;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}
.mode-tab:hover {
  color: var(--text2);
}
.mode-tab.active {
  background: var(--accent);
  color: #fff;
}

/* ─── SOCIAL PROOF SECTION ─── */
.social-proof {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(91,141,239,0.04) 50%, var(--bg) 100%);
  border-top: 1px solid var(--line);
  padding: 48px 24px;
}
.social-proof-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.social-proof-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 32px;
  letter-spacing: -0.3px;
}
.social-proof-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.sp-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.3s;
}
.sp-metric:hover { border-color: rgba(91,141,239,0.3); }
.sp-metric-val {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
}
.sp-metric-label {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}
.sp-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.sp-cta-primary {
  padding: 12px 32px;
  background: #3b82f6;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
  transition: all 0.3s var(--ease);
}
.sp-cta-primary:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
}
.sp-cta-secondary {
  padding: 12px 32px;
  color: var(--accent);
  border: 1px solid rgba(91,141,239,0.3);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.sp-cta-secondary:hover {
  border-color: var(--accent);
  background: rgba(91,141,239,0.06);
}

/* ─── EXPANDED FOOTER ─── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 48px 24px 24px;
}
.footer-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text);
  margin-bottom: 8px;
}
.footer-desc {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  max-width: 260px;
}
.footer-heading {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text3);
}
.footer-loc { color: #64748b; }

/* ─── R28-R29 UX FIXES ─── */

/* Fix: Header nav contrast */
.topbar-link { color: #f8fafc; font-weight: 500; }
.topbar-link:hover { color: #60a5fa; }

/* Fix: Chat bubble overflow — prevent truncation */
.msg.assistant {
  overflow-wrap: break-word;
  word-break: break-word;
  max-height: none;
}

/* Fix: Status dot alignment */
.emp-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* R29/R32 Fix: Portal hint text visibility — forced bright */
.portal-hint {
  color: #9ca3af !important;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.9 !important;
}
.portal-hint.visible {
  animation: hint-pulse-bright 2s ease-in-out infinite;
}
@keyframes hint-pulse-bright {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* R30 Fix: Top nav links touch targets (min 44px) */
.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 16px;
}

/* R30/R42 Fix: Column borders removed for cleaner look */

/* R32 Fix: Mode tabs segmented control */
.mode-tabs {
  border-radius: 24px;
  padding: 4px;
  background: #0f172a;
  border-color: #334155;
}
.mode-tab {
  padding: 6px 16px;
}
.mode-tab.active {
  background: #2563eb;
  border-radius: 20px;
  padding: 6px 16px;
  color: #fff;
  font-weight: 600;
}

/* Mobile hero login button */
.mobile-hero-login {
  display: block;
  width: 100%;
  color: #fff;
  background: transparent;
  border: 1.5px solid var(--accent);
  padding: 12px 28px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s var(--ease);
}
.mobile-hero-login:hover {
  background: var(--accent);
  color: #fff;
}

/* R30 Fix: Bottom bar layout — consistent alignment */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .assembly-overlay { transition: none; opacity: 0; visibility: hidden; }
  .anim-block { opacity: 1; transform: none; }
}

/* Focus visible */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.case:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(91, 141, 239, 0.15);
}

/* High contrast preferences */
@media (prefers-contrast: more) {
  :root {
    --line: rgba(255,255,255,0.25);
    --text2: rgba(255,255,255,0.90);
    --text3: rgba(255,255,255,0.80);
  }
  .case, .pw-worker, .pw-entry, .pw-auth-item { border-width: 2px; }
  .case-body p, .case-metric { color: var(--text2); }
  .bottom-item, .bottom-legal-link { color: var(--text2); }
}

/* Skip-link target focus */
#main-content:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Overscroll containment */
.portal-world, .modal, .chat-messages { overscroll-behavior: contain; }

/* Content visibility for off-screen sections */
.panel-features, .portal-world { content-visibility: auto; contain-intrinsic-size: auto 500px; }

/* Print */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .assembly-overlay, .portal-world, .col-portal,
  .col-chat, .voice-viz, .skip-to-content, .portal-hint,
  .bottombar, .signupModal { display: none !important; }
  .vep-shell { height: auto; }
  .main-grid { display: block; }
  .case { break-inside: avoid; border: 1px solid #ccc; margin-bottom: 12px; background: #fff; }
  .case-body h2 { color: #000; }
  .case-body p { color: #333; }
  .topbar { position: static; background: #fff; border-bottom: 1px solid #ccc; }
  .brand, .topbar-link { color: #000 !important; }
}

/* Windows High Contrast Mode */
@media (forced-colors: active) {
  .case, .pw-worker, .pw-entry, .pw-auth-item, .modal-content {
    border: 1px solid ButtonText;
  }
  .case.active { border: 2px solid Highlight; }
  .submit-btn, .top-cta, .mobile-hero-cta, .pw-cta, .bottom-cta {
    border: 1px solid ButtonText;
  }
  .portal-core, .portal-ring { border: 1px solid ButtonText; }
  .emp-avatar { border: 1px solid ButtonText; }
  .emp-avatar.active, .emp-avatar[aria-pressed="true"] { border: 2px solid Highlight; }
  .case-icon svg, .mic-btn svg, .send-btn svg { forced-color-adjust: auto; }
}

/* ─── SCROLL ANIMATIONS ────────────────────────────────────────────── */

.pricing-section,
.templates-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.pricing-section.visible,
.templates-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── PRICING SECTION ──────────────────────────────────────────────── */

.pricing-section {
  padding: 80px 24px;
  background: #060608;
}

.pricing-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.pricing-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.pricing-subtitle {
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.price-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: left;
  transition: border-color 0.2s, transform 0.2s;
}

.price-card:hover {
  border-color: rgba(91,141,239,0.3);
  transform: translateY(-2px);
}

.price-card.highlighted {
  border-color: #5b8def;
  background: rgba(91,141,239,0.06);
}

.price-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #5b8def;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-card-header {
  margin-bottom: 20px;
}

.price-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
}

.price-card-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
}

.price-period {
  font-size: 0.9rem;
  color: #64748b;
}

.price-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.price-card-features li {
  padding: 6px 0;
  color: #cbd5e1;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.price-card-features li:last-child {
  border-bottom: none;
}

.price-card-cta {
  display: block;
  text-align: center;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5b8def;
  background: rgba(91,141,239,0.1);
  text-decoration: none;
  transition: background 0.2s;
}

.price-card-cta:hover {
  background: rgba(91,141,239,0.2);
}

.price-card-cta.cta-primary {
  color: #fff;
  background: #5b8def;
}

.price-card-cta.cta-primary:hover {
  background: #4a7de0;
}

/* ─── TEMPLATES SECTION ────────────────────────────────────────────── */

.templates-section {
  padding: 80px 24px;
  background: rgba(91,141,239,0.02);
}

.templates-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.templates-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.templates-subtitle {
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 48px;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.template-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.template-card:hover {
  border-color: rgba(91,141,239,0.3);
  transform: translateY(-2px);
}

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

.template-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
}

.template-desc {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.template-metric {
  display: inline-block;
  background: rgba(91,141,239,0.1);
  color: #5b8def;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.template-cta {
  display: block;
  text-align: center;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5b8def;
  background: rgba(91,141,239,0.08);
  text-decoration: none;
  transition: background 0.2s;
}

.template-cta:hover {
  background: rgba(91,141,239,0.18);
}

/* ─── WIZARD OVERLAY ───────────────────────────────────────────────── */

.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6,6,8,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.wizard-container {
  width: 100%;
  max-width: 640px;
  height: 80vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  background: #0c0c10;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
}

.wizard-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1;
}

.wizard-close:hover { color: #fff; }

.wizard-progress {
  display: flex;
  gap: 0;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.wizard-step {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.wizard-step.active {
  color: #64748b;
  border-bottom-color: rgba(91,141,239,0.3);
}

.wizard-step.current {
  color: #5b8def;
  border-bottom-color: #5b8def;
}

.wizard-chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wizard-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.wizard-msg-assistant {
  background: rgba(91,141,239,0.1);
  color: #e2e8f0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.wizard-msg-user {
  background: #5b8def;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.wizard-typing {
  display: flex;
  gap: 4px;
  padding: 14px 20px;
}

.wizard-typing .dot {
  width: 6px;
  height: 6px;
  background: #5b8def;
  border-radius: 50%;
  animation: wizDot 1.2s infinite;
}

.wizard-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.wizard-typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wizDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.wizard-input-row {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.wizard-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 0.88rem;
  outline: none;
}

.wizard-input:focus {
  border-color: rgba(91,141,239,0.4);
}

.wizard-send {
  background: #5b8def;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.wizard-send:hover { background: #4a7de0; }
.wizard-send:disabled { opacity: 0.5; cursor: default; }

.wizard-completion {
  text-align: center;
  padding: 32px 0;
}

.wizard-cert {
  background: rgba(91,141,239,0.06);
  border: 1px solid rgba(91,141,239,0.2);
  border-radius: 16px;
  padding: 32px;
}

.wizard-cert h3 {
  color: #5b8def;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.wizard-cert-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.wizard-cert p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.wizard-cert-cta {
  display: inline-block;
  background: #5b8def;
  color: #fff;
  padding: 12px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
}

.wizard-cert-cta:hover { background: #4a7de0; }

/* Wizard template selection cards */
.wizard-template-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.wizard-tpl-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(91,141,239,0.08);
  border: 1px solid rgba(91,141,239,0.15);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-width: 120px;
  text-align: center;
}

.wizard-tpl-card:hover {
  border-color: #5b8def;
  background: rgba(91,141,239,0.15);
}

.wizard-tpl-icon {
  font-size: 1.5rem;
}

.wizard-tpl-card strong {
  color: #e2e8f0;
  font-size: 0.8rem;
}

.wizard-tpl-metric {
  color: #5b8def;
  font-size: 0.68rem;
  font-weight: 600;
}

/* ─── RESPONSIVE: PRICING + TEMPLATES ──────────────────────────────── */

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pricing-grid,
  .templates-grid {
    grid-template-columns: 1fr;
  }

  .pricing-section,
  .templates-section {
    padding: 48px 16px;
  }

  .pricing-title,
  .templates-title {
    font-size: 1.5rem;
  }

  .wizard-container {
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }
}
