/* ==========================================================================
   Showcase layer — dark-blue hero, preloader, cursor, spotlight, shimmer
   ========================================================================== */

/* Shimmering gradient text */
.grad-text {
  background-image: linear-gradient(110deg, var(--blue-600) 0%, var(--blue-400) 30%, var(--sky) 50%, var(--blue-400) 70%, var(--blue-600) 100%);
  background-size: 220% 100%;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--navy-950);
  animation: preHide 0.7s var(--ease) 2.6s forwards; /* fail-safe without JS */
}
.preloader.done { animation: preHide 0.7s var(--ease) forwards; }
@keyframes preHide { to { opacity: 0; visibility: hidden; transform: translateY(-4%); } }
.preloader__inner { display: flex; align-items: center; gap: 18px; }
.preloader svg { width: 72px; height: 72px; overflow: visible; }
.preloader .pl-bg { transform-origin: 24px 24px; animation: plPop 0.7s var(--ease) both; }
.preloader .pl-s { stroke-dasharray: 60; stroke-dashoffset: 60; animation: plDraw 0.9s var(--ease) 0.35s forwards; }
.preloader .pl-spark { transform-origin: 36.5px 14px; transform: scale(0); animation: plSpark 0.5s var(--ease) 1.05s forwards; }
@keyframes plPop { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } }
@keyframes plDraw { to { stroke-dashoffset: 0; } }
@keyframes plSpark { 70% { transform: scale(1.5) rotate(90deg); } to { transform: scale(1) rotate(90deg); } }
.preloader__word { overflow: hidden; }
.preloader__word span {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.05;
  transform: translateY(105%);
  animation: plUp 0.8s var(--ease) 0.6s forwards;
}
.preloader__word small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--blue-300);
  transform: translateY(160%);
  animation: plUp 0.8s var(--ease) 0.75s forwards;
}
@keyframes plUp { to { transform: none; } }

/* ---------- Custom cursor ---------- */
.cursor, .cursor-dot { display: none; }
@media (pointer: fine) {
  .has-cursor .cursor, .has-cursor .cursor-dot {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 400;
    pointer-events: none;
    border-radius: 50%;
  }
  .has-cursor .cursor {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 1.5px solid rgba(47, 107, 255, 0.55);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background 0.3s, border-color 0.3s;
  }
  .has-cursor .cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--blue-600); }
  .has-cursor .cursor.hover { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(47, 107, 255, 0.12); border-color: transparent; }
  .has-cursor .cursor.on-dark { border-color: rgba(255, 255, 255, 0.6); }
  .has-cursor .cursor.on-dark + .cursor-dot { background: #fff; }
}

/* ---------- Dark-blue hero (home page) ---------- */
.home .hero {
  background:
    radial-gradient(900px 600px at 80% 20%, rgba(47, 107, 255, 0.55), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(56, 189, 248, 0.28), transparent 60%),
    linear-gradient(180deg, var(--navy-950) 0%, #0b2163 100%);
  color: #fff;
}
.home .hero__grid {
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  opacity: 1;
}
.home .blob--1 { background: var(--blue-500); opacity: 0.45; }
.home .blob--2 { background: var(--sky); opacity: 0.25; }
.home .hero__title { color: #fff; }
.questions .grad-text,
.home .hero .grad-text {
  background-image: linear-gradient(110deg, #8fb6ff 0%, #fff 25%, var(--sky) 50%, #fff 75%, #8fb6ff 100%);
}
.home .hero__lead { color: rgba(255, 255, 255, 0.8); }
.home .eyebrow { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); color: #cfe0ff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.home .hero__meta { border-top-color: rgba(255, 255, 255, 0.14); }
.home .hero__meta div { color: rgba(255, 255, 255, 0.85); }
.home .hero__meta svg { color: var(--sky); }
.home .hero .btn--ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3); }
.home .hero .btn--ghost::before { background: rgba(255, 255, 255, 0.1); }
.home .hero .btn:not(.btn--ghost) {
  background: #fff;
  color: var(--blue-700);
  animation: glowPulse 3s ease-in-out infinite;
}
.home .hero .btn:not(.btn--ghost)::before { background: var(--blue-50); }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45), 0 16px 40px -10px rgba(56, 189, 248, 0.6); }
  50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0), 0 16px 50px -6px rgba(56, 189, 248, 0.85); }
}
.home .hero__photo--top, .home .hero__photo--side { border-color: rgba(255, 255, 255, 0.9); }
.home .scroll-cue { border-color: rgba(255, 255, 255, 0.35); bottom: 90px; z-index: 2; }
.home .scroll-cue::after { background: #fff; }

/* Header over the dark hero */
.home .header:not(.scrolled) .brand__name { color: #fff; }
.home .header:not(.scrolled) .brand__sub { color: var(--blue-300); }
.home .header:not(.scrolled) .nav__link { color: rgba(255, 255, 255, 0.82); }
.home .header:not(.scrolled) .nav__link:hover,
.home .header:not(.scrolled) .nav__link.active { color: #fff; background: rgba(255, 255, 255, 0.1); }
.home .header:not(.scrolled) .nav__link.active::after { background: var(--sky); }
.home .header:not(.scrolled) .header__cta { background: #fff; color: var(--blue-700); }
.home .header:not(.scrolled) .header__cta::before { background: var(--blue-50); }
.home .header:not(.scrolled) .menu-toggle { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
.home .header:not(.scrolled) .menu-toggle span { background: #fff; }
.home.menu-open .header .brand__name { color: var(--ink); }
.home.menu-open .header .brand__sub { color: var(--blue-600); }
.home.menu-open .header .menu-toggle { background: #fff; border-color: var(--line); }
.home.menu-open .header .menu-toggle span { background: var(--ink); }
.home.menu-open .header .nav__link { color: var(--ink-2); }

/* Rotating light rings behind the hero visual */
.hero__ring {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(56, 189, 248, 0.9) 70%, #fff 75%, transparent 76%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: spin 9s linear infinite;
  pointer-events: none;
}
.hero__ring--2 { width: 500px; height: 500px; margin: -250px 0 0 -250px; animation-duration: 14s; animation-direction: reverse; opacity: 0.6; }
.hero__glow {
  position: absolute;
  z-index: 0;
  inset: 15% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}
.home .hero__photo { box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.home .hero__photo--main, .home .hero__photo--top, .home .hero__photo--side { z-index: 1; }
.home .float-card { color: var(--ink); }
.home .hero__caption { display: none; }

/* Hero bottom curve into white */
.hero__curve { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; width: 100%; height: 70px; color: #fff; display: block; }

/* ---------- Spotlight hover on light cards ---------- */
.spot { position: relative; overflow: hidden; }
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 107, 255, 0.13), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.spot:hover::after { opacity: 1; }

/* Animated gradient border for project cards */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.project { position: relative; }
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--ang), var(--blue-600), var(--sky), #fff, var(--blue-400), var(--blue-600));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 3;
  pointer-events: none;
  animation: angle 4s linear infinite;
}
.project:hover::before { opacity: 1; }
@keyframes angle { to { --ang: 360deg; } }

/* ---------- Facts strip ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 72px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-md);
}
.fact { background: #fff; padding: 34px 28px; }
.fact b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.4vw, 58px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
}
.fact span { color: var(--ink-2); font-size: 16.5px; }

/* Big outlined background word */
.ghost-word {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(100px, 18vw, 260px);
  letter-spacing: -0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue-100);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.section > .container { position: relative; z-index: 1; }

/* Legal pages keep the light header */
.legal-page .header { position: sticky; top: 0; }
.legal-page .legal-hero { padding-top: 80px; }

@media (max-width: 1100px) {
  .hero__ring { width: 480px; height: 480px; margin: -240px 0 0 -240px; }
  .hero__ring--2 { width: 380px; height: 380px; margin: -190px 0 0 -190px; }
}
html, body { overflow-x: clip; }

@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .hero__ring { width: 340px; height: 340px; margin: -170px 0 0 -170px; }
  .hero__ring--2 { display: none; }
  .ghost-word { top: 16px; }
  .service { min-height: 0; padding-top: 240px; }
  .service__arrow { display: none; }
  .fact { padding: 26px 20px; }
  .fact span { font-size: 15px; }
  .preloader__word span { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
}
