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

:root {
  --brand: #3886ED;
  --gradient-start: #F9951E;
  --gradient-mid: #FF51C3;
  --gradient-end: #AF52DE;
  --brand-dark: #1a529c;
  --brand-light: #4585d9;
  --brand-darkest: #0b3a78;
  --accent: #0D94E7;
  --cyan: #14DEB8;
  --purple: #AF52DE;
  --bg: #1E1E1E;
  --bg2: #202226;
  --bg3: #2E3033;
  --text: rgba(255, 255, 255, 0.85);
  --text-dim: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Utility */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1100px;
}

.hero-text {
  text-align: left;
  flex: 1;
}

.hero-avatar {
  position: relative;
  flex-shrink: 0;
}

.hero-avatar img {
  width: 320px;
  height: 320px;
  border-radius: 32px;
  object-fit: cover;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 80px rgba(255, 81, 195, 0.2), 0 0 40px rgba(175, 82, 222, 0.15);
}

.hero-avatar-glow {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 81, 195, 0.15), rgba(175, 82, 222, 0.08), transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (max-width: 800px) {
  .hero-content {
    flex-direction: column-reverse;
    gap: 2rem;
  }
  .hero-text { text-align: center; }
  .hero-avatar img { width: 200px; height: 200px; }
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,81,195,0.12), rgba(175,82,222,0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--glass);
  backdrop-filter: blur(10px);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 30px rgba(255, 81, 195, 0.3);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255, 81, 195, 0.5);
}

/* Metrics */
.metrics {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.metric {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Demo */
.demo {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 3rem;
  font-weight: 300;
}

/* Case tabs */
.case-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.case-tab {
  padding: 10px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.case-tab:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

.case-tab.active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.case-panel {
  display: none;
}

.case-panel.active {
  display: block;
  animation: caseIn 0.4s ease;
}

@keyframes caseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-window {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4), 0 0 60px rgba(56,117,197,0.08);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: var(--bg3);
  border-bottom: 1px solid var(--glass-border);
}

.chat-header-logo {
  width: 22px;
  height: 22px;
}

.chat-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.chat-thread-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(56, 134, 237, 0.15);
  color: var(--brand);
  font-weight: 500;
}

.chat-messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 600px;
  overflow-y: auto;
}

.chat-msg {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.chat-msg.msg-visible {
  opacity: 1;
  transform: translateY(0);
}

.msg {
  display: flex;
  gap: 12px;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-user {
  background: linear-gradient(135deg, var(--purple), var(--brand));
  color: #fff;
}

.avatar-bot {
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  font-size: 1rem;
  overflow: hidden;
  padding: 0;
}

.avatar-bot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-meta {
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.msg-time {
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 8px;
  font-size: 0.75rem;
}

.msg-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #ccccd8;
}

.mention {
  color: var(--accent);
  font-weight: 600;
}

code {
  background: rgba(29,164,242,0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.code-line {
  color: var(--cyan);
  font-weight: 600;
}

.msg-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.tag-jira {
  background: rgba(175,82,222,0.15);
  color: var(--purple);
}

.tag-pr {
  background: rgba(20,222,184,0.12);
  color: var(--cyan);
}

.tag-deploy {
  background: rgba(249,149,30,0.15);
  color: var(--gradient-start);
}

.tag-review {
  background: rgba(56,134,237,0.15);
  color: var(--brand);
}

/* Features */
.features {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 3rem;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(29,164,242,0.25);
  box-shadow: 0 12px 40px rgba(29,164,242,0.1);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* CTA Section */
.cta-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8rem 2rem;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.cta-section p {
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* Hero logo */
.hero-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2rem;
}

.yuchat-logo-icon {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--glass-border);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.footer-logo-icon {
  width: 24px;
  height: 24px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

@media (max-width: 600px) {
  .metrics { gap: 1.5rem; }
  .metric-value { font-size: 1.8rem; }
  .chat-messages { padding: 12px; }
}
