:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #8e8e8e;
  --subtext: #d0d0d0;
  --nav-text: #2e2e2e;
  --pill-dark: #28282a;
  --sign-in-text: #c8c8c8;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  --trust-bg: #28282a;
  --trust-border: rgba(255, 255, 255, 0.4);
  --trust-text: #c4c2c3;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "VT323", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  background: var(--bg);
}
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Background (constrained to hero viewport) ---------- */
.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  z-index: 0;
}
.aurora-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

/* ---------- Page container ---------- */
.page {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 2.4vh, 28px) clamp(14px, 3vw, 32px);
  overflow: hidden;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 28px);
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
  animation: slideDown 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.logo {
  display: grid;
  place-items: center;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 25% 20%, #FFB3D9, transparent 65%),
    radial-gradient(circle at 75% 25%, #87CEEB, transparent 65%),
    radial-gradient(circle at 30% 80%, #4A90E2, transparent 65%),
    radial-gradient(circle at 80% 80%, #2C3E50, transparent 70%),
    #1A1A2E;
  background-size: 220% 220%, 220% 220%, 220% 220%, 220% 220%, 100% 100%;
  animation: meshDrift 10s ease-in-out infinite alternate;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--nav-shadow);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.logo:hover {
  transform: scale(1.04);
}
.logo-mark {
  width: 58%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.nav {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  height: clamp(44px, 5.2vw, 48px);
  max-width: 430px;
  flex: 1;
  box-shadow: var(--nav-shadow);
  justify-content: space-around;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  font: 500 clamp(13px, 1.4vw, 15px) / 1 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.nav a:hover {
  opacity: 0.75;
}
.nav a.active {
  opacity: 1;
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #111;
  box-shadow: -5px 0 0 #111, 5px 0 0 #111;
  transform: translateX(-50%);
}
.signin {
  height: clamp(44px, 5.2vw, 48px);
  padding: 0 clamp(18px, 2vw, 24px);
  background: var(--pill-dark);
  color: var(--sign-in-text);
  border-radius: 999px;
  text-decoration: none;
  font: 500 clamp(13px, 1.4vw, 14.5px) / 1 var(--font-sans);
  display: inline-flex;
  align-items: center;
  box-shadow: var(--nav-shadow);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.signin:hover {
  background: #323234;
  color: #fff;
  transform: translateY(-1px);
}
.burger {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  gap: clamp(14px, 2vh, 22px);
}

/* Trust row */
.trust {
  --trust-size: clamp(36px, 4.5vw, 42px);
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(4px, 1vh, 10px);
}
.avatar {
  width: var(--trust-size);
  height: var(--trust-size);
  border-radius: 50%;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  padding: 5px;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.avatar::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
  z-index: 0;
}
.avatar i {
  position: relative;
  z-index: 1;
  color: #111;
  font-size: calc(var(--trust-size) * 0.34);
}
.avatar.a2,
.avatar.a3 {
  margin-left: calc(var(--trust-size) * -0.42);
}
.avatar.a1 {
  z-index: 1;
}
.avatar.a2 {
  z-index: 2;
}
.avatar.a3 {
  z-index: 4;
}
.trust:hover .a1 {
  transform: translateY(-2px);
}
.trust:hover .a2 {
  transform: translateY(-4px);
}
.trust:hover .a3 {
  transform: translateY(-2px);
}
.trust-pill {
  height: var(--trust-size);
  display: inline-flex;
  align-items: center;
  background: var(--trust-bg);
  border: 1px solid var(--trust-border);
  border-radius: 999px;
  color: var(--trust-text);
  font: 500 clamp(12px, 1.4vw, 13.5px) / 1 var(--font-sans);
  padding: 0 calc(var(--trust-size) * 0.6) 0 calc(var(--trust-size) * 0.58);
  margin-left: calc(var(--trust-size) * -0.42);
  z-index: 3;
  white-space: nowrap;
}

/* Headline */
.headline {
  font-family: var(--font-display);
  font-weight: 400;
  color: #fff;
  font-size: clamp(36px, 7.6vw, 96px);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.headline .line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0.12s);
}
@keyframes headlineFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subhead */
.subhead {
  max-width: min(500px, 92%);
  color: #d0d0d0;
  opacity: 0.8;
  font-size: clamp(calc(13.5px + 2pt), calc(1.55vw + 2pt), calc(16.5px + 2pt));
  line-height: 1.55;
  font-weight: 400;
  margin: 0 auto;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #000;
  font: 600 clamp(13.5px, 1.5vw, 14.5px) / 1 var(--font-sans);
  padding: clamp(11px, 1.6vh, 13px) clamp(22px, 3vw, 28px);
  border-radius: 999px;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 22px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin-top: clamp(6px, 1.5vh, 12px);
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 30px rgba(255, 255, 255, 0.42),
    0 0 60px rgba(255, 255, 255, 0.18);
}
.cta i {
  font-size: 15px;
}

/* ---------- Stats footer ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 24px);
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
  padding-top: clamp(12px, 2vh, 20px);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.s-icon {
  font-family: var(--font-display);
  color: #fff;
  font-size: clamp(22px, 3vw, 33px);
  line-height: 1;
}
.s-value {
  font-family: var(--font-sans);
  color: #fff;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.s-label {
  color: var(--muted);
  font-size: clamp(11px, 1.2vw, 12.5px);
  font-weight: 400;
}

/* ---------- Shared reveal ---------- */
.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ---------- Breakpoints ---------- */
@media (max-width: 720px) {
  .nav,
  .signin {
    display: none;
  }
  .burger {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pill-dark);
    border: none;
    cursor: pointer;
    box-shadow: var(--nav-shadow);
    padding: 0;
    gap: 4px;
    grid-auto-flow: row;
    transition: background 0.2s;
  }
  .burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: #fff;
    transition: transform 0.3s, background 0.3s, opacity 0.3s;
  }
  .header {
    justify-content: space-between;
    max-width: 100%;
  }
  .logo {
    width: 48px;
    height: 48px;
  }
  .logo-mark {
    font-size: 22px;
  }
  .burger[aria-expanded="true"] {
    background: #fff;
  }
  .burger[aria-expanded="true"] span {
    background: #111;
  }
  .burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
    z-index: 40;
    animation: overlayIn 0.28s ease;
  }
  @keyframes overlayIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  .mobile-menu {
    position: fixed;
    left: 50%;
    top: 88px;
    transform: translateX(-50%);
    z-index: 50;
    width: min(340px, calc(100% - 32px));
    background: #fff;
    border-radius: 28px;
    padding: 22px 18px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: menuIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes menuIn {
    from {
      opacity: 0;
      transform: translate(-50%, -12px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }
  .mobile-menu a {
    position: relative;
    padding: 14px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--nav-text);
    font: 500 15px / 1 var(--font-sans);
    opacity: 0.6;
    animation: linkIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .mobile-menu a:nth-child(1) {
    animation-delay: 0.05s;
  }
  .mobile-menu a:nth-child(2) {
    animation-delay: 0.1s;
  }
  .mobile-menu a:nth-child(3) {
    animation-delay: 0.15s;
  }
  .mobile-menu a:nth-child(4) {
    animation-delay: 0.2s;
  }
  .mobile-menu a:nth-child(5) {
    animation-delay: 0.25s;
  }
  @keyframes linkIn {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 0.6;
      transform: translateY(0);
    }
  }
  .mobile-menu a.active {
    opacity: 1;
  }
  .mobile-menu a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #111;
    box-shadow: -5px 0 0 #111, 5px 0 0 #111;
    transform: translateX(-50%);
  }
  .signin-mobile {
    margin-top: 6px;
    background: var(--pill-dark);
    color: #fff !important;
    border-radius: 999px;
    padding: 14px 16px;
    opacity: 1 !important;
  }
  body.menu-open {
    overflow: hidden;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 1.6vh, 16px) 16px;
  }
  .headline {
    letter-spacing: -0.08em;
  }
}

@media (max-height: 700px) {
  .hero {
    gap: 10px;
  }
  .headline {
    line-height: 1.05;
  }
}

@media (max-width: 420px) {
  .headline {
    letter-spacing: -0.09em;
    line-height: 1.04;
  }
  .trust {
    --trust-size: 34px;
  }
  .trust-pill {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .headline .line,
  .anim {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .bg-aurora {
    animation: none;
  }
}

/* ---------- Section: Talk (ghost scene) ---------- */
.section-ghost {
  position: relative;
  z-index: 1;
  background: #000;
  min-height: 100vh;
  padding: clamp(60px, 8vh, 100px) clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text);
  overflow: hidden;
}
.section-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(180px 220px at 12% 18%, rgba(82, 39, 255, 0.32), transparent 70%),
    radial-gradient(160px 200px at 88% 26%, rgba(180, 151, 207, 0.24), transparent 70%),
    radial-gradient(200px 240px at 78% 78%, rgba(124, 90, 220, 0.26), transparent 70%),
    radial-gradient(140px 180px at 18% 82%, rgba(60, 40, 200, 0.24), transparent 70%),
    radial-gradient(120px 160px at 55% 45%, rgba(140, 100, 240, 0.15), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  animation: splotchDrift 20s ease-in-out infinite alternate;
}
@keyframes splotchDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, -2%) scale(1.05); }
}
.section-inner {
  position: relative;
  max-width: 1080px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3.5vh, 40px);
}
.section-eyebrow {
  font: 500 12px / 1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: #fff;
  font-size: clamp(44px, 8vw, 88px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-align: center;
  margin: 0;
  max-width: 900px;
}
.section-title span {
  display: block;
}

/* Scene: character + speech bubble */
.scene {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
  max-width: 900px;
  width: 100%;
}
.ghost-wrap {
  position: relative;
  display: block;
  animation: float 2.8s ease-in-out infinite;
  transform-origin: top center;
  will-change: transform;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-8px) scaleY(1.06); }
}
.main-ghost { width: clamp(160px, 20vw, 220px); }
.ghost {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 36px rgba(82, 39, 255, 0.35));
}

/* Mesh gradient body — variants */
.ghost-mesh {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 25% 20%, #FFB3D9, transparent 55%),
    radial-gradient(circle at 75% 25%, #87CEEB, transparent 55%),
    radial-gradient(circle at 30% 75%, #4A90E2, transparent 55%),
    radial-gradient(circle at 80% 80%, #2C3E50, transparent 55%),
    #1A1A2E;
  background-size: 220% 220%, 220% 220%, 220% 220%, 220% 220%, 100% 100%;
  animation: meshDrift 10s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%, 0 0; }
  100% { background-position: 20% 30%, 80% 25%, 15% 70%, 90% 90%, 0 0; }
}
.mesh-a {
  background:
    radial-gradient(circle at 30% 30%, #C8B6FF, transparent 55%),
    radial-gradient(circle at 70% 30%, #B8E1FF, transparent 55%),
    radial-gradient(circle at 30% 75%, #6C5CE7, transparent 55%),
    radial-gradient(circle at 80% 80%, #241E3F, transparent 55%),
    #0E0B24;
  background-size: 220% 220%, 220% 220%, 220% 220%, 220% 220%, 100% 100%;
}
.mesh-b {
  background:
    radial-gradient(circle at 30% 20%, #FFD6A5, transparent 55%),
    radial-gradient(circle at 70% 30%, #FFADAD, transparent 55%),
    radial-gradient(circle at 30% 75%, #BDB2FF, transparent 55%),
    radial-gradient(circle at 80% 80%, #3D2A5C, transparent 55%),
    #150D2A;
  background-size: 220% 220%, 220% 220%, 220% 220%, 220% 220%, 100% 100%;
}
.mesh-c {
  background:
    radial-gradient(circle at 30% 20%, #CAFFBF, transparent 55%),
    radial-gradient(circle at 70% 30%, #9BF6FF, transparent 55%),
    radial-gradient(circle at 30% 75%, #4A90E2, transparent 55%),
    radial-gradient(circle at 80% 80%, #1B2951, transparent 55%),
    #0B1226;
  background-size: 220% 220%, 220% 220%, 220% 220%, 220% 220%, 100% 100%;
}

/* Eyes — track mouse (JS) + blink */
.eye {
  transition:
    cx 0.25s cubic-bezier(0.2, 1, 0.3, 1),
    cy 0.25s cubic-bezier(0.2, 1, 0.3, 1);
  transform-origin: center;
  transform-box: fill-box;
  animation: blink 4s infinite;
}
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.08); }
}

/* Speech bubble (rectangular) */
.bubble {
  position: relative;
  background: #fff;
  color: #111;
  border-radius: 20px;
  padding: clamp(20px, 2.4vw, 28px) clamp(22px, 2.8vw, 32px);
  max-width: 480px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.bubble::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 42px;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 16px solid #fff;
}
.bubble-quote {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  color: #111;
  letter-spacing: -0.02em;
}
.bubble-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #3f3f46;
  font-size: 13.5px;
  line-height: 1.55;
}
.bubble-list li {
  position: relative;
  padding-left: 18px;
}
.bubble-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #a1a1aa;
}
.bubble .tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 5px;
  background: #f4f4f5;
  color: #111;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e4e4e7;
}
.bubble code {
  font-family: var(--font-mono, ui-monospace, monospace);
  background: #f4f4f5;
  color: #111;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}

/* Peer characters row */
.ghost-crowd {
  display: flex;
  gap: clamp(24px, 5vw, 60px);
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: clamp(10px, 2vh, 24px);
}
.ghost-wrap.small { width: clamp(72px, 8vw, 100px); }
.delay-1 { animation-delay: -0.4s; }
.delay-1 .eye { animation-delay: -1.2s; }
.delay-2 { animation-delay: -1.1s; }
.delay-2 .eye { animation-delay: -2.4s; }
.delay-3 { animation-delay: -1.8s; }
.delay-3 .eye { animation-delay: -0.6s; }
.mini-bubble {
  position: absolute;
  top: -14px;
  right: -18px;
  background: #fff;
  color: #111;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 14px / 1 var(--font-sans);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.section-caption {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 720px) {
  .scene {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }
  .bubble::before {
    left: 50%;
    top: -14px;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 0;
    border-bottom: 16px solid #fff;
  }
  .ghost-crowd { gap: 30px; }
  .section-title { font-size: clamp(24px, 6vw, 36px); }
}

@media (prefers-reduced-motion: reduce) {
  .ghost-wrap,
  .ghost-mesh,
  .eye {
    animation: none !important;
  }
}

/* ---------- Chat sequence (dark mode) ---------- */
.chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
  width: 100%;
  margin-top: clamp(20px, 3.5vh, 36px);
}
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.chat-msg.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.chat-msg.from-right {
  flex-direction: row-reverse;
}
.chat-avatar {
  display: block;
  width: clamp(40px, 4.4vw, 48px);
  height: auto;
  flex-shrink: 0;
  animation: float 2.8s ease-in-out infinite;
  transform-origin: top center;
}
.chat-avatar .ghost {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(82, 39, 255, 0.45));
}
.chat-msg[data-order="1"] .chat-avatar { animation-delay: 0s; }
.chat-msg[data-order="2"] .chat-avatar { animation-delay: -0.9s; }
.chat-msg[data-order="3"] .chat-avatar { animation-delay: -1.5s; }
.chat-msg[data-order="1"] .eye { animation-delay: -0.4s; }
.chat-msg[data-order="2"] .eye { animation-delay: -1.6s; }
.chat-msg[data-order="3"] .eye { animation-delay: -2.7s; }

.chat-bubble {
  margin: 0;
  background: rgba(255, 255, 255, 0.07);
  color: #f4f4f5;
  padding: 10px 16px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.35;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
}
.chat-msg.from-left .chat-bubble {
  border-bottom-left-radius: 6px;
}
.chat-msg.from-right .chat-bubble {
  border-bottom-right-radius: 6px;
  background: linear-gradient(180deg, #7c67ff 0%, #5227ff 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(82, 39, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .chat-msg { opacity: 1; transform: none; transition: none; }
  .chat-avatar { animation: none; }
}

/* ---------- Steps section ---------- */
.steps-section {
  position: relative;
  background: #050510;
  color: #fff;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 60px) 0;
  overflow: hidden;
  isolation: isolate;
}
.steps-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}
.steps-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 clamp(40px, 6vh, 72px);
  text-align: center;
}
.steps-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.4fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.steps-list {
  position: sticky;
  top: 20vh;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3.5vh, 36px);
}
.step-item {
  opacity: 0.28;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-6px);
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  padding-left: 22px;
}
.step-item.active {
  opacity: 1;
  transform: translateX(0);
  border-left-color: #B497CF;
}
.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: #B497CF;
  margin-bottom: 6px;
}
.step-heading {
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
  color: #fff;
}
.step-desc {
  font-size: clamp(14px, 1.4vw, 15.5px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 380px;
}
.step-desc .mono {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.steps-shots {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 12vh, 120px);
  padding-bottom: clamp(80px, 12vh, 140px);
}
.shot {
  margin: 0;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.shot.visible {
  opacity: 1;
  transform: translateY(0);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Aurora glow at the bottom of the section */
.steps-aurora {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20vh;
  height: 70vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.steps-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: stepsAuroraDrift 18s ease-in-out infinite alternate;
}
.steps-aurora-blob.a {
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(124, 255, 103, 0.55) 0%, transparent 65%);
  left: -10vw;
  bottom: -20vw;
  animation-delay: 0s;
}
.steps-aurora-blob.b {
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(180, 151, 207, 0.6) 0%, transparent 65%);
  right: -8vw;
  bottom: -15vw;
  animation-delay: -6s;
}
.steps-aurora-blob.c {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(82, 39, 255, 0.55) 0%, transparent 65%);
  left: 25vw;
  bottom: -25vw;
  animation-delay: -12s;
}
@keyframes stepsAuroraDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.08); }
}

@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-list {
    position: static;
    top: auto;
    order: -1;
  }
  .steps-shots { gap: clamp(30px, 6vh, 60px); }
}

@media (prefers-reduced-motion: reduce) {
  .step-item, .shot { transition: none; }
  .steps-aurora-blob { animation: none; }
  .shot { opacity: 1; transform: none; }
}

/* ---------- Pinned steps section ---------- */
.pinned-steps {
  position: relative;
  background: #000;
  height: 400vh;
}
.pinned-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #000;
}
.pinned-aurora-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.pinned-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.pinned-step {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1180px;
  padding: 0 clamp(20px, 5vw, 60px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.pinned-step.is-active {
  opacity: 1;
  pointer-events: auto;
}
.pinned-text h3 {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 16px;
}
.pinned-text p {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  max-width: 440px;
}
.pinned-text .mono {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pinned-shot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.pinned-shot-wrap img {
  display: block;
  width: 100%;
  max-width: 460px;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
  .pinned-steps { height: auto; }
  .pinned-viewport {
    position: static;
    height: auto;
    padding: 40px 0;
  }
  .pinned-aurora-bg { display: none; }
  .pinned-content { height: auto; }
  .pinned-step {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    grid-template-columns: 1fr;
    gap: 24px;
    opacity: 1;
    pointer-events: auto;
    padding: 40px clamp(20px, 5vw, 40px);
  }
  .pinned-shot-wrap img { max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .pinned-step { transition: none; }
}

/* Both sections sit on top of the fixed aurora. Their own bgs are        */
/* transparent so the shared backdrop reads through — no hard cut between */
/* the hero and the pinned section as you scroll.                          */
.pinned-steps { background: transparent; }
.pinned-viewport { background: transparent; }
.pinned-aurora-bg { display: none; }

/* ---------- Pre-footer CTA ---------- */
/* Sits directly on the shared aurora, same as the pinned steps section.  */
.pre-footer-cta {
  position: relative;
  z-index: 1;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vh, 20px);
  padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 60px);
  text-align: center;
}
.cta-xl {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #000;
  font: 600 clamp(16px, 1.7vw, 18px) / 1 var(--font-sans);
  padding: clamp(16px, 2vh, 20px) clamp(32px, 4vw, 44px);
  border-radius: 999px;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 34px rgba(255, 255, 255, 0.32),
    0 0 68px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cta-xl:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 44px rgba(255, 255, 255, 0.44),
    0 0 88px rgba(255, 255, 255, 0.18);
}
.cta-xl i { font-size: 18px; }
.cta-xl-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(13px, 1.3vw, 14.5px);
  line-height: 1.5;
}

/* ---------- Footer wordmark ---------- */
/* Giant "FailSafe" pinned to the very bottom of the page, sitting on the */
/* same fixed aurora — the shader keeps drifting behind the letters.      */
.site-footer {
  position: relative;
  z-index: 1;
  background: transparent;
  padding: 0 clamp(16px, 4vw, 40px) clamp(20px, 3vh, 40px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
}
.site-footer-word {
  font-family: var(--font-display);
  font-weight: 400;
  color: #fff;
  font-size: clamp(80px, 22vw, 340px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.18),
    0 10px 60px rgba(0, 0, 0, 0.45);
}

@media (max-width: 720px) {
  .pre-footer-cta { padding: clamp(60px, 10vh, 100px) 20px; }
  .site-footer-word { font-size: clamp(60px, 26vw, 180px); }
}
