/* ============================================================
   Shared ambient "landing" theme for inner pages.
   Provides the dark hero gradient, glass cards, and the
   animated background layers (stars, orbs, particles, 3D tilt).
   Page-specific CSS files map their own sections/cards onto the
   .amb-dark / .amb-glass utilities defined here.
   ============================================================ */

:root {
  --amb-grad:
    radial-gradient(circle at 70% 30%, rgba(183, 0, 255, 0.35) 0%, transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(255, 0, 153, 0.06) 0%, transparent 12%),
    radial-gradient(circle at 92% 22%, rgba(98, 0, 255, 0.22) 0%, transparent 10%),
    radial-gradient(circle at 65% 55%, rgba(111, 0, 255, 0.18) 0%, transparent 28%),
    linear-gradient(135deg, #02010a 0%, #05031a 18%, #090021 35%, #12002d 55%, #0b0220 72%, #03010d 100%);
  --amb-ig: linear-gradient(135deg, #3a64bf 0%, #14275c 100%);
}

/* ── dark, living-gradient sections ───────────────────────── */
.amb-dark {
  background: var(--amb-grad) !important;
  background-size: cover !important;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: rgba(255, 255, 255, 0.82);
}

/* default text lightening inside dark sections */
.amb-dark h1,
.amb-dark h2,
.amb-dark h3,
.amb-dark h4,
.amb-dark h5 {
  color: #fff;
}
.amb-dark p,
.amb-dark li,
.amb-dark span,
.amb-dark label,
.amb-dark td,
.amb-dark th {
  color: rgba(255, 255, 255, 0.72);
}
.amb-dark a:not(.btn):not([class*="btn"]) {
  color: #c7b8ff;
}

/* ── glass cards ──────────────────────────────────────────── */
.amb-glass {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35) !important;
  color: rgba(255, 255, 255, 0.72);
}
.amb-glass h1,
.amb-glass h2,
.amb-glass h3,
.amb-glass h4,
.amb-glass h5 {
  color: #fff;
}

/* small chips / icon tiles → dark gradient */
.amb-chip {
  background: var(--amb-ig) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}
.amb-chip svg { stroke: #fff !important; }

/* ── twinkling stars ──────────────────────────────────────── */
.star-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 1;
  animation: ambTwinkle var(--tw, 3s) ease-in-out infinite;
}
@keyframes ambTwinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.7); }
  50%      { opacity: 0.9;  transform: scale(1.5); }
}

/* ── drifting glow orbs ───────────────────────────────────── */
.section-orb {
  position: absolute;
  width: 42vw;
  max-width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
  animation: ambOrbFloat 20s ease-in-out infinite;
}
@keyframes ambOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4%, 6%) scale(1.12); }
  66%      { transform: translate(-5%, -4%) scale(0.94); }
}

/* ── auto-drifting glowing particle field ─────────────────── */
.fx-particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.fx-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.9;
  animation: ambDrift var(--dur, 10s) ease-in-out infinite alternate;
}
@keyframes ambDrift {
  0%   { transform: translate(0, 0) scale(0.8); opacity: 0.25; }
  50%  { opacity: 0.95; }
  100% { transform: translate(var(--dx, 20px), var(--dy, -60px)) scale(1.25); opacity: 0.4; }
}

/* mouse-follow parallax offset (composes with keyframe transform) */
.parallax,
.star-field {
  translate: var(--px, 0) var(--py, 0);
}

/* ── interactive 3D tilt cards ────────────────────────────── */
.tilt3d {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.4s;
  will-change: transform;
}
.tilt3d:hover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(179, 140, 255, 0.4) !important;
}
.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: transparent;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 4;
  mix-blend-mode: soft-light;
}
.tilt3d:hover .tilt-glare { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .amb-dark, .section-orb, .fx-dot, .star { animation: none !important; }
}
@media (max-width: 768px) {
  .section-orb { opacity: 0.4; }
}
