/* =================================================================
   Rebalance Engine — Landing Page Styles
   Brand: dark navy #0a1628, blue accent #3B82F6, teal gradient
   ================================================================= */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0a1628;
  --navy-2:  #111d33;
  --navy-3:  #162440;
  --surface: #1a2a45;
  --border:  rgba(255, 255, 255, 0.08);
  --text:    #c8d6e5;
  --text-2:  #8b9cb8;
  --white:   #f0f4f8;
  --blue:    #3B82F6;
  --blue-2:  #2563EB;
  --teal:    #06b6d4;
  --green:   #10b981;
  --red:     #f87171;
  --radius:  12px;
  --radius-lg: 20px;
  --shadow:  0 4px 24px rgba(0,0,0,0.25);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Utility ──────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-sm {
  font-size: 0.875rem;
  padding: 8px 18px;
  background: var(--blue);
  color: #fff;
}
.btn-sm:hover { background: var(--blue-2); }

.btn-lg {
  font-size: 1rem;
  padding: 14px 32px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 24px rgba(59,130,246,0.25);
}
.btn-primary:hover {
  background: var(--blue-2);
  box-shadow: 0 0 32px rgba(59,130,246,0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
}

/* ── Nav ──────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-icon {
  border-radius: 6px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
  /* Subtle grid background */
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(59,130,246,0.12);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.2);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

/* Hero visual — animated score card */
.hero-visual {
  max-width: 480px;
  margin: 0 auto;
}

.score-card {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow), 0 0 80px rgba(59,130,246,0.08);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.score-row:last-child { margin-bottom: 0; }

.score-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-2);
  min-width: 90px;
  text-align: left;
}

.score-bar {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.bar {
  height: 100%;
  border-radius: 100px;
  animation: growBar 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: left;
  transform: scaleX(0);
}

.bar-drift  { background: linear-gradient(90deg, #3B82F6, #60a5fa); animation-delay: 0.1s; }
.bar-tax    { background: linear-gradient(90deg, #10b981, #06b6d4); animation-delay: 0.25s; }
.bar-signal { background: linear-gradient(90deg, #94a3b8, #cbd5e1); animation-delay: 0.4s; }
.bar-total  { background: linear-gradient(90deg, #3B82F6, #10b981); animation-delay: 0.55s; }
.bar-wash   { background: linear-gradient(90deg, #fca5a5, #f87171); animation-delay: 0.7s; }

.bar-wash-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wash-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
}

@keyframes growBar {
  to { transform: scaleX(1); }
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--navy));
  z-index: 1;
}

/* ── Features ─────────────────────────────────────────────────── */
.features {
  padding: 80px 0 100px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--white);
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(59,130,246,0.1);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(59,130,246,0.1);
  color: var(--blue);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── CTA ──────────────────────────────────────────────────────── */
.cta {
  padding: 80px 0;
}

.cta-inner {
  text-align: center;
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
}

.cta p {
  font-size: 1.125rem;
  color: var(--text-2);
  margin-bottom: 28px;
  position: relative;
}

.cta .btn { position: relative; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--white);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-2);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero { padding: 130px 0 60px; }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .score-card {
    padding: 20px 18px;
  }
  .score-label {
    min-width: 72px;
    font-size: 0.65rem;
  }
  .cta-inner {
    padding: 48px 24px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
