/* TidyNizer — landing page
   Hierarchia: guideline portfolio (układ, skala, wagi, ruch) > design system aplikacji (materiał marki).
   Zob. docs/zasady-projektu-strony.md */

:root {
  /* Kolor — odcienie z DS, budżet z guideline'u */
  --bg: #E4E4E1;            /* styl A: jasny szary, 60–70% kadru */
  --surface: #FFFFFF;
  --tile: #D9DBD6;
  --ink: #2F3E46;           /* DS green-900 — tekst */
  --ink-card: #22302F;      /* karta „czarna” */
  --muted: #6B7A72;         /* DS slate-500 */
  --line: rgba(47, 62, 70, .18);
  --accent: #52796F;        /* DS primary — jedyny akcent */
  --accent-hover: #3F5F57;
  --brand-light: #84A98C;
  --brand-dark: #354F52;
  --brand-gradient: linear-gradient(135deg, #84A98C 0%, #52796F 48%, #354F52 100%);

  /* DS — tylko wewnątrz ekranów aplikacji */
  --app-page: #EEF2ED;
  --app-border: #CAD2C5;
  --app-sunken: #F6F7F4;
  --app-selected: #E1E8DF;
  --app-shelf: #DCE3D8;

  /* Typografia */
  --font-display: "Syne", "Barlow", system-ui, sans-serif;
  --font-text: "Barlow", "Segoe UI", system-ui, sans-serif;
  --fs-body: 17px;
  --fs-small: 13px;
  --fs-label: 12px;
  --fs-h1: clamp(52px, 6.2vw, 92px);
  --fs-h2: clamp(34px, 3.9vw, 58px);
  --fs-h3: clamp(26px, 2.2vw, 32px);
  --fs-num: clamp(36px, 3.1vw, 48px);

  /* Siatka — krok 8 px, margines ok. 4,5% */
  --m: clamp(16px, 4.5vw, 72px);
  --gap: 24px;
  --radius-card: 22px;
  --radius-tile: 32px;

  /* Ruch — tokeny z guideline'u */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-inout: cubic-bezier(.75, 0, .2, 1);
  --dur-s: 300ms;
  --dur-m: 650ms;
  --dur-l: 1000ms;
  --stagger: 115ms;

  --shadow-card: 0 1px 2px rgba(31, 42, 46, .06), 0 18px 40px -18px rgba(31, 42, 46, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd, h1, h2, h3, p { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { padding-inline: var(--m); max-width: 1600px; margin-inline: auto; }

/* ---------- Typografia ---------- */
.h1, .h2, .h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.02em; }
.h1 { font-size: var(--fs-h1); line-height: .95; }
.h2 { font-size: var(--fs-h2); line-height: 1.04; max-width: 17ch; }
.h3 { font-size: var(--fs-h3); line-height: 1.12; }
.dim { opacity: .4; }
.overline {
  font: 500 var(--fs-label)/1.2 var(--font-text);
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 24px;
}
.lead { max-width: 34ch; color: var(--muted); }
.num {
  font: 300 var(--fs-num)/1 var(--font-text);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.num .z { opacity: .3; }

/* ---------- Przyciski (pigułki) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font: 500 15px/1 var(--font-text);
  transition: background-color var(--dur-s) var(--ease-out), color var(--dur-s) var(--ease-out), border-color var(--dur-s) var(--ease-out), transform var(--dur-s) var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { border: 1px solid rgba(47, 62, 70, .28); }
.btn-ghost:hover { background: rgba(255, 255, 255, .6); border-color: transparent; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pill {
  display: flex; gap: 2px; padding: 5px;
  background: rgba(255, 255, 255, .55); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(6px);
}
.pill a { display: block; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: background-color var(--dur-s) var(--ease-out); }
.pill a:hover { background: #fff; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 500 20px/1 var(--font-text); }
.wordmark img { border-radius: 8px; }
.wordmark b { font-weight: 700; color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  height: clamp(760px, 100svh, 1000px);
  padding-inline: var(--m);
}
.nav {
  position: absolute; z-index: 5; top: 28px; left: var(--m); right: var(--m);
  display: flex; align-items: center; justify-content: space-between;
}
.hero-grid {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-columns: 28% 1fr 20%; align-items: center;
  max-width: 1600px; margin-inline: auto;
}
.hero-copy { align-self: center; padding-top: 40px; }
.hero-copy .overline { white-space: nowrap; }
.hero-copy .h1 { margin-bottom: 32px; }
.h1 .line { display: block; }
.h1 .line > span { display: inline-block; transform-origin: 50% 100%; }
.h1 .indent { padding-left: 1.1em; }
.hero-copy .lead { margin-bottom: 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stage { position: relative; height: 100%; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-data { align-self: center; padding-left: 40px; }
.data-head { font-size: var(--fs-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.hero-data dl { display: grid; gap: 28px; }
.hero-data dt { font-size: var(--fs-small); color: var(--muted); margin-bottom: 6px; }
.hero-data dd { font-size: clamp(40px, 3.4vw, 56px); }

.hair { position: absolute; z-index: 1; background: var(--line); pointer-events: none; }
.hair-h { left: 0; right: 0; top: 50%; height: 1px; transform-origin: 0 50%; }
.hair-v { top: 0; bottom: 0; width: 1px; transform-origin: 50% 0;
  left: calc(var(--m) + (100% - 2 * var(--m)) * .8); }
.cross { position: absolute; z-index: 1; width: 15px; height: 15px; top: 50%;
  left: calc(var(--m) + (100% - 2 * var(--m)) * .8); transform: translate(-50%, -50%); }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--ink); }
.cross::before { left: 7px; top: 0; width: 1px; height: 15px; }
.cross::after { top: 7px; left: 0; height: 1px; width: 15px; }

.outline-word {
  position: absolute; z-index: 0; left: calc(var(--m) - .04em); bottom: -.3em;
  font: 500 clamp(120px, 17vw, 280px)/1 var(--font-display); letter-spacing: -.03em;
  color: transparent; -webkit-text-stroke: 1px rgba(47, 62, 70, .16);
  white-space: nowrap; pointer-events: none; user-select: none;
}

/* Karty pływające */
.float-card {
  position: absolute; z-index: 3; display: grid; gap: 10px;
  min-width: 196px; padding: 18px 20px 16px; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card-light { background: var(--surface); }
.card-dark { background: var(--ink-card); color: #fff; }
.card-label { font-size: var(--fs-label); letter-spacing: .02em; color: var(--muted); }
.card-dark .card-label, .card-dark .card-foot { color: rgba(255, 255, 255, .62); }
.card-foot { font-size: var(--fs-label); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.card-dark .num { font-size: clamp(30px, 2.5vw, 40px); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #BF9B4F; display: inline-block; }

.hero-stage .card-light { left: -4%; bottom: 17%; }
.hero-stage .card-dark { right: 0; top: 19%; }

.micro-bars { display: flex; align-items: flex-end; gap: 5px; height: 36px; }
.micro-bars i { width: 9px; height: calc(var(--h) * 100%); border-radius: 4px; background: #D9DCD7; transform-origin: 50% 100%; }
.micro-bars i.on { background: var(--accent); }

/* ---------- PROBLEM ---------- */
.problem { padding: 176px 0 160px; }
.problem .h2 { max-width: 20ch; margin-bottom: 72px; }
.problem-stat { display: grid; grid-template-columns: auto minmax(0, 30ch); justify-content: start; align-items: end; gap: 32px; }
.problem-stat .big { font-size: clamp(96px, 12vw, 184px); line-height: .78; letter-spacing: -.04em; }
.problem-stat p { color: var(--muted); padding-bottom: .2em; }

/* ---------- HOW ---------- */
.how { padding: 40px 0 120px; }
.how-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.how-stage {
  position: sticky; top: 8vh; height: 84vh; max-height: 820px;
  border-radius: var(--radius-tile); background: var(--tile); overflow: hidden;
}
#rack-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.how-chip { right: 24px; bottom: 24px; opacity: 0; transform: translateY(12px); transition: opacity var(--dur-m) var(--ease-out), transform var(--dur-m) var(--ease-out); }
.how[data-state="2"] .how-chip { opacity: 1; transform: none; }
.how-steps { padding-top: 12vh; }
.how-steps .h2 { margin-bottom: 40px; }
.steps { display: grid; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 8px;
  min-height: 52vh; padding-top: 32px; border-top: 1px solid var(--line);
  opacity: .32; transition: opacity var(--dur-m) var(--ease-out);
}
.step.active { opacity: 1; }
.step h3 { font: 500 var(--fs-h3)/1.15 var(--font-display); letter-spacing: -.02em; margin-bottom: 16px; }
.step p { color: var(--muted); max-width: 36ch; margin-bottom: 20px; }
.step-n { font: 300 15px/1.9 var(--font-text); font-variant-numeric: tabular-nums; color: var(--muted); letter-spacing: .04em; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-small); background: rgba(255, 255, 255, .5); }

/* ---------- FEATURES ---------- */
.features { padding: 80px 0 40px; }
.features > .wrap:first-child { margin-bottom: 72px; }
.feature { display: grid; grid-template-columns: 38% 1fr; gap: 64px; align-items: center; margin-bottom: 120px; }
.feature.flip { grid-template-columns: 1fr 38%; }
.feature.flip .feature-copy { order: 2; }
.feature-copy .step-n { display: block; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .14em; font-size: var(--fs-label); font-weight: 500; }
.feature-copy .h3 { margin-bottom: 20px; max-width: 14ch; font-size: clamp(30px, 3vw, 44px); }
.feature-copy p { color: var(--muted); max-width: 34ch; }
.feature-stage {
  position: relative; height: 640px; border-radius: var(--radius-tile); background: var(--tile);
  overflow: hidden; display: flex; align-items: flex-start; justify-content: center; padding-top: 72px;
}
.fc-1 { left: 8%; bottom: 72px; }
.fc-2 { right: 8%; top: 120px; }
.fc-3 { left: 7%; bottom: 96px; }
.fc-4 { right: 7%; bottom: 96px; }

/* Telefon — wewnątrz obowiązuje DS aplikacji */
.phone {
  width: 320px; height: 660px; flex: none; border-radius: 52px; padding: 10px;
  background: #1C2526;
  /* Miękki, rozmyty cień warstwowy: kontakt + półcień + szeroka poświata */
  box-shadow:
    inset 0 0 0 1.5px #3A4648,
    0 2px 4px rgba(31, 42, 46, .08),
    0 14px 28px -8px rgba(31, 42, 46, .16),
    0 36px 72px -16px rgba(31, 42, 46, .22),
    0 70px 140px -24px rgba(31, 42, 46, .24);
  transform: rotate(-3deg);
}
.flip .phone { transform: rotate(3deg); }
.screen {
  height: 100%; border-radius: 42px; overflow: hidden; background: var(--app-page);
  padding: 48px 14px 0; font-family: var(--font-text); color: var(--ink);
}
.screen-dark { background: #10191A; padding: 0; position: relative; }
.app-bar { height: 44px; display: flex; align-items: center; margin-bottom: 8px; }
.app-title { font: 600 22px/1.25 var(--font-text); }
.search-field {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 3px rgba(82, 121, 111, .2); font-size: 15px;
}
.search-field svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.caret { width: 1.5px; height: 18px; background: var(--accent); margin-left: -6px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.list-meta { font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.rows { display: grid; gap: 8px; }
.rows li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--app-border); border-radius: 14px;
}
.rows li.sel { background: var(--app-selected); border-color: var(--accent); }
.rows .thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--app-sunken); border: 1px solid #DEE4DA; }
.row-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.row-main b { font-weight: 500; font-size: 15px; line-height: 1.3; }
.row-main small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.tag { flex: none; font-size: 12px; font-weight: 500; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 4px 9px; }
.seg { display: flex; padding: 3px; margin-bottom: 12px; background: #E1E6DE; border-radius: 10px; font-size: 13px; font-weight: 500; }
.seg span { flex: 1; text-align: center; padding: 7px 0; border-radius: 8px; color: var(--muted); }
.seg .on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(47, 62, 70, .1); }
.progress { height: 6px; border-radius: 3px; background: var(--app-shelf); margin: 4px 2px 8px; overflow: hidden; }
.progress span { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--accent); border-radius: 3px; }
.rows.compact { gap: 6px; }
.rows.compact li { padding: 8px 12px; }
.rows li.group { background: none; border: 0; padding: 8px 2px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--app-border); position: relative; }
.check.on { background: var(--accent); border-color: var(--accent); }
.check.on::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.scan-view { position: absolute; inset: 0 0 38% 0; display: grid; place-items: center;
  background: radial-gradient(120% 80% at 50% 40%, #33413F 0%, #10191A 70%); }
.scan-frame { position: relative; width: 180px; height: 180px; display: grid; place-items: center; }
.scan-frame > span { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; }
.scan-frame > span:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.scan-frame > span:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.scan-frame > span:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.scan-frame > span:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.qr-sm { width: 112px; height: 112px; padding: 8px; background: #fff; border-radius: 8px; transform: rotate(-6deg); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; padding: 20px 18px; background: #fff; border-radius: 20px 20px 0 0; display: grid; align-content: start; gap: 4px; }
.sheet b { font: 600 18px/1.35 var(--font-text); }
.sheet small { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.mini-list { display: grid; gap: 0; border-top: 1px solid #DEE4DA; }
.mini-list li { font-size: 15px; padding: 9px 0; border-bottom: 1px solid #DEE4DA; }

/* ---------- LABELS ---------- */
.labels { padding: 40px 0 160px; }
.labels-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.labels-copy .h2 { margin-bottom: 28px; }
.labels-copy p:not(.overline) { color: var(--muted); max-width: 34ch; }
.label-stack { position: relative; height: 520px; }
.label {
  position: absolute; display: flex; gap: 20px; align-items: center;
  width: min(380px, 86%); padding: 20px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-card);
}
.label > div:last-child { display: grid; gap: 2px; }
.label b { font: 500 32px/1.05 var(--font-display); letter-spacing: -.02em; }
.label span { font-size: 15px; }
.label small { font-size: var(--fs-label); color: var(--muted); }
.label .qr { width: 104px; height: 104px; flex: none; }
.label .src { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* Kody z odzysku: wycinek kartonu, metka produktu, kupon */
.label.kraft { background: #E2D3B6; border-radius: 6px 14px 8px 12px; box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(120, 92, 52, .12); }
.label.kraft .qr { background: #F4ECDD; padding: 6px; border-radius: 4px; }
.label.label-tag { padding-left: 34px; border-radius: 10px 16px 16px 10px; }
.label.label-tag::before { content: ""; position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 1px 2px rgba(31, 42, 46, .25); }
.label.coupon { background: #fff; border: 2px dashed var(--app-border); box-shadow: var(--shadow-card); }
.l1 { left: 4%; top: 40px; transform: rotate(-5deg); z-index: 3; }
.l2 { right: 0; top: 200px; transform: rotate(4deg); z-index: 2; }
.l3 { left: 14%; top: 350px; transform: rotate(-1.5deg); z-index: 1; }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- FINAL ---------- */
.final { background: var(--brand-gradient); color: #fff; padding: 160px 0; text-align: center; position: relative; overflow: hidden; }
.final-inner { display: grid; justify-items: center; }
.final-icon { border-radius: 26px; box-shadow: 0 30px 60px -24px rgba(16, 25, 26, .55); margin-bottom: 48px; }
.final-title { margin-bottom: 28px; }
.final p { color: rgba(255, 255, 255, .78); }
.store-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 40px 0 16px; }
.store { height: 64px; padding: 0 30px; flex-direction: column; gap: 4px; align-items: flex-start; }
.store-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.store-n { font-size: 18px; }
.final .btn-accent { background: #fff; color: var(--ink); }
.final .btn-accent:hover { background: #EEF2ED; }
.btn-ghost-light { border: 1px solid rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); }
.final .soon { font-size: var(--fs-small); color: rgba(255, 255, 255, .6); }

.footer { padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: var(--fs-small); color: var(--muted); }
.footer .wordmark { font-size: 16px; color: var(--ink); }

/* ================= RUCH =================
   Kolejność: otwarcie → bohater → struktura → nagłówek → karty → liczby.
   Klasa .anim jest dodawana tylko bez prefers-reduced-motion. */
.anim .hero { animation: slit var(--dur-l) var(--ease-inout) both; }
@keyframes slit { from { clip-path: inset(49.5% 0 49.5% 0); } to { clip-path: inset(0 0 0 0); } }

.anim .hair-h { animation: drawX 700ms var(--ease-inout) 800ms both; }
.anim .hair-v { animation: drawY 700ms var(--ease-inout) 900ms both; }
.anim .cross { animation: fade 400ms var(--ease-out) 1350ms both; }
@keyframes drawX { from { transform: scaleX(0); } }
@keyframes drawY { from { transform: scaleY(0); } }
@keyframes fade { from { opacity: 0; } }

.anim .outline-word { animation: rise 1100ms var(--ease-out) 500ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(18%); } }

.anim .h1 .line > span { animation: blurIn var(--dur-m) var(--ease-out) both; }
.anim .h1 .line:nth-child(1) > span { animation-delay: 1000ms; }
.anim .h1 .line:nth-child(2) > span { animation-delay: calc(1000ms + var(--stagger)); }
.anim .h1 .line:nth-child(3) > span { animation-delay: calc(1000ms + 2 * var(--stagger)); }
.anim .h1 .line:nth-child(4) > span { animation-delay: calc(1000ms + 3 * var(--stagger)); }
@keyframes blurIn {
  from { opacity: 0; transform: translateY(30%) scaleY(2.6); filter: blur(12px); }
  60% { filter: blur(2px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.anim .nav { animation: fadeUp var(--dur-m) var(--ease-out) 1500ms both; }
.anim .hero .reveal-micro { animation: fadeUp var(--dur-m) var(--ease-out) both; animation-delay: calc(1550ms + var(--i, 0) * var(--stagger)); }
.anim .reveal-card { animation: cardIn var(--dur-m) var(--ease-out) both; animation-delay: calc(1500ms + var(--d) * var(--stagger)); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(28px) scale(.96); } }

.anim .micro-bars i { animation: barUp 600ms var(--ease-out) both; }
.anim .micro-bars i:nth-child(1) { animation-delay: 2000ms; }
.anim .micro-bars i:nth-child(2) { animation-delay: 2040ms; }
.anim .micro-bars i:nth-child(3) { animation-delay: 2080ms; }
.anim .micro-bars i:nth-child(4) { animation-delay: 2120ms; }
.anim .micro-bars i:nth-child(5) { animation-delay: 2160ms; }
.anim .micro-bars i:nth-child(6) { animation-delay: 2200ms; }
.anim .micro-bars i:nth-child(7) { animation-delay: 2240ms; }
@keyframes barUp { from { transform: scaleY(0); } }

/* Odsłanianie przy scrollu */
.anim .reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-m) var(--ease-out), transform var(--dur-m) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.anim .reveal.in { opacity: 1; transform: none; }
.anim .feature-stage .float-card { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-m) var(--ease-out) 300ms, transform var(--dur-m) var(--ease-out) 300ms; }
.anim .feature-stage.in .float-card { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
}

/* ================= RESPONSYWNOŚĆ ================= */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 34% 1fr 22%; }
  .hero-data { padding-left: 24px; }
  .hero-stage .card-light { left: -10%; }
}

@media (max-width: 900px) {
  :root { --fs-body: 16px; }
  .nav { top: 16px; }
  .nav-links { display: none; }
  .hero { height: auto; padding-top: 104px; padding-bottom: 40px; }
  .hero-grid { grid-template-columns: 1fr; height: auto; gap: 8px; }
  .hero-copy { padding-top: 0; }
  .hero-copy .overline { white-space: normal; }
  .hero-copy .h1 { font-size: clamp(44px, 12.5vw, 80px); margin-bottom: 0; }
  /* Telefon: pudło zaraz pod nagłówkiem — widoczne na pierwszym ekranie; karty pod przyciskami */
  .hero-grid { grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 0; }
  .hero-copy, .hero-stage { display: contents; }
  .hero-grid > *, .hero-copy > *, #hero-canvas { grid-column: 1 / -1; }
  .hero-copy .overline { order: 1; margin-bottom: 16px; }
  .hero-copy .h1 { order: 2; }
  #hero-canvas { order: 3; position: relative; width: calc(100% + 2 * var(--m)); height: 88vw; max-height: 520px; margin: 0 calc(-1 * var(--m)); }
  .hero-copy .lead { order: 4; margin: 0 0 24px; }
  .hero-copy .cta-row { order: 5; margin-bottom: 32px; }
  .hero-stage .float-card { order: 6; grid-column: auto; position: relative; inset: auto; min-width: 0; align-self: start; }
  .hero-data { order: 7; margin-top: 24px; }
  .hero-stage .card-dark .num { font-size: 28px; }
  .float-card { min-width: 0; padding: 14px 16px; }
  .hero-data { padding: 24px 0 0; border-top: 1px solid var(--line); }
  .hero-data dl { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hair, .cross { display: none; }
  .outline-word { bottom: auto; top: 64%; font-size: 34vw; }

  .problem { padding: 96px 0; }
  .problem .h2 { margin-bottom: 48px; }
  .problem-stat { gap: 20px; }
  .problem-stat .big { font-size: clamp(84px, 26vw, 120px); }

  .how-grid, .labels-grid { grid-template-columns: 1fr; gap: 32px; }
  /* Regał przyklejony u góry ekranu — kroki przewijają się pod nim i zmieniają jego stan */
  .how-grid { align-items: stretch; }
  .how-stage { position: sticky; top: 12px; z-index: 2; width: 100%; height: min(80vw, 46vh); max-height: 520px; order: 2;
    box-shadow: 0 18px 30px -18px rgba(31, 42, 46, .25); }
  .how-steps { padding-top: 0; display: contents; }
  .how-steps > .overline, .how-steps > .h2 { order: 1; }
  .how-grid { display: flex; flex-direction: column; }
  .steps { order: 3; }
  .step { min-height: 0; padding: 24px 0 32px; grid-template-columns: 48px 1fr; }
  .steps { padding-bottom: 24vh; }
  .how-chip { right: 12px; bottom: 12px; padding: 12px 14px; gap: 6px; }
  .how-chip .num { font-size: 28px; }

  .feature, .feature.flip { grid-template-columns: 1fr; gap: 32px; margin-bottom: 88px; }
  .feature.flip .feature-copy { order: 0; }
  .feature-stage { height: 560px; padding-top: 48px; margin-inline: calc(-1 * var(--m)); border-radius: 0; }
  .phone { width: 280px; height: 580px; }
  .fc-1, .fc-3 { left: var(--m); }
  .fc-2, .fc-4 { right: var(--m); }
  .label-stack { height: 440px; }
  .label { width: 92%; }
  .label .qr { width: 80px; height: 80px; }
  .label b { font-size: 26px; }
  .l1 { left: 0; top: 10px; } .l2 { right: 0; top: 160px; } .l3 { left: 4%; top: 300px; }
  .final { padding: 104px 0; }
}
