/* ==========================================================================
   VantageFlow Technologies — design tokens & site styles
   Palette pulled from the VantageFlow logo:
     navy base, Flow Blue gradient, Sunrise gradient (used sparingly), gray text
   ========================================================================== */

:root {
  --navy: #020E22;
  --navy-alt: #071434;
  --navy-raised: #0B1B3A;

  --flow-blue-deep: #0072F1;
  --flow-blue-light: #00A8FB;
  --flow-gradient: linear-gradient(135deg, var(--flow-blue-deep), var(--flow-blue-light));

  --sunrise-orange: #FE7201;
  --sunrise-gold: #FEDB2C;
  --sunrise-gradient: linear-gradient(120deg, var(--sunrise-orange), var(--sunrise-gold));

  --white: #FFFFFF;
  --text-primary: #F4F7FC;
  --text-muted: #9AA7BD;
  --text-faint: #6B7280;

  --glass-bg-strong: rgba(11, 27, 58, 0.55);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-bg-subtle: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.07);

  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius-sm: 0.6rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--ease);
  --transition-base: 300ms var(--ease);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(0, 114, 241, 0.20), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(254, 114, 1, 0.08), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
}

h1 { font-size: clamp(2.4rem, 4.5vw, 3.75rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }

p { color: var(--text-muted); }

a { color: var(--flow-blue-light); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--white); }

::selection { background: var(--flow-blue-deep); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--flow-blue-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.container-fluid { max-width: 1320px; margin: 0 auto; }

.text-muted { color: var(--text-muted) !important; }
.text-faint { color: var(--text-faint) !important; }

.gradient-text {
  background: var(--flow-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow-free-section-title { margin-bottom: 2.5rem; }
.section-title h2 { margin-bottom: 0.75rem; }
.section-subtitle { max-width: 640px; font-size: 1.05rem; }

/* ==========================================================================
   Glass system — panel treatment varies deliberately by hierarchy
   ========================================================================== */

.glass-hero {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px -20px rgba(0, 30, 80, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: clamp(2.5rem, 5vw, 4.5rem);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.glass-panel:hover {
  border-color: rgba(0, 168, 251, 0.3);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 50px -30px rgba(0, 114, 241, 0.5);
}
.glass-panel:hover .mark-dot {
  transform: scale(1.08) rotate(-4deg);
}

.glass-panel-subtle {
  background: var(--glass-bg-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color var(--transition-base), background var(--transition-base);
}
.glass-panel-subtle:hover {
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
}

.glass-panel-featured {
  background: linear-gradient(160deg, rgba(0, 114, 241, 0.16), rgba(11, 27, 58, 0.6));
  border: 1px solid rgba(0, 168, 251, 0.35);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 60px -25px rgba(0, 114, 241, 0.45);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.glass-panel-featured:hover {
  border-color: rgba(0, 168, 251, 0.55);
  box-shadow: 0 24px 70px -25px rgba(0, 114, 241, 0.65);
}

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

.btn { border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: 600; padding: 0.75rem 1.6rem; transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast); border: none; }

.btn-primary {
  background: var(--sunrise-gradient);
  color: var(--navy);
  box-shadow: 0 12px 30px -12px rgba(254, 114, 1, 0.55);
}
.btn-primary:hover, .btn-primary:focus-visible { color: var(--navy); transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(254, 114, 1, 0.7); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--white);
}
.btn-secondary:hover, .btn-secondary:focus-visible { color: var(--white); background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }

.btn-outline-flow {
  background: transparent;
  border: 1px solid var(--flow-blue-light);
  color: var(--flow-blue-light);
}
.btn-outline-flow:hover { background: rgba(0, 168, 251, 0.1); color: var(--white); transform: translateY(-2px); }

.btn:active { transform: translateY(0); transition-duration: 100ms; }

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

#mainNavbar {
  background: rgba(2, 14, 34, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-base), border-color var(--transition-base);
  padding: 0.6rem 0;
}
#mainNavbar.scrolled {
  background: rgba(2, 14, 34, 0.85);
  border-bottom-color: var(--glass-border-subtle);
}

/* The lockup includes the small "TECHNOLOGIES" subtext, which needs more
   height than a bare icon+wordmark to stay legible -- hence the taller
   navbar padding above to match, rather than cropping the logo down. */
.navbar-brand .brand-logo { height: 46px; width: auto; display: block; }
@media (min-width: 768px) {
  .navbar-brand .brand-logo { height: 54px; }
}

.navbar-nav .nav-link {
  color: var(--text-muted); font-weight: 500; padding: 0.5rem 1rem !important;
  border-radius: var(--radius-sm); position: relative; transition: color var(--transition-fast);
}
.navbar-nav .nav-link::after {
  content: ''; position: absolute; left: 1rem; right: 1rem; bottom: 0.15rem; height: 2px;
  background: var(--flow-gradient); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition-base);
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--white); }
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after { transform: scaleX(1); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding: clamp(7rem, 14vw, 10rem) 0 clamp(3rem, 6vw, 5rem); }

.hero-content { max-width: 760px; }
.hero-content .hero-eyebrow { display: none; } /* no eyebrow labels, per brand guidance */

.hero-content h1 { opacity: 0; animation: heroRise 0.8s var(--ease) 0.1s forwards; }
.hero-content .hero-subtitle { opacity: 0; animation: heroRise 0.8s var(--ease) 0.28s forwards; margin-top: 1.25rem; font-size: 1.15rem; max-width: 620px; }
.hero-content .hero-buttons { opacity: 0; animation: heroRise 0.8s var(--ease) 0.46s forwards; margin-top: 2.25rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-badge { opacity: 0; animation: heroRise 0.8s var(--ease) 0.62s forwards; margin-top: 2.5rem; }

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

@media (prefers-reduced-motion: reduce) {
  .hero-content h1, .hero-content .hero-subtitle, .hero-content .hero-buttons, .hero-badge {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Grids / cards
   ========================================================================== */

.engine-card, .vertical-card { height: 100%; }
.engine-card h3, .vertical-card h3 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.engine-card p, .vertical-card p { margin-bottom: 0; font-size: 0.97rem; }

.vertical-service-list {
  list-style: none; padding: 0; margin: 1.1rem 0 0; font-size: 0.9rem;
}
.vertical-service-list li {
  position: relative; padding-left: 1.1rem; margin-bottom: 0.45rem; color: var(--text-muted);
}
.vertical-service-list li::before {
  content: ''; position: absolute; left: 0; top: 0.5em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--flow-gradient);
}
.vertical-note { margin-top: 0.9rem !important; font-size: 0.85rem !important; font-style: italic; }

.mark-dot {
  width: 2.5rem; height: 2.5rem; border-radius: 0.65rem;
  background: var(--flow-gradient);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-family: var(--font-display); font-weight: 700;
  margin-bottom: 1.1rem;
  transition: transform var(--transition-base);
}

/* ==========================================================================
   Hybrid model — the one genuinely staged sequence
   ========================================================================== */

.stage-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; }
.stage-track::before {
  content: ''; position: absolute; top: 2.1rem; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg, var(--flow-blue-deep), var(--sunrise-gold));
  opacity: 0.35;
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease) 0.2s;
}
.stage-track.is-visible::before { transform: scaleX(1); }
.stage-item { position: relative; }
.stage-label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: var(--navy-raised); border: 1px solid var(--glass-border);
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--flow-blue-light);
  margin-bottom: 1.1rem; position: relative; z-index: 1;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.stage-item.is-final .stage-label { background: var(--sunrise-gradient); color: var(--navy); border-color: transparent; }
.stage-item:hover .stage-label { transform: scale(1.1); box-shadow: 0 8px 24px -8px rgba(0, 168, 251, 0.5); }
.stage-item.is-final:hover .stage-label { box-shadow: 0 8px 24px -8px rgba(254, 114, 1, 0.55); }

@media (max-width: 767px) {
  .stage-track { grid-template-columns: 1fr; }
  .stage-track::before { display: none; }
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control, .form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}
.form-control:focus, .form-select:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--flow-blue-light);
  color: var(--white);
  box-shadow: 0 0 0 3px rgba(0, 168, 251, 0.2);
}
.form-control::placeholder { color: var(--text-faint); }
label { color: var(--text-muted); font-weight: 500; margin-bottom: 0.4rem; }
.form-text-error { color: #FCA5A5; font-size: 0.85rem; margin-top: 0.35rem; }
.form-text-error:empty { margin-top: 0; }

.form-control.is-invalid, .form-select.is-invalid { border-color: #FCA5A5; background-image: none; }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { border-color: #FCA5A5; box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.25); }
.honeypot-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.captcha-row { display: flex; align-items: center; gap: 0.75rem; }
.captcha-question { font-family: var(--font-display); font-weight: 700; color: var(--white); white-space: nowrap; }

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

footer {
  border-top: 1px solid var(--glass-border-subtle);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
  background: rgba(2, 14, 34, 0.6);
}
footer h4 { font-size: 1rem; color: var(--white); margin-bottom: 1rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 0.5rem; }
footer ul li a { color: var(--text-muted); overflow-wrap: anywhere; }
footer ul li a:hover { color: var(--flow-blue-light); }
footer [class*="col-"] { min-width: 0; } /* let long strings (emails) wrap instead of overflowing their column */
.footer-bottom { border-top: 1px solid var(--glass-border-subtle); margin-top: 2.5rem; padding-top: 1.5rem; color: var(--text-faint); font-size: 0.9rem; }

/* ==========================================================================
   Blog
   ========================================================================== */

.blog-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}
.blog-card-cover { border-radius: var(--radius-md); overflow: hidden; margin: -2rem -2rem 1.25rem; aspect-ratio: 16 / 9; background: var(--navy-raised); }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.blog-card h3 { margin-bottom: 0.5rem; }
.blog-card .blog-meta { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 0.75rem; }
.blog-card .blog-excerpt { flex-grow: 1; }
.blog-card .blog-readmore { margin-top: 1rem; font-weight: 600; display: inline-block; transition: transform var(--transition-fast); }

a:hover .blog-card {
  transform: translateY(-6px);
  border-color: rgba(0, 168, 251, 0.35);
  box-shadow: 0 24px 60px -30px rgba(0, 114, 241, 0.55);
}
a:hover .blog-card-cover img { transform: scale(1.06); }
a:hover .blog-card .blog-readmore { transform: translateX(4px); }

.blog-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--flow-blue-light);
  background: rgba(0, 168, 251, 0.12); border-radius: 999px; padding: 0.2rem 0.7rem; margin: 0 0.4rem 0.4rem 0;
}

.blog-detail-cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2rem; aspect-ratio: 21 / 9; background: var(--navy-raised); }
.blog-detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-body { max-width: 760px; margin: 0 auto; font-size: 1.05rem; }
.blog-body h2, .blog-body h3 { margin-top: 2rem; }
.blog-body p { color: var(--text-primary); opacity: 0.9; }
.blog-body img { max-width: 100%; border-radius: var(--radius-md); }
.blog-body a { text-decoration: underline; }
.blog-body blockquote { border-left: 3px solid var(--flow-blue-light); padding-left: 1.25rem; color: var(--text-muted); }
.blog-body pre { background: var(--navy-raised); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; }

.pagination .page-link { background: transparent; border-color: var(--glass-border); color: var(--text-muted); transition: transform var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast); }
.pagination .page-link:hover { color: var(--white); border-color: var(--flow-blue-light); transform: translateY(-2px); }
.pagination .page-item.active .page-link { background: var(--flow-gradient); border-color: transparent; color: var(--white); }

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

section { padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.badge-beta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--sunrise-gradient); color: var(--navy);
  font-weight: 700; font-size: 0.8rem; border-radius: 999px; padding: 0.4rem 0.9rem;
  animation: badgePulse 2.8s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 114, 1, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(254, 114, 1, 0); }
}

@media (max-width: 991px) {
  .glass-hero, .glass-panel { padding: 1.75rem; }
}

/* ==========================================================================
   Scroll reveal — a restrained fade/rise applied by static/js/main.js to
   cards and section groups as they enter the viewport, staggered per item.
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .badge-beta { animation: none !important; }
  .glass-panel:hover .mark-dot,
  .stage-item:hover .stage-label,
  a:hover .blog-card-cover img,
  .btn, .stage-track::before {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}
