/* ─────────────────────────────────────────────────────────────
   maximizing · przewodnik po platformie
   Paleta: granat #0b1a3a / #071129, pomarańcz marki #e8631a,
   kość słoniowa #f5efe6 dla tekstu.
   ───────────────────────────────────────────────────────────── */

:root {
  --navy: #0b1a3a;
  --navy-deep: #071129;
  --navy-glass: rgba(11, 26, 58, 0.78);
  --orange: #e8631a;
  --orange-soft: #ffb08a;
  --ivory: #f5efe6;
  --ivory-70: rgba(245, 239, 230, 0.72);
  --ivory-45: rgba(245, 239, 230, 0.45);
  --line: rgba(245, 239, 230, 0.12);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --card-w: 430px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--ivory);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: auto; overscroll-behavior-y: none; }
body { overflow-x: hidden; }

/* ── Tor przewijania ─────────────────────────────────────────── */
.track { width: 100%; height: 1300vh; pointer-events: none; }

/* ── Scena ───────────────────────────────────────────────────── */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #10244f 0%, var(--navy) 45%, var(--navy-deep) 100%);
}

.screens { position: absolute; inset: 0; }

.screen {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform, opacity;
  opacity: 0;
  visibility: hidden;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  image-rendering: auto;
}
.screen.is-visible { opacity: 1; visibility: visible; }

/* Przyciemnienie z otworem (reflektor) */
.dim {
  position: absolute;
  inset: 0;
  background: var(--navy-deep);
  opacity: 0;
  will-change: opacity, mask-image, -webkit-mask-image;
  pointer-events: none;
}

/* Pierścień wokół omawianego obszaru */
.ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-radius: 50%;
  border: 2px solid rgba(232, 99, 26, 0.85);
  box-shadow:
    0 0 0 6px rgba(232, 99, 26, 0.12),
    0 0 40px rgba(232, 99, 26, 0.35);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, width, height, opacity;
  animation: ringPulse 2.4s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(232, 99, 26, 0.12), 0 0 40px rgba(232, 99, 26, 0.35); }
  50%      { box-shadow: 0 0 0 12px rgba(232, 99, 26, 0.06), 0 0 56px rgba(232, 99, 26, 0.5); }
}

/* Kurtyna przy zmianie ekranu */
.curtain {
  position: absolute;
  inset: 0;
  background: var(--navy-deep);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* Dekoracja ekranu startowego: łuny w barwach marki */
.deco { position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity; }
.deco__glow {
  position: absolute;
  width: 62vmax; height: 62vmax;
  left: -18vmax; top: -22vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 70, 62, 0.28) 0%, rgba(245, 70, 62, 0) 62%);
}
.deco__glow--b {
  left: auto; right: -20vmax; top: auto; bottom: -30vmax;
  background: radial-gradient(circle, rgba(64, 120, 220, 0.26) 0%, rgba(64, 120, 220, 0) 62%);
}

/* ── Karty ───────────────────────────────────────────────────── */
.cards {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.card {
  position: absolute;
  width: var(--card-w);
  max-width: calc(100vw - 48px);
  padding: 34px 36px 36px;
  border-radius: 28px;
  background: var(--navy-glass);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  will-change: opacity, transform;
  pointer-events: none;
}
.card.is-active { pointer-events: auto; }

.card--left   { left: 6vw;  top: 50%; transform: translate3d(0, calc(-50% + 14px), 0); }
.card--right  { right: 6vw; top: 50%; transform: translate3d(0, calc(-50% + 14px), 0); }
.card--top    { left: 50%;  top: 6vh; transform: translate3d(-50%, 14px, 0); text-align: center; width: 620px; }
.card--center { left: 50%;  top: 50%; transform: translate3d(-50%, calc(-50% + 14px), 0); text-align: center; width: 560px; }

.card__step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange-soft);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.card__step::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}
.card--top .card__step::before,
.card--center .card__step::before { display: none; }

.card h1, .card h2 {
  margin: 0 0 12px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
}
.card h1 { font-size: clamp(30px, 3.4vw, 44px); }
.card h2 { font-size: clamp(24px, 2.2vw, 30px); }

.card p {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ivory-70);
  font-weight: 400;
}
.card p + p { margin-top: 12px; }
.card b { color: var(--ivory); font-weight: 600; }
.card em {
  font-style: normal;
  color: var(--orange-soft);
  font-weight: 600;
}

.card__quote {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(232, 99, 26, 0.12);
  border: 1px solid rgba(232, 99, 26, 0.28);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.45;
}

.card__note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(245, 239, 230, 0.06);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ivory-70);
}
.card__note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--orange-soft); }

.card__hint {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ivory-45);
}

/* Ekran startowy */
.card--intro {
  width: 520px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card--intro h1 { font-size: clamp(34px, 3.9vw, 52px); margin-bottom: 16px; }
.intro__lead { font-size: 17.5px; max-width: 52ch; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}
.brand__mark { width: 52px; height: 52px; flex: none; }
.brand__word {
  font-family: "Quicksand", var(--font);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1;
}
.brand__word i { font-style: normal; color: #f5463e; }

.intro__list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.intro__list li {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 239, 230, 0.16);
  background: rgba(245, 239, 230, 0.06);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ivory);
}

.scroll-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
  padding: 10px 26px 10px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 239, 230, 0.16);
  background: rgba(11, 26, 58, 0.7);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.scroll-cta:hover { transform: translateY(-2px); border-color: rgba(245, 70, 62, 0.6); background: rgba(11, 26, 58, 0.9); }
.scroll-cta:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }
.scroll-cta__icon {
  width: 52px; height: 52px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(232, 99, 26, 0.55);
  animation: ctaPulse 2.2s ease-out infinite;
}
.scroll-cta__icon svg { width: 24px; height: 24px; animation: ctaBounce 1.6s ease-in-out infinite; }
.scroll-cta__text { font-weight: 700; font-size: 17px; }
@keyframes ctaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 99, 26, 0.55); }
  70%  { box-shadow: 0 0 0 18px rgba(232, 99, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 99, 26, 0); }
}
@keyframes ctaBounce {
  0%, 100% { transform: translateY(-3px); }
  50%      { transform: translateY(4px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(232, 99, 26, 0.35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-1px); background: #f06f27; box-shadow: 0 14px 34px rgba(232, 99, 26, 0.45); }
.btn:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; }
.btn svg { width: 16px; height: 16px; }

/* ── Postęp ──────────────────────────────────────────────────── */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(245, 239, 230, 0.08);
  z-index: 5;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  border-radius: 0 3px 3px 0;
  will-change: width;
}

.rail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
}
.rail button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.rail button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 239, 230, 0.32);
  transition: transform .35s var(--ease), background .35s;
}
.rail button.is-active::before { background: var(--orange); transform: scale(1.7); }
.rail button:hover::before { background: var(--ivory); }
.rail button:focus-visible { outline: 2px solid var(--orange-soft); outline-offset: 2px; border-radius: 50%; }

/* ── Zachęta do przewijania ──────────────────────────────────── */
.cue {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.cue.is-visible { opacity: 1; transform: translate(-50%, 0); }
.cue__text {
  font-size: 15px;
  font-weight: 600;
  color: var(--ivory);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(11, 26, 58, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cue__mouse {
  width: 28px;
  height: 44px;
  border-radius: 14px;
  border: 2px solid rgba(245, 239, 230, 0.6);
  position: relative;
}
.cue__chev {
  width: 26px; height: 26px;
  color: var(--orange-soft);
  margin-top: -6px;
  animation: cueChev 1.6s ease-in-out infinite;
}
@keyframes cueChev {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%      { transform: translateY(6px); opacity: 1; }
}
.cue__mouse i {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 5px;
  height: 9px;
  border-radius: 3px;
  background: var(--orange);
  transform: translateX(-50%);
  animation: cueWheel 1.6s ease-in-out infinite;
}
@keyframes cueWheel {
  0%   { transform: translate(-50%, 0);    opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translate(-50%, 16px); opacity: 0; }
}

/* ── Ekran ładowania ─────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--navy-deep);
  transition: opacity .6s var(--ease), visibility .6s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader p { margin: 0; font-size: 14px; color: var(--ivory-45); }
.loader__mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  display: grid;
  place-items: center;
  animation: markSpin 1.4s linear infinite;
}
.loader__mark span {
  width: 18px;
  height: 18px;
  border-top: 3px solid var(--orange);
  border-right: 3px solid var(--orange);
  transform: rotate(-45deg) translate(-2px, 2px);
}
@keyframes markSpin { to { transform: rotate(360deg); } }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 760px), (max-height: 520px) {
  .track { height: 1300svh; }

  .card,
  .card--left, .card--right, .card--top, .card--center {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: translate3d(0, 14px, 0);
    text-align: left;
    padding: 24px 22px 24px;
    border-radius: 22px;
    max-height: 52svh;
    overflow: auto;
  }
  .card--top .card__step::before,
  .card--center .card__step::before { display: block; }
  .card h1 { font-size: 27px; }
  .card h2 { font-size: 22px; }
  .card p { font-size: 15px; line-height: 1.55; }
  .card__quote { font-size: 15.5px; padding: 13px 15px; }
  .card__hint { display: none; }
  .card--intro { background: var(--navy-glass); border: 1px solid var(--line); padding: 22px 20px; }
  .card--intro h1 { font-size: 27px; }
  .intro__lead { font-size: 15px; }
  .brand { margin-bottom: 16px; gap: 9px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__word { font-size: 27px; }
  .intro__list { display: none; }
  .scroll-cta { margin-top: 18px; gap: 12px; padding: 8px 18px 8px 8px; }
  .scroll-cta__icon { width: 44px; height: 44px; }
  .scroll-cta__text { font-size: 15px; }
  .cue__chev { display: none; }

  .rail { display: none; }
  .cue { bottom: auto; top: 14px; flex-direction: row; gap: 8px; }
  .cue__mouse { display: none; }
  .cue__text { font-size: 12px; }
}

/* ── Dostępność ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ring, .cue__mouse i, .cue__chev, .loader__mark, .scroll-cta__icon, .scroll-cta__icon svg { animation: none; }
}
