/* ============================================================
   ManningFlow — Design System & Effects
   Premium, dark, AI-era aesthetic. Glassmorphism + subtle motion.
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-soft: #0a0e1a;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-violet: #8b5cf6;
  --text: #e7ecf5;
  --text-muted: #94a3b8;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent-blue);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Background canvas ---------- */
.bg-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 55%, transparent 100%);
}

.glow-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(110px);
  opacity: 0.35;
  pointer-events: none;
  will-change: transform;
}
.glow-cyan { background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 65%); }
.glow-blue { background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 65%); }
.glow-violet { background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 65%); }

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-strong {
  background: rgba(10, 14, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.glass-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1.25rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 18px 50px -18px rgba(59, 130, 246, 0.35);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
}

/* ---------- Gradient text & borders ---------- */
.gradient-text {
  background: linear-gradient(92deg, #22d3ee 0%, #60a5fa 45%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-border {
  position: relative;
  border-radius: 1.25rem;
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(59, 130, 246, 0.45), rgba(139, 92, 246, 0.55)) border-box;
  border: 1px solid transparent;
}

.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.28), transparent);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(92deg, #0ea5e9, #3b82f6 55%, #7c3aed);
  background-size: 160% 100%;
  box-shadow: 0 8px 28px -8px rgba(59, 130, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background-position 0.4s ease, transform 0.25s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}
.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -10px rgba(59, 130, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}

/* ---------- Nav ---------- */
.nav-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.15rem;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current='page'] { color: var(--text); }
.nav-link[aria-current='page']::after { transform: scaleX(1); }

/* ---------- Badges / eyebrows ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ---------- Icon tiles ---------- */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.14));
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: #7dd3fc;
  flex-shrink: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Marquee (social proof strip) ---------- */
.marquee {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-mask {
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Accordion ---------- */
.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.accordion-panel > div { overflow: hidden; }
.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }
.accordion-item .accordion-chevron { transition: transform 0.3s ease; }
.accordion-item.is-open .accordion-chevron { transform: rotate(180deg); }

/* ---------- Forms ---------- */
.form-input {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input::placeholder { color: #64748b; }
.form-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.form-input.input-error {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}
select.form-input { appearance: none; }
select.form-input option { background: #0a0e1a; color: var(--text); }
.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
}
.form-error-msg {
  display: none;
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 0.35rem;
}
.form-success {
  display: none;
}
form.is-submitted .form-success { display: block; }
form.is-submitted .form-body { display: none; }

/* ---------- Stat counters ---------- */
.stat-value {
  font-variant-numeric: tabular-nums;
}

/* ---------- Process / timeline ---------- */
.timeline-line {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.5), rgba(139, 92, 246, 0.5));
  width: 2px;
}

/* ---------- Footer ---------- */
.footer-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-link:hover { color: #7dd3fc; }

/* ---------- Subtle float for hero visual ---------- */
@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.float-slow { animation: float-slow 7s ease-in-out infinite; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.38); }

/* ---------- Mobile menu ---------- */
#mobile-menu {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#mobile-menu.menu-hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee { animation: none; }
  .float-slow { animation: none; }
  .eyebrow .dot { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Journey (scroll-drawn SVG voyage line) ---------- */
.journey-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.journey-path-bg {
  stroke: rgba(148, 163, 184, 0.18);
}
.journey-path {
  stroke: url(#journeyGradient);
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.45));
}
.journey-node {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #0a0e1a;
  border: 2px solid rgba(148, 163, 184, 0.35);
  transition: border-color 0.45s ease, box-shadow 0.45s ease;
  z-index: 2;
}
.journey-node::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.25);
  transition: background 0.45s ease, transform 0.45s ease;
}
.journey-node.is-active {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
}
.journey-node.is-active::after {
  background: linear-gradient(135deg, #22d3ee, #8b5cf6);
  transform: scale(1.1);
}
.journey-traveler {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  box-shadow: 0 0 16px 5px rgba(34, 211, 238, 0.5);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s ease;
}
@media (prefers-reduced-motion: reduce) {
  .journey-traveler { display: none; }
}
/* ---------- Journey destination marker (course ends at the CTA) ---------- */
.journey-node-end {
  width: 28px;
  height: 28px;
}
.journey-node-end::after {
  inset: 5px;
}
.journey-node-end.is-active {
  border-color: rgba(139, 92, 246, 0.9);
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.55);
}
.journey-node-end.is-active::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}