/* ============================================================
   MPI TURBO — WOW Layer
   Premium efekty: kursor, parallax, przechył 3D, poświaty.
   Ładowany PO main/animations/responsive — może nadpisywać.
   ============================================================ */

/* ------------------------------------------------------------
   1. Pasek postępu scrolla (złota linia na górze)
   ------------------------------------------------------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 10001;
  background: var(--gradient-gold);
  box-shadow: 0 0 12px rgba(240, 180, 41, 0.7);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ------------------------------------------------------------
   2. Świetlisty kursor (tylko urządzenia z myszą)
   ------------------------------------------------------------ */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(240, 180, 41, 0.10) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
  will-change: left, top;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(240, 180, 41, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease,
              border-color 0.25s ease, background 0.25s ease;
  will-change: left, top;
}

.cursor-ring.is-hover {
  width: 56px;
  height: 56px;
  border-color: var(--color-gold-bright);
  background: rgba(240, 180, 41, 0.08);
}

body.cursor-active .cursor-glow,
body.cursor-active .cursor-ring {
  opacity: 1;
}

/* Schowaj na ekranach dotykowych / bez precyzyjnego wskaźnika */
@media (hover: none), (pointer: coarse) {
  .cursor-glow, .cursor-ring { display: none !important; }
}

/* ------------------------------------------------------------
   3. Hero — aurora / heat-haze, dryfująca w tle
   ------------------------------------------------------------ */
.hero__aurora {
  position: absolute;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 50% at 70% 35%, rgba(240, 180, 41, 0.16) 0%, transparent 60%),
    radial-gradient(35% 45% at 25% 65%, rgba(184, 115, 51, 0.14) 0%, transparent 60%),
    radial-gradient(30% 40% at 50% 50%, rgba(232, 149, 90, 0.08) 0%, transparent 70%);
  filter: blur(30px);
  mix-blend-mode: screen;
  animation: auroraDrift 20s ease-in-out infinite;
  will-change: transform;
}

@keyframes auroraDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(4%, -3%, 0) scale(1.08); }
  66%      { transform: translate3d(-3%, 4%, 0) scale(1.04); }
}

/* ------------------------------------------------------------
   4. Hero — wirująca turbina + reakcja na kursor (parallax)
   ------------------------------------------------------------ */
.hero__turbo-visual img,
.hero__turbo-visual svg {
  animation: turboSpin 28s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes turboSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Wzmocniona poświata pod turbiną */
.hero__turbo-glow {
  background: radial-gradient(ellipse at center,
              rgba(240, 180, 41, 0.30) 0%,
              rgba(184, 115, 51, 0.12) 35%,
              transparent 68%) !important;
}

/* ------------------------------------------------------------
   5. Hero — tytuł: metaliczny połysk + poświata
   ------------------------------------------------------------ */
.hero__title-line {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.hero__title-line--gold {
  background: linear-gradient(
    100deg,
    #b87333 0%,
    #f0b429 25%,
    #fff6dd 48%,
    #f0b429 60%,
    #b87333 100%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(240, 180, 41, 0.35));
  animation: titleShimmer 6s linear infinite;
}

@keyframes titleShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -100% center; }
}

/* ------------------------------------------------------------
   6. Hero — wskaźnik doładowania (BOOST gauge)
   ------------------------------------------------------------ */
.boost-gauge {
  position: absolute;
  right: 5%;
  bottom: 150px; /* nad paskiem marek; % nie działa bo #hero zawiera marquee */
  z-index: 4;
  width: 220px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(10, 8, 5, 0.55);
  border: 1px solid var(--color-border-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.boost-gauge.visible {
  opacity: 1;
  transform: translateY(0);
}

.boost-gauge__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.boost-gauge__label {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.boost-gauge__value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.boost-gauge__value span {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  -webkit-text-fill-color: var(--color-text-muted);
  margin-left: 3px;
}

.boost-gauge__track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.boost-gauge__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-copper), var(--color-gold-bright));
  box-shadow: 0 0 12px rgba(240, 180, 41, 0.6);
  transition: width 0.1s linear;
}

@media (max-width: 1024px) {
  .boost-gauge { display: none; }
}

/* ------------------------------------------------------------
   7. Karty 3D — przechył + reflektor podążający za kursorem
   ------------------------------------------------------------ */
.services__grid,
.parts__grid,
.stats-grid {
  perspective: 1400px;
}

.tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt__spot {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(240, 180, 41, 0.16) 0%,
    transparent 60%
  );
}

.tilt.is-tilting .tilt__spot { opacity: 1; }

/* Karta części ma overlay z treścią — reflektor pod treść */
.part-card .tilt__spot { z-index: 1; }

/* ------------------------------------------------------------
   8. Magnetyczne przyciski (przesuwane przez wow.js)
   ------------------------------------------------------------ */
.magnetic {
  will-change: transform;
}

/* ------------------------------------------------------------
   9. Świecący obrys sekcji statystyk + delikatne tło ziarna
   ------------------------------------------------------------ */
.stat-card {
  isolation: isolate;
}

.stat-card__number.animated {
  filter: drop-shadow(0 0 16px rgba(240, 180, 41, 0.45));
}

/* ------------------------------------------------------------
   10b. Baner cookies (RODO)
   ------------------------------------------------------------ */
.cookie-banner {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 10000;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(14, 14, 14, 0.92);
  border: 1px solid var(--color-border-glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-banner.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner__text {
  flex: 1 1 240px;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin: 0;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-banner__btn {
  font-family: var(--font-heading);
  font-size: var(--text-tiny);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
}

.cookie-banner__btn--accept {
  background: var(--gradient-gold);
  color: #0a0a0a;
  box-shadow: var(--glow-gold-subtle);
}

.cookie-banner__btn--accept:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-gold);
}

.cookie-banner__btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-banner__btn--ghost:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text-primary);
}

@media (max-width: 480px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-banner__actions { justify-content: center; }
}

/* ------------------------------------------------------------
   10. Szanuj preferencję ograniczonego ruchu
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .hero__aurora,
  .hero__turbo-visual img,
  .hero__turbo-visual svg,
  .hero__title-line--gold {
    animation: none !important;
  }
  .cursor-glow, .cursor-ring { display: none !important; }
  .tilt { transform: none !important; }
}
