:root {
  --color-bg-primary: #f8fafc;
  --color-bg-secondary: #ffffff;
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-glass-bg: rgba(255, 255, 255, 0.75);
  --color-glass-border: rgba(255, 255, 255, 0.6);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
                    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08), transparent 25%);
}

a { text-decoration: none; color: inherit; transition: var(--transition-smooth); }

/* Header & Nav */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: 80px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; z-index: 100;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.logo {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--color-text-secondary); }
.nav-links a:hover { color: var(--color-text-primary); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; background-color: var(--color-text-primary);
  color: #fff; border-radius: 9999px; font-weight: 600; font-size: 0.95rem;
  transition: var(--transition-smooth); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); color: #fff; }

/* Hero Section */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 120px 5% 80px; position: relative;
}

.hero-badge {
  display: inline-block; padding: 0.4rem 1rem;
  background: rgba(59, 130, 246, 0.1); color: var(--color-accent-hover);
  border-radius: 9999px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1.5rem; border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.1; max-width: 900px;
  margin-bottom: 1.5rem; color: var(--color-text-primary);
}
.hero h1 span {
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--color-text-secondary); max-width: 600px; margin-bottom: 2.5rem; }

/* =========================================================
   ANIMATED DEMO (30s Workflow)
   ========================================================= */
.demo-container {
  margin-top: 4rem;
  width: 100%; max-width: 400px; height: 600px;
  position: relative; perspective: 1000px; text-align: left;
}

.phone-frame {
  width: 100%; height: 100%; background: #f0f2f5;
  border-radius: 36px; border: 8px solid #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}

.app-header {
  height: 60px; background: #fff; display: flex; align-items: center;
  padding: 0 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); z-index: 2;
}
.contact-info { display: flex; align-items: center; gap: 10px; }
.contact-avatar { width: 36px; height: 36px; border-radius: 50%; background: #cbd5e1; }
.contact-name { font-weight: 600; font-size: 1rem; }

.chat-area { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; overflow: hidden; position: relative; }

.chat-msg {
  padding: 0.8rem 1rem; border-radius: 18px; max-width: 85%; font-size: 0.95rem; line-height: 1.4;
}
.incoming { background: #fff; align-self: flex-start; border-top-left-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.outgoing { background: #dcf8c6; align-self: flex-end; border-top-right-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.app-input-area {
  height: 60px; background: #f0f2f5; padding: 0 1rem; display: flex; align-items: center; gap: 10px;
}
.app-input-box { flex: 1; background: #fff; height: 40px; border-radius: 20px; display: flex; align-items: center; padding: 0 1rem; font-size: 0.9rem; color: #64748b; }
.app-send-btn { width: 40px; height: 40px; border-radius: 50%; background: #00a884; color: #fff; display: flex; align-items: center; justify-content: center; }

/* Holos UI Elements */
.holos-bubble {
  position: absolute; right: -20px; top: 150px;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center; z-index: 10;
}

.holos-panel {
  position: absolute; top: 180px; right: 1rem; left: 1rem;
  background: var(--color-glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-glass-border); border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); padding: 1rem; z-index: 9;
  display: flex; flex-direction: column; gap: 0.8rem;
}

.panel-header { display: flex; justify-content: space-between; align-items: center; }
.panel-header h3 { font-size: 1rem; font-weight: 700; color: #1e40af; }

.panel-translation {
  background: #fff; border-radius: 12px; padding: 0.8rem; font-size: 0.85rem; border: 1px solid #e2e8f0;
}
.trans-title, .intent-title { font-weight: 600; color: #64748b; margin-bottom: 0.2rem; }
.intent-title { margin-top: 0.5rem; }
.trans-text, .intent-text { color: #0f172a; }

.panel-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.reply-card {
  background: #fff; border-radius: 12px; padding: 0.8rem; border: 1px solid #e2e8f0; cursor: pointer; transition: all 0.2s;
}
.reply-card.hover-state { background: #eff6ff; border-color: #3b82f6; }
.card-tag { font-size: 0.75rem; font-weight: 600; color: #3b82f6; margin-bottom: 0.2rem; }
.card-text-en { font-size: 0.9rem; font-weight: 500; color: #0f172a; }
.card-text-zh { font-size: 0.8rem; color: #64748b; margin-top: 0.2rem; }

.mouse-cursor {
  position: absolute; width: 24px; height: 24px; z-index: 99; top: 500px; left: 200px;
}

/* 
  ANIMATION KEYFRAMES (16s Loop)
*/
.anim-incoming { opacity: 0; transform: translateY(10px); animation: fadeIn 16s infinite; }
.anim-bubble { transform: translateX(100px); animation: bubbleEnter 16s infinite; }
.anim-cursor { opacity: 0; animation: cursorMove 16s infinite; }
.anim-panel { opacity: 0; transform: scale(0.95); transform-origin: top right; pointer-events: none; animation: panelShow 16s infinite; }
.anim-card-click { animation: cardClick 16s infinite; }
.anim-typing { opacity: 1; animation: typingText 16s infinite; }
.anim-outgoing { opacity: 0; transform: translateY(10px); animation: outgoingShow 16s infinite; }

@keyframes fadeIn {
  0%, 5% { opacity: 0; transform: translateY(10px); }
  8%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes bubbleEnter {
  0%, 12% { transform: translateX(100px); }
  15%, 85% { transform: translateX(-10px); } /* sticks out */
  90%, 100% { transform: translateX(100px); }
}
@keyframes cursorMove {
  0%, 15% { opacity: 0; top: 500px; left: 200px; }
  18% { opacity: 1; top: 500px; left: 200px; }
  25% { top: 165px; left: 350px; transform: scale(1); } /* Moves to bubble */
  27% { transform: scale(0.8); } /* Click bubble */
  30% { transform: scale(1); }
  35% { top: 410px; left: 200px; } /* Moves to first card */
  45% { top: 410px; left: 200px; transform: scale(1); }
  47% { transform: scale(0.8); } /* Click card */
  50% { transform: scale(1); opacity: 1; }
  55%, 100% { opacity: 0; }
}
@keyframes panelShow {
  0%, 28% { opacity: 0; transform: scale(0.95); }
  31%, 48% { opacity: 1; transform: scale(1); }
  51%, 100% { opacity: 0; transform: scale(0.95); }
}
@keyframes cardClick {
  0%, 46% { background: #fff; border-color: #e2e8f0; }
  47%, 50% { background: #eff6ff; border-color: #3b82f6; } /* Hover/Active state */
  51%, 100% { background: #fff; border-color: #e2e8f0; }
}
@keyframes typingText {
  0%, 51% { content: "Type a message..."; color: #64748b; }
  52%, 58% { color: #0f172a; } /* Text injected */
  59%, 100% { color: #64748b; } /* Cleared after send */
}
/* CSS Hack to change content */
.typing-indicator::after {
  content: "Type a message...";
  animation: typingContent 16s infinite;
}
@keyframes typingContent {
  0%, 51% { content: "Type a message..."; }
  52%, 58% { content: "Yes, absolutely! Can't wait..."; }
  59%, 100% { content: "Type a message..."; }
}

@keyframes outgoingShow {
  0%, 58% { opacity: 0; transform: translateY(10px); }
  60%, 95% { opacity: 1; transform: translateY(0); }
  98%, 100% { opacity: 0; transform: translateY(-10px); }
}


/* =========================================================
   Features Section (Timeline)
   ========================================================= */
.features { padding: 100px 5%; background: #fff; }
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 4rem; letter-spacing: -0.03em; }

.workflow-container {
  max-width: 800px; margin: 0 auto 4rem;
}
.mode-title { font-size: 1.5rem; font-weight: 800; color: #1e40af; margin-bottom: 2rem; display: flex; align-items: center; gap: 10px; }

.timeline {
  position: relative; padding-left: 2rem;
}
.timeline::before {
  content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: #e2e8f0;
}

.timeline-step { position: relative; margin-bottom: 2.5rem; }
.timeline-step:last-child { margin-bottom: 0; }
.step-num {
  position: absolute; left: -2rem; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-accent); color: #fff; font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 4px solid #fff;
  transform: translateX(-50%);
}
.step-content h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text-primary); }
.step-content p { color: var(--color-text-secondary); font-size: 0.95rem; }

.passive-box {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 2rem;
  border-left: 4px solid #a855f7;
}
.passive-box p { color: var(--color-text-secondary); font-size: 1.05rem; }

.mt-4 { margin-top: 4rem; }

/* Footer */
.footer { background: var(--color-text-primary); color: #fff; padding: 80px 5% 40px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.footer-brand p { color: #94a3b8; max-width: 300px; }
.footer-links h4 { font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; font-size: 0.95rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; color: #94a3b8; font-size: 0.85rem; }

@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links { display: none; }
  .hero { padding-top: 100px; }
}

/* Document styling for Privacy/Terms */
.doc-container { max-width: 800px; margin: 120px auto 80px; padding: 0 5%; background: #fff; border-radius: 24px; padding: 3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.doc-container h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.03em; }
.doc-date { color: var(--color-text-secondary); font-size: 0.95rem; margin-bottom: 3rem; display: block; }
.doc-content h2, .doc-content h3 { margin-top: 2.5rem; margin-bottom: 1rem; font-weight: 700; color: var(--color-text-primary); }
.doc-content h2 { font-size: 1.5rem; }
.doc-content h3 { font-size: 1.2rem; }
.doc-content p { margin-bottom: 1rem; color: var(--color-text-secondary); }
.doc-content ul { margin-left: 1.5rem; margin-bottom: 1.5rem; color: var(--color-text-secondary); }
.doc-content li { margin-bottom: 0.5rem; }
