/* ===== Design tokens — sourced from the Integrivex mark (navy → electric blue) =====
   Light surface: the mark was designed for a white ground, so this is closer to its
   native habitat than the dark variant was. Text tokens are chosen to clear WCAG AA
   against --bg; --blue-400 is kept for decorative use only (particles, glows, rings)
   since it doesn't have enough contrast on white to carry small text. */
:root {
  --navy-950: #060f26;
  --navy-900: #0a1b3d;
  --navy-800: #10254a;
  --navy-700: #163665;

  --bg: #f6f9fd;
  --surface: #ffffff;
  --surface-2: #eaf0fa;
  --line: rgba(11, 27, 61, 0.10);
  --line-strong: rgba(11, 27, 61, 0.16);

  --blue-600: #0b57e0;
  --blue-500: #1670f2;
  --blue-400: #2aaeff;
  --cyan-300: #7fd4ff;

  --ink: #0b1b3d;
  --muted: #46527a;
  --muted-2: #56628c;

  --font-head: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --gradient-brand: linear-gradient(120deg, var(--navy-900) 0%, var(--blue-600) 55%, var(--blue-400) 100%);
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue-600); color: #fff; padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ===== Background canvas + grain ===== */
#scene {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
#grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.025; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Layout helpers ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-400);
  box-shadow: 0 0 10px 2px rgba(42, 174, 255, 0.6);
  flex: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 8px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.btn-primary {
  /* stops kept within blue-600..blue-500 (not the lighter blue-400) so white
     text clears AA contrast across the whole gradient, not just one end */
  background: linear-gradient(120deg, var(--blue-600), var(--blue-500));
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(11, 87, 224, 0.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(11, 87, 224, 0.5); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--blue-600); color: var(--blue-600); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.header.is-scrolled {
  background: rgba(246, 249, 253, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(11, 27, 61, 0.04);
}
.header-inner {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand-mark { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--muted);
  transition: color 0.18s ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); }
.nav-cta { margin-left: 4px; }
.nav-toggle { display: none; }

.header.nav-open .nav {
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  position: fixed; top: var(--header-h); left: 0; right: 0;
  background: rgba(246, 249, 253, 0.97); backdrop-filter: blur(14px);
  padding: 24px 28px 28px; border-bottom: 1px solid var(--line);
}
.header.nav-open .nav-cta { display: none; }
.header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle span { transition: transform 0.2s ease, opacity 0.2s ease; }

/* ===== Reel sections (shared) ===== */
.reel-section {
  position: relative; z-index: 2;
  padding: 140px 28px;
  max-width: 1240px; margin: 0 auto;
}
.reel-head { max-width: 640px; margin: 0 auto 64px; text-align: center; }
.reel-heading { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }

/* ===== Hero ===== */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
}
.hero-content { max-width: 780px; }
.hero-title {
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 1.06;
  margin-bottom: 26px;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 600px; margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted-2); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.scroll-cue i {
  width: 1px; height: 34px;
  background: linear-gradient(var(--blue-400), transparent);
  display: block;
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: scaleY(0.4); transform-origin: top; }
  40% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* ===== Services reel (pinned horizontal-feel scroller) ===== */
.services-reel { padding: 0 0 0; min-height: 100svh; display: flex; align-items: center; }
.reel-pin { width: 100%; padding: 100px 28px; }
.reel-pin .reel-head { margin-bottom: 56px; }

.service-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 20px;
  margin: 0 -28px;
  padding-left: 28px;
  padding-right: 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--blue-600) transparent;
}
.service-track::-webkit-scrollbar { height: 6px; }
.service-track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.service-card {
  scroll-snap-align: start;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(234, 240, 250, 0.75));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 30px;
  position: relative;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px -6px rgba(11, 27, 61, 0.08);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0.6;
  transform: translateY(6px) scale(0.98);
}
.service-card.is-active {
  opacity: 1;
  border-color: rgba(11, 87, 224, 0.35);
  transform: translateY(0) scale(1);
  box-shadow: 0 20px 36px -18px rgba(11, 87, 224, 0.28);
}
.service-num {
  position: absolute; top: 22px; right: 24px;
  font-size: 12px; color: var(--muted-2); letter-spacing: 0.05em;
}
.service-icon {
  width: 42px; height: 42px; color: var(--blue-600); margin-bottom: 22px;
}
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }

.reel-progress {
  display: flex; gap: 8px; justify-content: center; margin-top: 40px;
}
.reel-progress span {
  width: 26px; height: 3px; border-radius: 2px; background: var(--line-strong);
  transition: background 0.25s ease;
}
.reel-progress span.is-active { background: var(--blue-600); }

/* ===== Process ===== */
.process-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  counter-reset: step;
}
.process-list li {
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
  opacity: 0; transform: translateY(18px);
}
.process-list li.in-view { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }
.step-num { color: var(--blue-600); font-size: 13px; display: block; margin-bottom: 14px; }
.process-list h3 { font-size: 18px; margin-bottom: 10px; }
.process-list p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }

/* ===== Approach ===== */
.approach-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  max-width: 880px; margin: 0 auto;
}
.approach-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 26px;
  box-shadow: 0 2px 10px -6px rgba(11, 27, 61, 0.08);
  opacity: 0; transform: translateY(18px);
}
.approach-card.in-view { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }
.approach-card h3 { font-size: 17px; margin-bottom: 10px; }
.approach-card p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }

/* ===== CTA / contact ===== */
.cta { text-align: center; }
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta-heading { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15; margin-bottom: 20px; }
.cta-sub { color: var(--muted); font-size: 16px; margin-bottom: 44px; }

.contact-form { text-align: left; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field-row .field { margin-bottom: 0; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
input, textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 12px 14px; resize: vertical;
}
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 1px; border-color: transparent; }
.contact-form .btn { width: 100%; margin-top: 6px; }
.form-note { margin-top: 14px; font-size: 12.5px; color: var(--muted-2); text-align: center; }

/* ===== Footer ===== */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  padding: 56px 28px 28px;
}
.footer-inner {
  max-width: 1240px; margin: 0 auto 32px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap;
}
.footer-mark { height: 34px; margin-bottom: 12px; }
.footer-brand p { color: var(--muted-2); font-size: 13.5px; max-width: 340px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted-2);
  border-top: 1px solid var(--line); padding-top: 22px;
}

/* ===== Custom cursor (fine-pointer devices only, injected by js/cursor.js) ===== */
html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none !important;
}
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--blue-600);
  box-shadow: 0 0 10px 2px rgba(42, 174, 255, 0.45);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.4px solid rgba(11, 87, 224, 0.3);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease, opacity 0.2s ease;
}
.cursor-ring.is-active {
  width: 54px; height: 54px;
  background: rgba(11, 87, 224, 0.08);
  border-color: var(--blue-600);
}
.cursor-ring.is-pressed { width: 30px; height: 30px; }

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .approach-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  .reel-section { padding: 96px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
}
