/* ==============================================
   WorkView App — Framer-style Landing
   Colors pulled from actual dashboard code
   ============================================== */

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

:root {
  /* ---- Exact dashboard surfaces ---- */
  --bg: #0a0a0b;
  --surface: #111113;
  --surface-2: #161618;
  --surface-3: #1c1c1f;
  --bg-elevated: #0e0e10;

  /* ---- Exact dashboard text ---- */
  --text: #e8e8ea;
  --text-muted: #888890;
  --text-faint: #444450;

  /* ---- Exact dashboard borders ---- */
  --border-subtle: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);

  /* ---- Exact dashboard accent (blue only) ---- */
  --accent: #3D79F2;
  --accent-dim: rgba(61,121,242,0.10);
  --accent-border: rgba(61,121,242,0.18);
  --accent-soft: rgba(61,121,242,0.12);

  /* ---- Dashboard blue shades ---- */
  --b6: #89CFF0;
  --b9: #5494DA;
  --b10: #3D79F2;
  --b14: #0F3D8A;
  --b16: #1B2F66;
  --b18: #0C243D;

  /* ---- Gain/Loss — only place with color ---- */
  --success: #00e59b;
  --danger: #ff4d6d;

  /* ---- Glass (from dashboard) ---- */
  --glass-bg: rgba(17,17,19,0.65);
  --glass-blur: blur(20px);

  /* ---- Type ---- */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ---- Spacing ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* ---- Radius (from dashboard) ---- */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);

  /* ---- Easing ---- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }

.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;
}

.hidden { display: none !important; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--space-6); overflow: hidden; }
.center { text-align: center; }
.full-width { width: 100%; }

::selection { background: var(--accent-dim); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-xs); }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--bg);
  font-family: var(--font); font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; white-space: nowrap;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--b9);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  font-family: var(--font); text-decoration: none;
}
.btn-ghost:hover {
  border-color: var(--text-faint);
  color: var(--text);
  transform: translateY(-1px);
}
.btn-ghost .arrow { transition: transform var(--transition); }
.btn-ghost:hover .arrow { transform: translateX(3px); }

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,11,0.8);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border-subtle);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), background 0.3s ease;
  padding-top: env(safe-area-inset-top, 0px);
}
.nav-hidden {
  transform: translateY(-100%);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-6); height: 56px;
}
.nav-logo {
  display: flex; align-items: center; gap: var(--space-2);
  color: var(--text); font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-logo-img {
  height: 28px; width: auto;
  display: block;
  object-fit: contain;
}
.nav-links { display: flex; gap: var(--space-8); }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 20px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  font-family: var(--font);
}
.nav-cta:hover {
  border-color: var(--text-faint); color: var(--text);
}

@media (max-width: 600px) {
  .nav-links { display: none; }
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px var(--space-6) var(--space-16);
  position: relative;
}

.hero-eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-6);
}

.hero h1 {
  font-size: clamp(2.5rem, 1rem + 5vw, 5.5rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-6);
}

.gradient-text {
  background: linear-gradient(180deg, var(--text) 20%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 1rem + 0.3vw, 18px);
  color: var(--text-muted); line-height: 1.65;
  max-width: 540px; margin: 0 auto var(--space-8);
}

/* ---- Hero Email Form (centered in hero) ---- */
.hero-email-form {
  max-width: 480px;
  margin: 0 auto var(--space-6);
}

.hero-input-group {
  display: flex; gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px;
  transition: border-color var(--transition);
}
.hero-input-group:focus-within {
  border-color: var(--accent);
}

.hero-input-group input {
  flex: 1; padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text); font-size: 15px;
  font-family: var(--font);
  outline: none;
}
.hero-input-group input::placeholder { color: var(--text-faint); }

.hero-input-group .btn-primary {
  padding: 12px 24px;
  border-radius: 6px;
  flex-shrink: 0;
}

.hero-email-note {
  font-size: 12px; color: var(--text-faint);
  margin-top: var(--space-2);
}

/* Pulse animation for input focus redirect */
@keyframes inputPulse {
  0% { border-color: var(--border-strong); }
  50% { border-color: var(--accent); }
  100% { border-color: var(--border-strong); }
}
.input-pulse .hero-input-group,
.hero-input-group.input-pulse {
  animation: inputPulse 0.5s ease 2;
}

@media (max-width: 480px) {
  .hero-input-group {
    flex-direction: column;
    padding: var(--space-2);
  }
  .hero-input-group .btn-primary { width: 100%; }
}

/* ---- AI Typewriter in Hero ---- */
.hero-typewriter-wrap {
  max-width: 520px;
  margin: 0 auto;
  min-height: 60px;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-align: left;
}

.hero-tw-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.hero-typewriter {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  transition: opacity 0.3s ease;
}

.tw-cursor {
  display: inline-block;
  width: 1.5px;
  height: 14px;
  background: var(--accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: twBlink 0.8s step-end infinite;
}

@keyframes twBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.tw-cursor-fade {
  animation: twBlink 0.8s step-end 4, twFadeOut 0.5s ease 3.2s forwards;
}

@keyframes twFadeOut {
  to { opacity: 0; }
}

/* ---- Scroll Sequence ---- */
.sequence-section {
  padding: var(--space-16) 0 var(--space-20);
}

.sequence-text {
  text-align: center;
  margin-bottom: var(--space-10);
  padding: 0 var(--space-6);
}

.section-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-3);
}

.section-heading {
  font-size: clamp(1.8rem, 1rem + 2.5vw, 3rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.sequence-text h2 {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.section-desc {
  font-size: 15px; color: var(--text-muted);
  max-width: 440px; margin: 0 auto; line-height: 1.6;
}

.sequence-container {
  position: relative;
  max-width: 960px; margin: 0 auto;
  height: 540px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.sequence-scroll {
  position: absolute; inset: 0;
  overflow-y: scroll;
  z-index: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sequence-scroll::-webkit-scrollbar { display: none; }

/* Spacer sized for smooth scroll — 40px travel per frame */
.sequence-spacer {
  height: calc(var(--seq-height, 540px) + 35 * 40px);
}

.sequence-display {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}

.sequence-display img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* Sharp rendering for retina frames */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.sequence-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--border-subtle);
  z-index: 3;
}

.sequence-progress-bar {
  height: 100%; width: 0%;
  background: var(--accent);
  transition: width 60ms linear;
}

/* Scroll hint */
.sequence-container::after {
  content: 'Scroll inside ↕';
  position: absolute; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; color: var(--text-faint);
  letter-spacing: 0.5px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border-subtle);
  z-index: 4;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.sequence-container.scrolled::after { opacity: 0; }

@media (max-width: 700px) {
  .sequence-container { height: 380px; margin: 0 16px; }
}

/* ---- Features ---- */
.features-section {
  padding: var(--space-20) 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-top: var(--space-10);
}

.feature-card {
  background: var(--surface);
  padding: var(--space-8);
  transition: background var(--transition);
}
.feature-card:hover { background: var(--surface-2); }

.feature-hero-card {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-6);
}

.feature-hero-text {
  padding: var(--space-4) 0;
}

.feature-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}

.feature-card h3 {
  font-size: 16px; font-weight: 700;
  color: var(--text); margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.6;
}

.feature-visual {
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.feature-demo-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-hero-card { grid-column: span 1; grid-template-columns: 1fr; }
  .feature-hero-text { padding: 0 var(--space-4) var(--space-4); }
}

/* ---- Pricing ---- */
.pricing-section {
  padding: var(--space-20) 0;
}

.pricing-card {
  max-width: 440px; margin: var(--space-10) auto 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.pricing-top {
  padding: var(--space-8);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.pricing-amount {
  display: flex; align-items: baseline;
  justify-content: center; gap: 4px;
}

.price {
  font-size: 48px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--text);
  line-height: 1;
}

.price-period {
  font-size: 16px; color: var(--text-muted);
  font-weight: 500;
}

.pricing-note {
  font-size: 13px; color: var(--text-faint);
  margin-top: var(--space-2);
}

.pricing-features {
  list-style: none;
  padding: var(--space-6) var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-3);
}

.pricing-features li {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: 14px; color: var(--text-muted);
}

.pricing-features li svg { flex-shrink: 0; }

.pricing-card .btn-primary {
  margin: 0 var(--space-8) var(--space-8);
  width: calc(100% - var(--space-8) * 2);
}

/* ---- Signup Flow ---- */
.signup-section {
  padding: var(--space-20) 0 var(--space-24);
  text-align: center;
  display: none; /* Hidden until email is submitted */
}

.signup-step {
  display: none;
  animation: fadeUp 0.5s var(--ease) both;
}
.signup-step.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Early Access card */
.early-access-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-10) var(--space-8);
}

.ea-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-6);
}

.ea-email {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.ea-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 280px;
  margin: 0 auto;
}

.ea-actions .btn-primary,
.ea-actions .btn-ghost {
  width: 100%;
  justify-content: center;
}

/* Billing card */
.billing-card {
  max-width: 440px; margin: var(--space-8) auto 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}

.billing-summary {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.billing-line {
  display: flex; justify-content: space-between;
  font-size: 14px; color: var(--text-muted);
  padding: var(--space-1) 0;
}
.billing-line.total {
  font-weight: 700; color: var(--text);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

.free-badge {
  color: #89CFF0;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
}

.billing-form {
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-4);
}

.form-field {
  display: flex; flex-direction: column; gap: var(--space-1);
}
.form-field label {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.form-field input {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text); font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}
.form-field input:focus { border-color: var(--accent); }
.form-field input::placeholder { color: var(--text-faint); }

.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
}

.billing-disclaimer {
  font-size: 12px; color: var(--text-faint);
  line-height: 1.5; text-align: center;
  margin-top: var(--space-2);
}

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(10,10,11,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.success-content {
  max-width: 440px; margin: 0 auto;
}
.success-check {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-6);
}
.success-check svg { color: var(--accent); }

.success-details {
  margin-top: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.detail-row {
  display: flex; justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: 14px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.detail-row:last-child { border: none; }
.detail-row span:last-child { color: var(--text); font-weight: 600; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-6);
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-left {
  display: flex; align-items: center; gap: var(--space-2);
  color: var(--text-faint); font-weight: 600; font-size: 14px;
}
.footer-logo-img {
  height: 20px; width: auto;
  display: block;
  object-fit: contain;
}
.footer p { font-size: 12px; color: var(--text-faint); }

@media (max-width: 480px) {
  .footer-inner { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* ---- Scroll animations (CSS-native) ---- */
.fade-in { opacity: 1; }
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: revealFade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}
@keyframes revealFade { to { opacity: 1; } }

/* ---- 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;
  }
}

/* ===== HOW IT WORKS — FULL-FRAME SECTION ===== */
.hiw-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24) var(--space-6);
  background: var(--bg);
  position: relative;
}
/* Subtle top divider line */
.hiw-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hiw-inner {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.hiw-heading {
  font-size: clamp(1.8rem, 1rem + 3vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-top: var(--space-4);
  letter-spacing: -0.02em;
}

.hiw-subhead {
  font-size: clamp(15px, 1rem + 0.2vw, 17px);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 620px;
  margin: var(--space-6) auto var(--space-16);
}

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  text-align: left;
}

.hiw-step {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-8) var(--space-6);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hiw-step:hover {
  border-color: var(--accent-border);
  box-shadow: 0 0 20px rgba(61,121,242,0.08);
}

.hiw-step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-4);
  letter-spacing: 1px;
}

.hiw-step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.hiw-step-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.hiw-cta {
  margin-top: var(--space-12);
}
.hiw-cta .btn-primary {
  padding: 14px 36px;
  font-size: 15px;
}

@media (max-width: 768px) {
  .hiw-steps {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .hiw-step {
    padding: var(--space-6) var(--space-4);
  }
  .hiw-section {
    min-height: auto;
    padding: var(--space-16) var(--space-4);
  }
}

/* ===== DEMO IMAGES SECTION ===== */
.demo-section {
  padding: 100px 0 80px;
  overflow: hidden; /* prevent horizontal blowout */
}
.demo-header {
  text-align: center;
  margin-bottom: 60px;
}
.demo-grid {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.demo-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%; /* constrain within container */
}
.demo-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  padding-left: 4px;
}
.demo-img-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 1px rgba(255,255,255,0.06);
  background: var(--surface);
  max-width: 100%; /* prevent overflow */
}
.demo-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

@media (max-width: 768px) {
  .demo-section { padding: 60px 0 40px; }
  .demo-grid { gap: 32px; }
  .demo-header h2 { font-size: 1.4rem; }
  .demo-img-wrap { border-radius: 8px; }
}

/* ============================================================
   STATIC DASHBOARD PANELS — WorkView Demo Section
   Design tokens match wealth-dashboard.html exactly
   ============================================================ */

/* ---- Dashboard Shell (the "browser window" for each panel) ---- */
.ds-shell {
  display: grid;
  grid-template-columns: 180px 1fr;
  grid-template-rows: 1fr;
  background: #0a0a0b;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #e8e8ea;
  min-height: 540px;
  max-height: 620px;
  overflow: hidden;
  position: relative;
}

/* No-sidebar variant (Panel 3) */
.ds-shell-nosidebar {
  grid-template-columns: 1fr;
}

/* ---- Sidebar ---- */
.ds-sidebar {
  background: rgba(17,17,19,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ds-sidebar-logo {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ds-logo-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: #f0f0f2;
}

.ds-logo-sub {
  font-size: 9px;
  color: #888890;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.ds-sidebar-section {
  padding: 12px 12px 4px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #444450;
  font-weight: 600;
}

.ds-sidebar-nav {
  list-style: none;
  padding: 0 6px;
}

.ds-sidebar-nav li {
  margin-bottom: 1px;
}

.ds-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #888890;
  font-size: 12px;
  font-weight: 500;
  cursor: default;
  /* NON-INTERACTIVE: no hover */
}

.ds-sidebar-nav a.active {
  background: rgba(61,121,242,0.10);
  color: #3D79F2;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #3D79F2;
}

.ds-nav-icon {
  width: 15px;
  height: 15px;
  opacity: 0.55;
  flex-shrink: 0;
}

.ds-sidebar-nav a.active .ds-nav-icon {
  opacity: 1;
}

/* ---- Topbar ---- */
.ds-topbar {
  background: rgba(17,17,19,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  flex-shrink: 0;
}

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

.ds-topbar-title {
  font-size: 13px;
  font-weight: 700;
  color: #e8e8ea;
  letter-spacing: -0.01em;
}

.ds-market-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #888890;
}

.ds-market-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ds-market-dot.closed {
  background: #ff4d6d;
}

.ds-market-dot.open {
  background: #00e59b;
  box-shadow: 0 0 6px #00e59b;
}

.ds-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ds-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #888890;
  font-variant-numeric: tabular-nums;
}

/* ---- Main area layout ---- */
.ds-main-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.ds-content {
  flex: 1;
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- Card system ---- */
.ds-card {
  background: rgba(17,17,19,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 8px rgba(0,0,0,0.3);
  min-width: 0;
  overflow: hidden;
}

.ds-no-pad {
  padding: 0;
}

.ds-card-header {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #888890;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: normal;
  line-height: 1.3;
  min-height: 12px;
}

.ds-card-value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #e8e8ea;
  white-space: nowrap;
}

.ds-kpi-sm {
  font-size: 13px;
}

.ds-card-delta {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 500;
  color: #888890;
}

.ds-mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums lining-nums;
}

.ds-positive { color: #00e59b; }
.ds-negative { color: #ff4d6d; }
.ds-accent   { color: #3D79F2; }

/* ---- KPI Grids ---- */
.ds-kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex-shrink: 0;
}

.ds-kpi-grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.ds-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 62px;
  padding: 8px 10px;
}

/* ---- Bento 2-col ---- */
.ds-bento-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- Chart titles ---- */
.ds-chart-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888890;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

/* ---- Bar Chart ---- */
.ds-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ds-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ds-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #888890;
  width: 32px;
  flex-shrink: 0;
  font-weight: 600;
}

.ds-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.ds-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: none;
}

.ds-bar-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  width: 48px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ---- Donut Chart ---- */
.ds-donut-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ds-donut {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ds-donut-hole {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #0a0a0b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.ds-donut-center-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #e8e8ea;
  line-height: 1;
}

.ds-donut-center-label {
  font-size: 8px;
  color: #888890;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.ds-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ds-legend-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #888890;
}

.ds-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ds-legend-pct {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #e8e8ea;
  font-weight: 600;
}

/* ---- Holdings Table ---- */
.ds-table-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.ds-table th {
  background: rgba(17,17,19,0.85);
  padding: 7px 10px;
  text-align: left;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888890;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.ds-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 11px;
  color: #e8e8ea;
}

.ds-table tr:last-child td {
  border-bottom: none;
}

.ds-right {
  text-align: right;
}

.ds-ticker-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(61,121,242,0.12);
  color: #3D79F2;
  font-weight: 600;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(61,121,242,0.25);
}

.ds-name-col {
  font-family: 'Inter', system-ui, sans-serif;
  color: #888890;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Risk Profile ---- */
.ds-risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ds-risk-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(61,121,242,0.10);
  color: #3D79F2;
  letter-spacing: 0.3px;
}

.ds-risk-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  position: relative;
  overflow: visible;
  margin-bottom: 4px;
}

.ds-risk-bar-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg,
    #1750AC 0%,
    #3D79F2 40%,
    #5494DA 68%,
    #ff4d6d 100%
  );
}

.ds-risk-marker {
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
}

.ds-risk-marker-line {
  width: 2px;
  height: 14px;
  background: #e8e8ea;
  border-radius: 1px;
  box-shadow: 0 0 4px rgba(255,255,255,0.5);
}

.ds-risk-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #444450;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- AI Briefing Card ---- */
.ds-ai-briefing {
  background: linear-gradient(135deg, rgba(61,121,242,0.08) 0%, rgba(17,17,19,0.7) 60%);
  border: 1px solid rgba(61,121,242,0.25);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.ds-ai-briefing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3D79F2, transparent);
}

.ds-ai-briefing-full {
  padding: 16px 20px;
}

.ds-ai-briefing-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ds-ai-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(61,121,242,0.12);
  border: 1px solid rgba(61,121,242,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #3D79F2;
}

.ds-ai-label {
  font-size: 11px;
  font-weight: 700;
  color: #3D79F2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ds-ai-text {
  font-size: 12px;
  color: #888890;
  line-height: 1.6;
}

.ds-ai-text strong {
  color: #e8e8ea;
  font-weight: 600;
}

/* ---- Suggestion Cards Grid ---- */
.ds-suggestions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.ds-suggestion-card {
  background: rgba(17,17,19,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 4px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ds-suggestion-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-suggestion-ticker {
  font-size: 12px;
  font-weight: 700;
  color: #e8e8ea;
}

.ds-suggestion-text {
  font-size: 11px;
  color: #888890;
  line-height: 1.5;
}

/* ---- Suggestion Badges ---- */
.ds-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ds-badge-trim {
  background: rgba(84,148,218,0.12);
  color: #5494DA;
}

.ds-badge-buy {
  background: rgba(61,121,242,0.12);
  color: #3D79F2;
}

.ds-badge-add {
  background: rgba(61,121,242,0.10);
  color: #5494DA;
}

/* ---- Feature section mini dashboard ---- */
.ds-feature-mini {
  background: #0a0a0b;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #e8e8ea;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* ---- Mobile: panels restack to fit screen ---- */
@media (max-width: 768px) {
  .ds-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
    overflow: hidden;
    min-width: 0;
  }

  /* Hide sidebar on mobile */
  .ds-sidebar {
    display: none;
  }

  .demo-img-wrap {
    overflow: hidden;
  }

  /* KPI Row 1: 2 cols on mobile, show key 4 */
  .ds-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  /* Hide less-important KPIs on mobile */
  .ds-kpi-grid > .ds-card:nth-child(n+5) {
    display: none;
  }

  /* KPI Row 2: 2 cols */
  .ds-kpi-grid-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  /* Hide less-important row 2 KPIs on mobile */
  .ds-kpi-grid-6 > .ds-card:nth-child(n+5) {
    display: none;
  }

  /* Bento charts: stack vertically */
  .ds-bento-2 {
    grid-template-columns: 1fr;
  }

  /* Suggestion cards: single column */
  .ds-suggestions-grid {
    grid-template-columns: 1fr;
  }

  /* Table: smaller text */
  .ds-table th,
  .ds-table td {
    padding: 5px 6px;
    font-size: 10px;
  }

  .ds-content {
    padding: 10px;
    gap: 8px;
  }

  .ds-topbar {
    height: 40px;
    padding: 0 10px;
  }

  .ds-card-value {
    font-size: 13px;
  }

  .ds-card-header {
    font-size: 7px;
  }

  .ds-kpi {
    min-height: 52px;
    padding: 6px 8px;
  }

  /* Donut smaller on mobile */
  .ds-donut {
    width: 80px;
    height: 80px;
  }
  .ds-donut-hole {
    width: 52px;
    height: 52px;
  }
  .ds-donut-center-val {
    font-size: 14px;
  }

  /* AI briefing compact */
  .ds-ai-text {
    font-size: 11px;
  }
  .ds-ai-briefing-full .ds-ai-text {
    font-size: 11px;
    /* Limit to ~4 lines on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
