/* ============================================================
   Fluxo — premium dark-mode SaaS hero
   Vanilla CSS3 · variables · flexbox · grid · glassmorphism
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --bg: #030303;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --brand-primary: #7c3aed;
  --brand-secondary: #3b82f6;

  --gradient-primary: linear-gradient(135deg, #8b5cf6, #3b82f6);
  --gradient-text: linear-gradient(135deg, #60a5fa, #c084fc, #f472b6);

  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px) saturate(180%);

  --nav-max-width: 1200px;
  --nav-height: 80px;
  --radius-pill: 100px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 3px;
  border-radius: 6px;
}

a {
  color: inherit;
}

/* ---------- 3D background ---------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 72% 15%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(900px 560px at 18% 85%, rgba(59, 130, 246, 0.12), transparent 62%),
    radial-gradient(700px 500px at 50% 45%, rgba(255, 0, 138, 0.05), transparent 60%);
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    filter 0.25s var(--ease);
}

.btn-arrow {
  transition: transform 0.25s var(--ease);
}

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

/* Primary gradient button */
.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.5);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Glass button */
.btn-glass {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ---------- Liquid glass navbar ---------- */
.navbar {
  position: sticky;
  top: 24px;
  z-index: 100;
  max-width: var(--nav-max-width);
  height: var(--nav-height);
  margin: 24px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.55));
}

/* Center links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.chevron {
  transition: transform 0.3s var(--ease);
}

.has-dropdown:hover .chevron {
  transform: rotate(180deg);
}

/* Right actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}

.nav-login {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.nav-login:hover {
  color: var(--text-primary);
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.hamburger.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile menu drawer (enabled ≤ 768px) ---------- */
.mobile-menu {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 0 60px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: badge-in 0.7s var(--ease) both;
}

.badge-new {
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}

.badge-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

/* Headline */
.hero-title {
  font-size: 4.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 900px;
  margin-bottom: 24px;
  animation: title-in 0.8s var(--ease) 0.08s both;
}

.gradient-text {
  color: #e879f9; /* fallback */
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(192, 132, 252, 0.28));
}

/* Subheadline */
.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
  animation: fade-up 0.8s var(--ease) 0.16s both;
}

/* CTAs */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  animation: fade-up 0.8s var(--ease) 0.24s both;
}

/* Trust microcopy (checkmarks) */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
  animation: fade-up 0.8s var(--ease) 0.32s both;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-trust .check {
  color: #a78bfa;
}

/* ---------- Social proof ---------- */
.social-proof {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px 0 80px;
  margin-top: 40px;
}

.trusted-by {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

/* Company logos */
.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
  color: #d4d4d8;
}

.logo {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease);
}

.logo:hover {
  opacity: 1;
}

.logos svg {
  height: 26px;
  width: auto;
}

/* Reviews */
.reviews {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stars {
  display: flex;
  gap: 5px;
}

.star {
  width: 20px;
  height: 20px;
  fill: #eab308;
}

.reviews-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Entrance animations ---------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes badge-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes title-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Responsive breakpoints
   ============================================================ */

/* ---------- 1024px — laptop ---------- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.8rem;
  }

  .logos {
    gap: 32px;
  }
}

/* ---------- 768px — tablet ---------- */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  /* Hide desktop nav + actions, show hamburger */
  .nav-links,
  .nav-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Mobile drawer */
  .mobile-menu {
    display: block;
    position: absolute;
    top: calc(80px + 24px);
    left: 0;
    width: 100%;
    padding: 12px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    transition:
      opacity 0.3s var(--ease),
      transform 0.3s var(--ease),
      visibility 0.3s;
  }

  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
  }

  .mobile-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
  }

  .mobile-menu-divider {
    height: 1px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 4px 4px;
  }

  .mobile-menu-actions .btn {
    width: 100%;
  }

  .mobile-menu .nav-login {
    padding: 4px 0;
    text-align: center;
  }

  /* Stack hero CTAs vertically */
  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero-cta .btn {
    width: 100%;
  }

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

/* ---------- 480px — mobile ---------- */
@media (max-width: 480px) {
  body {
    padding: 0 16px;
  }

  /* Shrink badge */
  .badge {
    font-size: 0.8rem;
    padding: 6px 12px 6px 6px;
    gap: 8px;
    margin-bottom: 24px;
  }

  .badge-new {
    font-size: 0.68rem;
    padding: 4px 9px;
  }

  /* Shrink title */
  .hero-title {
    font-size: 2.2rem;
  }

  /* Shrink buttons */
  .btn {
    font-size: 0.9rem;
    padding: 12px 20px;
  }

  .btn-lg {
    padding: 14px 24px;
  }

  /* Shrink logos */
  .logos {
    gap: 20px;
  }

  .logos svg {
    height: 22px;
  }

  /* Stack stars + text vertically */
  .reviews {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Hide "Log in" in the drawer */
  .mobile-menu .nav-login {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
