/* =============================================
   SUBR - Redesigned (Light & Colorful)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f8f9fc;
  --bg-alt: #f1f4f9;
  --bg-card: #ffffff;
  --border: #e8ecf2;
  --border-hover: #d0d7e2;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --blue: #2563eb;
  --blue-bg: #eef2ff;
  --blue-border: #c7d2fe;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --orange-border: #fed7aa;
  --teal: #0d9488;
  --teal-bg: #f0fdfa;
  --teal-border: #ccfbf1;
  --green: #16a34a;
  --pink: #db2777;
  --gradient-primary: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-warm: linear-gradient(135deg, #ea580c, #d97706);
  --gradient-teal: linear-gradient(135deg, #0d9488, #2563eb);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.1);
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  --nav-height: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--blue); color: #fff; }
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--purple); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.section { padding: 100px 0; }

/* Typography */
.heading-xl {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.heading-lg {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.heading-md {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 600;
  line-height: 1.35;
}
.text-body { font-size: 1rem; color: var(--text-secondary); line-height: 1.75; }
.text-sm { font-size: 0.875rem; color: var(--text-muted); }

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-warm {
  background: var(--gradient-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.section-label.blue {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}
.section-label.purple {
  background: var(--purple-bg);
  color: var(--purple);
  border: 1px solid var(--purple-border);
}
.section-label.orange {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}
.section-label.teal {
  background: var(--teal-bg);
  color: var(--teal);
  border: 1px solid var(--teal-border);
}

/* Section header */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font-sans);
}
.btn-primary {
  background: var(--text);
  color: #fff;
}
.btn-primary:hover { background: var(--blue); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
}
.btn-ghost:hover { color: var(--text); background: rgba(0,0,0,0.03); }

/* Navigation */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  background: rgba(248, 249, 252, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo .logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(0,0,0,0.03); }
.nav-links a.active { color: var(--blue); background: var(--blue-bg); }
.nav-links .nav-cta {
  padding: 8px 20px !important;
  background: var(--text) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  margin-left: 8px;
}
.nav-links .nav-cta:hover { background: var(--blue) !important; color: #fff !important; }
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-mobile span {
  display: block; width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* Reveal animations */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="100"] { transition-delay: 0.08s; }
.reveal[data-delay="200"] { transition-delay: 0.16s; }
.reveal[data-delay="300"] { transition-delay: 0.24s; }
.reveal[data-delay="400"] { transition-delay: 0.32s; }
.reveal[data-delay="500"] { transition-delay: 0.40s; }
.reveal[data-delay="600"] { transition-delay: 0.48s; }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Feature card */
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
  border: 1px solid;
}
.feature-icon.blue { background: var(--blue-bg); border-color: var(--blue-border); color: var(--blue); }
.feature-icon.purple { background: var(--purple-bg); border-color: var(--purple-border); color: var(--purple); }
.feature-icon.orange { background: var(--orange-bg); border-color: var(--orange-border); color: var(--orange); }
.feature-icon.teal { background: var(--teal-bg); border-color: var(--teal-border); color: var(--teal); }
.feature-icon.green { background: #f0fdf4; border-color: #bbf7d0; color: var(--green); }
.feature-icon.pink { background: #fdf2f8; border-color: #fbcfe8; color: var(--pink); }

/* Stats */
.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Page header (subpages) */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
}

/* Particle canvas */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
  margin-top: 12px;
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col li a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.footer-col li a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg); padding: 16px; gap: 2px;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open a { padding: 12px 16px; }
  .nav-links .nav-cta { margin-left: 0; margin-top: 4px; text-align: center; }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .container { padding: 0 20px; }
}
@media (max-width: 480px) {
  .page-header { padding: 100px 0 40px; }
}

/* Code block */
.code-window {
  background: #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: #e2e8f0;
}
.code-window .window-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.code-window .window-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.code-window .window-body { padding: 20px 24px; overflow-x: auto; }
.code-window .kw  { color: #93c5fd; }
.code-window .str { color: #a7f3d0; }
.code-window .fn  { color: #fde68a; }
.code-window .cm  { color: #475569; font-style: italic; }
.code-window .num { color: #fca5a5; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  cursor: pointer;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1rem;
  color: var(--text);
  user-select: none;
}
.faq-question .arrow {
  font-size: 1.2rem;
  transition: transform 0.3s;
  color: var(--text-muted);
}
.faq-item.open .faq-question .arrow { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 12px;
}
