/* ============================================================
   SmaugBrain Homepage — Amplemarket-inspired design system.
   Light-first, frosted white workspace with Deep Violet core
   and Ember Orange atmosphere.

   Shared tokens, header, menu, footer are in themes.css.
   ============================================================ */

/* ============================================================
   DESIGN TOKENS (Amplemarket light theme)
   ============================================================ */

:root {
  /* Colors */
  --smh-ink-black: #111111;
  --smh-paper-white: #ffffff;
  --smh-obsidian-warm: #272625;
  --smh-graphite-mid: #6d6c6b;
  --smh-cream-paper: #f4f3ef;
  --smh-stone-border: #b1b1af;
  --smh-pearl-mist: #ecebea;
  --smh-deep-violet: #a78bfa;
  --smh-violet-shade: #2e2460;
  --smh-ember-blue: #0d52e8;
  --smh-blush-pink: #ffd7f0;
  --smh-mint-green: #b7efb2;
  --smh-pale-yellow: #ffef99;
  --smh-lilac-wash: #e2ddfd;
  --smh-grid-line-base: rgba(151, 151, 151, 0.06);
  --smh-grid-line: rgba(17, 17, 17, 0.06);
  --smh-grid-fine: rgba(17, 17, 17, 0.028);

  /* Typography */
  --smh-font: 'Space Grotesk', 'Inter Variable', ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  /* Typography Scale */
  --smh-text-caption: 10px;
  --smh-leading-caption: 1.2;
  --smh-tracking-caption: 0.03em;
  --smh-text-eyebrow: 12px;
  --smh-leading-eyebrow: 1.2;
  --smh-tracking-eyebrow: 0.03em;
  --smh-text-body-sm: 14px;
  --smh-leading-body-sm: 1.3;
  --smh-tracking-body-sm: -0.01em;
  --smh-text-body: 16px;
  --smh-leading-body: 1.3;
  --smh-tracking-body: -0.01em;
  --smh-text-subheading: 20px;
  --smh-leading-subheading: 1.2;
  --smh-tracking-subheading: -0.017em;
  --smh-text-heading-sm: 24px;
  --smh-leading-heading-sm: 1.2;
  --smh-tracking-heading-sm: -0.02em;
  --smh-text-heading: 28px;
  --smh-leading-heading: 1.1;
  --smh-tracking-heading: -0.02em;
  --smh-text-heading-lg: 36px;
  --smh-leading-heading-lg: 1.1;
  --smh-tracking-heading-lg: -0.02em;
  --smh-text-display: 56px;
  --smh-leading-display: 1.0;
  --smh-tracking-display: -0.04em;
  --smh-text-hero: 84px;
  --smh-leading-hero: 0.8;
  --smh-tracking-hero: -0.05em;

  /* Typography Weights */
  --smh-weight-regular: 400;
  --smh-weight-medium: 500;
  --smh-weight-bold: 700;
  --smh-weight-black: 900;

  /* Spacing (4px base) */
  --smh-space-4: 4px;
  --smh-space-8: 8px;
  --smh-space-12: 12px;
  --smh-space-16: 16px;
  --smh-space-20: 20px;
  --smh-space-24: 24px;
  --smh-space-28: 28px;
  --smh-space-36: 36px;
  --smh-space-40: 40px;
  --smh-space-44: 44px;
  --smh-space-48: 48px;
  --smh-space-56: 56px;
  --smh-space-84: 84px;
  --smh-space-100: 100px;
  --smh-space-112: 112px;
  --smh-space-144: 144px;

  /* Border Radius */
  --smh-radius-sm: 4px;
  --smh-radius-md: 8px;
  --smh-radius-lg: 12px;
  --smh-radius-xl: 16px;
  --smh-radius-2xl: 22px;
  --smh-radius-pill: 9999px;

  /* Shadows (inset-ring philosophy — no heavy drop shadows) */
  --smh-shadow-subtle: rgba(17, 17, 17, 0.05) 0px 0px 0px 1px inset;
  --smh-shadow-card: rgba(17, 17, 17, 0.04) 0px 1px 2px 0px,
    rgba(17, 17, 17, 0.04) 0px 4px 8px 0px,
    rgba(17, 17, 17, 0.04) 0px 0px 1px 0px;
  --smh-shadow-xl: rgba(17, 17, 17, 0.12) 0px 26px 60px -6px,
    rgba(17, 17, 17, 0.02) 0px 28px 28px -14px,
    rgba(17, 17, 17, 0.04) 0px 6px 6px -3px,
    rgba(17, 17, 17, 0.04) 0px 1px 1px -0.5px;

  /* Layout */
  --smh-page-max: 1420px;
  --smh-section-gap: 80px;
  --smh-card-padding: 20px;
  --smh-element-gap: 8px;
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */

html[data-theme='dark'] {
  --smh-ink-black: #eef4ff;
  --smh-paper-white: #0b1020;
  --smh-obsidian-warm: #060812;
  --smh-graphite-mid: #8da0bd;
  --smh-cream-paper: #10172a;
  --smh-stone-border: rgba(148, 163, 184, 0.18);
  --smh-pearl-mist: rgba(255, 255, 255, 0.06);
  --smh-deep-violet: #a78bfa; /* Keeping the same Deep Violet for contrast in dark mode */
  --smh-violet-shade: #1a1040;
  --smh-ember-blue: #0d52e8; /* Keeping the same Ember Blue for contrast in dark mode */
  --smh-blush-pink: rgba(255, 215, 240, 0.12);
  --smh-mint-green: rgba(183, 239, 178, 0.12);
  --smh-pale-yellow: rgba(255, 239, 153, 0.12);
  --smh-lilac-wash: rgba(226, 221, 253, 0.12);
  --smh-grid-line: rgba(255, 255, 255, 0.085);
  --smh-grid-fine: rgba(255, 255, 255, 0.045);
}

/* ============================================================
   BASE & HOME SHELL
   ============================================================ */

body.smaug-route-home {
  cursor: auto !important;
}

.sm-home-page canvas {
  cursor: default !important;
}

/* Remove old dot grid */
body.smaug-route-home::before {
  display: none;
}

.sm-home-shell {
  position: relative;
  background: var(--smh-paper-white);
  overflow-x: clip;
}

/* ============================================================
   HOME INTRO — glass wordmark loading sequence
   ============================================================ */

html.sm-home-intro-pending,
html.sm-home-intro-pending body {
  overflow: hidden;
}

.sm-home-intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.56) 36%, rgba(255, 255, 255, 0.18) 68%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 243, 239, 0.68));
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
  perspective: 1200px;
}

html.sm-home-intro-pending .sm-home-intro {
  display: grid;
  pointer-events: auto;
}

.sm-home-intro::before,
.sm-home-intro::after {
  content: '';
  position: absolute;
  inset: auto;
  pointer-events: none;
  border-radius: 9999px;
  filter: blur(38px);
}

.sm-home-intro::before {
  width: min(620px, 78vw);
  height: min(260px, 30vh);
  left: 12vw;
  top: 18vh;
  background: rgba(16, 5, 77, 0.08);
}

.sm-home-intro::after {
  width: min(540px, 70vw);
  height: min(220px, 28vh);
  right: 10vw;
  bottom: 18vh;
  background: rgba(232, 64, 13, 0.09);
}

.sm-home-intro-glass {
  position: fixed;
  left: 50%;
  top: 52%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', var(--smh-font);
  font-size: clamp(76px, 13vw, 208px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
  color: #111111;
  text-transform: lowercase;
  overflow: visible;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  filter:
    drop-shadow(0 22px 48px rgba(17, 17, 17, 0.12))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95));
}

.sm-home-intro-word {
  display: block;
  width: min(88vw, 980px);
  aspect-ratio: 698 / 120;
  opacity: 0;
  overflow: visible;
}

.sm-home-intro-wordmark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sm-home-intro-stroke {
  visibility: hidden;
  fill: none;
  stroke: #111111;
  stroke-width: 8.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.92))
    drop-shadow(0 14px 24px rgba(17, 17, 17, 0.14));
  will-change: stroke-dashoffset;
}

html.sm-home-intro-pending:not(.sm-home-intro-handoff) .sm-home-brand span {
  opacity: 0;
}

html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-eyebrow-cell,
html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-title,
html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-subcopy,
html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-hero-actions,
html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-trust,
html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-stage,
html.sm-home-intro-pending:not(.sm-home-intro-hero-started) .sm-home-metric {
  opacity: 0;
}

html[data-theme='dark'] .sm-home-intro {
  background:
    radial-gradient(circle at 50% 42%, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.68) 40%, rgba(2, 6, 23, 0.52) 100%),
    linear-gradient(180deg, rgba(8, 12, 24, 0.86), rgba(2, 6, 23, 0.82));
}

html[data-theme='dark'] .sm-home-intro-glass {
  filter:
    drop-shadow(0 24px 58px rgba(0, 0, 0, 0.42))
    drop-shadow(0 1px 1px rgba(255, 255, 255, 0.42));
}

html[data-theme='dark'] .sm-home-intro-stroke {
  stroke: rgba(226, 232, 240, 0.92);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.34))
    drop-shadow(0 0 20px rgba(125, 211, 252, 0.28))
    drop-shadow(0 16px 34px rgba(0, 0, 0, 0.32));
}

/* Noise texture overlay */
.sm-home-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* Page container */
.sm-home-page {
  margin: 0 auto;
  position: relative;
  z-index: 1;
  overflow-x: clip;
  --smh-grid-columns: 18;
  --smh-grid-edge-x: calc(
    max(0px, (100vw - var(--smh-page-max)) / 2)
    + clamp(14px, 1.8vw, 22px)
  );
  --smh-grid-size: calc(
    (100vw - (var(--smh-grid-edge-x) * 2)) / var(--smh-grid-columns)
  );
  --smh-grid-top-fade-start: 90px;
  --smh-grid-top-fade-end: 170px;
}

/* Corner-anchored radial atmosphere */
.sm-home-page::before {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 10%, rgba(232, 64, 13, 0.08), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(16, 5, 77, 0.06), transparent 32%),
    radial-gradient(circle at 60% 70%, rgba(226, 221, 253, 0.05), transparent 34%);
}

html[data-theme='dark'] .sm-home-page::before {
  background:
    radial-gradient(circle at 12% 10%, rgba(79, 140, 255, 0.22), transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(167, 139, 250, 0.20), transparent 32%),
    radial-gradient(circle at 60% 70%, rgba(51, 214, 255, 0.10), transparent 34%);
}


/* ============================================================
   HERO SECTION — centered (example1 Amplemarket style)
   ============================================================ */
.sm-home-hero {
  box-sizing: border-box;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 clamp(14px, 1.8vw, 22px);
  position: relative;
  overflow: hidden;
}

.sm-home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--smh-grid-line-base) 1px, transparent 1px),
    linear-gradient(to bottom, var(--smh-grid-fine) 1px, transparent 1px);
  background-size:
    var(--smh-grid-size) var(--smh-grid-size),
    var(--smh-grid-size) var(--smh-grid-size);
  background-position:
    var(--smh-grid-edge-x) 0,
    0 0;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent var(--smh-grid-top-fade-start),
    #000 var(--smh-grid-top-fade-end),
    #000 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent var(--smh-grid-top-fade-start),
    #000 var(--smh-grid-top-fade-end),
    #000 100%
  );
}

.sm-home-hero-inner {
  padding: 184px 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  width: min(var(--smh-page-max), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.sm-home-hero-inner::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 96px;
  width: min(920px, calc(100vw - 120px));
  height: 420px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.84) 0,
    rgba(255, 255, 255, 0.72) 34%,
    rgba(255, 255, 255, 0.3) 68%,
    rgba(255, 255, 255, 0) 100%
  );
}

html[data-theme='dark'] .sm-home-hero-inner::before {
  background: radial-gradient(
    ellipse at center,
    rgba(11, 16, 32, 0.82) 0,
    rgba(11, 16, 32, 0.68) 34%,
    rgba(11, 16, 32, 0.28) 68%,
    rgba(11, 16, 32, 0) 100%
  );
}

.sm-home-hero-copy {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Eyebrow pill badge — original (kept for backwards compat) */
.sm-home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--smh-ink-black);
  background: var(--smh-paper-white);
  color: var(--smh-ink-black);
  padding: 6px 12px;
  border-radius: var(--smh-radius-md);
  font-size: var(--smh-text-eyebrow);
  font-weight: var(--smh-weight-bold);
  letter-spacing: var(--smh-tracking-eyebrow);
  margin-bottom: 22px;
}

.sm-home-eyebrow .sm-home-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 0 7px rgba(40, 200, 64, 0.12);
}

/* Eyebrow split-cell variant */
.sm-home-eyebrow-cell {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--smh-ink-black);
  border-radius: var(--smh-radius-md);
  overflow: hidden;
  margin-bottom: 22px;
}

.sm-home-eyebrow-cell-left {
  background: var(--smh-ink-black);
  color: var(--smh-paper-white);
  padding: 6px 12px;
  font-size: var(--smh-text-eyebrow);
  font-weight: var(--smh-weight-bold);
  letter-spacing: var(--smh-tracking-eyebrow);
}

.sm-home-eyebrow-cell-right {
  background: var(--smh-paper-white);
  color: var(--smh-ink-black);
  padding: 6px 12px;
  font-size: var(--smh-text-eyebrow);
  font-weight: var(--smh-weight-medium);
  letter-spacing: var(--smh-tracking-eyebrow);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Headline */
.sm-home-title {
  font-size: clamp(40px, 5.5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin-bottom: 22px;
  color: var(--smh-ink-black);
  font-weight: var(--smh-weight-bold);
}

.sm-home-title-accent {
  background: linear-gradient(
    100deg,
    var(--smh-ink-black),
    var(--smh-deep-violet) 50%,
    var(--smh-ember-blue)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Subcopy */
.sm-home-subcopy {
  font-size: var(--smh-text-subheading);
  line-height: 1.7;
  color: var(--smh-graphite-mid);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
}

/* Trust / social-proof row */
.sm-home-trust {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--smh-graphite-mid);
  font-size: var(--smh-text-body-sm);
  margin-bottom: 40px;
}

.sm-home-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--smh-ink-black);
}

/* Hero CTAs */
.sm-home-hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.sm-home-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--smh-radius-lg);
  background: var(--smh-ink-black);
  color: var(--smh-paper-white);
  font-size: 15px;
  font-weight: var(--smh-weight-medium);
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sm-home-btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.sm-home-btn-primary:active {
  transform: translateY(0);
}

.sm-home-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: var(--smh-radius-lg);
  background: var(--smh-ember-blue);
  color: #ffffff;
  border: 1px solid var(--smh-ember-blue);
  font-size: 15px;
  font-weight: var(--smh-weight-medium);
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sm-home-btn-secondary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sm-home-btn-secondary:active {
  transform: translateY(0);
}

.sm-home-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: var(--smh-radius-lg);
  background: var(--smh-paper-white);
  color: var(--smh-ink-black);
  border: 1px solid var(--smh-ink-black);
  font-size: 15px;
  font-weight: var(--smh-weight-medium);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.sm-home-btn-ghost:hover {
  background: rgba(17, 17, 17, 0.04);
  transform: translateY(-1px);
}

.sm-home-btn-ghost:active {
  transform: translateY(0);
}

/* Metrics row — centered strip below workbench */
.sm-home-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.sm-home-metric {
  border: 1px solid var(--smh-stone-border);
  background: var(--smh-paper-white);
  border-radius: var(--smh-radius-xl);
  padding: 14px;
  box-shadow: var(--smh-shadow-subtle);
}

.sm-home-metric b {
  display: block;
  font-size: var(--smh-text-subheading);
  margin-bottom: 3px;
  color: var(--smh-ink-black);
}

.sm-home-metric span {
  color: var(--smh-graphite-mid);
  font-size: var(--smh-text-body-sm);
}

/* ============================================================
   HERO — FLAT CENTERED WORKBENCH MOCKUP
   ============================================================ */

.sm-home-stage {
  position: relative;
  width: 100%;
  max-width: var(--smh-page-max);
  margin: 0 auto 40px;
  transform-origin: center top;
  will-change: transform, opacity;
}

/* Atmospheric orb behind the app window — centered */
.sm-home-orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
  pointer-events: none;
}

html[data-theme='light'] .sm-home-orb {
  background: radial-gradient(
    circle,
    rgba(232, 64, 13, 0.14),
    rgba(16, 5, 77, 0.06) 35%,
    transparent 62%
  );
  filter: blur(40px);
}

html[data-theme='dark'] .sm-home-orb {
  background: radial-gradient(
    circle,
    rgba(51, 214, 255, 0.28),
    transparent 64%
  );
  filter: blur(24px);
}

/* App window — flat, no 3D tilt */
.sm-home-app {
  position: relative;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: var(--smh-radius-2xl);
  background: var(--smh-paper-white);
  box-shadow: var(--smh-shadow-xl), var(--smh-shadow-subtle);
  overflow: hidden;
  transform: none;
}

/* Hand-drawn rocket accent */
.sm-home-hero-rocket {
  position: absolute;
  right: -40px;
  top: -30px;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 980px) {
  .sm-home-hero-rocket { display: none; }
}

html[data-theme='dark'] .sm-home-app {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(
    180deg,
    rgba(16, 23, 42, 0.96),
    rgba(7, 11, 23, 0.98)
  );
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* App title bar */
.sm-home-appbar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(17, 17, 17, 0.02);
}

html[data-theme='dark'] .sm-home-appbar {
  border-bottom-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.sm-home-appbar-dots {
  display: flex;
  gap: 7px;
}

.sm-home-appbar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.sm-home-appbar-dot--red  { background: #ff5f57; }
.sm-home-appbar-dot--yellow { background: #ffbd2e; }
.sm-home-appbar-dot--green { background: #28c840; }

.sm-home-appbar-title {
  color: var(--smh-graphite-mid);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.sm-home-appbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #28c840;
  font-size: 12px;
}

.sm-home-appbar-status .sm-home-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 0 7px rgba(40, 200, 64, 0.12);
}

/* Workbench layout */
.sm-home-workbench {
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  min-height: 520px;
}

.sm-home-workbench-side,
.sm-home-workbench-right {
  padding: 16px;
  background: rgba(17, 17, 17, 0.02);
}

html[data-theme='dark'] .sm-home-workbench-side,
html[data-theme='dark'] .sm-home-workbench-right {
  background: rgba(3, 7, 18, 0.28);
}

.sm-home-workbench-side {
  border-right: 1px solid rgba(17, 17, 17, 0.08);
}

html[data-theme='dark'] .sm-home-workbench-side {
  border-right-color: rgba(148, 163, 184, 0.18);
}

.sm-home-workbench-right {
  border-left: 1px solid rgba(17, 17, 17, 0.08);
}

html[data-theme='dark'] .sm-home-workbench-right {
  border-left-color: rgba(148, 163, 184, 0.18);
}

/* Section label */
.sm-home-section-label {
  color: var(--smh-graphite-mid);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

/* Agent items */
.sm-home-agent {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--smh-radius-lg);
  margin-bottom: 6px;
  color: var(--smh-graphite-mid);
  border: 1px solid transparent;
  font-size: var(--smh-text-body-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sm-home-agent.is-active {
  background: rgba(16, 5, 77, 0.06);
  border-color: rgba(16, 5, 77, 0.15);
  color: var(--smh-ink-black);
}

html[data-theme='dark'] .sm-home-agent.is-active {
  background: rgba(79, 140, 255, 0.13);
  border-color: rgba(79, 140, 255, 0.28);
  color: #fff;
}

.sm-home-agent-avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  background: rgba(17, 17, 17, 0.06);
}

html[data-theme='dark'] .sm-home-agent-avatar {
  background: rgba(148, 163, 184, 0.12);
}

.sm-home-agent small {
  display: block;
  color: var(--smh-graphite-mid);
  font-size: 11px;
  margin-top: 1px;
}

/* Main content area */
.sm-home-workbench-main {
  padding: 18px;
  background: linear-gradient(
    180deg,
    rgba(17, 17, 17, 0.02),
    rgba(17, 17, 17, 0.01)
  );
}

html[data-theme='dark'] .sm-home-workbench-main {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.40),
    rgba(2, 6, 23, 0.30)
  );
}

/* Task head */
.sm-home-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sm-home-task-head h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--smh-ink-black);
  margin: 0;
}

.sm-home-task-head p {
  color: var(--smh-graphite-mid);
  font-size: 12px;
  margin-top: 4px;
}

.sm-home-badge {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: var(--smh-radius-pill);
  background: rgba(40, 200, 64, 0.1);
  color: #1a8a3a;
  border: 1px solid rgba(40, 200, 64, 0.2);
  white-space: nowrap;
}

html[data-theme='dark'] .sm-home-badge {
  background: rgba(85, 242, 166, 0.12);
  color: #8af7c4;
  border-color: rgba(85, 242, 166, 0.22);
}

/* Prompt card */
.sm-home-prompt {
  border: 1px solid rgba(16, 5, 77, 0.12);
  background: rgba(16, 5, 77, 0.04);
  border-radius: var(--smh-radius-xl);
  padding: 14px;
  color: var(--smh-ink-black);
  line-height: 1.6;
  font-size: 13px;
  margin-bottom: 14px;
}

html[data-theme='dark'] .sm-home-prompt {
  border-color: rgba(79, 140, 255, 0.22);
  background: rgba(79, 140, 255, 0.08);
  color: #d6e3ff;
}

/* Flow steps */
.sm-home-flow {
  display: grid;
  gap: 8px;
}

.sm-home-step {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(17, 17, 17, 0.02);
  border-radius: var(--smh-radius-lg);
  padding: 10px 12px;
}

html[data-theme='dark'] .sm-home-step {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.sm-home-step-num {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.06);
  color: var(--smh-ink-black);
  font-size: 12px;
}

html[data-theme='dark'] .sm-home-step-num {
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
}

.sm-home-step strong {
  display: block;
  font-size: 13px;
  color: var(--smh-ink-black);
  margin-bottom: 2px;
}

.sm-home-step p {
  color: var(--smh-graphite-mid);
  font-size: 12px;
  margin: 0;
}

.sm-home-chip {
  font-size: 11px;
  color: var(--smh-graphite-mid);
  border: 1px solid rgba(17, 17, 17, 0.08);
  padding: 5px 8px;
  border-radius: var(--smh-radius-pill);
  white-space: nowrap;
}

html[data-theme='dark'] .sm-home-chip {
  color: #91a4c8;
  border-color: rgba(148, 163, 184, 0.18);
}

.sm-home-chip.is-running {
  color: #1a8a3a;
  border-color: rgba(40, 200, 64, 0.2);
  background: rgba(40, 200, 64, 0.06);
}

html[data-theme='dark'] .sm-home-chip.is-running {
  color: #86efac;
  border-color: rgba(85, 242, 166, 0.25);
  background: rgba(85, 242, 166, 0.08);
}

/* Console */
.sm-home-console {
  margin-top: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--smh-radius-xl);
  background: var(--smh-cream-paper);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html[data-theme='dark'] .sm-home-console {
  border-color: rgba(148, 163, 184, 0.16);
  background: #050816;
}

.sm-home-console-top {
  padding: 10px 12px;
  color: var(--smh-graphite-mid);
  font-size: 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  display: flex;
  justify-content: space-between;
}

html[data-theme='dark'] .sm-home-console-top {
  color: #7f8daa;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.sm-home-console-log {
  padding: 12px;
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--smh-graphite-mid);
}

html[data-theme='dark'] .sm-home-console-log {
  color: #97a7c4;
}

.sm-home-console-log span::before {
  content: '>';
  color: var(--smh-deep-violet);
  margin-right: 8px;
}

html[data-theme='dark'] .sm-home-console-log span::before {
  color: #4f8cff;
}

.sm-home-console-log .is-ok   { color: #1a8a3a; }
.sm-home-console-log .is-warn { color: #b86e00; }

html[data-theme='dark'] .sm-home-console-log .is-ok   { color: #81f4b2; }
html[data-theme='dark'] .sm-home-console-log .is-warn { color: #ffd38a; }

/* Usage card */
.sm-home-usage-card {
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--smh-radius-xl);
  background: rgba(17, 17, 17, 0.02);
  padding: 12px;
  margin-bottom: 12px;
}

html[data-theme='dark'] .sm-home-usage-card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.sm-home-usage-card b {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--smh-ink-black);
}

.sm-home-usage-card small {
  color: var(--smh-graphite-mid);
  font-size: 11px;
}

.sm-home-bar {
  height: 7px;
  border-radius: var(--smh-radius-pill);
  background: rgba(17, 17, 17, 0.08);
  overflow: hidden;
  margin: 8px 0;
}

html[data-theme='dark'] .sm-home-bar {
  background: rgba(148, 163, 184, 0.16);
}

.sm-home-bar-fill {
  height: 100%;
  border-radius: var(--smh-radius-pill);
  background: linear-gradient(
    90deg,
    var(--smh-deep-violet),
    var(--smh-ember-blue)
  );
}

/* Skill tags (right sidebar) */
.sm-home-skill {
  padding: 9px 10px;
  border-radius: var(--smh-radius-lg);
  background: rgba(17, 17, 17, 0.02);
  border: 1px solid rgba(17, 17, 17, 0.08);
  margin-bottom: 8px;
  color: var(--smh-ink-black);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

html[data-theme='dark'] .sm-home-skill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.14);
  color: #cad6ee;
}

/* ============================================================
   TESTIMONIALS — customer grid + timeline
   ============================================================ */

.sm-home-testimonials {
  background: var(--smh-paper-white);
  color: var(--smh-ink-black);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-top: 1px solid var(--smh-grid-line);
  border-bottom: 1px solid var(--smh-grid-line);
  position: relative;
}

html[data-theme='dark'] .sm-home-testimonials {
  background: #0f0f0f;
  color: #f6f8ff;
}

.sm-home-testimonials-inner {
  box-sizing: border-box;
  max-width: var(--smh-page-max);
  margin: 0 auto;
  padding: 0 clamp(14px, 1.8vw, 22px);
  position: relative;
  z-index: 1;
}

.sm-home-testimonials::before,
.sm-home-testimonials::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--smh-grid-line);
  pointer-events: none;
  z-index: 0;
}

.sm-home-testimonials::before {
  left: var(--smh-grid-edge-x);
}

.sm-home-testimonials::after {
  right: var(--smh-grid-edge-x);
}

.sm-home-testimonials-head {
  box-sizing: border-box;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}

.sm-home-testimonials-head .sm-home-section-heading {
  color: var(--smh-ink-black);
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: var(--smh-weight-bold);
  letter-spacing: 0;
  line-height: 0.98;
  max-width: 640px;
  margin: 0 auto 14px;
}

html[data-theme='dark'] .sm-home-testimonials-head .sm-home-section-heading {
  color: #f6f8ff;
}

.sm-home-section-subheading {
  color: var(--smh-graphite-mid);
  font-size: var(--smh-text-body);
  line-height: 1.55;
  max-width: 560px;
  margin: 0 auto;
}

html[data-theme='dark'] .sm-home-section-subheading {
  color: rgba(246, 248, 255, 0.68);
}

.sm-home-testimonials-btn {
  align-items: center;
  background: var(--smh-paper-white);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: var(--smh-radius-lg);
  color: var(--smh-ink-black);
  display: inline-flex;
  font-size: 13px;
  font-weight: var(--smh-weight-bold);
  justify-content: center;
  line-height: 1;
  margin-top: 30px;
  min-height: 42px;
  padding: 0 18px;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sm-home-testimonials-btn:hover {
  border-color: rgba(17, 17, 17, 0.32);
  transform: translateY(-1px);
}

html[data-theme='dark'] .sm-home-testimonials-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f6f8ff;
}

.sm-home-feature-grid {
  border-top: 1px solid var(--smh-grid-line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[data-theme='dark'] .sm-home-feature-grid {
  border-color: var(--smh-grid-line);
}

.sm-home-feature-grid-card {
  border-bottom: 1px solid var(--smh-grid-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  padding: clamp(24px, 3vw, 42px);
}

.sm-home-feature-grid-card:not(:nth-child(4n)) {
  border-right: 1px solid var(--smh-grid-line);
}

html[data-theme='dark'] .sm-home-feature-grid-card {
  border-color: var(--smh-grid-line);
}

.sm-home-feature-grid-icon {
  align-items: center;
  background: rgba(17, 17, 17, 0.035);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--smh-radius-lg);
  display: inline-flex;
  font-size: 22px;
  height: 46px;
  justify-content: center;
  margin-bottom: 38px;
  width: 46px;
}

html[data-theme='dark'] .sm-home-feature-grid-icon {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.sm-home-feature-grid-card h3 {
  color: var(--smh-ink-black);
  font-size: 18px;
  letter-spacing: 0;
  margin: 0 0 34px;
}

.sm-home-feature-grid-card p {
  color: #51504d;
  font-size: var(--smh-text-body);
  line-height: 1.55;
  margin: 0;
  max-width: 540px;
}

html[data-theme='dark'] .sm-home-feature-grid-card h3 {
  color: #ffffff;
}

html[data-theme='dark'] .sm-home-feature-grid-card p {
  color: rgba(246, 248, 255, 0.7);
}

.sm-home-workflow-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  min-height: 520px;
  padding: clamp(50px, 6vw, 86px) clamp(24px, 4vw, 46px);
  gap: 80px;
}

.sm-home-workflow-copy h2 {
  color: var(--smh-ink-black);
  font-size: clamp(32px, 3vw, 44px);
  font-style: italic;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 14px;
}

.sm-home-workflow-copy p {
  color: var(--smh-graphite-mid);
  font-size: 18px;
  line-height: 1.45;
  margin: 0;
}

html[data-theme='dark'] .sm-home-workflow-copy h2 {
  color: #f6f8ff;
}

html[data-theme='dark'] .sm-home-workflow-copy p {
  color: rgba(246, 248, 255, 0.68);
}

.sm-home-workflow-steps {
  display: grid;
  gap: 58px;
  position: relative;
}

.sm-home-workflow-steps::before {
  background: var(--smh-grid-line);
  bottom: 0;
  content: "";
  left: 19px;
  position: absolute;
  top: 19px;
  width: 1px;
}

.sm-home-workflow-step {
  display: grid;
  gap: 26px;
  grid-template-columns: 40px minmax(0, 1fr);
  position: relative;
}

.sm-home-workflow-step-icon {
  align-items: center;
  background: var(--smh-paper-white);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 50%;
  color: var(--smh-graphite-mid);
  display: flex;
  font-size: 11px;
  font-weight: var(--smh-weight-bold);
  height: 40px;
  justify-content: center;
  width: 40px;
  z-index: 1;
}

html[data-theme='dark'] .sm-home-workflow-step-icon {
  background: #0f0f0f;
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(246, 248, 255, 0.68);
}

.sm-home-workflow-step h3 {
  color: var(--smh-ink-black);
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 8px;
}

.sm-home-workflow-step p {
  color: var(--smh-graphite-mid);
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.sm-home-workflow-step:nth-child(4),
.sm-home-workflow-step:nth-child(5) {
  opacity: 0.38;
}

html[data-theme='dark'] .sm-home-workflow-step h3 {
  color: #f6f8ff;
}

html[data-theme='dark'] .sm-home-workflow-step p {
  color: rgba(246, 248, 255, 0.62);
}

/* ============================================================
   SECTION HEAD (shared by workflow, etc.)
   ============================================================ */

.sm-home-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.sm-home-section-head h2 {
  font-size: clamp(28px, 3.5vw, 36px);
  letter-spacing: -0.03em;
  color: var(--smh-ink-black);
  margin: 0;
  font-weight: var(--smh-weight-bold);
}

.sm-home-section-head p {
  color: var(--smh-graphite-mid);
  max-width: 520px;
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.sm-home-cta {
  padding: 80px clamp(14px, 1.8vw, 22px);
  max-width: var(--smh-page-max);
  margin: 0 auto;
}

.sm-home-cta-box {
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: var(--smh-radius-2xl);
  padding: 36px;
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(232, 64, 13, 0.08),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      rgba(16, 5, 77, 0.04),
      rgba(232, 64, 13, 0.02)
    );
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

html[data-theme='dark'] .sm-home-cta-box {
  border-color: rgba(79, 140, 255, 0.28);
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(51, 214, 255, 0.16),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      rgba(79, 140, 255, 0.16),
      rgba(167, 139, 250, 0.08)
    );
}

.sm-home-cta-box h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--smh-ink-black);
  font-weight: var(--smh-weight-bold);
}

.sm-home-cta-box p {
  color: var(--smh-graphite-mid);
  margin: 0;
  font-size: var(--smh-text-body);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.sm-home-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.sm-home-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TOAST
   ============================================================ */

.sm-home-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--smh-ink-black);
  color: var(--smh-paper-white);
  padding: 12px 18px;
  border-radius: var(--smh-radius-pill);
  z-index: 100;
  font-size: var(--smh-text-body-sm);
  font-family: var(--smh-font);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

html[data-theme='dark'] .sm-home-toast {
  background: var(--smh-paper-white);
  color: var(--smh-ink-black);
  border: 1px solid var(--smh-stone-border);
}

.sm-home-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   RESPONSIVE — 980px
   ============================================================ */

@media (max-width: 980px) {
  .sm-home-page {
    --smh-grid-columns: 14;
  }

  .sm-home-hero-inner {
    padding: 132px 0 36px;
  }

  .sm-home-stage {
    max-width: 100%;
    margin-bottom: 28px;
  }

  .sm-home-hero-rocket { display: none; }

  .sm-home-workbench {
    grid-template-columns: 1fr;
  }

  .sm-home-workbench-side,
  .sm-home-workbench-right { display: none; }

  .sm-home-testimonials-head { min-height: 250px; }
  .sm-home-feature-grid     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm-home-workflow-timeline           { grid-template-columns: 1fr; gap: 44px; }
  .sm-home-feature-grid-card { border-right: 1px solid var(--smh-grid-line); }
  .sm-home-feature-grid-card:nth-child(4n) { border-right: 1px solid var(--smh-grid-line); }
  .sm-home-feature-grid-card:nth-child(2n) { border-right: 0; }

  .sm-home-title { font-size: clamp(36px, 6vw, 44px); }
}

/* ============================================================
   RESPONSIVE — 620px
   ============================================================ */

@media (max-width: 620px) {
  .sm-home-page {
    --smh-grid-columns: 10;
    --smh-grid-edge-x: 18px;
    --smh-grid-top-fade-start: 64px;
    --smh-grid-top-fade-end: 120px;
  }

  .sm-home-hero-inner {
    padding: 98px 0 24px;
  }

  .sm-home-hero-inner::before {
    top: 72px;
    width: calc(100vw - 36px);
    height: 300px;
  }

  .sm-home-stage {
    margin-bottom: 20px;
  }

  .sm-home-testimonials    { padding: 54px 0 0; }
  .sm-home-testimonials-head { min-height: 240px; padding: 0 18px; }
  .sm-home-feature-grid   { grid-template-columns: 1fr; }
  .sm-home-feature-grid-card,
  .sm-home-feature-grid-card:nth-child(2n),
  .sm-home-feature-grid-card:nth-child(4n) { border-right: 0; }
  .sm-home-feature-grid-card   { min-height: 210px; }
  .sm-home-workflow-timeline         { padding: 42px 18px; }
  .sm-home-workflow-steps { gap: 38px; }
  .sm-home-metrics        { grid-template-columns: 1fr; gap: 10px; }
  .sm-home-section-head   { flex-direction: column; align-items: flex-start; }
  .sm-home-cta-box        { flex-direction: column; text-align: center; }
  .sm-home-hero-actions   { flex-direction: column; align-items: center; }

  .sm-home-trust {
    flex-direction: column;
    gap: 6px;
  }

  .sm-home-metric { padding: 12px; }

  .sm-home-title { font-size: clamp(30px, 8vw, 40px); }
}
