/* ==========================================================================
   1. Design Tokens & Soft Glowing Cloud ("柔光流云") Palette
   ========================================================================== */
:root {
  --bg: #F5F8FE;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #FFFFFF;
  --border: rgba(26, 115, 232, 0.14);
  --border-ink: rgba(15, 23, 42, 0.08);
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #64748B;
  --accent: #1A73E8;
  --accent-soft: rgba(26, 115, 232, 0.10);
  --mint: #0D9488;
  --violet: #7C3AED;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   2. Custom Precision Cursor (Desktop Mouse Devices Only)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  body.site-pointer, .site-pointer :is(a, button, [role="button"], .lib-card) {
    cursor: none !important;
  }
  input, textarea, select {
    cursor: text !important;
  }
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid rgba(26, 115, 232, 0.55);
    background: rgba(26, 115, 232, 0.05);
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-100px, -100px, 0);
    transition: width 0.22s var(--ease-out), height 0.22s var(--ease-out), background 0.22s, border-color 0.22s, opacity 0.2s;
    backdrop-filter: blur(1px);
  }
  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 10000;
    transform: translate3d(-100px, -100px, 0);
    transition: transform 0.08s ease-out, opacity 0.2s;
  }
  .cursor-ring.hovering {
    width: 44px;
    height: 44px;
    background: rgba(26, 115, 232, 0.10);
    border-color: rgba(26, 115, 232, 0.85);
  }
  .cursor-ring.clicking {
    width: 22px;
    height: 22px;
    background: rgba(26, 115, 232, 0.22);
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none !important; }
}

/* ==========================================================================
   3. Ambient Flowing Cloud Orbs Background
   ========================================================================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(155deg, #F6F9FF 0%, #EEF4FD 48%, #F1FBF8 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  will-change: transform;
}

.orb-1 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.34) 0%, rgba(59, 130, 246, 0) 68%);
  top: -160px;
  left: -120px;
  animation: floatOrb1 10s ease-in-out infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.26) 0%, rgba(139, 92, 246, 0) 68%);
  top: 10%;
  right: -130px;
  animation: floatOrb2 12s ease-in-out infinite alternate;
}

.orb-3 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.24) 0%, rgba(20, 184, 166, 0) 68%);
  bottom: -180px;
  left: 24%;
  animation: floatOrb3 13s ease-in-out infinite alternate;
}

.mouse-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.11) 0%, rgba(26, 115, 232, 0) 70%);
  transform: translate3d(-500px, -500px, 0);
  pointer-events: none;
  transition: transform 0.4s ease-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(110px, 70px) scale(1.12); }
}
@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, 85px) scale(1.08); }
}
@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(85px, -70px) scale(1.12); }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ==========================================================================
   4. Top Navigation Header
   ========================================================================== */
header {
  position: relative;
  z-index: 40;
  background: rgba(245, 248, 254, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}
.brand:hover .logo-mark { transform: scale(1.06); }

.brand-text { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.025em; }
.brand-divider { width: 1px; height: 13px; background: rgba(15, 23, 42, 0.16); }
.brand-slogan { font-size: 13px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }


.lang-btn {
  border: 1px solid var(--border-ink);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 9999px;
  transition: all 0.2s;
}
.lang-btn:hover { background: #FFFFFF; color: var(--ink); border-color: rgba(26, 115, 232, 0.35); }

.nav-download {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.25);
  transition: transform 0.18s var(--ease-out), opacity 0.2s;
}
.nav-download:hover { transform: translateY(-1px); opacity: 0.92; }

/* ==========================================================================
   5. Entrance & Scroll Float-Up Emergence Animations
   ========================================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), filter 0.7s var(--ease-out);
  will-change: opacity, transform, filter;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-d1 { transition-delay: 0.06s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.22s; }
.reveal-d4 { transition-delay: 0.30s; }
.hero-in { opacity: 0; animation: fadeUp 0.68s var(--ease-out) forwards; }
.d1 { animation-delay: 0.04s; }
.d2 { animation-delay: 0.10s; }
.d3 { animation-delay: 0.16s; }
.d4 { animation-delay: 0.22s; }

/* ==========================================================================
   6. Hero Section & Interactive 20:9 Simulated Android Device
   ========================================================================== */
.hero {
  padding: 40px 0 58px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  padding: 5px 13px;
  border-radius: 9999px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(26, 115, 232, 0.06);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 24px;
  max-width: 480px;
}
.hero-desc strong { color: var(--ink); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 9999px;
  border: none;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(26, 115, 232, 0.28);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(26, 115, 232, 0.35); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 9999px;
  border: 1px solid var(--border-ink);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}
.btn-secondary:hover { background: #FFFFFF; border-color: rgba(26, 115, 232, 0.35); transform: translateY(-1px); }

.hero-meta {
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.meta-pill {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 9999px;
}
.meta-pill.mint {
  color: var(--mint);
  background: rgba(13, 148, 136, 0.10);
}

/* Realistic 20:9 Tall Android Device Mockup */
.device-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 1200px;
}

.device-wrap {
  transition: transform 0.25s ease-out;
  max-width: 100%;
}

.device-bezel {
  width: 300px;
  max-width: 92vw;
  height: 620px;
  background: #18181B;
  border-radius: 44px;
  padding: 9px;
  box-shadow:
    0 34px 70px -14px rgba(15, 23, 42, 0.25),
    0 6px 20px rgba(26, 115, 232, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  display: flex;
}

.device-screen {
  --phone-accent: #1A73E8;
  --phone-accent-soft: rgba(26, 115, 232, 0.12);
  flex: 1;
  border-radius: 35px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.35s ease;
  background:
    radial-gradient(circle at 20% 25%, rgba(96, 165, 250, 0.18), transparent 55%),
    radial-gradient(circle at 80% 35%, rgba(167, 139, 250, 0.14), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(45, 212, 191, 0.16), transparent 55%),
    #F7F9FE;
}

.device-screen[data-theme="mint"] {
  --phone-accent: #0D9488;
  --phone-accent-soft: rgba(13, 148, 136, 0.13);
  background:
    radial-gradient(circle at 20% 25%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.14), transparent 55%),
    #F3FBF9;
}

.device-screen[data-theme="violet"] {
  --phone-accent: #7C3AED;
  --phone-accent-soft: rgba(124, 58, 237, 0.12);
  background:
    radial-gradient(circle at 25% 25%, rgba(167, 139, 250, 0.22), transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(244, 114, 182, 0.13), transparent 55%),
    #F8F6FF;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.camera-pill {
  width: 56px;
  height: 15px;
  border-radius: 9999px;
  background: #09090B;
  border: none;
}

.app-content {
  flex: 1;
  padding: 6px 14px 76px;
  overflow-y: auto;
  scrollbar-width: none;
}
.app-content::-webkit-scrollbar { display: none; }

.phone-panel {
  display: none;
  flex-direction: column;
  gap: 9px;
  animation: fadeUp 0.22s var(--ease-out);
}
.phone-panel.active { display: flex; }

/* Authentic Lexi App Header & Cards inside Phone */
.app-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 4px;
}
.app-logo-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #EBF2FE;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-title-inline {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.app-slogan-inline {
  font-size: 10.5px;
  color: var(--ink-3);
  border-left: 1px solid rgba(15, 23, 42, 0.15);
  padding-left: 7px;
}

.lexi-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 12px 13px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.search-box-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: 40px;
}

.phone-textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  resize: none;
  line-height: 1.45;
  outline: none;
}

.phone-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
}
.phone-icon-btn:hover, .phone-icon-btn.active {
  background: var(--phone-accent-soft);
  color: var(--phone-accent);
}

.ctx-input-wrap {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
}
.phone-ctx-input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.95);
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 11px;
  color: var(--ink);
  outline: none;
}

.search-box-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.ctx-link {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--phone-accent);
  background: none;
  border: none;
  padding: 2px 0;
}

.lookup-btn-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--phone-accent);
  color: #FFFFFF;
  padding: 5px 13px;
  border-radius: 9999px;
  border: none;
  transition: transform 0.15s, opacity 0.2s;
}
.lookup-btn-pill:active { transform: scale(0.95); }

.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
}
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.95);
  border: none;
  text-align: left;
  color: var(--ink);
  transition: background 0.15s;
}
.recent-item:hover { background: var(--phone-accent-soft); }

.seg-word {
  border-bottom: 1.5px dashed rgba(100, 116, 139, 0.65);
  padding-bottom: 1px;
  transition: background 0.15s;
}
.seg-word:hover { background: rgba(100, 116, 139, 0.14); border-radius: 3px; }
.seg-phrase {
  border-bottom: 2px dashed var(--phone-accent);
  color: var(--phone-accent);
  font-weight: 600;
  padding-bottom: 1px;
  transition: background 0.15s;
}
.seg-phrase:hover { background: var(--phone-accent-soft); border-radius: 3px; }

/* Floating Glass Bottom Nav Bar inside Phone */
.floating-nav {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  height: 52px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  gap: 2px;
}

.phone-tab {
  border: none;
  background: transparent;
  border-radius: 9999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.22s var(--ease-out);
}

.phone-tab.active {
  background: var(--phone-accent-soft);
  color: var(--phone-accent);
}

/* Review Screen inside Phone */
.page-h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.review-sub { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 4px; }
.pill-light {
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 4px 10px;
  border-radius: 9999px;
  color: var(--ink);
}
.mode-pills { display: flex; gap: 6px; margin-bottom: 4px; }
.mode-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  transition: all 0.18s;
}
.mode-pill.active { background: var(--phone-accent-soft); color: var(--phone-accent); }

.flashcard-wrap { perspective: 900px; }
.flashcard {
  position: relative;
  height: 194px;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease-out);
}
.flashcard.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 22px rgba(26, 115, 232, 0.08);
}
.card-back { transform: rotateY(180deg); background: #FFFFFF; }
.fsrs-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.fsrs-btn {
  border: none;
  border-radius: 11px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.14s;
}
.fsrs-btn:active { transform: scale(0.95); }

/* Settings Accordion Rows inside Phone */
.setting-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 11px 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: border-radius .22s var(--ease-out);
}
.setting-header {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.setting-body {
  display: flex;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 11px;
  color: var(--ink-2);
  flex-direction: column;
  gap: 7px;
}

.theme-swatches { display: flex; gap: 10px; align-items: center; }
.swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1.5px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s;
}
.swatch-btn.active { box-shadow: 0 0 0 2px var(--ink); transform: scale(1.1); }

.ota-bar-wrap {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: none;
}
.ota-bar-wrap.show { display: block; }
.ota-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--phone-accent);
  transition: width 0.35s ease;
}

.phone-hint-badge {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: center;
}

/* ==========================================================================
   7. Interactive Animated Feature Stage
   ========================================================================== */
.section {
  padding: 48px 0;
}

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 32px;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.section-head p {
  font-size: 14.5px;
  color: var(--ink-2);
}

.stage-container {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(26, 115, 232, 0.07), 0 4px 16px rgba(15, 23, 42, 0.03);
}

.stage-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-tab {
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 15px 17px;
  transition: all 0.28s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.stage-tab:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(26, 115, 232, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 115, 232, 0.10);
}

.stage-tab.active {
  background: #FFFFFF;
  border-color: rgba(26, 115, 232, 0.24);
  box-shadow: 0 10px 26px rgba(26, 115, 232, 0.10);
}

.stage-tab-bar {
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0;
  transform: scaleY(0.3);
  transition: all 0.28s var(--ease-out);
}

.stage-tab.active .stage-tab-bar {
  opacity: 1;
  transform: scaleY(1);
}

.stage-tab-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}

.stage-tab-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.stage-tab-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}

.stage-visual {
  background: linear-gradient(145deg, rgba(240, 246, 255, 0.9), rgba(244, 251, 249, 0.9));
  border: 1px solid rgba(26, 115, 232, 0.10);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.stage-scene {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 14px;
  animation: sceneEnter 0.4s var(--ease-out);
}

.stage-scene.active { display: flex; }

@keyframes sceneEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.scene-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #FFFFFF;
}

.ctx-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 9999px;
  background: #F1F5F9;
  color: var(--ink-2);
  border: none;
  transition: all 0.25s var(--ease-out);
}
.ctx-pill.lit {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.28);
}

.ocr-frame {
  position: relative;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  border: 1.5px dashed rgba(13, 148, 136, 0.45);
  overflow: hidden;
}
.ocr-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.20), transparent);
  animation: beamSweep 2.6s ease-in-out infinite;
}
@keyframes beamSweep {
  0% { left: -50px; }
  100% { left: 105%; }
}

.stage-flip-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.10);
  text-align: center;
  animation: floatCard 4s ease-in-out infinite;
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.byok-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
.flow-node {
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.flow-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  position: relative;
  overflow: hidden;
}
.flow-pulse {
  position: absolute;
  top: -2px;
  width: 18px;
  height: 6px;
  border-radius: 4px;
  background: #FFFFFF;
  box-shadow: 0 0 8px var(--accent);
  animation: pulseTravel 1.8s linear infinite;
}
@keyframes pulseTravel {
  0% { left: -20px; }
  100% { left: 105%; }
}

/* ==========================================================================
   8. Three-Step Quick Start & Changelog
   ========================================================================== */
.download-panel {
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(26, 115, 232, 0.06);
}

.dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-ink);
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.step-box {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 16px;
  padding: 18px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 5px;
}
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step-desc { font-size: 13px; color: var(--ink-2); }

.changelog-box {
  border-top: 1px solid var(--border-ink);
  padding-top: 14px;
}
.changelog-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 0;
}
.changelog-content {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 18px;
  border-radius: 14px;
}
.changelog-content.open { display: block; }
.changelog-content ul { padding-left: 18px; margin-top: 4px; }

/* ==========================================================================
   9. Footer, Sticky Mobile Bar & Modals
   ========================================================================== */
footer {
  padding: 24px 0 42px;
  font-size: 13px;
  color: var(--ink-3);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-link {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  background: none;
  border: none;
  font-size: 13px;
}
.footer-link:hover { color: var(--accent); }

/* Mobile Sticky Bottom Capsule Bar */
.mobile-bottom-bar {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #FFFFFF;
  border-radius: 24px;
  max-width: 410px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  text-align: center;
  position: relative;
  animation: fadeUp 0.2s var(--ease-out);
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s var(--ease-out);
  z-index: 80;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   10. Responsive Breakpoints (Mobile Native Adaptations)
   ========================================================================== */
@media (max-width: 880px) {
  body { padding-bottom: 72px; }
  .hero { padding: 26px 0 36px; }
  .hero-grid, .stage-container, .steps-row { grid-template-columns: 1fr; }
  .hero-grid { text-align: center; gap: 30px; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .cta-row, .hero-meta { justify-content: center; }
  .brand-divider, .brand-slogan, .nav-download { display: none; }
  .stage-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stage-tab {
    padding: 12px;
    text-align: center;
  }
  .stage-tab-desc, .stage-tab-bar { display: none; }
  .stage-visual { min-height: 220px; padding: 18px; }
  .download-panel { padding: 20px; }
  .footer-inner { justify-content: center; text-align: center; }

  .mobile-bottom-bar {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 400px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid #FFFFFF;
    border-radius: 9999px;
    padding: 6px 6px 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    z-index: 45;
  }
  .toast { bottom: 82px; }
}
  