/* RNS "hip" layer (2026-11-17) — a younger, modern feel INSIDE the existing
   palette (sky #0ea5e9 / #38bdf8 on navy #0b1220) and the Feng Shui rules:
   one accent family, even spacing, nothing garish. Loads last, after
   styles.min.css and tiles.css. All hover motion is gated behind
   (hover: hover) and (pointer: fine) per the mobile-native rules, and the
   ticker stops under prefers-reduced-motion. */

:root {
  --hip-grad: linear-gradient(92deg, #38bdf8 0%, #0ea5e9 45%, #6366f1 100%);
  --hip-glow: 0 12px 34px rgba(14, 165, 233, .28);
}

body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

h1, h2, h3, .hip-ticker span {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.4rem); line-height: 1.08; }

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

.eyebrow {
  background: var(--hip-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .14em;
}

/* Frosted sticky header */
.site-header {
  background: rgba(11, 18, 32, .85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Hero glow — light pools + a sparse field of crisp micro-dots behind the
   hero copy. This layer counter-drifts for parallax depth against the
   orbs; the dots have hard edges, so their drift reads clearly even on a
   phone screen. */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -12%; z-index: 0;
  background:
    radial-gradient(circle 3px at 18% 24%, rgba(125, 211, 252, .55), transparent 100%),
    radial-gradient(circle 2px at 34% 68%, rgba(125, 211, 252, .45), transparent 100%),
    radial-gradient(circle 3px at 58% 16%, rgba(165, 180, 252, .5), transparent 100%),
    radial-gradient(circle 2px at 71% 44%, rgba(125, 211, 252, .5), transparent 100%),
    radial-gradient(circle 3px at 86% 74%, rgba(165, 180, 252, .45), transparent 100%),
    radial-gradient(circle 2px at 44% 38%, rgba(125, 211, 252, .4), transparent 100%),
    radial-gradient(circle 2px at 92% 12%, rgba(125, 211, 252, .45), transparent 100%),
    radial-gradient(560px 320px at 12% 8%, rgba(56, 189, 248, .16), transparent 65%),
    radial-gradient(640px 380px at 88% 22%, rgba(99, 102, 241, .13), transparent 65%);
  pointer-events: none;
  animation: hip-drift-back 24s ease-in-out infinite alternate;
}
@keyframes hip-drift-back {
  from { transform: translate3d(3%, 2%, 0); }
  to { transform: translate3d(-3%, -2%, 0); }
}
/* Moving background: three orbs drifting behind the hero. Transform-only
   animation (GPU-friendly, no layout thrash). Tuned 2026-11-17 v3:
   tighter, brighter orbs on a 14s cycle — v1/v2 soft-glow versions were
   honestly invisible on a phone (pixel-diff proof: 0.0% of pixels moved).
   Stops for reduced motion. */
.hero::after {
  content: "";
  position: absolute; inset: -22%; z-index: 0;
  background:
    radial-gradient(240px 240px at 22% 30%, rgba(56, 189, 248, .30), transparent 70%),
    radial-gradient(300px 300px at 74% 62%, rgba(99, 102, 241, .26), transparent 70%),
    radial-gradient(180px 180px at 55% 14%, rgba(14, 165, 233, .24), transparent 70%);
  pointer-events: none;
  animation: hip-drift 14s ease-in-out infinite alternate;
}
@keyframes hip-drift {
  from { transform: translate3d(-8%, -5%, 0) scale(1); }
  to { transform: translate3d(8%, 6%, 0) scale(1.18); }
}
.hero .container { position: relative; z-index: 1; }

/* Pill buttons; primary carries the gradient */
.btn, .nav-cta, .footer-cta, .sticky-cta { border-radius: 999px; }
.btn.primary, .nav-cta, .footer-cta, .sticky-cta {
  background: var(--hip-grad);
  box-shadow: var(--hip-glow);
}
@media (hover: hover) and (pointer: fine) {
  .btn.primary:hover, .nav-cta:hover, .footer-cta:hover, .sticky-cta:hover {
    background: var(--hip-grad);
    filter: brightness(1.1);
    transform: translateY(-1px);
  }
  .btn.secondary:hover { transform: translateY(-1px); }
}

/* Cards: rounder corners, lift + glow on hover (fine pointers only) */
.audit-card, .story-card, .testimonial-tile, .case-link-card, .cards > article, .cards > li {
  border-radius: 20px;
}
@media (hover: hover) and (pointer: fine) {
  .audit-card, .story-card, .testimonial-tile, .case-link-card, .cards > article, .cards > li {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  }
  .audit-card:hover, .story-card:hover, .testimonial-tile:hover, .case-link-card:hover,
  .cards > article:hover, .cards > li:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, .55);
    box-shadow: 0 18px 40px rgba(2, 132, 199, .22);
  }
}

/* Services ticker — slim scrolling band under the hero */
.hip-ticker {
  overflow: hidden;
  border-top: 1px solid rgba(56, 189, 248, .25);
  border-bottom: 1px solid rgba(56, 189, 248, .25);
  background: linear-gradient(90deg, rgba(14, 165, 233, .10), rgba(99, 102, 241, .10));
  padding: .8rem 0;
}
.hip-ticker-track {
  display: flex; width: max-content;
  animation: hip-scroll 30s linear infinite;
}
.hip-ticker span {
  white-space: nowrap;
  font-size: .95rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text);
  padding-right: .5rem;
}
.hip-ticker i { font-style: normal; color: #38bdf8; padding: 0 .9rem; }
@media (hover: hover) and (pointer: fine) {
  .hip-ticker:hover .hip-ticker-track { animation-play-state: paused; }
}
@keyframes hip-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hip-ticker-track { animation: none; }
  .hero::before, .hero::after { animation: none; }
}

::selection { background: rgba(14, 165, 233, .45); }
:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
