/* ============================================================
   APEX VERTICAL — Stylesheet
   Dark AI-tech aesthetic | Electric Blue (#0070f3) accents
   ============================================================ */

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

:root {
  --bg:          #0a0a0f;
  --bg-2:        #0f0f18;
  --bg-card:     #111120;
  --bg-card-hov: #161628;
  --border:      rgba(255,255,255,0.07);
  --border-blue: rgba(0,112,243,0.35);
  --accent:      #0070f3;
  --accent-glow: rgba(0,112,243,0.25);
  --accent-lite: #3391ff;
  --text:        #e8e8f0;
  --text-muted:  #7878a0;
  --text-faint:  #44445a;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-head:   'Space Grotesk', 'Inter', system-ui, sans-serif;
  --radius:      12px;
  --radius-lg:   20px;
  --trans:       0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- UTILITIES ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-accent { color: var(--accent); }

/* Crisp gradient text — used on hero "Scaling." and process "live systems" */
.text-gradient {
  background: linear-gradient(95deg, #0070f3 0%, #60b4ff 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Force GPU layer for sub-pixel crispness */
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

.section { padding: 100px 0; }

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section__header--left { text-align: left; margin-left: 0; }

.section__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border-blue);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.section__sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--trans);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn--sm  { font-size: 14px; padding: 8px 18px; }
.btn--lg  { font-size: 16px; padding: 15px 32px; }
.btn--full { width: 100%; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 transparent;
}
.btn--primary:hover {
  background: var(--accent-lite);
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-2px);
  animation-play-state: paused; /* freeze pulse on hover */
}

/* Hero CTA periodic pulse — fires every 3 s */
@keyframes cta-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(0,112,243,0.6); }
  40%  { box-shadow: 0 0 0 14px rgba(0,112,243,0);  }
  100% { box-shadow: 0 0 0 0   rgba(0,112,243,0);   }
}
.btn--pulse {
  animation: cta-pulse 3s cubic-bezier(0.4,0,0.6,1) infinite;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0;
  transition: background var(--trans), backdrop-filter var(--trans), border-color var(--trans);
  border-bottom: 1px solid transparent;
}

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

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
}

.logo-mark {
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav__links a:not(.btn):hover { color: var(--text); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--trans);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 780px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.badge__dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.3); }
}

.hero__headline {
  font-family: var(--font-head);
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat__num {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat__divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 40px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ---------- LOGOS ---------- */
.logos {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.logos__label {
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.logos__track {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 20px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

/* ---------- SERVICES ---------- */
.services { background: var(--bg); }

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--trans);
}

.service-card:hover {
  background: var(--bg-card-hov);
  border-color: var(--border-blue);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,112,243,0.14), 0 4px 20px rgba(0,0,0,0.4);
}
.service-card:hover::before { opacity: 1; }

.service-card--featured {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0,112,243,0.08) 100%);
  border-color: var(--border-blue);
}
.service-card--featured::before { opacity: 0.6; }

.service-card__icon {
  width: 48px; height: 48px;
  color: var(--accent);
  margin-bottom: 20px;
}

.service-card__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.service-card__title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: #fff;
}

.service-card__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.service-card__list li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.service-card__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

.service-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--trans);
}

.service-card__link:hover { gap: 8px; }

/* ---------- PROCESS ---------- */
.process { background: var(--bg-2); }

.process__steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.process__step {
  flex: 1;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: border-color var(--trans);
}

.process__step:hover { border-color: var(--border-blue); }

.process__connector {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-blue), var(--border));
  margin-top: 56px;
  flex-shrink: 0;
}

.step__num {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.step__title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.step__desc { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* ---------- RESULTS ---------- */
.results { background: var(--bg); }

.results__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--trans);
}

.result-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,112,243,0.14), 0 4px 20px rgba(0,0,0,0.4);
}

.result-card__metric {
  font-family: var(--font-head);
  font-size: 52px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}

.result-card__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.result-card__author {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
}

.featured-quote {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0,112,243,0.06) 100%);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.featured-quote::before {
  content: '"';
  position: absolute;
  top: -20px; left: 24px;
  font-size: 160px;
  color: var(--accent);
  opacity: 0.08;
  font-family: Georgia, serif;
  line-height: 1;
}

.featured-quote p {
  font-family: var(--font-head);
  font-size: clamp(17px, 2.5vw, 22px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
}

.featured-quote cite {
  font-size: 14px;
  color: var(--text-muted);
  font-style: normal;
}

/* ---------- FAQ ---------- */
.faq { background: var(--bg-2); }

.faq__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.faq__list { display: flex; flex-direction: column; gap: 0; }

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 22px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  gap: 16px;
  transition: color var(--trans);
}

.faq__question:hover { color: var(--accent); }

.faq__icon {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform var(--trans);
  font-weight: 300;
  line-height: 1;
}

.faq__item.open .faq__icon { transform: rotate(45deg); }

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}

.faq__answer p {
  padding-bottom: 22px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

.cta-section__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(0,112,243,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section__inner {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.cta-section__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-section__sub {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.7;
}

.cta-form { display: flex; flex-direction: column; gap: 14px; }

.cta-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cta-form input,
.cta-form select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--trans);
  -webkit-appearance: none;
}

.cta-form input::placeholder { color: var(--text-faint); }
.cta-form select { color: var(--text-faint); }
.cta-form select option { background: var(--bg-card); color: var(--text); }

.cta-form input:focus,
.cta-form select:focus { border-color: var(--accent); }

.cta-form__note {
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand p {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 8px;
  max-width: 260px;
}

.footer__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer__links a:hover { color: var(--accent); }

.footer__legal {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-faint);
}
.footer__legal a:hover { color: var(--text-muted); text-decoration: underline; }

.footer__copy {
  font-size: 12px;
  color: var(--text-faint);
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}

/* ---------- ANIMATIONS ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].in-view {
  opacity: 1;
  transform: none;
}

/* ================================================================
   2026 DESIGN EVOLUTION — Layered on top of existing styles
   All GPU-accelerated via transform / opacity
   ================================================================ */

/* ── Scroll Progress Bar ──────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #0070f3, #60b4ff);
  box-shadow: 0 0 8px rgba(0, 112, 243, 0.6);
  z-index: 9999;
  will-change: width;
  pointer-events: none;
}

/* ── Grid Pulse Canvas ────────────────────────────────────────── */
#grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Grain Overlay ────────────────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* Push all page content above canvas / grain */
.nav, .hero, .logos, .services, .process,
.results, .faq, .cta-section, .footer {
  position: relative;
  z-index: 2;
}

/* ── Glassmorphism 2.0 on Service Cards ───────────────────────── */
.service-card {
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  /* Grain texture on each card */
  isolation: isolate;
}

/* Light-catching 1px gradient border via pseudo */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255,255,255,0.18) 30%,
    rgba(255,255,255,0.05) 55%,
    rgba(255,255,255,0.18) 78%,
    transparent 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* 10% grain texture per card */
.service-card > *  { position: relative; z-index: 2; }
.service-card::before {
  /* keep the existing top-edge accent line — just extend it */
  z-index: 3;
}

/* ── Kinetic Typography — Inter Tight variable font ───────────── */
.hero__headline,
.section__title,
.cta-section__title {
  font-family: 'Inter Tight', 'Space Grotesk', system-ui, sans-serif;
  font-variation-settings: 'wght' 800;
  will-change: transform, font-variation-settings;
  transform-origin: left center;
}

.section__title,
.cta-section__title {
  transform-origin: center center;
}

/* ── Magnetic Button wrapper ──────────────────────────────────── */
[data-magnetic] {
  will-change: transform;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── 3D Tilt Cards ────────────────────────────────────────────── */
[data-tilt] {
  will-change: transform;
  transform-style: preserve-3d;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .results__grid  { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .process__steps { flex-direction: column; max-width: 560px; margin-left: auto; margin-right: auto; }
  .process__connector { width: 1px; height: 28px; margin: 0 0 0 36px; background: linear-gradient(to bottom, var(--border-blue), var(--border)); }
  .faq__inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 680px) {
  .section { padding: 64px 0; }

  /* Nav */
  .nav__links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: rgba(10,10,15,0.97); backdrop-filter: blur(16px); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border); }
  .nav__links.open { display: flex; }
  .nav__toggle { display: flex; }

  /* Hero — center-align content on mobile */
  .hero__inner { align-items: center; text-align: center; }
  .hero__sub   { text-align: center; }
  .hero__cta   { flex-direction: column; align-items: center; width: 100%; }
  .hero__cta .btn { width: 100%; max-width: 340px; }
  .hero__stats { justify-content: center; flex-wrap: wrap; gap: 20px; }
  .stat__divider { display: none; }

  /* Tighter grid background on small screens */
  .hero__grid-bg {
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 100% 70% at 50% 30%, black 10%, transparent 100%);
  }

  /* Cards full-width on mobile */
  .services__grid,
  .results__grid  { max-width: 100%; }
  .service-card,
  .result-card    { padding: 28px 24px; }

  .cta-form__row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__brand p { max-width: 100%; }
  .footer__legal { justify-content: center; }
  .featured-quote { padding: 32px 24px; }
}
