/* ============================================================
   Sayboard Design System — Adapted from Lessie Atomic Tokens
   Brand: Mint Green #5CE5C8 / Dark sophisticated aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* --- Basic Color Primitives --- */
:root {
  --_dark-900: 10, 12, 16;           /* #0A0C10 */
  --_dark-800: 16, 20, 28;           /* #10141C */
  --_dark-700: 24, 28, 38;           /* #181C26 */
  --_dark-600: 36, 40, 52;           /* #242834 */
  --_dark-500: 52, 58, 72;           /* #343A48 */
  --_light-100: 255, 255, 255;       /* #FFFFFF */
  --_light-200: 240, 242, 245;       /* #F0F2F5 */
  --_light-300: 200, 210, 220;       /* #C8D2DC */
  --_mint: 45, 212, 191;              /* #2DD4BF — Sayboard brand */
  --_mint-light: 90, 230, 210;       /* #5AE6D2 */
  --_mint-deep: 30, 170, 150;        /* #1EAA96 */
  --_coral: 231, 103, 90;            /* #E7675A */
  --_amber: 250, 183, 70;            /* #FAB746 */
  --_sky: 100, 180, 255;             /* #64B4FF */
}

/* ============================================================
   DARK THEME (default — Lovart-inspired)
   ============================================================ */
:root,
[data-theme="dark"] {
  /* --- text --- */
  --text-primary:           rgba(var(--_light-100), 1);
  --text-primary-light:     rgba(var(--_light-100), 0.85);
  --text-secondary:         rgba(var(--_light-300), 0.7);
  --text-tertiary:          rgba(var(--_light-300), 0.4);
  --text-brand-primary:     rgba(var(--_mint), 1);
  --text-brand-secondary:   rgba(var(--_mint), 0.7);
  --text-brand-tertiary:    rgba(var(--_mint), 0.4);
  --text-success:           rgba(var(--_mint-deep), 1);
  --text-warn:              rgba(var(--_coral), 1);

  /* --- icon --- */
  --icon-primary:           rgba(var(--_light-100), 1);
  --icon-secondary:         rgba(var(--_light-300), 0.6);
  --icon-tertiary:          rgba(var(--_light-300), 0.35);
  --icon-brand-primary:     rgba(var(--_mint), 1);

  /* --- fill --- */
  --fill-bg-primary:        rgb(var(--_dark-900));
  --fill-bg-secondary:      rgb(var(--_dark-800));
  --fill-bg-elevated:       rgb(var(--_dark-700));
  --fill-bg-card:           rgba(var(--_light-100), 0.04);
  --fill-bg-card-hover:     rgba(var(--_light-100), 0.07);
  --fill-primary:           rgba(var(--_light-100), 1);
  --fill-secondary:         rgba(var(--_light-100), 0.6);
  --fill-tertiary:          rgba(var(--_light-100), 0.15);
  --fill-quaternary:        rgba(var(--_light-100), 0.05);
  --fill-accent-primary:    rgba(var(--_mint), 1);
  --fill-accent-secondary:  rgba(var(--_mint), 0.5);
  --fill-accent-tertiary:   rgba(var(--_mint), 0.12);

  /* --- stroke --- */
  --stroke-primary:         rgba(var(--_light-100), 1);
  --stroke-secondary:       rgba(var(--_light-100), 0.15);
  --stroke-tertiary:        rgba(var(--_light-100), 0.08);
  --stroke-brand:           rgba(var(--_mint), 0.4);

  /* --- overlay --- */
  --overlay-hover:          rgba(var(--_light-100), 0.04);
  --overlay-press:          rgba(var(--_light-100), 0.08);

  /* --- shadow --- */
  --shadow-primary:         rgba(0, 0, 0, 0.5);
  --shadow-glow:            rgba(var(--_mint), 0.15);
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
[data-theme="light"] {
  --text-primary:           rgba(var(--_dark-900), 1);
  --text-primary-light:     rgba(var(--_dark-900), 0.85);
  --text-secondary:         rgba(var(--_dark-500), 0.8);
  --text-tertiary:          rgba(var(--_dark-500), 0.5);
  --text-brand-primary:     rgba(var(--_mint-deep), 1);
  --text-brand-secondary:   rgba(var(--_mint-deep), 0.7);

  --fill-bg-primary:        #F5F5F5;
  --fill-bg-secondary:      #EEEEEE;
  --fill-bg-elevated:       #FFFFFF;
  --fill-bg-card:           #FFFFFF;
  --fill-bg-card-hover:     #FFFFFF;
  --fill-primary:           rgba(var(--_dark-900), 1);
  --fill-accent-primary:    rgba(var(--_mint), 1);
  --fill-accent-tertiary:   rgba(var(--_mint), 0.12);

  --stroke-secondary:       rgba(var(--_dark-900), 0.1);
  --stroke-tertiary:        rgba(var(--_dark-900), 0.06);

  --overlay-hover:          rgba(var(--_dark-900), 0.03);
  --overlay-press:          rgba(var(--_dark-900), 0.06);

  --shadow-primary:         rgba(0, 0, 0, 0.08);
  --shadow-glow:            rgba(var(--_mint), 0.2);
}

/* ============================================================
   Global Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: clip;
  background: #0A0C10;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--fill-bg-primary);
  overflow-x: clip;
}

/* ============================================================
   Typography
   ============================================================ */
.font-display { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.font-mono    { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.title-huge   { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: clamp(40px, min(7vw, 8vh), 80px); line-height: 1.15; letter-spacing: -0.02em; }
.title-large  { font-family: 'JetBrains Mono', monospace; font-weight: 400; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.25; }
.title-normal { font-weight: 600; font-size: 20px; line-height: 1.4; }
.title-small  { font-weight: 500; font-size: 16px; line-height: 1.375; }
.body-primary { font-weight: 400; font-size: 16px; line-height: 1.6; }
.body-secondary { font-weight: 400; font-size: 14px; line-height: 1.5; }
.body-small   { font-weight: 400; font-size: 12px; line-height: 1.4; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .btn { font-size: 14px; padding: 12px 20px; }
}

.section {
  padding: 120px 0;
  background: var(--fill-bg-primary, #F5F5F7);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .section {
  background: var(--fill-bg-primary, #0A0C10);
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .hero > .container { padding-top: 5vh; }
  .hero-content { padding-top: 30vh; padding-bottom: 60vh; }
  .app-preview-wrap, .app-preview-spacer { margin-left: 16px; margin-right: 16px; }
}

/* ============================================================
   Interactive
   ============================================================ */
.interactive {
  position: relative;
  cursor: pointer;
  isolation: isolate;
  transition: all 0.2s ease;
}
.interactive:hover {
  transform: translateY(-1px);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: var(--fill-accent-primary);
  color: rgb(var(--_dark-900));
}
.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--fill-bg-card);
  color: var(--text-primary);
  border: 1px solid var(--stroke-secondary);
  padding: 14px 32px;
  height: 48px;
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: var(--fill-bg-card-hover);
  border-color: var(--stroke-brand);
  transform: translateY(-2px);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
}
.nav.scrolled {
  background: rgba(245, 245, 245, 0.82);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom-color: var(--stroke-tertiary);
}

/* Nav over dark content (mockup full screen) */
.nav.over-dark {
  color: #F5F5F7;
}
.nav.over-dark .nav-logo { color: #F5F5F7; }
.nav.over-dark .nav-links a { color: rgba(255,255,255,0.7); }
.nav.over-dark .nav-links a:hover { color: rgba(45, 212, 191, 1); }
.nav.over-dark.scrolled {
  background: rgba(25, 25, 26, 0.82);
  border-bottom-color: rgba(255,255,255,0.08);
}
.nav.over-dark .nav-cta.btn-primary {
  background: rgba(255,255,255,0.1);
  color: #F5F5F7;
  border-color: rgba(255,255,255,0.15);
}
.nav.over-dark.scrolled .nav-cta.btn-primary {
  background: var(--fill-accent-primary);
  color: rgb(var(--_dark-900));
  border-color: transparent;
}
.nav.over-dark .nav-hamburger span {
  background: #F5F5F7;
}
[data-theme="dark"] .nav.scrolled {
  background: rgba(10, 12, 16, 0.82);
}

/* Nav CTA: secondary style at top, primary on scroll */
.nav-cta.btn-primary {
  background: var(--fill-bg-card);
  color: var(--text-primary);
  border: 1px solid var(--stroke-secondary);
  transition: all 0.35s ease;
}
.nav.scrolled .nav-cta.btn-primary {
  background: var(--fill-accent-primary);
  color: rgb(var(--_dark-900));
  border-color: transparent;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 18px;
}

.nav-logo svg {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-brand-primary);
}

.nav-cta {
  padding: 12px 24px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
}
.nav-cta-short { display: none; }

/* Hamburger — hidden on desktop */
.nav-hamburger { display: none; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { display: none !important; }
  .nav-logo span { display: none; }
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
  }
  .nav-hamburger span {
    width: 16px;
    height: 1.5px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s;
  }
  .hero-actions { flex-direction: column; gap: 8px; }
  .hero-actions .btn { width: 100%; }
  .nav .container { max-width: 100%; width: 100%; }
  .title-huge { font-size: 48px; }
}

/* Drawer overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: var(--fill-bg-elevated);
  z-index: 201;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px var(--shadow-primary);
}
.drawer.open { right: 0; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.drawer-header .nav-logo span { display: inline; }
.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-links a {
  display: block;
  padding: 12px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--stroke-tertiary);
}
.drawer-links a:hover { color: var(--text-brand-primary); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  height: 350vh;
  position: relative;
  overflow: visible;
}

/* Interactive sound wave canvas */
.hero-waves {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  margin-bottom: -100vh;
  pointer-events: none;
  z-index: 0;
}
.hero:hover .hero-waves {
  pointer-events: auto;
}

/* Sticky wrapper: pins to viewport while user scrolls through 250vh hero */
.hero > .container {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  overflow: visible;
  z-index: 1;
}

/* Hero text: centered in viewport, will fade out on scroll */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  padding: 15vh 24px 15vh;
  text-align: center;
  will-change: opacity;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--fill-accent-tertiary);
  border: 1px solid rgba(var(--_mint), 0.2);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-brand-primary);
  margin-bottom: 32px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fill-accent-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  margin-bottom: min(24px, 2vh);
}

.rainbow-shimmer {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--text-primary) 35%,
    #ff6b6b 42%,
    #feca57 48%,
    #48dbfb 54%,
    #2FD4BF 60%,
    var(--text-primary) 65%,
    var(--text-primary) 100%
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 1.5s linear 1 forwards;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

.hero h1 .brand {
  background: linear-gradient(135deg, rgba(var(--_mint), 1), rgba(var(--_mint-light), 1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto min(48px, 4vh);
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-platforms {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ============================================================
   App Preview (Hero Screenshot)
   ============================================================ */
.app-preview-spacer {
  margin-top: 20px;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16 / 10;
  flex-shrink: 1;
  min-height: 0;
  align-self: center;
}
.app-preview {
  width: 100%;
  height: 100%;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--stroke-secondary);
  box-shadow: 0 8px 40px var(--shadow-primary);
  background: var(--fill-bg-elevated);
}

.app-preview img {
  width: 100%;
  display: block;
}

.app-preview-glow {
  position: absolute;
  bottom: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(var(--_mint), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================================
   Features Grid
   ============================================================ */
.features-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.features-header .overline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-brand-primary);
  margin-bottom: 16px;
}

.features-header h2 {
  margin-bottom: 16px;
  white-space: nowrap;
}

.features-header p {
  color: var(--text-secondary);
  font-size: 18px;
}

/* Features: one-per-screen, alternating left/right layout */
.features-stack {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 64px;
  min-height: 60vh;
}

.feature-row-reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
  min-width: 0;
}

.feature-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-brand-primary);
  margin-bottom: 16px;
}

.feature-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.feature-visual {
  flex: 1;
  min-width: 0;
}

/* Feature Mockups */
.feat-mockup {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--stroke-secondary);
  background: var(--fill-bg-elevated);
  overflow: hidden;
  box-shadow: 0 4px 24px var(--shadow-primary);
}

.feat-mockup-bar {
  display: none;
}

.feat-mockup-body {
  padding: 24px;
}

/* Feature 1: Waveform + transcript */
.feat-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  margin-bottom: 16px;
}
.feat-waveform span {
  width: 4px;
  border-radius: 2px;
  background: var(--fill-accent-primary);
  animation: feat-wave 0.8s ease-in-out infinite;
}
.feat-waveform span:nth-child(1) { animation-delay: 0s; }
.feat-waveform span:nth-child(2) { animation-delay: 0.1s; }
.feat-waveform span:nth-child(3) { animation-delay: 0.2s; }
.feat-waveform span:nth-child(4) { animation-delay: 0.3s; }
.feat-waveform span:nth-child(5) { animation-delay: 0.4s; }
.feat-waveform span:nth-child(6) { animation-delay: 0.5s; }
.feat-waveform span:nth-child(7) { animation-delay: 0.6s; }

@keyframes feat-wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.feat-status {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--fill-accent-primary);
  margin-bottom: 12px;
}

.feat-transcript {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
  line-height: 1.6;
}

/* Feature 2: Chat bubbles */
.feat-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 85%;
}

.feat-bubble-user {
  align-self: flex-end;
  background: var(--fill-accent-primary);
  color: rgb(var(--_dark-900));
  border-bottom-right-radius: 4px;
}

.feat-bubble-ai {
  align-self: flex-start;
  background: var(--fill-bg-card);
  color: var(--text-primary);
  border: 1px solid var(--stroke-tertiary);
  border-bottom-left-radius: 4px;
}

/* Feature 3: Word list */
.feat-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.feat-word-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feat-word-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--fill-bg-card);
  border: 1px solid var(--stroke-tertiary);
}

.feat-word {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
}

.feat-word-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--fill-accent-tertiary);
  color: var(--text-brand-primary);
  font-weight: 500;
}

/* Feature 4: History */
.feat-search-bar {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--fill-bg-card);
  border: 1px solid var(--stroke-tertiary);
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.feat-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feat-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s;
}

.feat-history-item:first-child {
  background: var(--fill-bg-card);
}

.feat-history-text {
  font-size: 13px;
  color: var(--text-primary);
}

.feat-history-time {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-left: 16px;
}

/* Feature 5: Stacked apps */
.feat-mockup-stack {
  position: relative;
  background: none;
  border: none;
  box-shadow: none;
  height: 280px;
}

.feat-app-layer {
  position: absolute;
  width: 75%;
  border-radius: 10px;
  border: 1px solid var(--stroke-secondary);
  background: var(--fill-bg-elevated);
  box-shadow: 0 4px 20px var(--shadow-primary);
  overflow: hidden;
  /* Initial: collapsed flat, stacked */
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* When parent is visible (triggered by JS), cards pop up one by one */
.feat-mockup-stack.in-view .feat-app-layer {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.feat-app-1 { top: 0; left: 0; z-index: 1; transition-delay: 0.1s; }
.feat-app-2 { top: 40px; left: 12%; z-index: 2; transition-delay: 0.3s; }
.feat-app-3 { top: 80px; left: 24%; z-index: 3; transition-delay: 0.5s; }

.feat-app-bar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--stroke-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.feat-app-icon {
  flex-shrink: 0;
}

.feat-app-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.feat-app-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feat-code-line {
  height: 8px;
  border-radius: 4px;
  background: var(--fill-bg-card);
  width: 100%;
}
.feat-code-line.short { width: 60%; }

.feat-overlay-badge {
  position: absolute;
  bottom: 20px;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--fill-accent-primary);
  color: rgb(var(--_dark-900));
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.3);
}

@media (max-width: 768px) {
  .features-stack { gap: 80px; }
  .feature-row, .feature-row-reverse { flex-direction: column; gap: 32px; min-height: auto; }
  .feature-visual { width: 100%; }
  .feat-mockup { width: 100%; }
}

/* ============================================================
   How it Works
   ============================================================ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.steps::before {
  display: none;
}

@media (max-width: 768px) {
  .steps { gap: 32px; }
  .step { flex-direction: column; text-align: center; }
  .steps-indicator { display: none; }
}

/* Step indicator row: spans all 3 columns */
.steps-indicator {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--fill-bg-secondary);
}

.step-dot span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--text-tertiary);
  opacity: 0.4;
}

/* Each step card */
.step {
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
}

.step-dot span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--text-tertiary);
  opacity: 0.5;
}

.step-illust {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 80px;
  max-width: 80px;
}

.step-svg {
  color: var(--text-primary);
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================================================
   Step Hover Animations
   ============================================================ */
.step-illust-interactive { position: relative; overflow: hidden; }

/* Step 1: Fn key press */
.fn-key-wrap { position: relative; display: inline-flex; }
.fn-press-ring {
  position: absolute; inset: -8px; border-radius: 16px;
  border: 2px solid var(--fill-accent-primary);
  opacity: 0; transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.step:hover .fn-key-bg {
  fill: var(--fill-accent-primary); transition: fill 0.2s;
}
.step:hover .fn-press-ring {
  opacity: 1; transform: scale(1);
  animation: fn-pulse 1s ease-in-out infinite;
}
@keyframes fn-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(1.2); }
}

/* Step 2: Expandable voice demo bar */
.voice-demo-bar {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.voice-demo-bar.open {
  max-height: 72px; opacity: 1;
}
.voice-demo-inner {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 0;
  padding: 0;
  background: var(--fill-bg-elevated);
  border: 1px solid var(--stroke-tertiary);
  border-radius: 14px;
  margin: 0 auto;
  max-width: 480px;
  height: 56px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}
/* Left: wave area */
.voice-demo-left {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 212, 191, 0.06);
  border-right: 1px solid var(--stroke-tertiary);
  padding: 0 16px;
}
/* Voice bars — logo-style equalizer */
.voice-bars {
  display: flex; align-items: center; gap: 4px; height: 32px;
}
.voice-bars span {
  width: 4px; border-radius: 2px;
  background: #2DD4BF;
  animation: none;
}
.voice-demo-bar.open .voice-bars span {
  animation: vbar 0.8s ease-in-out infinite;
}
.voice-bars span:nth-child(1) { height: 10px; animation-delay: 0s; opacity: 0.5; }
.voice-bars span:nth-child(2) { height: 20px; animation-delay: 0.1s; opacity: 0.7; }
.voice-bars span:nth-child(3) { height: 28px; animation-delay: 0.2s; opacity: 1; }
.voice-bars span:nth-child(4) { height: 16px; animation-delay: 0.3s; opacity: 0.7; }
.voice-bars span:nth-child(5) { height: 12px; animation-delay: 0.4s; opacity: 0.5; }
@keyframes vbar {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}
/* Right: text area */
.voice-demo-right {
  display: flex; align-items: center;
  padding: 0 20px; height: 100%; gap: 0;
  overflow: hidden;
}
.voice-demo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 400;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.voice-demo-cursor {
  display: inline-block; width: 2px; height: 16px;
  background: var(--fill-accent-primary);
  animation: blink-cursor 0.5s step-end infinite;
  flex-shrink: 0; margin-left: 1px;
}

/* Step 3: Chat bubble with filling lines */
.step-hover-result { position: relative; display: flex; justify-content: center; }
.result-line-1, .result-line-2, .result-line-3 {
  transition: opacity 0.3s ease, stroke 0.3s ease;
}
.step:hover .result-line-1 {
  opacity: 0.8 !important;
  stroke: var(--fill-accent-primary);
  transition-delay: 0.1s;
}
.step:hover .result-line-2 {
  opacity: 0.6 !important;
  stroke: var(--fill-accent-primary);
  transition-delay: 0.25s;
}
.step:hover .result-line-3 {
  opacity: 0.8 !important;
  stroke: var(--fill-accent-primary);
  transition-delay: 0.4s;
}

/* ============================================================
   Feature 2: Chat streaming animation
   ============================================================ */
.feat-chat-animated .feat-bubble-user {
  opacity: 0; transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feat-chat-animated.in-view .feat-bubble-user {
  opacity: 1; transform: translateX(0);
}
.feat-chat-animated .feat-bubble-ai {
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.01s;
}
.feat-chat-animated.in-view .feat-bubble-ai {
  opacity: 1; max-height: 800px;
}
.feat-bubble-ai .ai-stream-cursor {
  display: inline-block; width: 2px; height: 13px;
  background: var(--fill-accent-primary);
  margin-left: 2px; vertical-align: text-bottom;
  animation: blink-cursor 0.5s step-end infinite;
}

/* ============================================================
   Feature 3: Word stamp animation
   ============================================================ */
.feat-word-item {
  opacity: 0.15; transform: scale(0.97);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feat-word-item.stamped {
  opacity: 1; transform: scale(1);
}

/* ============================================================
   Feature 4: History hover highlight
   ============================================================ */
.feat-history-item {
  opacity: 0.4;
  filter: grayscale(1);
  transition: all 0.25s ease;
}
.feat-history-item:hover {
  opacity: 1;
  filter: grayscale(0);
  background: var(--fill-bg-card);
  transform: translateX(4px);
}
.feat-history-item:hover .feat-history-text {
  color: var(--text-brand-primary);
}
.feat-history-item:first-child {
  background: transparent;
}

/* ============================================================
   Keyboard Shortcut Display
   ============================================================ */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: var(--fill-bg-card);
  border: 1px solid var(--stroke-secondary);
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary-light);
  box-shadow: 0 2px 0 var(--stroke-tertiary);
}

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--_mint), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 480px;
  margin: 0 auto 40px;
}

/* ============================================================
   Footer — Scroll-reveal dark card (Wispr-inspired)
   ============================================================ */
/* Main content: opaque, covers the sticky footer behind it */
.main-content {
  position: relative;
  z-index: 2;
  background: var(--fill-bg-primary);
}

.footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: #0A0C10;
  color: #F5F5F7;
  border-radius: 16px 16px 0 0;
  padding: 80px 0 24px;
}

.footer-waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 160px;
  pointer-events: none;
  opacity: 0.4;
  z-index: 2;
}

.footer-cta {
  text-align: center;
  margin-bottom: 72px;
  position: relative;
  z-index: 1;
}

.footer-logo {
  display: inline-flex;
  color: rgba(45, 212, 191, 1);
  margin-bottom: 20px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-logo:hover {
  transform: scale(1.1);
}

.footer-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  color: #F5F5F7;
  margin-bottom: 24px;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: rgba(45, 212, 191, 1);
  color: #0A0C10;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s;
}
.footer-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(45, 212, 191, 0.3);
}

.footer-grid {
  display: flex;
  gap: 67px;
  align-items: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 24px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.footer-col {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform;
}

.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  opacity: 0.7;
  color: #fff;
}

.footer-col ul {
  display: flex;
  gap: 51px;
  white-space: nowrap;
  list-style: none;
}

.footer-col a {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  will-change: transform;
}

@media (max-width: 768px) {
  .footer-grid { flex-direction: column; gap: 24px; align-items: flex-start; }
  .footer-col { align-items: flex-start; }
  .footer-col ul { gap: 16px; flex-wrap: wrap; }
  .footer { border-radius: 12px 12px 0 0; padding: 60px 0 32px; }
}


.footer-col a:hover {
  color: rgba(45, 212, 191, 1);
}

/* Divider: 1px line by default, becomes wave canvas on overscroll */
.footer-divider {
  display: block;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 1px;
  margin-top: 40px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 16px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  color: rgba(255,255,255,0.3);
  font-size: 12px;
}

/* Override theme toggle in dark bottom bar */
.footer-bottom .theme-toggle {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
}
.footer-bottom .theme-toggle:hover {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.3);
}

/* Dark mode: footer inverts to light */
[data-theme="dark"] .footer {
  background: #1A1D24;
  color: #E0E0E3;
}
[data-theme="dark"] .footer-tagline {
  color: #E0E0E3;
}
[data-theme="dark"] .footer-col h4 {
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .footer-col a {
  color: rgba(255,255,255,0.5);
}
[data-theme="dark"] .footer-col a:hover {
  color: rgba(45, 212, 191, 1);
}
[data-theme="dark"] .footer-copy {
  color: rgba(255,255,255,0.25);
}
[data-theme="dark"] .footer-bottom {
  border-top-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .footer-bottom .theme-toggle {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45);
}
[data-theme="dark"] .footer-bottom .theme-toggle:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.25);
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fade-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Smooth glow animation for hero */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============================================================
   App Mockup (Sayboard UI replica)
   ============================================================ */
/* macOS Desktop Mockup */
.desktop {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #F5F5F7;
  font-family: -apple-system, 'SF Pro Text', sans-serif;
}

.menubar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.menubar-left, .menubar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.menubar-apple { opacity: 0.85; }
.menubar-app { font-weight: 600; }
.menubar-item { opacity: 0.7; font-size: 11px; }
.menubar-icon { display: flex; align-items: center; opacity: 0.7; }
.menubar-time { font-size: 11px; opacity: 0.7; }

.desktop-area {
  flex: 1;
  position: relative;
  padding: 16px;
  background: #19191A;
  overflow: hidden;
}

/* Desktop folder icons — top-right like macOS */
.desk-icons {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.desk-icon span {
  font-size: 10px;
  color: rgba(0,0,0,0.7);
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

/* ChatGPT-style window on desktop */
.desk-chatgpt {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  max-width: 380px;
  max-height: calc(100% - 60px);
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(35, 33, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 48px rgba(0,0,0,0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.desk-chatgpt-logo {
  margin-bottom: 4px;
}

.desk-chatgpt-input {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: height 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}
.desk-chatgpt-input svg {
  margin-top: 2px;
  flex-shrink: 0;
  opacity: 0.4;
}
.desk-chatgpt-input span {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,0.35);
  word-break: break-word;
}

.desk-chatgpt-suggestions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.desk-chatgpt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  transition: background 0.15s;
}
.desk-chatgpt-item:hover {
  background: rgba(255,255,255,0.05);
}

.desk-chatgpt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.desk-chatgpt-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-chatgpt-meta {
  color: rgba(255,255,255,0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

.desk-chatgpt-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  padding-top: 4px;
}

/* Sayboard floating bar — input method style */
.sayboard-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  max-width: 320px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  white-space: nowrap;
  transition: width 0.2s ease;
}

.sayboard-bar-icon { display: flex; flex-shrink: 0; }

.sayboard-bar-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0,0,0,0.8);
}

.sayboard-bar-text {
  font-size: 12px;
  color: rgba(0,0,0,0.5);
  max-width: 260px;
  overflow: hidden;
  white-space: nowrap;
}

.sayboard-bar-key {
  margin-left: auto;
}

.mockup {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
  color: #19191a;
  font-size: 13px;
}

.mockup-sidebar {
  width: 240px;
  min-width: 240px;
  border-right: 1px solid rgba(25, 25, 26, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
}

.mockup-sidebar-top {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.mockup-traffic {
  display: flex;
  gap: 8px;
  padding: 16px 20px 8px;
}
.mockup-traffic .dot-red    { width: 12px; height: 12px; border-radius: 50%; background: #ff736a; }
.mockup-traffic .dot-yellow { width: 12px; height: 12px; border-radius: 50%; background: #febc2e; }
.mockup-traffic .dot-green  { width: 12px; height: 12px; border-radius: 50%; background: #19c332; }

.mockup-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  color: #19191a;
}
.mockup-logo svg { color: #19191a; }

.mockup-new-voice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 12px;
  padding: 10px 12px;
  background: #2DD4BF;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  color: #19191a;
}
.mockup-plus {
  font-size: 16px;
  font-weight: 700;
}
.mockup-fn-key {
  margin-left: auto;
  font-size: 10px;
  font-weight: 300;
  opacity: 0.6;
}

.mockup-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
}
.mockup-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #19191a;
}
.mockup-menu-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mockup-menu-item svg { color: #19191a; opacity: 0.6; display: block; }
.mockup-menu-item { cursor: pointer; transition: background 0.15s ease; }
.mockup-menu-item:hover { background: rgba(25, 25, 26, 0.04); }
.mockup-menu-item.active { background: rgba(25, 25, 26, 0.06); font-weight: 600; }
.mockup-menu-item.active svg { opacity: 1; }

.mockup-divider {
  height: 1px;
  background: rgba(25, 25, 26, 0.08);
  margin: 4px 20px;
}

.mockup-recent-label {
  padding: 8px 24px 4px;
  font-size: 11px;
  font-weight: 300;
  color: rgba(25, 25, 26, 0.5);
  text-align: left;
}

.mockup-recent-item {
  padding: 6px 24px;
  text-align: left;
  font-size: 11px;
  font-weight: 300;
  color: #19191a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup-sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 12px;
  border-top: 1px solid rgba(25, 25, 26, 0.08);
  font-size: 12px;
  font-weight: 400;
  width: 100%;
}
.mockup-sidebar-bottom span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.mockup-settings-icon {
  margin-left: auto;
  color: rgba(25, 25, 26, 0.4);
  cursor: pointer;
  transition: color 0.2s;
  flex-shrink: 0;
}
.mockup-settings-icon:hover { color: rgba(25, 25, 26, 0.8); }
[data-theme="dark"] .mockup-settings-icon { color: rgba(255,255,255,0.3); }
[data-theme="dark"] .mockup-settings-icon:hover { color: rgba(255,255,255,0.7); }

.mockup-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: url('https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=48&h=48&fit=crop&crop=face') center/cover no-repeat;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.mockup-avatar::after,
.mockup-avatar::before {
  display: none;
}

/* Main content area */
.mockup-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 48px 32px 48px;
  overflow: hidden;
}

.mockup-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 600px;
  width: 100%;
  z-index: 1;
}

.mockup-center-logo {
  display: flex;
  justify-content: center;
}

/* Logo eye/mouth bounce animation — like waveform bars */
.logo-eye {
  transform-origin: center center;
  animation: eye-bounce 1.2s ease-in-out infinite;
}
.logo-eye-l { animation-delay: 0s; }
.logo-eye-c { animation-delay: 0.2s; }
.logo-eye-r { animation-delay: 0.4s; }

@keyframes eye-bounce {
  0%, 100% { transform: scaleY(0.7); }
  50% { transform: scaleY(1); }
}

.mockup-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  color: #19191a;
  text-align: center;
}


.mockup-text {
  font-size: 13px;
  font-weight: 400;
  color: rgba(25, 25, 26, 0.55);
  line-height: 1.7;
  text-align: left;
  width: 100%;
  height: 3.4em;
  min-height: 3.4em;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.mockup-cursor {
  display: none;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* FAB — hidden by default, slides up when mockup expanded */
.mockup-fab {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 28px;
  background: #FFFFFF;
  color: #19191a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  z-index: 2;
}
.mockup-fab.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
[data-theme="dark"] .mockup-fab { background: #2A2A2E; color: #F5F5F7; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.mockup-bottom-glow {
  position: absolute;
  bottom: -20px;
  left: -20%;
  right: -20%;
  height: 120px;
  pointer-events: none;
}

.mockup-bottom-glow::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(var(--_mint), 0.3) 0%, transparent 100%);
  animation: voice-glow-pulse 4s ease-in-out infinite;
}

.mockup-bottom-glow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(var(--_mint), 0.15) 0%, transparent 100%);
  animation: voice-glow-ripple 5.5s ease-in-out infinite 0.3s;
}

@keyframes voice-glow-pulse {
  0%  { opacity: 0.3; transform: translateX(-50%) scaleX(0.7) scaleY(0.8); }
  8%  { opacity: 0.9; transform: translateX(-50%) scaleX(1.15) scaleY(1.1); }
  14% { opacity: 0.4; transform: translateX(-50%) scaleX(0.8) scaleY(0.85); }
  18% { opacity: 0.7; transform: translateX(-50%) scaleX(1.0) scaleY(0.95); }
  25% { opacity: 0.35; transform: translateX(-50%) scaleX(0.75) scaleY(0.9); }
  33% { opacity: 0.95; transform: translateX(-50%) scaleX(1.2) scaleY(1.15); }
  38% { opacity: 0.5; transform: translateX(-50%) scaleX(0.85) scaleY(0.88); }
  45% { opacity: 0.3; transform: translateX(-50%) scaleX(0.7) scaleY(0.82); }
  52% { opacity: 0.85; transform: translateX(-50%) scaleX(1.1) scaleY(1.05); }
  58% { opacity: 0.6; transform: translateX(-50%) scaleX(0.9) scaleY(0.92); }
  65% { opacity: 0.4; transform: translateX(-50%) scaleX(0.78) scaleY(0.87); }
  72% { opacity: 0.8; transform: translateX(-50%) scaleX(1.05) scaleY(1.0); }
  80% { opacity: 0.45; transform: translateX(-50%) scaleX(0.82) scaleY(0.9); }
  88% { opacity: 0.7; transform: translateX(-50%) scaleX(0.95) scaleY(0.97); }
  100% { opacity: 0.3; transform: translateX(-50%) scaleX(0.7) scaleY(0.8); }
}

@keyframes voice-glow-ripple {
  0%  { opacity: 0.2; transform: translateX(-50%) scaleX(0.5) scaleY(0.7); }
  12% { opacity: 0.7; transform: translateX(-50%) scaleX(1.1) scaleY(1.05); }
  20% { opacity: 0.3; transform: translateX(-50%) scaleX(0.65) scaleY(0.8); }
  30% { opacity: 0.6; transform: translateX(-50%) scaleX(0.9) scaleY(0.95); }
  42% { opacity: 0.8; transform: translateX(-50%) scaleX(1.15) scaleY(1.1); }
  50% { opacity: 0.25; transform: translateX(-50%) scaleX(0.55) scaleY(0.75); }
  60% { opacity: 0.65; transform: translateX(-50%) scaleX(1.0) scaleY(1.0); }
  70% { opacity: 0.35; transform: translateX(-50%) scaleX(0.7) scaleY(0.85); }
  82% { opacity: 0.75; transform: translateX(-50%) scaleX(1.08) scaleY(1.02); }
  100% { opacity: 0.2; transform: translateX(-50%) scaleX(0.5) scaleY(0.7); }
}

/* Mobile segment bar — hidden on desktop */
.mockup-segment { display: none; }

@media (max-width: 768px) {
  .mockup-sidebar { display: none; }
  .mockup { aspect-ratio: 3 / 4; flex-direction: column; }

  .mockup-segment {
    display: flex;
    gap: 0;
    padding: 4px;
    background: rgba(25, 25, 26, 0.04);
    border-bottom: none;
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
    border-radius: 12px;
    overflow: hidden;
  }
  .mockup-seg-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    color: rgba(25, 25, 26, 0.5);
    cursor: pointer;
    transition: all 0.2s;
  }
  .mockup-seg-item.active {
    background: #2DD4BF;
    color: #19191a;
    font-weight: 700;
  }

  .mockup-content { flex: 1; padding: 0 16px 48px; }
}

/* Dark mode segment */
[data-theme="dark"] .mockup-segment { background: rgba(255,255,255,0.04); border-bottom-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .mockup-seg-item { color: rgba(255,255,255,0.4); }
[data-theme="dark"] .mockup-seg-item.active { background: #2DD4BF; color: #1C1C1E; }

/* ============================================================
   Theme Toggle Button
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--stroke-tertiary);
  border-radius: 8px;
  background: var(--fill-bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--stroke-secondary);
}

/* Show/hide sun/moon icons based on theme */
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-sun   { display: none; }
[data-theme="dark"] .icon-moon  { display: block; }
/* Default (light) */
.icon-moon { display: none; }
.icon-sun  { display: block; }

/* ============================================================
   Mockup Dark Mode
   ============================================================ */
[data-theme="dark"] .mockup {
  background: #1C1C1E;
  color: #F5F5F7;
}
[data-theme="dark"] .mockup-sidebar {
  background: #1C1C1E;
  border-right-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .mockup-logo { color: #F5F5F7; }
[data-theme="dark"] .mockup-logo svg { color: #F5F5F7; }
[data-theme="dark"] .mockup-menu-item { color: #F5F5F7; }
[data-theme="dark"] .mockup-menu-item svg { color: #F5F5F7; opacity: 0.5; }
[data-theme="dark"] .mockup-menu-item:hover { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .mockup-menu-item.active { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .mockup-menu-item.active svg { opacity: 1; }
[data-theme="dark"] .mockup-new-voice { background: #2DD4BF; color: #1C1C1E; }
[data-theme="dark"] .mockup-divider { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .mockup-recent-label { color: rgba(255,255,255,0.4); }
[data-theme="dark"] .mockup-recent-item { color: rgba(255,255,255,0.7); }
[data-theme="dark"] .mockup-sidebar-bottom {
  border-top-color: rgba(255,255,255,0.08);
  color: #F5F5F7;
}
[data-theme="dark"] .mockup-content { background: #1C1C1E; }
[data-theme="dark"] .mockup-waveform span { background: #F5F5F7; }
[data-theme="dark"] .mockup-title { color: #F5F5F7; }
[data-theme="dark"] .mockup-text { color: rgba(255,255,255,0.5); }
[data-theme="dark"] .mockup-cursor { background: #F5F5F7; }
[data-theme="dark"] .mockup-traffic .dot-red { background: #ff736a; }
[data-theme="dark"] .mockup-traffic .dot-yellow { background: #febc2e; }
[data-theme="dark"] .mockup-traffic .dot-green { background: #19c332; }

/* Dark mode: desktop mockup */
[data-theme="dark"] .desktop { background: #1C1C1E; }
[data-theme="dark"] .menubar { background: rgba(0,0,0,0.6); color: rgba(255,255,255,0.85); }
[data-theme="dark"] .desktop-area { background: #0A0C10; }
[data-theme="dark"] .sayboard-bar {
  background: rgba(40,40,44,0.9);
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .sayboard-bar-content { color: rgba(255,255,255,0.8); }
[data-theme="dark"] .sayboard-bar-text { color: rgba(255,255,255,0.5); }
[data-theme="dark"] .sayboard-bar .kbd {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.15);
}
[data-theme="dark"] .desk-chatgpt {
  background: rgba(25,23,20,0.95);
  border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .desk-chatgpt-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .desk-chatgpt-input span { color: rgba(255,255,255,0.35); }
[data-theme="dark"] .desk-chatgpt-item { color: rgba(255,255,255,0.7); }
[data-theme="dark"] .desk-chatgpt-meta { color: rgba(255,255,255,0.25); }
[data-theme="dark"] .desk-chatgpt-footer { color: rgba(255,255,255,0.2); }

