/* ==========================================================================
   Hero — cinematic depth stack
   Sits between the WebGL globe/living-bg (z 0) and the hero scrim (z 1):
   a slow perspective grid, drifting light beams, and soft glow particles.
   Everything here is transform/opacity only — GPU-friendly, 60fps, and
   fully inert under prefers-reduced-motion.
   ========================================================================== */

.hero-depth {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

/* ---- perspective floor grid — a faint horizon-line of structure that
   reads as "infrastructure" rather than decoration. Materializes in on
   load rather than sitting there static, so the first frame feels like
   the environment is assembling itself. ---- */
.hero-grid {
  position: absolute;
  left: 50%;
  bottom: -10%;
  width: 220%;
  height: 70%;
  transform: translateX(-50%) perspective(700px) rotateX(62deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(95,212,216,0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95,212,216,0.14) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 78%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 78%);
  opacity: 0;
  animation:
    grid-materialize 1.8s var(--ease-out) forwards,
    grid-drift 16s linear 1.8s infinite;
}

@keyframes grid-materialize {
  from { opacity: 0; transform: translateX(-50%) perspective(700px) rotateX(62deg) translateY(24px); }
  to   { opacity: 0.55; transform: translateX(-50%) perspective(700px) rotateX(62deg) translateY(0); }
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 -112px, 0 0; }
}

/* ---- architectural search-light beams — restrained, monochrome,
   engineered rather than a soft multicolor "AI gradient" wash. Thin,
   high-contrast shafts standing in for volumetric light through the
   infrastructure, not a decorative blob. ---- */
.hero-beams {
  position: absolute;
  inset: -20% -10%;
  opacity: 0;
  animation: beams-in 2.2s var(--ease-out) 0.3s forwards;
}

@keyframes beams-in {
  to { opacity: 1; }
}

.beam {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  mix-blend-mode: screen;
  filter: blur(2px);
}

.beam-1 {
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: conic-gradient(from 0deg,
    transparent 0deg,
    rgba(95,212,216,0.07) 6deg,
    transparent 16deg,
    transparent 194deg,
    rgba(79,140,255,0.06) 200deg,
    transparent 210deg,
    transparent 360deg);
  animation: beam-spin-1 110s linear infinite;
}

.beam-2 {
  width: 118vmax;
  height: 118vmax;
  margin: -59vmax 0 0 -59vmax;
  background: conic-gradient(from 90deg,
    transparent 0deg,
    rgba(95,212,216,0.055) 5deg,
    transparent 13deg,
    transparent 360deg);
  animation: beam-spin-2 150s linear infinite reverse;
}

.beam-3 {
  width: 60vmax;
  height: 60vmax;
  margin: -30vmax 0 0 -30vmax;
  background: radial-gradient(circle, rgba(95,212,216,0.08), transparent 62%);
  animation: beam-pulse 9s ease-in-out infinite;
}

@keyframes beam-spin-1 { to { transform: rotate(360deg); } }
@keyframes beam-spin-2 { to { transform: rotate(360deg); } }
@keyframes beam-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.06); }
}

/* ---- vertical spotlight column — a single narrow shaft of light
   dropping straight down behind the mark and headline, the way a
   single architectural light picks out one object in a dark room.
   This is the element doing the most work to feel "premium" rather
   than "generic gradient background". ---- */
.hero-spotlight {
  position: absolute;
  top: -10%;
  left: 50%;
  width: min(46vw, 620px);
  height: 130%;
  transform: translateX(-50%);
  background: linear-gradient(180deg,
    rgba(95,212,216,0.16) 0%,
    rgba(95,212,216,0.07) 28%,
    rgba(95,212,216,0.02) 55%,
    transparent 80%);
  clip-path: polygon(46% 0%, 54% 0%, 78% 100%, 22% 100%);
  opacity: 0;
  animation: spotlight-in 2s var(--ease-out) 0.15s forwards, spotlight-breathe 7s ease-in-out 2.2s infinite;
  mix-blend-mode: screen;
}

@keyframes spotlight-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spotlight-breathe {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

/* ---- one-shot ignition ring — the "system coming online" moment
   behind the logo mark: a bright ring expands outward once from the
   core and dissolves, timed with the headline rising in just after.
   Never repeats — an idle looping pulse would cheapen it. ---- */
.hero-ignition {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1px solid rgba(95,212,216,0.8);
  box-shadow: 0 0 30px 4px rgba(95,212,216,0.35);
  opacity: 0;
  animation: ignition-expand 1.4s var(--ease-out) 0.25s forwards;
}

@keyframes ignition-expand {
  0%   { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(9); }
}

/* ---- one-shot scanline sweep — a thin band of light sweeping down
   the full hero once on load, like a system boot / calibration pass. ---- */
.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -6%;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(95,212,216,0.16), transparent);
  opacity: 0;
  animation: scanline-sweep 1.7s var(--ease-in-out) 0.2s forwards;
}

@keyframes scanline-sweep {
  0%   { top: -6%; opacity: 0; }
  8%   { opacity: 0.9; }
  92%  { opacity: 0.5; }
  100% { top: 104%; opacity: 0; }
}

/* ---- soft glow particles — populated by js/hero-premium.js, each one a
   single absolutely-positioned dot drifting its own slow path. Sparse
   and dim — telemetry dust, not confetti. ---- */
.hero-particles {
  position: absolute;
  inset: 0;
}

.hero-particle {
  position: absolute;
  width: var(--p-size, 3px);
  height: var(--p-size, 3px);
  border-radius: 50%;
  background: var(--p-color, var(--cyan));
  box-shadow: 0 0 8px 1px var(--p-color, var(--cyan));
  opacity: 0;
  animation: particle-drift var(--p-dur, 14s) ease-in-out infinite;
  animation-delay: var(--p-delay, 0s);
}

@keyframes particle-drift {
  0%   { opacity: 0; transform: translate(0, 0); }
  10%  { opacity: var(--p-opacity, 0.6); }
  50%  { transform: translate(var(--p-x, 20px), var(--p-y, -60px)); }
  90%  { opacity: var(--p-opacity, 0.6); }
  100% { opacity: 0; transform: translate(calc(var(--p-x, 20px) * 2), calc(var(--p-y, -60px) * 2)); }
}

/* parallax response — small, cheap translate nudges applied by JS via
   custom properties rather than per-frame layout writes */
.hero-grid   { transform: translateX(-50%) perspective(700px) rotateX(62deg) translate3d(var(--px, 0), var(--py, 0), 0); }
.hero-beams  { transform: translate3d(var(--bx, 0), var(--by, 0), 0); }

/* ---- the logo anchor above the eyebrow — elegant, breathing light,
   the visual centerpiece the eye lands on first ---- */
.hero-mark {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mark img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 18px rgba(95,212,216,0.35));
  animation: mark-breathe 5s ease-in-out 2s infinite;
}

.hero-mark-glow {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95,212,216,0.35), rgba(79,140,255,0.12) 45%, transparent 72%);
  filter: blur(10px);
  animation: mark-glow-pulse 5s ease-in-out 2s infinite;
}

@keyframes mark-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 18px rgba(95,212,216,0.32)); }
  50%      { transform: scale(1.05); filter: drop-shadow(0 0 26px rgba(95,212,216,0.5)); }
}

@keyframes mark-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.94); }
  50%      { opacity: 1; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid, .beam, .hero-particle, .hero-mark img, .hero-mark-glow,
  .hero-spotlight, .hero-ignition, .hero-scanline, .hero-beams {
    animation: none !important;
    opacity: 1;
  }
  .hero-ignition, .hero-scanline { display: none; }
}

@media (max-width: 760px) {
  .hero-grid { opacity: 0.35; }
  .beam-1, .beam-2 { display: none; }
  .hero-spotlight { width: 80vw; }
}

/* ==========================================================================
   Sitewide refined micro-interactions — premium hover states, elevation,
   and glow applied consistently to the existing card/button/panel language
   rather than introducing a second visual system.
   ========================================================================== */

.btn {
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.3s ease, border-color 0.3s ease;
}
.btn-primary:hover { box-shadow: 0 8px 30px -6px rgba(95,212,216,0.45); }
.btn-ghost:hover   { box-shadow: 0 8px 24px -10px rgba(255,255,255,0.12); }

.panel,
.tilt-card,
.principle-card,
.glass {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s ease;
}

.principle-card:hover,
.tilt-card:hover {
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.55), 0 0 0 1px rgba(95,212,216,0.12);
}

.core-node,
.eco-item,
.nav-cta,
a.magnetic {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
