/* InfinitDev — Design tokens */
:root {
  /* Type */
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Color — cool-tinted neutrals */
  --bg: oklch(0.99 0.005 240);
  --bg-alt: oklch(0.975 0.008 240);
  --surface: #ffffff;
  --hairline: oklch(0.92 0.01 240);
  --hairline-strong: oklch(0.86 0.015 240);

  --ink: oklch(0.22 0.03 240);
  --ink-muted: oklch(0.5 0.02 240);
  --ink-soft: oklch(0.65 0.015 240);

  /* Cyan accents */
  --cyan: oklch(0.72 0.14 220);
  --cyan-deep: oklch(0.55 0.14 225);
  --cyan-ink: oklch(0.42 0.13 230);
  --cyan-wash: oklch(0.96 0.03 220);
  --cyan-tint: oklch(0.92 0.05 220);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.3 0.04 240 / 0.06), 0 1px 1px oklch(0.3 0.04 240 / 0.04);
  --shadow-md: 0 10px 30px -12px oklch(0.3 0.08 240 / 0.18), 0 4px 10px -6px oklch(0.3 0.06 240 / 0.1);
  --shadow-cyan: 0 14px 40px -12px oklch(0.55 0.18 220 / 0.35);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  overflow-x: hidden;
}

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

::selection { background: var(--cyan-tint); color: var(--cyan-ink); }

.container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

/* Typography utility classes */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-ink);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--cyan);
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  line-height: 1.05;
  font-weight: 600;
}
h1 { font-size: clamp(44px, 6vw, 84px); letter-spacing: -0.035em; font-weight: 500; }
h2 { font-size: clamp(32px, 3.8vw, 54px); letter-spacing: -0.028em; }
h3 { font-size: clamp(20px, 1.6vw, 26px); }
p { margin: 0; color: var(--ink-muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  white-space: normal;
  text-align: center;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-cyan);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--cyan-ink);
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn .arr {
  display: inline-block;
  transition: transform .2s ease;
}
.btn:hover .arr { transform: translateX(3px); }

/* Hairline divider */
.hr {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 0;
}

/* Pills / chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Scroll reveal variants */
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1); }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.92); transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1); }
.reveal-scale.in { opacity: 1; transform: none; }
.reveal-blur { opacity: 0; filter: blur(12px); transition: opacity .9s cubic-bezier(.2,.6,.2,1), filter .9s cubic-bezier(.2,.6,.2,1); }
.reveal-blur.in { opacity: 1; filter: blur(0); }

/* Staggered children */
.stagger > * { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.stagger.in > *:nth-child(2) { transition-delay: 90ms; }
.stagger.in > *:nth-child(3) { transition-delay: 180ms; }
.stagger.in > *:nth-child(4) { transition-delay: 270ms; }
.stagger.in > *:nth-child(5) { transition-delay: 360ms; }
.stagger.in > *:nth-child(6) { transition-delay: 450ms; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-deep));
  width: 0%;
  z-index: 200;
  transition: width .05s linear;
  box-shadow: 0 0 12px var(--cyan);
}

/* Parallax helpers driven by --p (0..1) */
.parallax-y { transform: translateY(calc(var(--p, 0) * var(--amount, 80px))); will-change: transform; }
.parallax-rotate { transform: rotate(calc(var(--p, 0) * var(--amount, 20deg))); will-change: transform; }

/* Section header sweep underline */
.sweep {
  position: relative;
  display: inline-block;
}
.sweep::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  height: 3px;
  width: 0;
  background: var(--cyan);
  transition: width 1.1s cubic-bezier(.2,.6,.2,1);
}
.reveal.in .sweep::after,
.sweep.in::after { width: 100%; }

/* Counter wiggle */
.counter { display: inline-block; font-variant-numeric: tabular-nums; }

/* --- Decorative backgrounds --- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.72 0.14 220 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.72 0.14 220 / 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  pointer-events: none;
}
.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, oklch(0.6 0.12 220 / 0.18) 1.2px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 70%);
  pointer-events: none;
}
.bg-diagonal {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, oklch(0.96 0.03 220 / 0.6) 0 1px, transparent 1px 22px);
  mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
  pointer-events: none;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

@media (max-width: 960px) {
  html { scroll-padding-top: 84px; }

  .container {
    width: min(1280px, calc(100% - 32px));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1280px, calc(100% - 24px));
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .eyebrow::before {
    width: 18px;
    margin-right: 8px;
  }

  .chip {
    font-size: 10px;
  }

  .btn {
    width: 100%;
    padding: 14px 18px;
  }
}

@media (pointer: coarse) {
  .cursor-glow {
    display: none !important;
  }
}
.bg-blob-a { background: radial-gradient(circle, oklch(0.88 0.1 215 / 0.55), transparent 60%); }
.bg-blob-b { background: radial-gradient(circle, oklch(0.88 0.1 250 / 0.35), transparent 60%); }
.bg-blob-c { background: radial-gradient(circle, oklch(0.92 0.08 195 / 0.45), transparent 60%); }

/* Floating glyphs that drift */
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  33% { transform: translate(14px, -18px) rotate(6deg); }
  66% { transform: translate(-10px, 12px) rotate(-4deg); }
}
.float-slow { animation: drift 18s ease-in-out infinite; }
.float-med { animation: drift 12s ease-in-out infinite; }
.float-fast { animation: drift 8s ease-in-out infinite; }

/* Pulsing ring */
@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  animation: pulseRing 3.4s ease-out infinite;
}

/* Shimmering gradient sweep on section title accents */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-text {
  background: linear-gradient(90deg, var(--cyan-ink) 0%, var(--cyan) 45%, var(--cyan-deep) 55%, var(--cyan-ink) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  gap: 80px;
  animation: marquee 40s linear infinite;
  width: max-content;
}

/* Infinity spin */
@keyframes spinLoop {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -400; }
}
.infinity-flow path {
  stroke-dasharray: 8 10;
  animation: spinLoop 14s linear infinite;
}

/* Grain */
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: radial-gradient(circle at 1px 1px, oklch(0.5 0.02 240 / 0.06) 1px, transparent 0);
  background-size: 3px 3px;
}
