/* ========================================
   FLOWBOARD — Landing Page
   ======================================== */

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

:root {
  --bg: #080810;
  --surface: #0f0f1a;
  --surface-hover: #151525;
  --border: #1a1a2e;
  --border-light: #252540;
  --green: #00e87b;
  --green-dim: rgba(0, 232, 123, 0.15);
  --purple: #8b5cf6;
  --purple-dim: rgba(139, 92, 246, 0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);
  --pink: #ec4899;
  --pink-dim: rgba(236, 72, 153, 0.15);
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --muted: #64748b;
  --danger: #ef4444;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ========== NAV ========== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav-scrolled {
  background: rgba(8, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.logo-sm { font-size: 1rem; }

.logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--green), var(--purple));
  border-radius: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  padding: 4px;
  flex-shrink: 0;
}

.logo-icon span { border-radius: 2px; }
.logo-icon span:nth-child(1) { background: rgba(255,255,255,0.9); }
.logo-icon span:nth-child(2) { background: rgba(255,255,255,0.4); }
.logo-icon span:nth-child(3) { background: rgba(255,255,255,0.4); }
.logo-icon span:nth-child(4) { background: rgba(255,255,255,0.9); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-secondary, #94a3b8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text, #e2e8f0);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--green);
  color: #080810;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 232, 123, 0.3);
}

.nav-cta .arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.nav-cta:hover .arrow {
  transform: translateX(3px);
}

/* ========== HERO ========== */

.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  position: relative;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

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

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--green), #00c868);
  color: #080810;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Space Grotesk', sans-serif;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 232, 123, 0.3);
}

.btn-hero .arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.btn-hero:hover .arrow {
  transform: translateX(4px);
}

.btn-hero-lg {
  font-size: 1.1rem;
  padding: 16px 40px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--surface);
}

/* ========== PREVIEW ========== */

.preview-wrapper {
  max-width: 820px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0,232,123,0.06);
  position: relative;
}

.preview-chrome {
  background: var(--surface);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
}

.preview-dots span:first-child { background: #ef4444; opacity: 0.6; }
.preview-dots span:nth-child(2) { background: #f59e0b; opacity: 0.6; }
.preview-dots span:nth-child(3) { background: #22c55e; opacity: 0.6; }

.preview-url {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: 'DM Sans', monospace;
  padding: 4px 12px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.preview-board {
  background: var(--bg);
  aspect-ratio: 800 / 340;
}

.preview-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========== PAIN POINTS ========== */

.pain-points {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
}

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

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pain-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pain-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pain-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pain-icon-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pain-tool {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pain-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pain-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pain-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.solve-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.solve-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0, 232, 123, 0.2);
  flex-shrink: 0;
}

.solve-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.solve-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.solve-desc strong {
  color: var(--text);
}

/* ========== FEATURES ========== */

.features {
  padding: 60px 0 100px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--border-light);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--fc) 10%, transparent);
  color: var(--fc);
  border: 1px solid color-mix(in srgb, var(--fc) 18%, transparent);
  margin-bottom: 16px;
}

.feature-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

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

/* ========== CTA ========== */

.cta-section {
  padding: 0 0 120px;
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 64px 40px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 232, 123, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}

.cta-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  position: relative;
}

.cta-card .btn-hero {
  position: relative;
  margin-bottom: 28px;
}

.cta-tiles {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.hero-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(0,232,123,0.2); }
.chip-amber { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.chip-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(139,92,246,0.2); }
.chip-pink { background: var(--pink-dim); color: var(--pink); border: 1px solid rgba(236,72,153,0.2); }

/* ========== FOOTER ========== */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer-tagline {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--text);
}

/* ========== WAITLIST FORM ========== */

.waitlist-form-wrapper {
  max-width: 480px;
  margin: 0 auto 24px;
  position: relative;
}

.waitlist-form {
  width: 100%;
}

.waitlist-input-group {
  display: flex;
  gap: 0;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.waitlist-input-group:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 232, 123, 0.12), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.waitlist-input {
  flex: 1;
  padding: 14px 18px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  min-width: 0;
}

.waitlist-input::placeholder {
  color: var(--muted);
}

.btn-waitlist {
  border-radius: 0 12px 12px 0;
  padding: 14px 24px;
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-waitlist:disabled {
  opacity: 0.8;
  cursor: wait;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
}

.btn-loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.waitlist-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

.waitlist-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: 14px;
  background: rgba(0, 232, 123, 0.08);
  border: 1px solid rgba(0, 232, 123, 0.2);
  animation: fadeInSuccess 0.4s ease;
}

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

.success-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 232, 123, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}

.success-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green);
}

.waitlist-error {
  font-size: 0.82rem;
  color: var(--danger);
  margin-top: 8px;
  text-align: center;
  animation: fadeInSuccess 0.3s ease;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 900px) {
  .pain-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .btn-hero, .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .waitlist-input-group {
    flex-direction: column;
    border-radius: 14px;
  }

  .waitlist-input {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }

  .btn-waitlist {
    border-radius: 0 0 12px 12px;
    justify-content: center;
    padding: 14px 24px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .cta-card {
    padding: 48px 24px;
  }

  .nav-inner {
    height: 56px;
  }

  .preview-wrapper {
    margin: 0 -12px;
    border-radius: 12px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
