/* FazeDevs motion v2: pełna warstwa animacji strony głównej.
   Animujemy tylko transform, opacity, translate, scale i clip-path.
   Bez JS treść jest widoczna. prefers-reduced-motion wyłącza ruch. */

:root {
  --mo-ease-out: cubic-bezier(.16, 1, .3, 1);
  --mo-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --mo-ease-soft: cubic-bezier(.33, 1, .68, 1);
  --mo-dur: 900ms;
  --mo-dist: 32px;
}

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

html { scroll-behavior: smooth; }

/* ---------- Reveal przy przewijaniu ---------- */
html.mo-ready [data-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--mo-dist), 0) scale(.985);
  transition:
    opacity var(--mo-dur) var(--mo-ease-out),
    transform var(--mo-dur) var(--mo-ease-out);
  transition-delay: var(--mo-delay, 0ms);
}
html.mo-ready [data-reveal].is-in { opacity: 1; transform: none; }
html.mo-ready [data-reveal].is-done { transition: none; }

/* Nagłówki: maska odsłaniająca tekst od dołu */
html.mo-ready [data-reveal-title] {
  clip-path: inset(0 0 100% 0);
  transform: translate3d(0, 14px, 0);
  transition:
    clip-path 1.1s var(--mo-ease-out),
    transform 1.1s var(--mo-ease-out);
  transition-delay: var(--mo-delay, 0ms);
}
html.mo-ready [data-reveal-title].is-in { clip-path: inset(-10% -4% -6% -4%); transform: none; }
html.mo-ready [data-reveal-title].is-done { clip-path: none; transition: none; }

/* Dzieci kart wjeżdżają osobno (ikona, tytuł, opis) */
html.mo-ready .mo-spot [data-mo-child] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .7s var(--mo-ease-out), transform .7s var(--mo-ease-out);
  transition-delay: calc(var(--mo-delay, 0ms) + var(--mo-child, 0ms) + 180ms);
}
html.mo-ready .mo-spot.is-in [data-mo-child] { opacity: 1; transform: none; }

/* ---------- Wejście hero ---------- */
@keyframes mo-rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
html.mo-ready body.mo-loaded [data-hero-in] {
  animation: mo-rise 1s var(--mo-ease-out) both;
  animation-delay: var(--mo-delay, 0ms);
}

/* Logo hero: delikatne oddychanie */
@keyframes mo-breathe {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -8px, 0); }
}
html.mo-ready body.mo-loaded .clean-hero-logo { animation: mo-breathe 7s ease-in-out infinite; }

/* ---------- Przyciski: połysk, wciśnięcie, ripple ---------- */
html.mo-ready .button,
html.mo-ready .hero-primary {
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--mo-ease-spring), box-shadow .35s ease;
}
html.mo-ready .button::after,
html.mo-ready .hero-primary::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
html.mo-ready .button:hover::after,
html.mo-ready .hero-primary:hover::after {
  transform: translateX(120%);
  transition: transform .9s var(--mo-ease-out);
}
html.mo-ready .button:active { transform: scale(.96); }
.mo-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: scale(0);
  animation: mo-ripple .7s var(--mo-ease-out) forwards;
  pointer-events: none;
}
@keyframes mo-ripple { to { transform: scale(1); opacity: 0; } }

/* ---------- Karty: poświata + uniesienie ---------- */
html.mo-ready .mo-spot {
  position: relative;
  isolation: isolate;
  transition: translate .5s var(--mo-ease-soft), box-shadow .5s var(--mo-ease-soft);
}
html.mo-ready .mo-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
  background: radial-gradient(420px circle at var(--mo-x, 50%) var(--mo-y, 50%),
    rgba(184, 135, 255, .2), transparent 60%);
  z-index: -1;
}
html.mo-ready .mo-spot.is-hot::before { opacity: 1; }
html.mo-ready .mo-spot.is-hot {
  translate: 0 -6px;
  box-shadow: 0 22px 48px -20px rgba(141, 85, 221, .5);
}

/* Plan Plus: obracający się obrys */
html.mo-ready .plus-card { position: relative; }
html.mo-ready .plus-card::after {
  content: "";
  display: block;
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--mo-angle), transparent 0 70%, #c9a5f4, #8d55dd, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: mo-orbit-border 5s linear infinite;
}
@keyframes mo-orbit-border { to { --mo-angle: 360deg; } }

/* ---------- Magnes ---------- */
html.mo-ready .mo-magnet { transition: translate .5s var(--mo-ease-soft); will-change: translate; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.mo-ready [data-reveal],
  html.mo-ready [data-reveal].is-in,
  html.mo-ready [data-reveal-title],
  html.mo-ready [data-reveal-title].is-in,
  html.mo-ready .mo-spot [data-mo-child] {
    opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important;
  }
  html.mo-ready body.mo-loaded [data-hero-in],
  html.mo-ready .clean-hero-logo,
  html.mo-ready .plus-card::after { animation: none !important; }
  html.mo-ready .button, html.mo-ready .hero-primary,
  html.mo-ready .mo-spot, html.mo-ready .mo-magnet { transition: none !important; }
  .mo-ripple { display: none; }
}

.fd-clean .clean-hero {
  --hero-gutter: max(clamp(20px, 5vw, 80px), calc((100% - 1232px) / 2));
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: clamp(520px, 68svh, 720px);
  padding: clamp(52px, 6.5vw, 96px) var(--hero-gutter);
  gap: clamp(32px, 6vw, 96px);
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  overflow: hidden;
  background: transparent;
}
.fd-clean .site-header { position: relative; top: auto; }
html { scroll-padding-top: 12px; }
@media (max-width: 850px) {
  .fd-clean .site-header .nav { position: absolute; top: 100%; }
}
.fd-clean .clean-hero .hero-title {
  margin: 0;
  font-size: clamp(42px, 5.2vw, 80px);
  line-height: 1.09;
  letter-spacing: -.052em;
}
.fd-clean .clean-hero .hero-title-rotator { display: block; min-height: 1.15em; padding: 0 0 .06em; }
.fd-clean .clean-hero .lead { max-width: 43ch; margin-top: 22px; color: #bfb7cb; font-size: 1rem; line-height: 1.7; }
.fd-clean .clean-hero .hero-actions { margin-top: 28px; }
.fd-clean .hero-actions .button { font-size: .9375rem; min-height: 48px; }
.module-launcher {
  position: relative;
  justify-self: end;
  width: min(100%, 448px);
  overflow: hidden;
  border: 1px solid #463750;
  border-radius: 18px;
  background: #131018;
  box-shadow: 0 22px 68px #0006;
}
.launcher-banner { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.launcher-body { padding: 19px 24px 10px; }
.launcher-body h2 { margin: 0 0 10px; color: #f1ebf7; font-size: 1.125rem; line-height: 1.4; letter-spacing: -.025em; }
.launcher-link { display: flex; align-items: center; gap: 13px; padding: 13px 4px; min-height: 52px; color: #e2dbe9; font-size: .9375rem; font-weight: 600; text-decoration: none; }
.launcher-link + .launcher-link { border-top: 1px solid #ffffff0f; }
.launcher-link img { width: 26px; height: 26px; object-fit: contain; }
.launcher-link i { margin-inline: auto 5px; width: 7px; height: 7px; border: solid #ae97c7; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.launcher-link:is(:hover,:focus-visible) { color: #d5b4ff; }
@media (max-width: 760px) {
  .fd-clean .clean-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 44px 42px; gap: 32px; }
  .fd-clean .clean-hero-copy, .module-launcher { width: 100%; max-width: 500px; justify-self: center; }
  .fd-clean .clean-hero .hero-title { font-size: clamp(38px, 8.7vw, 58px); }
  .fd-clean .clean-hero .lead { margin-top: 14px; }
  .fd-clean .clean-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
  .fd-clean .clean-hero .hero-actions > .button { flex: 1 1 140px; width: auto; min-width: 0; }
  .launcher-body { padding: 14px 18px 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .module-launcher { animation: clean-intro .55s var(--mo-ease-out) both; }
  .launcher-link i { transition: translate .2s ease; }
  .launcher-link:hover i { translate: 3px 0; }
}

.fd-clean .clean-final-cta h2 {
  margin: 0;
  color: #f2eafa;
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.fd-clean .clean-final-cta p:last-child { font-size: 1rem; line-height: 1.6; }
body.fd-clean { background: #07040c !important; }
body.fd-clean::before { background-attachment: scroll !important; }
html.mo-ready .plus-card::after { animation-play-state: paused; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  html.mo-ready .plus-card:hover::after { animation-play-state: running; }
  html.mo-ready .mo-spot:hover { translate: 0 -2px; }
}
