/* ============================================================
   Inner.Ski — system projektowy wg wytycznych marki
   Granat (głos) · Popiel (struktura) · Beż (Punkt) · Śnieg (tło)
   Spectral only · zero zaokrągleń · zero cieni · linia = decyzja
   ============================================================ */

:root {
  --snow:    #F2F2F1;
  --ink:     #14223A;          /* granat — głos */
  --ink-70:  rgba(20, 34, 58, .72);
  --struct:  #8E9294;          /* popiel — struktura (linie) */
  --struct-text: #5F666B;      /* popiel do tekstu — czytelny na śniegu (AA) */
  --accent:  #C9A97A;          /* beż — Punkt, jedyny akcent */
  --hairline: color-mix(in srgb, var(--ink) 15%, transparent);

  --font-serif: "Spectral", Georgia, serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-zoom: cubic-bezier(.5, 0, .1, 1);
  --t-zoom: 1000ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-serif);
  font-weight: 300;
  background: var(--snow);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.dot { color: var(--accent); }

/* etykieta: wersaliki Spectral, popiel */
.label {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--struct-text);
}

/* ---------- tło ---------- */

.bg { position: fixed; inset: 0; z-index: 0; }

.bg__img {
  position: absolute; inset: 0;
  bottom: 32%;
  background-image: var(--bg-photo, none);
  background-size: cover;
  background-position: center 72%;
  filter: grayscale(.18) brightness(1.02) contrast(1.02) saturate(.92);
  transform: translateY(var(--par-y, 0px));
  transition: transform .6s var(--ease-out);
}

/* zdjęcie wyłania się u góry, dół schodzi w czystą biel śniegu */
.bg__wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--snow) 34%, transparent) 0%,
      color-mix(in srgb, var(--snow) 12%, transparent) 15%,
      color-mix(in srgb, var(--snow) 30%, transparent) 32%,
      color-mix(in srgb, var(--snow) 78%, transparent) 48%,
      var(--snow) 61%,
      var(--snow) 100%);
}

/* morze chmur — dwie warstwy mgły dryfujące przed zdjęciem */
.bg__fog {
  position: absolute;
  left: -22%;
  width: 144%;
  height: 42%;
  pointer-events: none;
  background: radial-gradient(52% 100% at 50% 50%, rgba(255, 255, 255, .5), transparent 72%);
}
.bg__fog--1 { top: 24%; animation: fogdrift 90s ease-in-out infinite alternate; }
.bg__fog--2 { top: 38%; opacity: .7; animation: fogdrift 130s ease-in-out infinite alternate-reverse; }
@keyframes fogdrift {
  from { transform: translateX(-4.5%); }
  to   { transform: translateX(4.5%); }
}

/* ślad — jedyny element graficzny marki: beżowa linia + cieńsza popielata.
   Rysuje się na śniegu jak ślad krawędzi narty. */
.bg__trace { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg__trace .trace--accent { stroke: var(--accent); stroke-width: 4; opacity: .8; }
.bg__trace .trace--struct { stroke: var(--struct); stroke-width: 1.5; opacity: .55; }
.bg__trace path { stroke-dasharray: 1; stroke-dashoffset: 1; }
body.is-ready .trace--struct { animation: tracedraw 2.8s var(--ease-zoom) .65s forwards; }
body.is-ready .trace--accent { animation: tracedraw 2.8s var(--ease-zoom) .9s forwards; }
@keyframes tracedraw { to { stroke-dashoffset: 0; } }

/* ---------- szklana listwa górna ---------- */

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: color-mix(in srgb, var(--snow) 44%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--hairline);
}

.top__brand {
  display: flex;
  align-items: center;
  padding: 20px clamp(24px, 4vw, 56px);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: .02em;
}

/* jedyny ciemny blok kompozycji — kotwica i pierwsze CTA */
.top__cta {
  display: flex;
  align-items: center;
  gap: 40px;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  padding: 20px clamp(24px, 4vw, 56px);
  background: var(--ink);
  color: var(--snow);
  transition: background .22s var(--ease-out), color .22s var(--ease-out);
}
.top__cta .arrow { color: var(--accent); font-weight: 400; }
.top__cta:hover { background: color-mix(in srgb, var(--ink) 82%, var(--accent)); }

/* ---------- scena / rozeta ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding-top: 40px;
}

.wheel-wrap {
  position: relative;
  width: min(80vh, 88vw, 860px);
  aspect-ratio: 1;
  transition: transform var(--t-zoom) var(--ease-zoom);
  will-change: transform;
}

/* tarcza reaguje na kursor (przechył), a przy wejściu osadza się obrotem */
.tilt {
  position: absolute;
  inset: 0;
  transform: perspective(1300px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
}
/* w trakcie zoomu i na podstronie tarcza stoi w pionie — perspektywa nie
   miesza się do transformacji zoomu */
body.is-zooming .tilt,
body.is-open .tilt { transform: none; }
.settle { position: absolute; inset: 0; }
body:not(.is-ready) .settle { transform: rotate(-9deg) scale(.985); }
.settle { transition: transform 1.6s var(--ease-zoom); }
body.is-zooming .settle { transition: none; }

#wheel { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }

/* warstwa szkła: divy klipowane ścieżkami klinów (backdrop-filter nie działa w SVG) */
.glass-layer {
  position: absolute;
  top: 0; left: 0;
  width: 1000px;
  height: 1000px;
  transform-origin: 0 0;
  pointer-events: none;
}
.glass-wedge {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, .56) 0%,
    rgba(255, 255, 255, .28) 55%,
    rgba(255, 255, 255, .42) 100%);
  backdrop-filter: blur(22px) saturate(1.1) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.1) brightness(1.08);
  transition: transform .4s var(--ease-out), background .3s var(--ease-out);
}
.glass-wedge.is-active {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, .20) 0%,
    rgba(255, 255, 255, .05) 60%,
    rgba(255, 255, 255, .12) 100%);
}

/* pierścień obrotowy */
.ring { animation: spin 110s linear infinite; transform-origin: 500px 500px; }
.ring text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .34em;
  text-transform: uppercase;
  fill: color-mix(in srgb, var(--ink) 68%, transparent);
}
@keyframes spin { to { transform: rotate(360deg); } }


/* klin */
.wedge { cursor: pointer; }
.wedge__base {
  fill: rgba(255, 255, 255, .12);
  stroke: rgba(255, 255, 255, .78);
  stroke-width: 1.4;
  transition: fill .3s var(--ease-out);
}
.wedge__photo {
  opacity: 0;
  transition: opacity .45s var(--ease-out);
  filter: grayscale(.3) brightness(1.02) contrast(.97) saturate(.85);
}
.wedge__veil {
  fill: rgba(242, 242, 241, .46);
  opacity: 0;
  transition: opacity .45s var(--ease-out);
  pointer-events: none;
}
.wedge__label {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 52px;
  letter-spacing: .015em;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
}
.wedge__label .label-dot { fill: var(--accent); }
.wedge__label--long { font-size: 34px; }
.wedge__sub {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  fill: color-mix(in srgb, var(--ink) 78%, transparent);
  text-anchor: middle;
  pointer-events: none;
}
.wedge__tick {
  stroke: var(--accent);
  stroke-width: 3.5;
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  pointer-events: none;
}

.wedge { transform-box: view-box; transform-origin: 50% 50%; }
.wedge.is-active { transform: translate(var(--push-x), var(--push-y)) scale(1.045); }
.glass-wedge { transform-origin: 50% 50%; }
.glass-wedge.is-active { transform: translate(var(--push-x), var(--push-y)) scale(1.045); }
.wedge.is-active .wedge__base  { fill: transparent; }
.wedge.is-active .wedge__photo { opacity: 1; }
.wedge.is-active .wedge__veil  { opacity: 1; }
.wedge.is-active .wedge__tick  { opacity: 1; }

/* piasta */
.hub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
  background: color-mix(in srgb, var(--snow) 66%, transparent);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid var(--hairline);
}
.hub__brand {
  font-weight: 200;
  font-size: clamp(21px, 2.5vw, 32px);
  letter-spacing: .02em;
}
.hub__rule { width: 34px; height: 2px; background: var(--ink); }

/* ---------- wejście (orkiestracja) ---------- */

body:not(.is-ready) .wheel-wrap { opacity: 0; transform: scale(.97); }
.wheel-wrap { opacity: 1; transform: scale(1); transition: opacity .9s var(--ease-out), transform var(--t-zoom) var(--ease-zoom); }

body:not(.is-ready) .wedge,
body:not(.is-ready) .glass-wedge { opacity: 0; }
.wedge { opacity: 1; transition: transform .4s var(--ease-out), opacity .7s var(--ease-out) calc(180ms + var(--i) * 90ms); }
.glass-wedge { opacity: 1; transition: transform .4s var(--ease-out), background .3s var(--ease-out), opacity .7s var(--ease-out) calc(180ms + var(--i) * 90ms); }
body:not(.is-ready) .hub { opacity: 0; }
.hub { transition: opacity .8s var(--ease-out) .75s; }
body:not(.is-ready) .ring { opacity: 0; }
.ring { transition: opacity 1.2s var(--ease-out) .9s; }
body:not(.is-ready) .top { opacity: 0; }
.top { transition: opacity .8s var(--ease-out) .35s; }

/* ---------- podgląd sekcji obok koła (hover) ---------- */

.peek {
  position: fixed;
  left: clamp(24px, 4vw, 64px);
  bottom: clamp(28px, 7vh, 76px);
  max-width: 320px;
  z-index: 20;
  border-left: 2px solid var(--accent);
  padding: 18px 24px 18px 22px;
  background: color-mix(in srgb, var(--snow) 78%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out);
}
.peek.is-on { opacity: 1; transform: none; }
body.is-zooming .peek,
body.is-open .peek { opacity: 0 !important; }

.peek__kicker {
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
.peek__text {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-70);
}
.peek__hint {
  margin-top: 14px;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--struct-text);
}
.peek__hint .arrow { color: var(--accent); }

@media (max-width: 1150px) { .peek { display: none; } }

/* ---------- ultra-płynny zoom: w trakcie ruchu tylko GPU ---------- */

/* własne warstwy kompozytora dla wszystkiego, co animuje transform/opacity */
.wedge,
.glass-wedge { will-change: transform, opacity; }
.page { will-change: opacity; }

/* szkło klinów NIE gaśnie skokowo: kliny zachowują blur i miękko
   znikają razem z opacity; blur tracą tylko elementy zakryte
   (otwarty klin ma na sobie nieprzezroczyste zdjęcie) */
body.is-zooming .glass-wedge.is-open {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* paralaksa tła nie miesza się do animacji */
body.is-zooming .bg__img { transition: none; }

/* obracający się pierścień nie konkuruje o klatki podczas zoomu */
body.is-zooming .ring { animation-play-state: paused; }

/* filtr zdjęcia otwartego klina nie jest re-rasteryzowany w trakcie skalowania */
body.is-zooming .wedge.is-open .wedge__photo { filter: none; }

/* szkło podstrony wchodzi dopiero PO zakończeniu zoomu — miękko, nie skokiem */
.page__sheet { transition: backdrop-filter .4s var(--ease-out); }
.page__card  { transition: backdrop-filter .4s var(--ease-out); }
body:not(.is-open) .page .page__sheet,
body:not(.is-open) .page .page__card,
body:not(.is-open) .page .page__back {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---------- zoom w klin ---------- */

body.is-zooming .wheel-wrap { transform: scale(var(--zoom-scale, 9)); }
body.is-zooming #wheel .wedge:not(.is-open) { opacity: 0; transition: opacity .45s var(--ease-out); }
body.is-zooming .glass-layer .glass-wedge:not(.is-open) { opacity: 0; transition: opacity .45s var(--ease-out); }
body.is-zooming .ring,
body.is-zooming .hub { opacity: 0; transition: opacity .4s var(--ease-out); }
body.is-zooming .wedge.is-open .wedge__label,
body.is-zooming .wedge.is-open .wedge__sub,
body.is-zooming .wedge.is-open .wedge__tick,
body.is-zooming .wedge.is-open .wedge__veil { opacity: 0; transition: opacity .3s; }
body.is-zooming .wedge.is-open .wedge__base { stroke: none; }

body.is-zooming .top { opacity: 0; pointer-events: none; transition: opacity .3s; }

body.is-open .stage { visibility: hidden; }

/* ---------- powrót z podstrony (un-zoom) ----------
   W trakcie zjazdu skali ukryte jest wszystko poza wracającym klinem;
   blur szkła wyłączony (przy dużych skalach renderuje się jako
   nieprzycięte prostokąty). Po wylądowaniu klasa znika i rozeta
   wraca swoją staggerowaną kaskadą wejścia. */
body.is-unzoom #wheel .wedge:not(.is-open),
body.is-unzoom .glass-layer .glass-wedge:not(.is-open) { opacity: 0; transition: none; }
body.is-unzoom .ring,
body.is-unzoom .hub { opacity: 0; transition: none; }
body.is-unzoom .glass-wedge {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ---------- podstrony ---------- */

.page {
  position: fixed;
  inset: 0;
  z-index: 40;
  visibility: hidden;
  opacity: 0;
  transition: opacity .45s var(--ease-out), visibility 0s linear .45s;
  background: var(--snow);
}
/* pre-paint: strona wchodzi do renderu 2 klatki przed startem zoomu,
   więc jej pierwsze (ciężkie) malowanie nie wypada w środku animacji */
.page.is-prep {
  visibility: visible;
  opacity: 0;
  transition: none;
}
.page.is-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity .45s var(--ease-out) .38s;
}

.page__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 70%;
  filter: grayscale(.28) brightness(1.02) contrast(.98) saturate(.9);
}
.page__wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right,
      color-mix(in srgb, var(--snow) 72%, transparent) 0%,
      color-mix(in srgb, var(--snow) 38%, transparent) 40%,
      color-mix(in srgb, var(--snow) 6%, transparent) 75%,
      transparent 100%),
    linear-gradient(to bottom,
      color-mix(in srgb, var(--snow) 55%, transparent) 0%,
      transparent 30%);
}

.page__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 660px;
  padding: 0 clamp(24px, 6vw, 96px);
}

/* karta treści + ramki-echo (linia = decyzja, zero cieni) */
.page__stack { position: relative; }
.page__sheet {
  position: absolute;
  inset: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, .75);
  pointer-events: none;
}
.page__sheet--1 { transform: translate(14px, -14px); }
.page__sheet--2 { transform: translate(28px, -28px); border-color: rgba(255, 255, 255, .4); }

.page__card {
  position: relative;
  background: color-mix(in srgb, var(--snow) 62%, transparent);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .75);
  padding: clamp(32px, 4.5vw, 56px);
}

.page__back {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 300;
  font-size: 17px;
  letter-spacing: .02em;
  padding: 20px clamp(24px, 4vw, 56px);
  background: color-mix(in srgb, var(--snow) 55%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  transition: background .22s var(--ease-out), color .22s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
}
.page__back .arrow { color: var(--accent); }
.page__back:hover { background: var(--ink); color: var(--snow); }

.page__kicker {
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--struct-text);
  margin-bottom: 22px;
  text-wrap: balance;
}

.page__title {
  font-weight: 200;
  font-size: clamp(36px, 4.5vw, 62px);
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
  margin-bottom: 24px;
}

.page__lead {
  font-weight: 300;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7;
  color: var(--ink-70);
  max-width: 54ch;
  margin-bottom: 36px;
}

/* przycisk: napis od lewej, strzałka na prawo */
.page__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-width: min(300px, 100%);
  width: fit-content;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 17px 22px;
  border: 2px solid var(--ink);
  transition: background .22s var(--ease-out), color .22s var(--ease-out);
}
.page__cta .arrow { color: var(--accent); font-size: 15px; }
.page__cta:hover { background: var(--ink); color: var(--snow); }

/* stagger treści podstrony */
.page__stack { opacity: 0; transform: translateY(16px); }
.page.is-visible .page__stack {
  transition: opacity .6s var(--ease-out) .45s, transform .6s var(--ease-out) .45s;
  opacity: 1; transform: none;
}
.page__kicker, .page__title, .page__lead, .page__cta {
  opacity: 0;
  transform: translateY(12px);
}
.page.is-visible .page__kicker { transition: opacity .5s var(--ease-out) .58s, transform .5s var(--ease-out) .58s; opacity: 1; transform: none; }
.page.is-visible .page__title  { transition: opacity .5s var(--ease-out) .66s, transform .5s var(--ease-out) .66s; opacity: 1; transform: none; }
.page.is-visible .page__lead   { transition: opacity .5s var(--ease-out) .74s, transform .5s var(--ease-out) .74s; opacity: 1; transform: none; }
.page.is-visible .page__cta    { transition: opacity .5s var(--ease-out) .82s, transform .5s var(--ease-out) .82s; opacity: 1; transform: none; }

/* ============================================================
   Podstrona: KSIĄŻKA — koło 12 rozdziałów + zajawki
   klik w klin = zajawka · rozdział 3 w całości · kup książkę
   ============================================================ */

.page--book { background: var(--snow); }

.book {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.page--book .page__back { position: fixed; z-index: 60; }

/* kicker z beżowym punktem */
.bkicker {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--struct-text);
  margin-bottom: 24px;
}
.bkicker::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;              /* punkt — jedyny okrąg marki */
  background: var(--accent);
  flex: none;
}

/* ---------- kolumna koła ---------- */

.bwheel-col {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 72px clamp(16px, 2.5vw, 48px) 32px;
}

.bwheel-wrap {
  position: relative;
  width: min(82vh, 44vw, 760px);
  aspect-ratio: 1;
}
#bookWheel { width: 100%; height: 100%; display: block; overflow: visible; }

/* klin rozdziału */
.bw { cursor: pointer; transition: transform .35s var(--ease-out); }
.bw__base {
  fill: #fff;
  stroke: color-mix(in srgb, var(--struct) 42%, transparent);
  stroke-width: 1.2;
  transition: fill .28s var(--ease-out), stroke .28s var(--ease-out);
}
.bw:hover .bw__base,
.bw:focus-visible .bw__base { stroke: var(--ink); }
.bw { transform-box: view-box; transform-origin: 50% 50%; }
.bw.is-active { transform: translate(var(--push-x), var(--push-y)) scale(1.03); }
.bw.is-active .bw__base { fill: var(--ink); stroke: var(--ink); }

.bw__num {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 46px;
  letter-spacing: .04em;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
  transition: fill .28s var(--ease-out);
}
.bw__label {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  fill: var(--struct-text);
  text-anchor: middle;
  pointer-events: none;
  transition: fill .28s var(--ease-out);
}
.bw.is-active .bw__num { fill: var(--snow); }
.bw.is-active .bw__label { fill: color-mix(in srgb, var(--snow) 62%, transparent); }

.bw__tick {
  stroke: var(--accent);
  stroke-width: 3.5;
  opacity: 0;
  transition: opacity .28s var(--ease-out);
  pointer-events: none;
}
.bw.is-active .bw__tick { opacity: 1; }

/* beżowy punkt = rozdział do przeczytania w całości */
.bw__free { fill: var(--accent); pointer-events: none; }

/* piasta */
.bhub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 29%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  background: color-mix(in srgb, var(--snow) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.bhub:hover,
.bhub:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--snow) 88%, transparent);
}
.bhub__mark { width: clamp(28px, 3.2vw, 44px); color: var(--ink); }
.bhub__mark svg { display: block; width: 100%; height: auto; }
.bhub__brand { font-weight: 300; font-size: clamp(16px, 1.7vw, 24px); letter-spacing: .02em; }
.bhub__label {
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  line-height: 1.9;
  color: var(--struct-text);
}

/* ---------- kolumna zajawki ---------- */

.bpanel-col {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px clamp(28px, 6vw, 120px) 72px clamp(20px, 3vw, 56px);
}

.bpanel {
  max-width: 640px;
  scroll-margin-top: 84px;
  opacity: 0;
  transform: translateY(14px);
}
.bpanel.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease-out) .06s, transform .5s var(--ease-out) .06s;
}

.bpanel__title {
  font-weight: 200;
  font-size: clamp(28px, 2.9vw, 44px);
  line-height: 1.18;
  text-wrap: balance;
  margin-bottom: 24px;
}
.bpanel__lead,
.bpanel__tease p {
  font-weight: 300;
  font-size: clamp(15.5px, 1.3vw, 18px);
  line-height: 1.78;
  color: var(--ink-70);
  margin-bottom: 18px;
}
.bpanel__tease { position: relative; }
.bpanel__tease--fade { padding-bottom: 8px; }
.bpanel__tease--fade::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 84px;
  background: linear-gradient(to bottom, transparent, var(--snow));
  pointer-events: none;
}

/* blok darmowego rozdziału w panelu startowym */
.bpanel__free {
  margin-top: 30px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--struct) 45%, transparent);
  border-left: 3px solid var(--accent);
  padding: clamp(22px, 2.4vw, 30px);
}
.bpanel__free-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}
.bpanel__free-title {
  font-weight: 300;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 22px;
  text-wrap: balance;
}
.bpanel__free-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.bpanel__free-actions .page__cta { margin: 0; }

.bpanel__hint {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 26px 0 6px;
}
.bpanel__hint-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.bpanel__more {
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  color: var(--ink-70);
  margin-bottom: 20px;
}

.bpanel__foot { margin-top: 30px; }
.bpanel__foot .page__cta { margin-bottom: 18px; }

.bpanel__order-link {
  display: inline-block;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  padding-bottom: 5px;
  transition: border-color .22s var(--ease-out);
}
.bpanel__order-link .arrow { color: var(--accent); }
.bpanel__order-link:hover { border-color: var(--ink); }

/* ---------- pełny rozdział ---------- */

.breader {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--snow);
  overflow-y: auto;
  overflow-x: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity .4s var(--ease-out), visibility 0s linear .4s;
}
.breader.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity .4s var(--ease-out);
}

.breader__close {
  position: fixed;
  top: 0; left: 0;
  z-index: 85;
  display: inline-flex;
  align-items: center;
  font-weight: 300;
  font-size: 16px;
  letter-spacing: .02em;
  padding: 18px clamp(24px, 4vw, 56px);
  background: color-mix(in srgb, var(--snow) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  transition: background .22s var(--ease-out), color .22s var(--ease-out);
}
.breader__close .arrow { color: var(--accent); }
.breader__close:hover { background: var(--ink); color: var(--snow); }

.breader__inner {
  max-width: 70ch;
  margin: 0 auto;
  padding: clamp(96px, 14vh, 150px) clamp(20px, 4vw, 32px) 120px;
}
.breader__title {
  font-weight: 200;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
  text-wrap: balance;
  margin-bottom: clamp(32px, 5vh, 52px);
}
.breader__h3 {
  font-weight: 400;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.3;
  margin: clamp(36px, 6vh, 56px) 0 22px;
}
.breader__inner p {
  font-weight: 300;
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1.35em;
}
.breader__end {
  border-top: 1px solid color-mix(in srgb, var(--struct) 45%, transparent);
  margin-top: clamp(40px, 7vh, 64px);
  padding-top: 36px;
}
.breader__endnote {
  font-style: italic;
  color: var(--ink-70) !important;
  margin-bottom: 26px !important;
}

/* ---------- zachęta do kliknięcia ---------- */

.bwheel-hint {
  display: block;
  max-width: 52ch;
  margin-top: 4px;
  text-align: center;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  line-height: 2.1;
  color: var(--struct-text);
}
.bwheel-hint em { font-style: normal; color: var(--ink); white-space: nowrap; }
.bwheel-hint__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
  animation: bpulse 2.4s var(--ease-out) infinite;
}

/* beżowy punkt darmowego rozdziału pulsuje */
.bw__free {
  transform-box: fill-box;
  transform-origin: center;
  animation: bpulse 2.4s var(--ease-out) infinite;
}
@keyframes bpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .3; transform: scale(1.8); }
}

/* ---------- czytnik: postęp, inicjał, wyimki, listy ---------- */

.breader__progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 90;
}
.breader__progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.breader__body { counter-reset: bsec; }
.breader__body > p:first-child::first-letter {
  float: left;
  font-weight: 400;
  font-size: 3.3em;
  line-height: .85;
  padding: 6px 12px 0 0;
}
.breader__h3 { counter-increment: bsec; }
.breader__h3::before {
  content: counter(bsec, decimal-leading-zero);
  display: block;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .26em;
  color: var(--accent);
  margin-bottom: 8px;
}
.breader__pull {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(19px, 1.9vw, 25px) !important;
  line-height: 1.55 !important;
  border-left: 2px solid var(--accent);
  padding-left: clamp(18px, 2.4vw, 28px);
  margin: clamp(30px, 4.5vh, 44px) 0 !important;
}
.breader__list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0 0 1.5em;
}
.breader__list li {
  position: relative;
  padding-left: 28px;
  font-weight: 300;
  font-size: clamp(15.5px, 1.25vw, 17.5px);
  line-height: 1.65;
}
.breader__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .72em;
  width: 14px;
  height: 2px;
  background: var(--accent);
}

/* ---------- podstrona: METODYKA ---------- */

.page--met { background: var(--snow); }

.met {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.page--met .page__back { position: fixed; z-index: 60; }

.met__hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.met__hero .page__bg,
.met__hero .page__wash { position: absolute; }
.met__heroinner {
  position: relative;
  width: 100%;
  max-width: 660px;
  padding: 96px clamp(24px, 6vw, 96px) 64px;
}

.met__sec {
  position: relative;
  background: #fff;
  border-top: 1px solid var(--hairline);
  padding: clamp(72px, 11vh, 128px) clamp(24px, 7vw, 120px);
}
.met__inner { max-width: 860px; margin: 0 auto; }
.met__title {
  font-weight: 200;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.16;
  text-wrap: balance;
  margin-bottom: clamp(32px, 5vh, 48px);
}

.bsteps {
  list-style: none;
  border-left: 1px solid color-mix(in srgb, var(--struct) 45%, transparent);
}
.bstep { position: relative; padding: 0 0 clamp(36px, 5vh, 56px) clamp(28px, 3.4vw, 52px); }
.bstep:last-child { padding-bottom: 6px; }
.bstep::before {
  content: '';
  position: absolute;
  left: -6px;
  top: .52em;
  width: 11px;
  height: 11px;
  border-radius: 50%;          /* punkt */
  background: #fff;
  border: 2px solid var(--accent);
}
.bstep:last-child::before { background: var(--accent); }
.bstep__name {
  font-weight: 400;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.3;
  margin-bottom: 10px;
}
.bstep__name em { font-weight: 200; font-style: italic; color: var(--ink-70); }
.bstep__desc {
  font-weight: 300;
  font-size: clamp(15px, 1.25vw, 17.5px);
  line-height: 1.7;
  color: var(--ink-70);
  max-width: 58ch;
}

.met__foot {
  margin-top: clamp(40px, 6vh, 56px);
  padding-top: 32px;
  border-top: 1px solid color-mix(in srgb, var(--struct) 40%, transparent);
}
.met__footnote {
  font-style: italic;
  font-weight: 300;
  font-size: 15.5px;
  color: var(--ink-70);
  margin-bottom: 22px;
}

/* ---------- książka: responsywność ---------- */

@media (max-width: 999px) {
  .book { display: block; }
  .bwheel-col {
    position: static;
    height: auto;
    padding: 92px 16px 20px;
  }
  .bwheel-wrap { width: min(92vw, 58vh); }
  .bw__num { font-size: 58px; }
  .bw__label { display: none; }
  .bw__free { r: 6; }
  .bhub__label { display: none; }
  .bpanel-col {
    min-height: 0;
    padding: 28px clamp(20px, 6vw, 48px) 72px;
  }
  .bwheel-hint { padding: 0 24px; }
}

/* ---------- responsywność ---------- */

@media (max-width: 900px) {
  .wheel-wrap { width: min(72vh, 94vw); }
  .wedge__label { font-size: 56px; }
  .wedge__label--long { font-size: 37px; }
  .wedge__sub { font-size: 16px; }
}

@media (max-width: 560px) {
  .top__brand { padding: 16px 20px; font-size: 19px; }
  .top__cta { padding: 16px 20px; gap: 20px; }
  .stage { padding-top: 20px; }
  .wheel-wrap { width: min(96vw, 60vh); }
  .wedge__sub { display: none; }
  .wedge__label { font-size: 48px; }
  .wedge__label--long { font-size: 32px; }
  .ring { display: none; }
  .hub__brand { font-size: 17px; }
  .hub { gap: 7px; }
  .hub__rule { display: none; }
  .page__inner { max-width: 100%; padding-top: 80px; }
  .page__back { padding: 14px 20px; font-size: 15px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  /* elementy rysowane kreską mają być po prostu widoczne */
  .bg__trace path {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
  .settle { transform: none !important; }
}

/* ============================================================
   MOTYW: GRANATOWA NOC (html.night) — strona główna w granacie
   Podstrony pozostają jasne (nakładają się na scenę).
   ============================================================ */

html.night body { background: #0B1424; }

html.night .bg__img {
  filter: grayscale(.85) brightness(.6) contrast(1.14) saturate(.7);
}
html.night .bg__wash {
  background:
    linear-gradient(to bottom,
      rgba(11, 20, 36, .55) 0%,
      rgba(11, 20, 36, .18) 16%,
      rgba(11, 20, 36, .38) 33%,
      rgba(11, 20, 36, .86) 52%,
      #0B1424 66%,
      #0B1424 100%);
}
html.night .bg__fog--1 { opacity: .16; }
html.night .bg__fog--2 { opacity: .1; }
html.night .bg__trace .trace--struct { stroke: rgba(242, 242, 241, .28); }

html.night .top {
  background: rgba(11, 20, 36, .45);
  border-bottom-color: rgba(242, 242, 241, .14);
  color: var(--snow);
}
html.night .top__cta { background: var(--accent); color: #0B1424; }
html.night .top__cta .arrow { color: #0B1424; }
html.night .top__cta:hover { background: var(--snow); color: var(--ink); }
html.night .top__cta:hover .arrow { color: var(--ink); }

html.night .glass-wedge {
  background: linear-gradient(135deg,
    rgba(20, 34, 58, .55) 0%,
    rgba(20, 34, 58, .26) 55%,
    rgba(20, 34, 58, .44) 100%);
  backdrop-filter: blur(18px) brightness(.92);
  -webkit-backdrop-filter: blur(18px) brightness(.92);
}
html.night .glass-wedge.is-active {
  background: linear-gradient(135deg,
    rgba(20, 34, 58, .3) 0%,
    rgba(20, 34, 58, .1) 60%,
    rgba(20, 34, 58, .2) 100%);
}
html.night .wedge__base { fill: rgba(255, 255, 255, .02); stroke: rgba(255, 255, 255, .3); }
html.night .wedge__label { fill: var(--snow); }
html.night .wedge__sub { fill: rgba(242, 242, 241, .82); }
html.night .wedge__veil { fill: rgba(11, 20, 36, .44); }
html.night .ring text { fill: rgba(242, 242, 241, .5); }

html.night .hub {
  background: rgba(11, 20, 36, .52);
  border-color: rgba(242, 242, 241, .16);
  color: var(--snow);
}
html.night .hub__rule { background: var(--accent); }

html.night .peek { background: rgba(11, 20, 36, .55); }
html.night .peek__kicker { color: var(--snow); }
html.night .peek__text { color: rgba(242, 242, 241, .78); }
html.night .peek__hint { color: rgba(242, 242, 241, .5); }

/* księżycowa poświata pod tarczą — dół sceny nie jest martwy */
html.night .bg::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(90vw, 1300px);
  height: min(70vh, 700px);
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(201, 169, 122, .085), transparent 70%);
  pointer-events: none;
}

/* ============================================================
   MOTYW: DUOTONE ŚWITU (html.duo) — jasna scena, góry w granacie
   ============================================================ */

html.duo .bg__img { filter: grayscale(1) contrast(1.06) brightness(1.04); }
html.duo .bg__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #33517E;
  mix-blend-mode: color;
}

/* ============================================================
   MOTYW: PORCELANA (html.pure) — bez zdjęcia, sama linia;
   fotografia pojawia się wyłącznie w hoverze klina
   ============================================================ */

html.pure body { background: #F6F5F2; }
html.pure .bg__img, html.pure .bg__fog { display: none; }
html.pure .bg__wash { background: #F6F5F2; }
html.pure .glass-wedge { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.pure .glass-wedge.is-active { background: transparent; }
html.pure .wedge__base { fill: none; stroke: var(--hairline); }
html.pure .top { background: #F6F5F2; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.pure .hub { background: #F6F5F2; backdrop-filter: none; -webkit-backdrop-filter: none; }
html.pure .peek { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ============================================================
   WARIANT: NOCNY WITRAŻ (html.night.vitrail) — zdjęcia sekcji
   tlą się w klinach jak podświetlony witraż; hover = pełne światło
   ============================================================ */

html.night.vitrail .wedge__photo {
  opacity: .26;
  filter: grayscale(.5) brightness(.72) contrast(1.06) saturate(.85);
}
html.night.vitrail .wedge.is-active .wedge__photo {
  opacity: 1;
  filter: grayscale(.3) brightness(1.02) contrast(.97) saturate(.85);
}
html.night.vitrail .wedge__base { fill: rgba(255, 255, 255, .015); }
