:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --border: #e3e6f0;
  --text: #121528;
  --muted: #5b6478;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eceeff;
  --on-primary: #ffffff;
  --danger: #c4261a;
  --success: #067647;
  --success-soft: #e8f7ee;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0c17;
    --surface: #131629;
    --surface-2: #181c33;
    --border: #262b49;
    --text: #eceefb;
    --muted: #9aa2c6;
    --primary: #8087ff;
    --primary-hover: #979dff;
    --primary-soft: #222754;
    --on-primary: #0a0c17;
    --danger: #ff8f86;
    --success: #5fd49a;
    --success-soft: #12301f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0; }
.alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }

header.top { padding: 16px 0; }
header.top .wrap { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--primary); }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 600; padding: 12px 20px;
  border-radius: 10px; text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.hero { padding: 48px 0 64px; }
.hero .lead { margin-bottom: 1.5em; }

.waitlist { max-width: 520px; }
.waitlist .row { display: flex; gap: 8px; flex-wrap: wrap; }
.waitlist input[type='email'] {
  flex: 1 1 220px; min-width: 0; font: inherit; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.waitlist input[type='email']:focus-visible,
.btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
.consent input { margin-top: 4px; }
/* Honeypot: off-screen for people, still present for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 10px; font-weight: 600; min-height: 1.6em; }
.status.ok { color: var(--success); }
.status.err { color: var(--danger); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--muted); }
.step-no {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  font-weight: 700; margin-bottom: 10px;
}
.tag {
  display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 10px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary); margin-bottom: 10px;
}
.story { background: var(--bg); color: var(--text); }
.scene p { color: var(--muted); }
.scene h3 { color: var(--text); }
.story-pin { padding: 28px 0 40px; }
.story-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 0 var(--gutter, 20px); max-width: 1160px; margin: 0 auto 16px; }
.story-head h2 { margin: 0; }
.story-count { display: none; }
.story-stage { display: grid; gap: 28px; }
.scene { margin: 0; }
.scene img { display: block; width: min(100%, 1400px); height: auto; margin: 0 auto; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px rgba(30, 27, 90, 0.18), 0 0 0 1px var(--border); }
.scene figcaption { max-width: 1160px; margin: 14px auto 0; padding: 0 var(--gutter, 20px); }
.scene h3 { font-size: clamp(1.3rem, 3vw, 2rem); margin: 0 0 0.2em; }
.scene p { margin: 0; color: var(--muted); font-size: 1.1rem; }
.story-bar, .story-hint { display: none; }

/* Pinned, scroll-driven mode: each step takes over the whole screen. */
@media (prefers-reduced-motion: no-preference) {
  html.js .story { height: calc(var(--n) * 85vh + 15vh); position: relative; }
  html.js .story-pin { background: radial-gradient(60% 50% at 85% 0%, var(--primary-soft), transparent 70%), var(--bg); }
  html.js .story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 22px 0 0; display: flex; flex-direction: column; overflow: hidden; }
  html.js .story-head { width: 100%; margin-bottom: 8px; }
  html.js .story-head h2 { font-size: clamp(1.1rem, 2.4vw, 1.6rem); margin: 0; letter-spacing: -0.01em; }
  html.js .story-count { display: block; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  html.js .story-count b { color: var(--primary); font-size: 1.6em; }
  html.js .story-stage { position: relative; flex: 1; min-height: 0; display: block; }
  html.js .scene { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(14vh) scale(0.97); transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); pointer-events: none; }
  html.js .scene.is-active { opacity: 1; transform: none; pointer-events: auto; }
  html.js .scene.is-past { transform: translateY(-14vh) scale(0.97); }
  html.js .scene img { width: 100%; height: auto; max-height: calc(100svh - 215px); width: auto; max-width: min(96vw, 1400px); object-fit: contain; flex: 0 1 auto; align-self: center; }
  html.js .scene figcaption { width: 100%; margin-top: 22px; text-align: center; padding-bottom: 8px; }
  html.js .scene .tag { margin-bottom: 8px; }
  html.js .story-bar { display: block; height: 4px; background: var(--border); }
  html.js .story-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #7c3aed); transition: width 0.15s linear; }
  html.js .story-hint { display: block; position: absolute; right: 20px; bottom: 16px; margin: 0; font-size: 0.85rem; color: var(--muted); transition: opacity 0.3s; }
  html.js .story.is-late .story-hint { opacity: 0; }
}
.fmt-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.fmt { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.fmt h3 { font-size: 1.15rem; margin: 10px 0 0.3em; }
.fmt p { margin: 0; color: var(--muted); }
.fmt .tag.soon { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.fmt-soon { opacity: 0.85; }
.mock { position: relative; margin: 0 auto; height: 190px; border-radius: 14px; border: 2px solid var(--border); background: linear-gradient(160deg, var(--surface-2), var(--primary-soft)); display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; overflow: hidden; }
.m-45 { aspect-ratio: 4 / 5; height: auto; width: 150px; }
.m-916 { aspect-ratio: 9 / 16; height: auto; width: 107px; }
.mock i, .mock b { display: block; border-radius: 4px; }
.m-hook { background: var(--primary); color: var(--on-primary); font-style: normal; font-size: 0.7rem; font-weight: 700; padding: 5px 7px; width: fit-content; }
.m-line { height: 6px; background: var(--border); } .w90 { width: 90%; } .w70 { width: 70%; }
.m-scene { height: 26px; background: var(--surface); border: 1px solid var(--border); } .m-scene.short { height: 16px; width: 70%; }
.m-cta { margin-top: auto; background: var(--success-soft); color: var(--success); font-style: normal; font-size: 0.65rem; font-weight: 700; padding: 4px 6px; width: fit-content; }
.m-dots { margin-top: auto; display: flex; gap: 4px; justify-content: center; }
.m-dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--border); } .m-dots b:first-child { background: var(--primary); }
.fine { color: var(--muted); font-size: 0.9rem; text-align: center; margin-top: 18px; }
.ticks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.fmt-top { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.fmt-top .tag { margin: 0; }
.plat { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border-radius: 28%; color: #fff; }
.plat svg { width: 21px; height: 21px; }
.plat-ig { background: linear-gradient(45deg, #f9a03f 0%, #e1306c 50%, #833ab4 100%); }
.plat-tt { background: #111; box-shadow: inset -2px -2px 0 #fe2c55, inset 2px 2px 0 #25f4ee; }
.plat-yt { background: #ff0033; }
.demo-cta { text-align: center; margin: 28px 0 0; }
.proof-slot {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--muted); background: var(--surface);
}

details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.prose { max-width: 720px; padding: 32px 0 56px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* --- Sales page additions --- */
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--primary); margin: 0 0 12px; }
.hero { position: relative; overflow: hidden; padding: 40px 0 72px; background: radial-gradient(60% 55% at 85% 0%, var(--primary-soft), transparent 70%); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.chips li { font-size: 0.85rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.browser { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(30, 27, 90, 0.18), 0 2px 6px rgba(16, 24, 40, 0.06); }
.dots-bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.dots-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.browser img { display: block; width: 100%; height: auto; }
.feat { display: grid; gap: 24px; align-items: center; margin-top: 56px; }
.feat h3 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.01em; margin: 6px 0 0.4em; }
.feat-copy p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.shot-note { text-align: left; margin: 8px 0 0; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .hero-shot { transform: perspective(1400px) rotateY(-8deg) rotateX(2deg); }
  .feat { grid-template-columns: 1fr 1.25fr; gap: 48px; }
  .feat:nth-of-type(even) { grid-template-columns: 1.25fr 1fr; }
  .feat:nth-of-type(even) .feat-copy { order: 2; }
}
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (min-width: 900px) { html.js .hero-shot.reveal.in { transform: perspective(1400px) rotateY(-8deg) rotateX(2deg); } }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }
#funkcje-pro .wrap, .hero .wrap { max-width: 1160px; }

/* Closing call-to-action: brand-coloured band, then a plain footer. */
.closing { padding: 80px 0; text-align: center; color: #fff; background: radial-gradient(50% 80% at 90% 100%, rgba(255, 255, 255, 0.16), transparent 70%), linear-gradient(135deg, #4f46e5, #7c3aed); }
.closing h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.8rem); letter-spacing: -0.02em; max-width: 18em; margin: 0 auto 0.5em; }
.closing .lead { color: rgba(255, 255, 255, 0.85); margin: 0 auto 1.6em; }
.closing .waitlist { margin: 0 auto; text-align: left; }
.closing .waitlist input[type='email'] { background: #fff; border-color: transparent; color: #121528; }
.closing .waitlist input[type='email']:focus-visible, .closing .btn:focus-visible, .closing a:focus-visible { outline-color: #fff; }
.closing .consent { color: rgba(255, 255, 255, 0.85); }
.closing .consent a { color: #fff; }
.closing .btn { background: #121528; color: #fff; }
.closing .btn:hover:not(:disabled) { background: #000; }
.closing .status.ok { color: #c9f7dd; }
.closing .status.err { color: #ffd2cd; }
