/* ════════════════════════════════════════════════════════════════
   ███  AURORA FX  ███   — warstwa „pioneer IT" (beauty)
   Konstelacja (stonowana), 3D-tilt, magnetyczne przyciski, custom cursor,
   żywy mesh-gradient, wirujące ramki, sheen. Gate: desktop + reduced-motion.
   ════════════════════════════════════════════════════════════════ */

@property --fx-angle{ syntax:'<angle>'; initial-value:0deg; inherits:false; }

/* ---------- żywy mesh-gradient w tle całej strony ---------- */
.fx-aurora-bg{ position:fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden; background:#080b12; }
.fx-aurora-bg::before, .fx-aurora-bg::after{
  content:""; position:absolute; inset:-40%;
  background:
    radial-gradient(38% 42% at 22% 28%, rgba(246,181,58,0.20), transparent 60%),
    radial-gradient(34% 40% at 80% 18%, rgba(232,130,30,0.16), transparent 60%),
    radial-gradient(46% 50% at 62% 82%, rgba(255,210,122,0.12), transparent 60%),
    radial-gradient(40% 44% at 12% 78%, rgba(120,90,255,0.07), transparent 60%);
  filter:blur(40px); animation:fxMesh 26s linear infinite;
}
.fx-aurora-bg::after{ animation-duration:38s; animation-direction:reverse; opacity:.7; }
@keyframes fxMesh{
  0%{ transform:translate(0,0) rotate(0deg) scale(1.05); }
  33%{ transform:translate(3%,-2%) rotate(120deg) scale(1.12); }
  66%{ transform:translate(-2%,3%) rotate(240deg) scale(1.0); }
  100%{ transform:translate(0,0) rotate(360deg) scale(1.05); }
}
.fx-grid-dots{
  position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.5;
  background-image:radial-gradient(rgba(246,181,58,0.08) 1px, transparent 1px); background-size:34px 34px;
  mask-image:radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image:radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}

/* ---------- hero: konstelacja (stonowana) ---------- */
.hero{ perspective:1200px; }
.hero-bg{ z-index:0; }
.hero-overlay{ z-index:2; }
.fx-hero-canvas{ position:absolute; inset:0; z-index:3; pointer-events:none; width:100%; height:100%; opacity:.5; }
.hero-inner{ z-index:6 !important; }

/* sheen na akcentach + FIX dla nagłówka hero (rozbijany na litery .split-char) */
.h2 .accent, .h2-large .accent, .hero-title .accent, .config-result-value{
  background-size:220% auto !important; animation:fxSheen 6s linear infinite;
}
.hero-title .accent, .hero-title .accent .split-char{
  background:var(--gold-grad) !important; background-size:220% auto !important;
  -webkit-background-clip:text !important; background-clip:text !important;
  -webkit-text-fill-color:transparent !important; color:transparent !important;
  text-shadow:none !important; animation:fxSheen 6s linear infinite;
}
@keyframes fxSheen{ 0%{ background-position:0% center; } 100%{ background-position:200% center; } }

/* ---------- wirujące świetlne ramki (conic) ---------- */
.config-result, .calc-results .result-card.primary{ position:relative; isolation:isolate; }
.config-result::after, .calc-results .result-card.primary::after{
  content:""; position:absolute; inset:-1.5px; z-index:-1; border-radius:inherit; padding:1.5px;
  background:conic-gradient(from var(--fx-angle), #ffd27a, #e8821e, #f6b53a, rgba(246,181,58,0) 55%, #ffd27a);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; animation:fxSpin 5s linear infinite;
}
@keyframes fxSpin{ to{ --fx-angle:360deg; } }

/* ---------- 3D tilt kart (JS ustawia --rx/--ry/--mx/--my) ---------- */
.feature, .scenario, .academy-card, .effect-card, .reco-card{
  isolation:isolate; transform-style:preserve-3d;
  transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(var(--ty,0px));
  transition:transform .18s ease-out, border-color .35s, box-shadow .35s;
}
.fx-tilt-active{ transition:transform .05s linear !important; }
/* refleks na karcie — z-index:-1, żeby nie psuć absolutnych dzieci */
.feature::before, .scenario::before, .academy-card::before, .effect-card::before, .reco-card::before{
  content:""; position:absolute; inset:0; z-index:-1; border-radius:inherit; pointer-events:none;
  background:radial-gradient(280px 280px at var(--mx,50%) var(--my,0%), rgba(255,210,122,0.16), transparent 60%);
  opacity:0; transition:opacity .35s;
}
.feature:hover::before, .scenario:hover::before, .academy-card:hover::before, .effect-card:hover::before, .reco-card:hover::before{ opacity:1; }

/* ---------- magnetyczne przyciski ---------- */
.btn, .btn-mini, .btn-large{ will-change:transform; }
.btn-primary{ position:relative; overflow:hidden; }
.btn-primary::after{
  content:""; position:absolute; top:0; left:-120%; width:60%; height:100%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform:skewX(-18deg); transition:left .6s ease;
}
.btn-primary:hover::after{ left:130%; }

/* ---------- custom cursor ---------- */
.fx-cursor-ring, .fx-cursor-dot{ position:fixed; top:0; left:0; z-index:99999; pointer-events:none; border-radius:50%; transform:translate(-50%,-50%); mix-blend-mode:screen; }
.fx-cursor-ring{ width:38px; height:38px; border:1.5px solid rgba(246,181,58,0.7); transition:width .22s ease, height .22s ease, border-color .22s, background .22s; box-shadow:0 0 18px rgba(246,181,58,0.25); }
.fx-cursor-dot{ width:5px; height:5px; background:var(--gold-bright); box-shadow:0 0 10px rgba(246,181,58,0.9); }
.fx-cursor-ring.is-hot{ width:62px; height:62px; border-color:rgba(255,210,122,0.95); background:rgba(246,181,58,0.06); }
@media (hover:none),(max-width:880px){ .fx-cursor-ring,.fx-cursor-dot{ display:none !important; } }

/* ---------- świetlne linie-separatory między sekcjami ---------- */
.section + .section::before,
.section-problem::before, .section-solution::before, .section-proof::before, .section-calc::before,
.section-config::before, .section-scenarios::before, .section-science::before, .section-process::before,
.section-compare::before, .section-faq::before{
  content:""; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:min(1180px,90%); height:1px; pointer-events:none;
  background:linear-gradient(90deg, transparent, rgba(246,181,58,0.5), transparent);
}

/* ---------- reveal: blur-in ---------- */
.reveal{ filter:blur(8px); }
.reveal.in{ filter:blur(0); transition:filter .9s cubic-bezier(.22,1,.36,1), opacity .9s, transform .9s cubic-bezier(.22,1,.36,1); }

/* ---------- połysk na obrazach ---------- */
.image-frame, .scenario-img{ position:relative; overflow:hidden; }
.image-frame::after, .scenario-img::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(120deg, transparent 40%, rgba(255,210,122,0.10) 50%, transparent 60%);
  transform:translateX(-100%); transition:transform .9s ease;
}
.image-frame:hover::after, .scenario:hover .scenario-img::after{ transform:translateX(100%); }

@media (prefers-reduced-motion:reduce){
  .fx-aurora-bg::before,.fx-aurora-bg::after,
  .h2 .accent,.h2-large .accent,.hero-title .accent,
  .config-result::after,.calc-results .result-card.primary::after{ animation:none !important; }
}
