:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);
  --transition-med: 260ms cubic-bezier(0.4,0,0.2,1);
  --max-width: 1160px;
  /* AIService design-system aliases (2026-08-21) -- named per the
     product's own token vocabulary (--bg/--surface/--muted/--shadow-sm
     etc.), mapped onto the theme tokens already defined below rather
     than replacing them: every existing rule in this codebase already
     depends on --bg-primary/--bg-secondary/--text-muted/--shadow-elevated
     etc, and a global rename would touch hundreds of declarations for
     zero visual change. New rules should prefer these names; old rules
     don't need retrofitting just to match a naming convention. */
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.12);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.22);
}

[data-theme='dark'] {
  --bg-primary: #0b0c10;
  --bg-secondary: #14151b;
  --bg-tertiary: #1c1e26;
  --bg-elevated: rgba(255,255,255,0.05);
  --border-subtle: rgba(255,255,255,0.09);
  --text-primary: #f3f4f6;
  --text-secondary: #9ba0aa;
  --text-muted: #6c7078;
  --accent: #7c6bf0;
  --accent-hover: #8f80f4;
  --accent-soft: rgba(124,107,240,0.16);
  --accent-2: #45c9c0;
  --danger: #f0575c;
  --success: #4fd1a5;
  --shadow-elevated: 0 12px 40px rgba(0,0,0,0.4);
  --glass-bg: rgba(20,21,27,0.65);
  --nav-bg: rgba(11,12,16,0.72);
  /* Design-system aliases, see :root -- mapped per theme since these
     values are theme-dependent. */
  --bg: var(--bg-primary);
  --surface: var(--bg-secondary);
  --surface-elevated: var(--bg-tertiary);
  --border: var(--border-subtle);
  --muted: var(--text-muted);
}

[data-theme='light'] {
  --bg-primary: #f8f8fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef0f5;
  --bg-elevated: rgba(0,0,0,0.035);
  --border-subtle: rgba(0,0,0,0.09);
  --text-primary: #1a1c22;
  --text-secondary: #5b5f68;
  --text-muted: #8a8e96;
  --accent: #6a58e8;
  --accent-hover: #5b48d9;
  --accent-soft: rgba(106,88,232,0.12);
  --accent-2: #189489;
  --danger: #d9484d;
  --success: #1f9d74;
  --shadow-elevated: 0 12px 40px rgba(20,20,30,0.12);
  --glass-bg: rgba(255,255,255,0.75);
  --nav-bg: rgba(255,255,255,0.78);
  --bg: var(--bg-primary);
  --surface: var(--bg-secondary);
  --surface-elevated: var(--bg-tertiary);
  --border: var(--border-subtle);
  --muted: var(--text-muted);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-med), color var(--transition-med);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,p { margin: 0; }
img, svg { display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: var(--radius-md); transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast); white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-tertiary); }
.btn-ghost { color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 72px; display: flex; align-items: center; transition: background var(--transition-med), border-color var(--transition-med), height var(--transition-med); border-bottom: 1px solid transparent; }
.navbar.scrolled { background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--border-subtle); height: 64px; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14px; color: var(--text-secondary); font-weight: 500; transition: color var(--transition-fast); }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-burger { display: none; width: 38px; height: 38px; border-radius: 8px; align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--text-primary); border-radius: 2px; position: relative; }
.nav-burger span::before, .nav-burger span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform var(--transition-fast); }
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }
.mobile-menu { position: fixed; top: 64px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border-subtle); padding: 18px 24px 26px; display: none; flex-direction: column; gap: 16px; z-index: 199; box-shadow: var(--shadow-elevated); }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 15px; color: var(--text-primary); font-weight: 500; }
.theme-toggle { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: background var(--transition-fast); }
.theme-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Hero */
.hero { padding: 168px 0 100px; overflow: hidden; position: relative; }
.hero-bg-glow { position: absolute; top: -180px; right: -160px; width: 560px; height: 560px; background: radial-gradient(circle, var(--accent-soft), transparent 70%); filter: blur(10px); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 20px; margin-bottom: 22px; }
.hero h1 { font-size: 52px; line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 20px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 17px; line-height: 1.6; color: var(--text-secondary); max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }
.hero-meta { display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.dot-success { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }

/* Chat preview mock */
.chat-preview { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); box-shadow: var(--shadow-elevated); overflow: hidden; }
.chat-preview-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border-subtle); }
.chat-preview-dot { width: 9px; height: 9px; border-radius: 50%; }
.chat-preview-dot.r { background: #f0575c; } .chat-preview-dot.y { background: #eebb3c; } .chat-preview-dot.g { background: #4fd1a5; }
.chat-preview-title { margin-left: 6px; font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.chat-preview-body { padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; min-height: 300px; }
.cp-msg { display: flex; gap: 10px; align-items: flex-start; opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease; }
.cp-msg.show { opacity: 1; transform: translateY(0); }
.cp-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.cp-avatar.a { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.cp-avatar.u { background: var(--bg-tertiary); color: var(--text-primary); }
.cp-bubble { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: 10px 14px; font-size: 13.5px; line-height: 1.5; max-width: 78%; }
.cp-msg.user { flex-direction: row-reverse; }
.cp-msg.user .cp-bubble { background: var(--accent-soft); }
.cp-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.cp-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: bounce 1.1s infinite ease-in-out; }
.cp-typing span:nth-child(2) { animation-delay: 0.15s; } .cp-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-preview-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border-subtle); }
.chat-preview-input input { flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: 20px; padding: 9px 14px; font-size: 13px; }
.cp-send { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Logos strip */
.logo-strip { padding: 34px 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.logo-strip-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; }
.logo-strip span { font-size: 12.5px; color: var(--text-muted); }
.logo-strip-items { display: flex; gap: 30px; flex-wrap: wrap; }
.logo-strip-items span { font-weight: 600; font-size: 14px; color: var(--text-secondary); }

/* Section heading */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-tag { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; display: block; }
.section-head h2 { font-size: 34px; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 15.5px; line-height: 1.6; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 26px 24px; transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med); }
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-elevated); }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.feature-card h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 30px 26px; display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow-elevated); }
.price-badge { position: absolute; top: -12px; right: 24px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.price-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.price-card .price { font-size: 34px; font-weight: 700; margin: 14px 0 4px; }
.price-card .price small { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.price-card .price-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 22px; }
.price-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; flex: 1; }
.price-features li { font-size: 13.5px; color: var(--text-secondary); display: flex; gap: 8px; align-items: flex-start; }
.price-features li svg { flex-shrink: 0; margin-top: 2px; color: var(--success); }
.coming-soon-tag { font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border-subtle); padding: 3px 10px; border-radius: 20px; display: inline-block; margin-bottom: 14px; align-self: flex-start; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: var(--radius-xl); padding: 60px 50px; text-align: center; color: #fff; }
.cta-band h2 { font-size: 30px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.cta-band p { font-size: 15px; opacity: 0.9; margin-bottom: 26px; }
.cta-band .btn-primary { background: #fff; color: var(--accent); }
.cta-band .btn-primary:hover { background: #f2f2f2; }

/* Footer */
.footer { padding: 64px 0 34px; border-top: 1px solid var(--border-subtle); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 46px; }
.footer-brand p { font-size: 13.5px; color: var(--text-secondary); margin-top: 12px; max-width: 260px; line-height: 1.6; }
.footer-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--text-secondary); transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--border-subtle); font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; gap: 10px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 680px) {
  .hero { padding: 130px 0 70px; }
  .hero h1 { font-size: 32px; }
  .hero p.lead { font-size: 15.5px; }
  .hero-actions .btn { flex: 1; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 26px; }
  .cta-band { padding: 44px 26px; }
  .nav-burger { display: flex; }
  .navbar { height: 64px; }
  .logo-strip-inner { justify-content: center; text-align: center; }
}
