/* ==========================================================================
   Pathway IT — base.css
   Design tokens · reset · typography · buttons · backdrops · custom cursor
   Type: Poppins throughout, JetBrains Mono for small uppercase labels
   ========================================================================== */

:root {
  /* ── brand ────────────────────────────────────────────────── */
  --blue-50:  #EEF4FF;
  --blue-100: #DCE7FF;
  --blue-200: #BED0FF;
  --blue-300: #93B4FF;
  --blue-400: #6091FB;
  --blue:     #2563EB;
  --blue-600: #1D53D6;
  --blue-700: #1A45B0;

  --indigo-50:  #EEF0FF;
  --indigo-200: #C7CBFF;
  --indigo-400: #7C7EF5;
  --indigo:     #4F46E5;
  --indigo-600: #453BD1;

  --sky-300: #7DD3FC;
  --sky:     #38BDF8;
  --sky-500: #0EA5E9;

  --violet: #7C3AED;
  --cyan:   #06B6D4;
  --teal:   #0EA5A5;
  --green:  #10B981;
  --amber:  #F59E0B;
  --rose:   #E11D48;

  /* ── neutrals ─────────────────────────────────────────────── */
  --ink:      #05070F;
  --ink-2:    #0A0E1A;
  --ink-3:    #121728;
  --slate-900:#0B1220;
  --slate-800:#1B2436;
  --slate-700:#334155;
  --slate-600:#4A5568;
  --slate-500:#64748B;
  --slate-400:#94A3B8;
  --slate-300:#CBD5E1;
  --line:     #E4E9F2;
  --line-2:   #EFF2F8;
  --paper:    #FFFFFF;
  --paper-2:  #F7F9FC;
  --paper-3:  #F1F5FC;

  /* ── gradients ────────────────────────────────────────────── */
  --grad-brand: linear-gradient(120deg, #4F46E5 0%, #2563EB 48%, #22A6E0 100%);
  --grad-hero: linear-gradient(104deg, #6366F1 0%, #38BDF8 58%, #7DD3FC 100%);
  --grad-brand-soft: linear-gradient(120deg, rgba(79,70,229,.14), rgba(37,99,235,.1) 55%, rgba(34,166,224,.12));
  --grad-dark: radial-gradient(120% 130% at 10% -10%, #16204A 0%, #0A0E1A 52%, #05070F 100%);
  --grad-line: linear-gradient(90deg, transparent, rgba(79,70,229,.6), transparent);

  /* ── type ─────────────────────────────────────────────────── */
  /* One family across the whole site. JetBrains Mono is kept only for the
     small uppercase labels and counters, where a monospace is the point. */
  --font-display: "Poppins", system-ui, sans-serif;
  --font-serif: "Poppins", system-ui, sans-serif;   /* hero italic line */
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-display: clamp(2.7rem, 5.6vw, 5rem);
  --fs-h1: clamp(2.3rem, 4.6vw, 4rem);
  --fs-h2: clamp(2rem, 3.6vw, 3.25rem);
  --fs-h3: clamp(1.35rem, 2.1vw, 1.95rem);
  --fs-h4: clamp(1.08rem, 1.4vw, 1.28rem);
  --fs-body: clamp(1rem, 1.05vw, 1.0625rem);
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  /* ── layout ───────────────────────────────────────────────── */
  --container: 1200px;
  --container-wide: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3.25rem);
  --section-y: clamp(5.5rem, 11vw, 10rem);

  /* ── radius ───────────────────────────────────────────────── */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-2xl: 34px;
  --r-3xl: 44px;
  --r-pill: 999px;

  /* ── shadow ───────────────────────────────────────────────── */
  --sh-xs: 0 1px 2px rgba(6, 12, 32, .05);
  --sh-sm: 0 2px 10px rgba(6, 12, 32, .06);
  --sh-md: 0 12px 32px rgba(6, 12, 32, .08), 0 2px 8px rgba(6, 12, 32, .04);
  --sh-lg: 0 28px 68px rgba(6, 12, 32, .13), 0 8px 20px rgba(6, 12, 32, .06);
  --sh-glow: 0 12px 34px rgba(79, 70, 229, .32);
  --sh-glow-lg: 0 20px 52px rgba(79, 70, 229, .42);

  /* ── motion ───────────────────────────────────────────────── */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, .05, .36, 1);
  --t-fast: 180ms;
  --t: 340ms;
  --t-slow: 620ms;

  --header-h: 88px;
  --header-h-sm: 68px;
}

/* ─────────────────────────────────────────────────────── reset ───────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* `clip`, never `hidden` — hidden makes the body a scroll container and
     breaks position:sticky and ScrollTrigger pinning */
  overflow-x: clip;
}
/* Lenis owns scrolling; native smooth-scroll would fight it */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--slate-600);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.nav-open { overflow: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p, figure { margin: 0; }
input, textarea { font: inherit; }

:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--indigo-200); color: var(--ink); }

/* ───────────────────────────────────────────────── typography ───────── */
h1, h2, h3, h4, .display, .num-display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.18; letter-spacing: -0.022em; }
h4 { font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -0.016em; }
.display { font-size: var(--fs-display); letter-spacing: -0.038em; }

.lead {
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  color: var(--slate-600);
  line-height: 1.7;
  text-wrap: pretty;
}
.muted { color: var(--slate-500); }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* eyebrow pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .42rem .85rem .42rem .6rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--indigo);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .16);
}
[data-theme="dark"] .eyebrow {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: var(--indigo-200);
}
[data-theme="dark"] .eyebrow .dot { background: var(--blue-300); box-shadow: 0 0 0 3px rgba(147, 180, 255, .16); }

/* ───────────────────────────────────────────────────── layout ───────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide { max-width: var(--container-wide); }

.section { position: relative; padding-block: var(--section-y); }
.section-head { max-width: 730px; margin-bottom: clamp(2.75rem, 5vw, 4.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: 1.15rem; }

.divider { height: 1px; border: 0; margin: 0; background: var(--line); }

/* ──────────────────────────────────────────────────── buttons ───────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .95rem 1.55rem;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  will-change: transform;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: scale(.97); }
.btn-lg { padding: 1.1rem 1.9rem; font-size: 1rem; }

/* gradient + glow primary */
.btn-grad {
  color: #fff;
  background: var(--grad-brand);
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow: var(--sh-glow);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-position var(--t-slow) var(--ease);
}
.btn-grad::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,.55) 12%, transparent 26%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  animation: spin-slow 4.5s linear infinite;
}
.btn-grad:hover {
  transform: scale(1.035);
  box-shadow: var(--sh-glow-lg);
  background-position: 100% 50%;
}
.btn-grad:hover::before { opacity: .5; }

.btn-ghost {
  color: var(--slate-900);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .6);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  transform: scale(1.03);
  border-color: var(--indigo-200);
  background: #fff;
  box-shadow: var(--sh-md);
}

.btn-light { background: #fff; color: var(--ink); box-shadow: var(--sh-md); }
.btn-light:hover { transform: scale(1.035); box-shadow: 0 20px 44px rgba(0, 0, 0, .3); }

.btn-outline-light {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
}
.btn-outline-light:hover {
  transform: scale(1.03);
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .42);
}

.btn-arrow svg { transition: transform var(--t) var(--ease); }
.btn-arrow:hover svg { transform: translateX(4px); }

/* text link with sliding underline */
.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--indigo);
}
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t) var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); transform-origin: left; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--t) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ──────────────────────────────────────────────── dark surfaces ─────── */
[data-theme="dark"] { color: rgba(255, 255, 255, .68); }
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] .display { color: #fff; }
[data-theme="dark"] .lead { color: rgba(255, 255, 255, .64); }
[data-theme="dark"] .muted { color: rgba(255, 255, 255, .5); }

/* ─────────────────────────────────────────── surfaces & backdrops ───── */
.glass {
  background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .62));
  backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: 0 10px 34px rgba(6, 12, 32, .08), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.glass-dark {
  background: linear-gradient(150deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .028));
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .1);
}

/* gradient hairline border (uses a pseudo element so radius stays crisp) */
.grad-border { position: relative; }
.grad-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(79,70,229,.55), rgba(37,99,235,.16) 45%, rgba(255,255,255,0) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .8;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}

/* soft glowing blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* grid + dotted backdrops */
.bg-grid::before,
.bg-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-grid::before {
  background-image:
    linear-gradient(to right, rgba(11, 18, 32, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 18, 32, .045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 5%, transparent 78%);
}
.bg-dots::before {
  background-image: radial-gradient(rgba(79, 70, 229, .16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 15%, transparent 76%);
}
[data-theme="dark"].bg-grid::before {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
}

/* film-grain noise overlay (inline SVG turbulence, no image file) */
.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

/* ───────────────────────────────────────────── custom cursor ────────── */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--indigo);
}
.cursor-ring {
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.4px solid rgba(79, 70, 229, .5);
  transition: width var(--t) var(--ease), height var(--t) var(--ease),
              margin var(--t) var(--ease), background-color var(--t) var(--ease),
              border-color var(--t) var(--ease);
}
.cursor-ring.is-hover {
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
  background: rgba(79, 70, 229, .09);
  border-color: rgba(79, 70, 229, .75);
}
.cursor-ring.is-dark { border-color: rgba(255, 255, 255, .6); }
.cursor-dot.is-dark { background: #fff; }
body.cursor-on { cursor: none; }
body.cursor-on a, body.cursor-on button, body.cursor-on [role="button"] { cursor: none; }
/* keep the native caret where typing happens */
body.cursor-on input, body.cursor-on textarea { cursor: text; }

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

/* magnetic wrapper hint */
[data-magnetic] { will-change: transform; }

/* ───────────────────────────────────────────────── animation ────────── */
[data-reveal], [data-reveal-group] > * { will-change: transform, opacity, filter; }
.no-motion [data-reveal],
.no-motion [data-reveal-group] > * { opacity: 1 !important; transform: none !important; filter: none !important; }

/* SplitType line masks */
.split-mask { display: block; overflow: hidden; }
.split-line { display: block; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse-ring {
  0%   { transform: scale(.9); opacity: .5; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes dash-move { to { stroke-dashoffset: -1000; } }
@keyframes caret { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes marquee-x {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}

/* ─────────────────────────────────────────────────────── a11y ───────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: .5rem; left: .5rem; z-index: 10000;
  padding: .65rem 1.1rem;
  background: var(--indigo); color: #fff;
  border-radius: var(--r-sm);
  transform: translateY(-180%);
  transition: transform var(--t) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .cursor-dot, .cursor-ring { display: none; }
  body.cursor-on { cursor: auto; }
}
