/* ==========================================================================
   Flowzco — Design System
   Deep green + purple + white/dark, glassmorphism, premium SaaS aesthetic
   ========================================================================== */

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

:root {
  /* Brand colors — deep navy / indigo / emerald, no neon */
  --green: #10b981;
  --green-light: #34d399;
  --green-dim: #059669;
  --purple: #6366f1;
  --purple-light: #818cf8;
  --purple-dim: #4f46e5;

  /* Neutrals */
  --white: #ffffff;
  --bg: #0b1120;
  --bg-alt: #0e1626;
  --bg-elevated: #131b2e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f1f5f9;
  --text-dim: rgba(241, 245, 249, 0.66);
  --text-dimmer: rgba(241, 245, 249, 0.42);

  /* Light section neutrals */
  --light-bg: #f8fafc;
  --light-bg-alt: #f1f5f9;
  --light-text: #0b1120;
  --light-text-dim: rgba(11, 17, 32, 0.62);
  --light-border: rgba(11, 17, 32, 0.08);
  --light-surface: rgba(11, 17, 32, 0.03);

  /* Flat brand fills — no gradients anywhere on this site */
  --brand-solid: var(--purple);
  --brand-tint: rgba(99, 102, 241, 0.1);

  /* Shadows — soft and neutral, no colored glow */
  --glow-green: 0 0 30px rgba(16, 185, 129, 0.12);
  --glow-purple: 0 0 30px rgba(99, 102, 241, 0.12);
  --glow-brand: 0 10px 40px rgba(11, 17, 32, 0.25);
  --shadow-card: 0 8px 24px rgba(6, 9, 18, 0.28);
  --shadow-card-light: 0 8px 24px rgba(11, 17, 32, 0.07);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Type */
  --font-heading: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
body.is-loaded { opacity: 1; }

img, svg { display: block; max-width: 100%; }

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

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

input, select { font-family: inherit; }

::selection { background: var(--purple); color: white; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--purple-dim); }

/* ==========================================================================
   Layout helpers
   ========================================================================== */

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

.section { position: relative; padding: 120px 0; overflow: hidden; }
.section--tight { padding: 90px 0; }
.section-dark { background: var(--bg); color: var(--text); }
.section-dark-alt { background: var(--bg-alt); color: var(--text); }
.section-light { background: var(--light-bg); color: var(--light-text); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--green-light);
  margin-bottom: 22px;
}
.section-light .eyebrow { border-color: var(--light-border); background: var(--light-surface); color: var(--green-dim); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-solid); }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }

h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 16px; }
h3 { font-size: 22px; margin-bottom: 10px; }

p { color: var(--text-dim); }
.section-light p { color: var(--light-text-dim); }

.text-gradient { color: var(--purple-light); }

.lede { font-size: 18px; color: var(--text-dim); max-width: 620px; }
.section-light .lede { color: var(--light-text-dim); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-full);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--brand-solid);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(11, 17, 32, 0.22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(11, 17, 32, 0.3); }

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: var(--surface-hover); transform: translateY(-2px); border-color: rgba(255,255,255,0.28); }

.section-light .btn-secondary { background: var(--light-surface); border-color: var(--light-border); color: var(--light-text); }
.section-light .btn-secondary:hover { background: rgba(11,11,20,0.06); }

.btn-ghost { background: transparent; color: var(--text-dim); padding: 10px 16px; }
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ==========================================================================
   Glass / cards / glow
   ========================================================================== */

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--r-lg);
}

.section-light .glass {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-card-light);
}

.card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
  box-shadow: var(--shadow-card);
}

.section-light .card { background: #ffffff; border: 1px solid var(--light-border); box-shadow: var(--shadow-card-light); }
.section-light .card:hover { box-shadow: 0 12px 28px rgba(11,17,32,0.09); border-color: rgba(99,102,241,0.25); }

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  color: var(--green-light);
}
.card-icon svg { width: 24px; height: 24px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-full);
  background: rgba(16,185,129,0.12); color: var(--green-light);
  border: 1px solid rgba(16,185,129,0.24);
}
.badge-purple { background: rgba(99,102,241,0.12); color: var(--purple-light); border-color: rgba(99,102,241,0.26); }
.badge-soon { background: rgba(255,255,255,0.07); color: var(--text-dimmer); border-color: var(--border); }

/* Very subtle ambient wash — used sparingly, hero only */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.16;
  z-index: 0;
}
.glow-green { background: var(--green); }
.glow-purple { background: var(--purple); }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(6, 6, 10, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.navbar.is-scrolled { background: rgba(6, 6, 10, 0.86); box-shadow: 0 10px 40px rgba(0,0,0,0.4); }

.navbar .container { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand-solid);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(6, 9, 18, 0.35);
  position: relative;
  transition: transform 0.4s var(--ease);
}
.brand-mark svg { width: 22px; height: 22px; overflow: visible; transition: transform 0.5s var(--ease); }
.brand-mark svg .ghost-body { fill: #ffffff; }
.brand-mark svg .ghost-eyes circle { fill: var(--green); }
.brand:hover .brand-mark { transform: scale(1.06); }
.brand:hover .brand-mark svg { transform: rotate(14deg); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 9px 16px;
  font-size: 14.5px; font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--r-full);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-links a:hover { color: var(--green-light); background: rgba(255,255,255,0.06); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute; left: 16px; right: 16px; bottom: 3px; height: 2px;
  border-radius: var(--r-full);
  background: var(--brand-solid);
}

/* ---------- Workforce nav dropdown (Manage / Flowspace) ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 5px;
  position: relative;
  padding: 9px 16px;
  font-size: 14.5px; font-weight: 500;
  color: var(--text-dim);
  border-radius: var(--r-full);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-dropdown-trigger:hover { color: var(--green-light); background: rgba(255,255,255,0.06); }
.nav-dropdown-trigger .chev { width: 13px; height: 13px; transition: transform 0.3s var(--ease); }
.nav-dropdown.is-open .nav-dropdown-trigger .chev,
.nav-dropdown:hover .nav-dropdown-trigger .chev { transform: rotate(180deg); }

/* The outer menu starts flush against the trigger (top:100%, zero gap) so
   hovering straight down from "Workforce" never leaves a dead zone that
   would close the menu — no click required. Its own padding-top provides
   the visual breathing room instead of a positional gap; the inner card is
   what actually animates in. */
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  width: 280px;
  padding-top: 12px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: visibility 0.22s;
  z-index: 1100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.nav-dropdown-card {
  background: rgba(10, 12, 20, 0.98);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  padding: 8px;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.nav-dropdown:hover .nav-dropdown-card,
.nav-dropdown.is-open .nav-dropdown-card {
  opacity: 1; transform: translateY(0);
}
.dropdown-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border-radius: var(--r-md);
  transition: background 0.2s var(--ease);
}
.dropdown-item:hover { background: rgba(255,255,255,0.06); }
.dropdown-item.active { background: rgba(255,255,255,0.05); }
.dropdown-item .di-icon {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--purple-light);
}
.dropdown-item .di-icon svg { width: 17px; height: 17px; }
.dropdown-item .di-copy { display: flex; flex-direction: column; gap: 2px; }
.dropdown-item .di-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.dropdown-item .di-desc { font-size: 12.5px; color: var(--text-dimmer); line-height: 1.4; }

/* No browser-default focus ring (shows as a colored outline the instant a
   link is clicked/selected) — the hover/active background is feedback
   enough here. */
.dropdown-item:focus,
.nav-dropdown-trigger:focus,
.nav-links a:focus,
.notif-bell-btn:focus { outline: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Notification bell (appears after a simulated log in) ---------- */
.notif-bell { position: relative; }
.notif-bell-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); transition: all 0.25s var(--ease);
}
.notif-bell-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.notif-bell-btn svg { width: 18px; height: 18px; }
.notif-dot { display: none; position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--green-light); border: 1.5px solid var(--bg); }
.notif-bell.has-dot .notif-dot { display: block; }
.notif-panel {
  position: absolute; top: calc(100% + 12px); right: 0; width: 300px;
  background: rgba(10, 12, 20, 0.98); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 1100;
}
.notif-bell.is-open .notif-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-panel-head { padding: 10px 12px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmer); }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); }
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-light); flex: none; margin-top: 5px; }
.notif-item-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.notif-item-desc { font-size: 12.5px; color: var(--text-dimmer); margin-top: 2px; line-height: 1.5; }
.notif-panel-foot { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }
.notif-signout { width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; font-weight: 600; color: var(--text-dim); transition: all 0.2s var(--ease); }
.notif-signout:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
}
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(8, 8, 13, 0.98);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px 26px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu > a { padding: 12px 8px; font-size: 16px; font-weight: 500; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-menu > a.active { color: var(--green-light); }
.mobile-menu .mobile-group { border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
.mobile-menu .mobile-group-label { display: block; padding: 12px 8px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmer); }
.mobile-menu .mobile-sublink { display: block; padding: 10px 8px 10px 20px; font-size: 15px; font-weight: 500; color: var(--text-dim); }
.mobile-menu .mobile-sublink.active { color: var(--green-light); }
.mobile-menu .mobile-actions { display: flex; gap: 10px; margin-top: 14px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions .only-desktop { display: none !important; }
  .nav-toggle { display: flex; }
}
@media (min-width: 901px) { .mobile-menu { display: none !important; } }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { background: #050508; border-top: 1px solid rgba(255,255,255,0.06); padding: 70px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 50px; }
.footer-brand p { margin-top: 14px; max-width: 280px; font-size: 14.5px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dimmer); margin-bottom: 16px; font-family: var(--font-body); font-weight: 600; }
.footer-col a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--text-dim); transition: color 0.25s; }
.footer-col a:hover { color: var(--green-light); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 13.5px; color: var(--text-dimmer); flex-wrap: wrap; gap: 14px; }
.footer-bottom .legal-links { display: flex; gap: 22px; }
.footer-bottom .legal-links a { color: var(--text-dimmer); }
.footer-bottom .legal-links a:hover { color: var(--text); }

@media (max-width: 800px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Success overlay — animated checkmark for publish / purchase confirmations
   ========================================================================== */
.success-overlay {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 18, 0.6); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.success-overlay.is-visible { opacity: 1; pointer-events: auto; }
.success-card {
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); padding: 46px 54px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  transform: scale(0.9); transition: transform 0.35s var(--ease);
}
.success-overlay.is-visible .success-card { transform: scale(1); }
.success-check-svg { width: 84px; height: 84px; }
.success-check-svg .sc-circle {
  fill: none; stroke: var(--green); stroke-width: 3;
  stroke-linecap: round; stroke-dasharray: 166; stroke-dashoffset: 166;
}
.success-check-svg .sc-check {
  fill: none; stroke: var(--green-light); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
}
.success-overlay.is-visible .success-check-svg .sc-circle {
  animation: scDrawCircle 0.5s var(--ease) 0.05s forwards;
}
.success-overlay.is-visible .success-check-svg .sc-check {
  animation: scDrawCheck 0.35s var(--ease) 0.5s forwards;
}
@keyframes scDrawCircle { to { stroke-dashoffset: 0; } }
@keyframes scDrawCheck { to { stroke-dashoffset: 0; } }
.success-message { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--text); opacity: 0; transform: translateY(6px); transition: opacity 0.3s var(--ease) 0.55s, transform 0.3s var(--ease) 0.55s; }
.success-overlay.is-visible .success-message { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: 0.08s; }
.reveal-delay-2.is-visible { transition-delay: 0.16s; }
.reveal-delay-3.is-visible { transition-delay: 0.24s; }
.reveal-delay-4.is-visible { transition-delay: 0.32s; }
.reveal-delay-5.is-visible { transition-delay: 0.4s; }

/* ==========================================================================
   Utility
   ========================================================================== */

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.w-full { width: 100%; }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .footer-top { grid-template-columns: 1fr; }
}
