/* ============================================================
   PayPulse Design System v2 — "Signal Bloom"
   See design-system.md. v1 (flat / hairline / no-gradient) is retired.
   ============================================================ */
:root {
  /* canvas */
  --void: #04060c;
  --ink: #070c18;
  --deep: #0c1730;

  /* bloom */
  --bloom-core: #1f58f2;
  --bloom-mid: #123a8f;
  --bloom-edge: #08122b;

  /* accents */
  --signal: #4ee2ff;       /* live / transmitting only */
  --rupee-gold: #ffd7a3;   /* the single warm accent */

  /* text */
  --ice: #e8f0ff;
  --mist: #9fb0cc;
  --slate: #5b6b86;
  --hairline: rgba(232, 240, 255, 0.14);

  /* legacy aliases — sections not yet migrated to v2 still resolve */
  --carbon: var(--ink);
  --graphite: #16223f;
  --iron: var(--slate);
  --iron-edge: var(--slate);
  --steel: var(--slate);
  --fog: var(--mist);
  --cobalt: var(--bloom-core);
  --cobalt-dim: var(--bloom-mid);
  --orange: var(--rupee-gold);

  --font-display: 'Space Grotesk', 'General Sans', Inter, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  --max-width: 1200px;
  --section-gap: 140px;
  --card-radius: 20px;
  --btn-radius: 999px;
}

/* ---------- Bloom: the signature background ---------- */
/* Two layers. The radial is sized so its void stop lands INSIDE the frame
   (a 120%-wide gradient can never reach black on screen — the ramp is still
   mid-way at x=0). The vignette on top then guarantees both edges die to
   canvas regardless of where the core sits. bar.md mechanism 1. */
.bloom {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(90deg,
      var(--void) 0%,
      color-mix(in oklab, var(--void) 55%, transparent) 16%,
      transparent 34%, transparent 66%,
      color-mix(in oklab, var(--void) 55%, transparent) 84%,
      var(--void) 100%),
    radial-gradient(58% 46% at var(--bloom-x, 50%) var(--bloom-y, 40%),
      color-mix(in oklab, var(--bloom-core) 62%, transparent) 0%,
      var(--bloom-mid) 30%,
      var(--bloom-edge) 58%,
      var(--void) 88%);
  opacity: 0.92;
  animation: bloom-drift 26s ease-in-out infinite alternate;
}
@keyframes bloom-drift {
  from { transform: translate3d(-1%, -0.8%, 0) scale(1.02); }
  to   { transform: translate3d(1%, 1%, 0) scale(1.06); }
}

/* Gold micro-badge — the single warm element in sections that have no CTA.
   bar.md mechanism 3 requires exactly one per viewport, never zero. */
.pill-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--rupee-gold) 16%, transparent);
  border: 1px solid color-mix(in oklab, var(--rupee-gold) 55%, transparent);
  color: var(--rupee-gold);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  transition: opacity 0.35s ease;
  position: sticky;
  top: 88px;
  z-index: 3;
  animation: warm-breathe 4.2s ease-in-out infinite;
}

/* the warm accent quietly breathes — keeps the middle of the page alive
   (bar.md #6) without adding a second colour */
@keyframes warm-breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--rupee-gold) 30%, transparent); }
  50%      { box-shadow: 0 0 26px 2px color-mix(in oklab, var(--rupee-gold) 26%, transparent); }
}

/* badge promoted out of a short header so its sticky range covers the whole
   section — align it to the content column by hand */
.pill-rail {
  margin-left: max(24px, calc(50% - var(--max-width) / 2 + 24px));
}

/* ---------- Glass surface ---------- */
.glass {
  background: color-mix(in oklab, var(--deep) 55%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline);
  border-radius: var(--card-radius);
}

/* ---------- Liquid cursor ---------- */
.cursor-dot,
.cursor-blob {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--ice);
}
.cursor-blob {
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  background: radial-gradient(circle,
    color-mix(in oklab, var(--bloom-core) 85%, transparent) 0%,
    color-mix(in oklab, var(--signal) 35%, transparent) 55%,
    transparent 72%);
  filter: blur(5px);
  z-index: 9997;
}
.cursor-blob.is-hot {
  background: radial-gradient(circle,
    color-mix(in oklab, var(--rupee-gold) 85%, transparent) 0%,
    color-mix(in oklab, var(--rupee-gold) 30%, transparent) 58%,
    transparent 74%);
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-blob { display: none; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 20px;
}

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

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.loader-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-rupee {
  width: 88px;
  height: 88px;
  animation: loader-spin 1.4s linear infinite;
}
.loader-ring {
  fill: none;
  stroke: var(--ice);
  stroke-width: 2;
  stroke-dasharray: 60 200;
  stroke-linecap: round;
}
.loader-symbol {
  font-family: var(--font-display);
  font-size: 40px;
  fill: var(--cobalt);
  transform-box: fill-box;
  transform-origin: center;
  animation: loader-spin-reverse 1.4s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }
@keyframes loader-spin-reverse { to { transform: rotate(-360deg); } }
.loader-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fog);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: color-mix(in oklab, var(--void) 62%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  color: var(--ice);
}
.nav-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
}
.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-links a { color: var(--slate); transition: color 0.25s ease; }
.nav-links a:hover { color: var(--ice); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--btn-radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--ice);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
/* The one warm element per viewport — see bar.md mechanism 3. */
.btn-gold, .btn-primary {
  background: var(--rupee-gold);
  border-color: var(--rupee-gold);
  color: #17233d;
  animation: warm-breathe 4.2s ease-in-out infinite;
}
.btn-gold:hover, .btn-primary:hover {
  box-shadow: 0 0 34px 0 color-mix(in oklab, var(--rupee-gold) 45%, transparent);
}
.btn-ghost, .btn-outline {
  background: color-mix(in oklab, var(--deep) 45%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--hairline);
  color: var(--ice);
}
.btn-ghost:hover, .btn-outline:hover {
  border-color: color-mix(in oklab, var(--signal) 55%, transparent);
  color: var(--ice);
}
.nav-cta { padding: 10px 20px; font-size: 13px; }
.btn-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  opacity: 0.62;
  margin-left: 10px;
}

/* ---------- Currency ticker ---------- */
.ticker {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--ink) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 46px;
  display: flex;
  align-items: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
  padding-left: 40px;
}
.ticker-item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--slate);
}
.ticker-rupee { color: color-mix(in oklab, var(--signal) 60%, var(--ice)); }
/* live status reads cyan, not gold — gold is reserved for the single CTA */
.ticker-orange { color: var(--signal); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 140px 24px 120px;
  overflow: hidden;
}
#heroField {
  position: absolute;
  inset: 0;
  /* a <canvas> is a replaced element — inset:0 alone leaves it at its
     intrinsic 300x150, so it needs explicit dimensions to fill the hero */
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 940px;
  margin: 0 auto;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ice);
  margin-bottom: 28px;
}
/* two-tone headline — mechanism 2 of the bar */
.hero-title .tint,
.section-title .tint {
  display: block;
  color: color-mix(in oklab, var(--signal) 55%, var(--ice));
}
.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--mist);
  max-width: 620px;
  margin: 0 auto 44px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-scrollcue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--slate);
}
.hero-scrollcue span:last-child {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--signal), transparent);
  animation: cue-fall 2.4s ease-in-out infinite;
}
@keyframes cue-fall {
  0%, 100% { opacity: 0.25; transform: scaleY(0.6); transform-origin: top; }
  50%      { opacity: 1;    transform: scaleY(1);   transform-origin: top; }
}

/* ---------- How it works: pinned horizontal journey ---------- */
.arch { position: relative; overflow: hidden; padding: var(--section-gap) 0 0; }
.arch-head {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto 72px;
  padding: 0 24px;
}
.section-sub {
  font-size: 17px;
  color: var(--mist);
  max-width: 620px;
}
.arch-stage { position: relative; z-index: 2; }
.arch-viewport { position: relative; padding: 0 0 var(--section-gap); }

/* the wire the packet rides along */
.arch-wire {
  position: relative;
  height: 42px;
  margin: 0 0 34px;
}
.arch-wire-base,
.arch-wire-fill {
  position: absolute;
  top: 20px;
  left: 0;
  height: 1px;
}
.arch-wire-base {
  width: 100%;
  background: repeating-linear-gradient(90deg,
    var(--hairline) 0 8px, transparent 8px 16px);
}
.arch-wire-fill {
  width: 0%;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--signal) 70%, transparent),
    var(--signal));
  box-shadow: 0 0 14px 1px color-mix(in oklab, var(--signal) 55%, transparent);
}
.arch-packet {
  opacity: 0;
  transition: opacity 0.4s ease;
  position: absolute;
  top: 20px;
  left: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--rupee-gold);
  color: #17233d;
  font-family: var(--font-display);
  font-size: 15px;
  box-shadow: 0 0 26px 2px color-mix(in oklab, var(--rupee-gold) 50%, transparent);
}

/* horizontal track of hops */
.arch-track {
  display: flex;
  gap: 26px;
  padding: 0 24px;
  width: max-content;
}
.hop {
  position: relative;
  flex: 0 0 auto;
  width: 340px;
  padding: 30px;
  opacity: 0.42;
  transition: opacity 0.45s ease, border-color 0.45s ease, transform 0.45s ease;
}
.hop.is-live {
  opacity: 1;
  border-color: color-mix(in oklab, var(--signal) 42%, transparent);
  transform: translateY(-6px);
}
.hop-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  color: var(--mist);
  margin-bottom: 22px;
  transition: color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}
.hop-icon svg { width: 21px; height: 21px; }
.hop.is-live .hop-icon {
  color: var(--signal);
  border-color: color-mix(in oklab, var(--signal) 50%, transparent);
  box-shadow: 0 0 24px 0 color-mix(in oklab, var(--signal) 28%, transparent);
}
.hop-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 12px;
  transition: color 0.45s ease;
}
.hop.is-live .hop-tag { color: var(--signal); }
.hop-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ice);
  margin-bottom: 12px;
}
.hop-body { font-size: 15px; line-height: 1.62; color: var(--mist); }

@media (max-width: 860px) {
  .arch-track { width: auto; flex-direction: column; }
  .hop { width: auto; opacity: 1; }
  .arch-wire { display: none; }
}

/* ---------- Screenshot banner (auto-scrolling marquee) ---------- */
.screens {
  position: relative;
  padding: var(--section-gap) 0;
  /* no overflow:hidden here — it would make this a scroll container and kill
     the sticky gold badge. The marquee does its own clipping. */
}
.screens-head {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto 60px;
  padding: 0 24px;
}
.screens-marquee {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent);
}
.screens-track {
  display: flex;
  gap: 34px;
  width: max-content;
  padding: 6px 0 10px;
  animation: screens-scroll 78s linear infinite;
}
.screens-marquee:hover .screens-track { animation-play-state: paused; }
@keyframes screens-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 17px)); }
}
.phone-card { flex: 0 0 auto; width: 234px; }
.phone-frame {
  border: 1px solid var(--hairline);
  border-radius: 26px;
  padding: 8px;
  background: color-mix(in oklab, var(--deep) 60%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.phone-frame img { display: block; width: 100%; height: auto; border-radius: 18px; }
.phone-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  text-align: center;
  margin-top: 16px;
}
@media (prefers-reduced-motion: reduce) {
  .screens-track { animation: none; }
  .screens-marquee { overflow-x: auto; }
}

/* ---------- About / team ---------- */
.about { position: relative; }
.about > *:not(.bloom):not(.pill-gold) { position: relative; z-index: 2; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.team-card {
  padding: 28px;
  transition: border-color 0.35s ease, transform 0.35s ease;
}
.team-card:hover {
  border-color: color-mix(in oklab, var(--signal) 45%, transparent);
  transform: translateY(-4px);
}
.team-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--signal) 45%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
  flex: 0 0 auto;
}
.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* baked to a normalised cool duotone at build time so mixed-source photos
     (studio, phone snaps, one illustration) land on one luminance + head scale */
  transition: filter 0.4s ease, transform 0.4s ease;
}
.team-card:hover .team-photo { filter: brightness(1.12); transform: scale(1.04); }
.team-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  color: var(--ice);
  margin-bottom: 5px;
}
.team-role { font-size: 14px; color: var(--mist); margin-bottom: 16px; }
.team-linkedin {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.team-linkedin:hover,
.team-linkedin:focus-visible {
  color: var(--signal);
  border-bottom-color: color-mix(in oklab, var(--signal) 60%, transparent);
}
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { position: relative; text-align: center; }
.contact > *:not(.bloom):not(.pill-gold) { position: relative; z-index: 2; }
.contact .section-title,
.contact .section-sub { margin-left: auto; margin-right: auto; }
.contact .section-sub { margin-bottom: 40px; }
.contact-email {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---------- Scroll reveal ----------
   Reveals are driven by GSAP (js/main.js), which animates *from* a hidden
   state to the element's natural one. So elements must NOT start hidden in
   CSS: if GSAP ever fails to load, the content simply shows. */
.reveal { will-change: transform, opacity; }

/* ---------- Shared section shell ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-gap) 24px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ice);
  margin-bottom: 20px;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  border-top: 1px solid var(--hairline);
  padding: 40px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero { padding: 110px 20px 90px; }
  .section { padding: 90px 20px; }
  .arch { padding-top: 90px; }
  .arch-head { margin-bottom: 48px; }
}


/* ---------- Reduced motion: stop every ambient loop ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bloom,
  .hero-scrollcue span:last-child,
  .loader-rupee,
  .loader-symbol,
  .ticker-track,
  .screens-track,
  .pill-gold,
  .btn-gold {
    animation: none !important;
  }
  .arch-packet { opacity: 1; }
  .hop { opacity: 1; }
  /* no pin means no horizontal scrub — the track must scroll by hand
     or hops 04/05 are unreachable behind .arch{overflow:hidden} */
  .arch-viewport { overflow-x: auto; }
  .arch-track { transform: none !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
