/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --bg-dark:          #10131c;
  --bg-card:          #131a29;
  --bg-card-hover:    #1a2339;
  --color-primary-01: #4991e5;
  --color-primary-02: #39bdd6;
  --color-primary-03: #3bd4cb;
  --color-primary-04: #bad7f5;
  --color-white:      #F2F5FA;
  --color-dark:       #121111;

  /* Custom easings */
  --ease-fast:   cubic-bezier(.17, .67, .1, .99);
  --ease-faster: cubic-bezier(.19, 1, .22, 1);
  --ease-slow:   cubic-bezier(.73, 0, 0, 1);
}

/* ============================================
   AURORA CANVAS — opt-in per section/container
   Add class .fx-aurora to any Elementor section
   or container. JS injects the canvas automatically.
   ============================================ */
.fx-aurora {
  position: relative;
  overflow: hidden;
}

/* Canvas injected by JS as first child of .fx-aurora */
.fx-aurora-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  will-change: transform; /* own GPU compositor layer — prevents jank on other CSS transitions */
}

/* All direct children of .fx-aurora sit above the canvas */
.fx-aurora > *:not(.fx-aurora-canvas) {
  position: relative;
  z-index: 1;
}

/* ============================================
   AURORA OVERLAY MODE
   Add both classes: fx-aurora fx-aurora-overlay
   Use on sections that already have a dark background
   or a background image. The aurora orbs blend on top
   using screen mode (black = transparent, colors add).
   z-index: 2 puts the canvas above image widgets.
   ============================================ */
.fx-aurora.fx-aurora-overlay {
  isolation: isolate; /* contain blending within this section */
}

.fx-aurora.fx-aurora-overlay .fx-aurora-canvas {
  z-index: 2;
  mix-blend-mode: screen;
}

/* ============================================
   NAVIGATION — glassmorphism
   ============================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#site-header .nav-bg {
  position: absolute;
  inset: 0;
  background: rgba(16, 19, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(73, 145, 229, 0.1);
  z-index: -1;
}

#site-header nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  width: 100%;
  justify-content: space-between;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  position: relative;
  z-index: 1;
}

.hero .container { max-width: 700px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 1.5rem;
  background: rgba(26, 33, 50, 0.9);
  border: 1px solid rgba(73, 145, 229, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--color-primary-02);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.1rem;
  opacity: 0.7;
  margin-bottom: 2rem;
  max-width: 40ch;
}

/* ============================================
   TEXT GRADIENT + SHINE
   Wrap text: <span class="text-gradient">words</span>
   ============================================ */
.text-gradient {
  background: linear-gradient(
    90deg,
    var(--color-primary-01),
    var(--color-primary-02),
    var(--color-primary-03)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shine 3s linear infinite;
}

@keyframes text-shine {
  0%   { background-position: 100% center; }
  100% { background-position: -100% center; }
}

/* ============================================
   BUTTONS — direct use (non-Elementor)
   ============================================ */
.btn-primary {
  display: inline-block;
  padding: 0.8em 1.6em;
  background: var(--color-primary-04);
  color: var(--bg-dark);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease-fast);
}

.btn-primary:hover { transform: scale(0.97); }

/* ============================================
   BUTTON PULSE ANIMATION
   In Elementor: add btn-pulse to the button widget
   CSS Class — rings are applied to the inner
   .elementor-button element, not the full-width wrapper.
   ============================================ */

/* Elementor button widget: pulse on the inner <a> */
.btn-pulse .elementor-button {
  position: relative;
  overflow: hidden;
}

.btn-pulse .elementor-button::before,
.btn-pulse .elementor-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(186, 215, 245, 0.3);
  animation: btn-pulse 2.5s ease-out infinite;
  pointer-events: none;
}

.btn-pulse .elementor-button::after { animation-delay: 1.25s; }

/* Non-Elementor direct button: suppress wrapper pseudo-elements
   and apply only when .btn-pulse is the button itself          */
.btn-pulse:has(.elementor-button)::before,
.btn-pulse:has(.elementor-button)::after { display: none; }

/* Direct .btn-pulse on a button element (non-Elementor) */
.btn-pulse:not(:has(.elementor-button))::before,
.btn-pulse:not(:has(.elementor-button))::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(186, 215, 245, 0.3);
  animation: btn-pulse 2.5s ease-out infinite;
  pointer-events: none;
}

.btn-pulse:not(:has(.elementor-button))::after { animation-delay: 1.25s; }

@keyframes btn-pulse {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.4); }
}

/* ============================================
   DARK SECTION
   ============================================ */
.section-dark {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
  background: rgba(8, 11, 18, 0.5);
}

.section-dark h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 3rem;
}

/* ============================================
   BENTO GRID
   ============================================ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* ============================================
   FX CARD + RIM LIGHT
   Add .fx-card to any Elementor container/card.
   JS automatically injects .fx-rimlight inside it.
   NO HTML widget needed.
   The container should have a border-radius set
   in Elementor for the rim to follow the card shape.
   Do NOT set overflow:hidden on the card — it will
   clip the rim light border.
   ============================================ */
.fx-card {
  position: relative;
}

/* Injected by JS as first child of .fx-card */
.fx-rimlight {
  --rim-angle: 0deg;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s var(--ease-faster);
}

.fx-card:hover .fx-rimlight { opacity: 1; }

/* Outer glow layer */
.fx-rimlight::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--rim-angle),
    var(--color-primary-02)        0%,
    rgba(73,145,229, 0.5)         15%,
    transparent                   30%,
    transparent                   35%,
    rgba(73,145,229, 0.18)        50%,
    transparent                   65%,
    transparent                   75%,
    var(--color-primary-02)      100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: blur(3px);
  opacity: 0.7;
}

/* Inner crisp border */
.fx-rimlight::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--rim-angle),
    var(--color-primary-02)       0%,
    rgba(73,145,229, 0.3)        20%,
    transparent                  35%,
    transparent                  70%,
    rgba(73,145,229, 0.1)        85%,
    var(--color-primary-02)     100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Ensure card content sits above the rim light overlay */
.fx-card > *:not(.fx-rimlight) {
  position: relative;
  z-index: 1;
}

/* ============================================
   LIGHT SECTION
   ============================================ */
.section-light {
  position: relative;
  z-index: 2;
  padding: 6rem 0;
  background: #F2F5FA;
  color: #10131c;
}

.section-light h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: #10131c;
}

/* ============================================
   SCROLL REVEAL — add .fx-reveal to any element
   Optional stagger: add attribute data-fx-delay="100"
   ============================================ */
.fx-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  0.8s var(--ease-faster),
    transform 0.8s var(--ease-faster);
}

.fx-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fx-reveal[data-fx-delay] {
  transition-delay: var(--fx-delay, 0ms);
}

/* ============================================
   REDUCED MOTION — respect user preference
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .text-gradient                          { animation: none; }
  .btn-pulse .elementor-button::before,
  .btn-pulse .elementor-button::after,
  .btn-pulse:not(:has(.elementor-button))::before,
  .btn-pulse:not(:has(.elementor-button))::after { animation: none; }
  .fx-reveal                              { opacity: 1; transform: none; transition: none; }
}
