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

:root {
  --bg: #0a0a0c;
  --bg2: #111115;
  --bg3: #18181e;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #f0eff5;
  --muted: rgba(240,239,245,0.45);
  --dim: rgba(240,239,245,0.25);
  --coral: #FF6B6B;
  --amber: #FFB347;
  --sage: #6BCB77;
  --blue: #4D96FF;
  --lavender: #C77DFF;
  --teal: #48CAE4;
  --pink: #FF6B9D;
  --mint: #52D9B5;
  --accent: #4D96FF;
}

html { scroll-behavior: smooth; }

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

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 60px;
  background: rgba(10,10,12,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 600; color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 28px; height: 28px;
}

nav a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }

.nav-links { display: flex; gap: 2rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: #3d86ef; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { background: var(--bg3); }

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

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 2rem 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse at center top, rgba(77,150,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 100px;
  background: rgba(77,150,255,0.1);
  border: 1px solid rgba(77,150,255,0.2);
  font-size: 12px; color: var(--blue);
  margin-bottom: 2rem; font-weight: 500;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600; line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--coral) 0%, var(--amber) 25%, var(--sage) 50%, var(--blue) 75%, var(--lavender) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem; color: var(--muted);
  max-width: 520px; margin-bottom: 2.5rem;
  font-weight: 300; line-height: 1.7;
}

.hero-cta {
  display: flex; gap: 12px; align-items: center;
  flex-wrap: wrap; justify-content: center;
  margin-bottom: 1rem;
}

.price-note {
  font-size: 13px; color: var(--dim);
}

/* APP MOCKUP */
.mockup-wrap {
  margin-top: 5rem;
  width: 100%; max-width: 900px;
  position: relative;
}

.mockup-glow {
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(77,150,255,0.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

.mockup {
  position: relative; z-index: 1;
  background: var(--bg2);
  border-radius: 16px;
  border: 1px solid var(--border2);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}

.mockup-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.mockup-inner {
  display: flex; height: 480px;
}

.mockup-sidebar {
  width: 200px; min-width: 200px;
  background: rgba(255,255,255,0.02);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
}

.sidebar-section { margin-bottom: 24px; }

.sidebar-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  color: var(--dim); text-transform: uppercase; margin-bottom: 10px;
}

.volume-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 10px; padding: 12px;
  margin-bottom: 8px;
}

.volume-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.volume-size { font-size: 11px; color: var(--muted); margin-bottom: 8px; }

.vol-bar-bg {
  height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px;
  margin-bottom: 6px; overflow: hidden;
}
.vol-bar-fill {
  height: 100%; width: 77%;
  background: linear-gradient(90deg, var(--blue), var(--lavender));
  border-radius: 2px;
}
.vol-free { font-size: 10px; color: var(--dim); }

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 6px;
  font-size: 13px; color: var(--muted);
  cursor: pointer; transition: all 0.15s;
  margin-bottom: 2px;
}
.sidebar-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }

.mockup-main { flex: 1; position: relative; overflow: hidden; }

/* Treemap visualization */
.treemap {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 160px 60px;
  gap: 2px; padding: 2px;
}

.tile {
  border-radius: 6px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 12px; cursor: pointer;
  transition: filter 0.15s;
}
.tile:hover { filter: brightness(1.1); }

.tile-name { font-size: 13px; font-weight: 500; color: rgba(0,0,0,0.8); }
.tile-size { font-size: 11px; color: rgba(0,0,0,0.6); margin-top: 2px; }

.tile-row { display: flex; gap: 2px; }
.tile-row .tile { flex: 1; }

/* FEATURES */
section { padding: 6rem 2rem; }

.section-inner { max-width: 1100px; margin: 0 auto; }

.section-tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.2; margin-bottom: 1rem;
}

.section-sub {
  font-size: 1rem; color: var(--muted); max-width: 500px;
  font-weight: 300; line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  margin-top: 4rem;
}

.feature-card {
  background: var(--bg2);
  padding: 2rem;
  transition: background 0.2s;
}
.feature-card:hover { background: var(--bg3); }

.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem; font-size: 18px;
}

.feature-title {
  font-size: 16px; font-weight: 500; margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 14px; color: var(--muted); line-height: 1.65; font-weight: 300;
}

/* VIZ SHOWCASE */
.viz-section { background: var(--bg); }

.viz-tabs {
  display: flex; gap: 8px; margin-top: 3rem; flex-wrap: wrap;
}

.viz-tab {
  padding: 8px 16px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--border2); color: var(--muted);
  cursor: pointer; background: transparent; font-family: inherit;
  transition: all 0.15s;
}
.viz-tab.active, .viz-tab:hover {
  background: var(--bg3); color: var(--text);
  border-color: var(--border2);
}
.viz-tab.active { border-color: var(--accent); color: var(--accent); }

.viz-display {
  margin-top: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  height: 320px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

/* PRICING */
.pricing-section { background: var(--bg); }

.pricing-card {
  max-width: 420px; margin: 3rem auto 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px; overflow: hidden;
}

.pricing-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pricing-label { font-size: 12px; color: var(--muted); margin-bottom: 0.5rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }
.pricing-price { font-size: 3.5rem; font-weight: 600; letter-spacing: -0.04em; }
.pricing-price span { font-size: 1.2rem; font-weight: 400; color: var(--muted); vertical-align: top; padding-top: 12px; display: inline-block; }
.pricing-desc { font-size: 14px; color: var(--muted); margin-top: 0.5rem; }

.pricing-features { padding: 1.5rem 2rem 2rem; }

.pricing-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; font-size: 14px; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.pricing-item:last-child { border-bottom: none; }

.check {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(107,203,119,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.check::after {
  content: '';
  width: 5px; height: 9px;
  border: 1.5px solid var(--sage);
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  display: block;
}

.pricing-cta { padding: 0 2rem 2rem; }
.pricing-cta .btn { width: 100%; justify-content: center; font-size: 15px; padding: 14px; }

.pricing-note { text-align: center; font-size: 12px; color: var(--dim); margin-top: 1rem; }

/* WAITLIST */
.waitlist-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.waitlist-inner {
  max-width: 560px; margin: 0 auto; text-align: center;
}

.waitlist-form {
  display: flex; gap: 10px; margin-top: 2rem; flex-wrap: wrap;
  justify-content: center;
}

.waitlist-input {
  flex: 1; min-width: 220px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 12px 16px;
  font-family: inherit; font-size: 14px; color: var(--text);
  outline: none; transition: border-color 0.2s;
}
.waitlist-input::placeholder { color: var(--dim); }
.waitlist-input:focus { border-color: var(--accent); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}

.footer-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: var(--muted);
  text-decoration: none;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 13px; color: var(--dim); text-decoration: none; }
.footer-links a:hover { color: var(--muted); }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero > * { animation: fadeUp 0.6s ease both; }
.hero > *:nth-child(1) { animation-delay: 0.1s; }
.hero > *:nth-child(2) { animation-delay: 0.2s; }
.hero > *:nth-child(3) { animation-delay: 0.3s; }
.hero > *:nth-child(4) { animation-delay: 0.4s; }
.hero > *:nth-child(5) { animation-delay: 0.5s; }
.hero > *:nth-child(6) { animation-delay: 0.6s; }

/* SUNBURST SVG */
.sunburst-svg { 
  width: 260px; 
  height: 260px; 
  flex-shrink: 0;
}

/* Sunburst container layout */
#viz-sunburst {
  flex-direction: row;
  gap: 2rem;
  padding: 1.5rem;
}

.sunburst-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sunburst-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.sunburst-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sunburst-legend-size {
  margin-left: auto;
  color: var(--dim);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
}

/* Bar chart styles */
.barchart-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  justify-content: center;
  padding: 1.5rem;
}

.barchart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.barchart-label {
  width: 80px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.barchart-bar {
  flex: 1;
  height: 28px;
  border-radius: 4px;
  min-width: 8px;
}

.barchart-size {
  width: 55px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--dim);
  text-align: right;
  flex-shrink: 0;
}

/* Color palette dots */
.palette { display: flex; gap: 4px; margin-top: 8px; }
.palette-dot { width: 8px; height: 8px; border-radius: 50%; }

@media (max-width: 768px) {
  /* Sunburst mobile: stack vertically */
  #viz-sunburst {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
  }

  .sunburst-svg {
    width: 180px;
    height: 180px;
  }

  .sunburst-legend {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }

  .sunburst-legend-item {
    font-size: 11px;
  }

  .sunburst-legend-size {
    display: none;
  }

  /* Bar chart mobile: narrower labels */
  .barchart-label {
    width: 60px;
    font-size: 11px;
  }

  .barchart-size {
    width: 50px;
    font-size: 10px;
  }

  .barchart-bar {
    height: 22px;
  }

  .barchart-container {
    padding: 1rem;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .mockup-sidebar { display: none; }
  footer { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  /* Sunburst extra small */
  .sunburst-svg {
    width: 150px;
    height: 150px;
  }

  /* Bar chart extra small */
  .barchart-label {
    width: 50px;
    font-size: 10px;
  }

  .barchart-size {
    width: 45px;
    font-size: 9px;
  }

  .barchart-bar {
    height: 18px;
  }

  .barchart-row {
    gap: 8px;
  }
}
