/**
 * Metalo broliai — WOW efektai (1–5) be jokio puslapio struktūros keitimo.
 * 1. Šlifuoto plieno + CAD brėžinio tinklelio prožektorius (.fp-hero, .fp-ctasec)
 * 2. Lazerio spindulio kraštas (Border Beam) + magnetinis pritraukimas (.mb-btn-primary)
 * 3. CNC šlifuoto plieno atspindys antriniams mygtukams (.fp-ctas .fp-link)
 * 4. 3D posvyrio + šviečiančio rėmelio kortelės (.fp-cat, .fp-serv-c)
 * 5. 3D WebGL šlifuoto plieno bangų fonas Hero sekcijoje (#mb-gl-steel)
 *
 * 100 % saugu mobiliesiems (hover/tilt/WebGL aktyvuojami tik su pele) ir gerbia prefers-reduced-motion.
 */

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

@keyframes mb-laser-spin {
  to {
    --mb-beam: 360deg;
  }
}

/* ── 1 & 5. Hero + CTA fonas: šlifuotas plienas + CAD tinklelis + pelės prožektorius + WebGL sluoksnis ── */
.fp-hero,
.fp-ctasec {
  position: relative;
  overflow: hidden;
  background-color: #070b14;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(rgba(96, 165, 250, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.055) 1px, transparent 1px);
  background-size: 100% 3px, 34px 34px, 34px 34px;
}

.fp-hero::after,
.fp-ctasec::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    320px circle at var(--mb-mx, 50%) var(--mb-my, 35%),
    rgba(96, 165, 250, 0.16),
    rgba(56, 189, 248, 0.04) 45%,
    transparent 75%
  );
  transition: opacity 0.25s ease;
}

#mb-gl-steel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.fp-hero > .fp-hero-inner,
.fp-ctasec > .mb-container {
  position: relative;
  z-index: 2;
}

/* ── 2. Lazerio spindulio kraštas (Border Beam) pagrindiniams CTA mygtukams ──
   Pakeičia seną baltą shimmer juostą, kuri uždengdavo mygtuko tekstą! */
.mb-btn-primary {
  position: relative !important;
  isolation: isolate;
  border: 2px solid transparent !important;
  background-image:
    linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%),
    conic-gradient(
      from var(--mb-beam),
      rgba(96, 165, 250, 0.25) 0deg,
      rgba(96, 165, 250, 0.25) 250deg,
      #38bdf8 308deg,
      #ffffff 345deg,
      rgba(96, 165, 250, 0.25) 360deg
    ) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  color: #ffffff !important;
  animation: mb-laser-spin 2.8s linear infinite;
  transition: transform 0.15s ease-out, box-shadow 0.22s ease !important;
}

/* Išjungiame seną baltą shimmer pseudoelementą, kad niekada neuždengtų teksto */
.mb-btn-primary::before,
.mb-btn-primary::after {
  animation: none !important;
  display: none !important;
}

.mb-btn-primary:hover {
  box-shadow: 0 0 26px rgba(56, 189, 248, 0.45), 0 8px 24px rgba(15, 23, 42, 0.45) !important;
}

/* ── 3. CNC šlifuoto plieno atspindys antriniams Hero mygtukams ── */
.fp-ctas .fp-link {
  position: relative;
  overflow: hidden;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid rgba(203, 213, 225, 0.28) !important;
  border-bottom: 1px solid rgba(203, 213, 225, 0.28) !important;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.85) 50%, rgba(15, 23, 42, 0.95) 100%);
  color: #f1f5f9 !important;
  transition: border-color 0.2s ease, transform 0.15s ease-out, box-shadow 0.2s ease;
}

.fp-ctas .fp-link::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    130px circle at var(--mb-bx, -150px) var(--mb-by, -150px),
    rgba(255, 255, 255, 0.3),
    transparent 70%
  );
}

.fp-ctas .fp-link:hover {
  border-color: rgba(226, 232, 240, 0.7) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

/* ── 4. 3D posvyris + šviečiantis prožektoriaus rėmelis kortelėms ── */
.fp-cat,
.fp-serv-c {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.fp-cat::before,
.fp-serv-c::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    200px circle at var(--mb-cx, -250px) var(--mb-cy, -250px),
    rgba(96, 165, 250, 0.2),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .fp-cat:hover::before,
  .fp-serv-c:hover::before {
    opacity: 1;
  }
}

/* Saugiklis: jei vartotojas įjungė sumažintą judesį — jokio sukimosi ir jokių bangų */
@media (prefers-reduced-motion: reduce) {
  .mb-btn-primary {
    animation: none !important;
  }
  #mb-gl-steel {
    display: none !important;
  }
}

/* Antraštės mygtukas „Gauti pasiūlymą“ – ta pati tamsiai mėlyna kaip pagrindiniai mygtukai (savininkas 2026-11-28) */
.mb-nav-cta {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
}
.mb-nav-cta:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%) !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}
