/* FALLaSLEEP – wspolne style strony glownej i podstron */
:root {
  --bg: #131418; --bg-edge: #0e0f12; --card: #1c1d22; --card-hover: #24252b;
  --border: #2a2b32; --accent: #7d67cb; --accent-l: #a38feb; --accent-d: #6551b2;
  --gold: #f2c15a; --text: #f3f3f6; --mute: #9a9ba3; --dim: #62636b; --ok: #6fd6a6;
  --radius: 16px; --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-edge); color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { font-family: Outfit, Inter, sans-serif; line-height: 1.1; margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

/* Nocne niebo */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(90,68,168,.35), transparent 70%),
    radial-gradient(50% 45% at 10% 90%, rgba(60,44,120,.30), transparent 70%),
    var(--bg-edge); }
.sky i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  animation: twinkle var(--d) ease-in-out infinite; animation-delay: var(--dl); opacity: .2; }
.sky i.g { background: var(--gold); width: 3px; height: 3px; }
@keyframes twinkle { 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .sky i { animation: none; opacity: .5; } html { scroll-behavior: auto; } }

/* Nagłówek */
header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
  background: rgba(14,15,18,.7); border-bottom: 1px solid rgba(42,43,50,.6); }
.nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none;
  font: 800 20px Outfit, sans-serif; letter-spacing: .5px; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: none; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--mute); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
@media (min-width: 900px) { .nav-links { display: flex; } }
.lang { margin-left: auto; display: flex; background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px; }
@media (min-width: 900px) { .lang { margin-left: 8px; } }
.lang button { all: unset; cursor: pointer; padding: 4px 12px; border-radius: 999px;
  font: 600 13px Inter, sans-serif; color: var(--mute); }
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.lang button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent-l); outline-offset: 2px; }

/* Hero */
.hero { padding-block: 56px 40px; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 1.15fr; padding-block: 88px 64px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(28,29,34,.7);
  font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-l); }
.hero h1 { font-size: clamp(44px, 8vw, 76px); font-weight: 800; margin: 20px 0 8px; position: relative; width: fit-content; }
.hero h1 .star { position: absolute; top: -4px; right: -30px; width: 22px; color: var(--gold); }
.sub { font: 600 18px Outfit, sans-serif; color: var(--accent-l); margin-bottom: 16px; }
.lead { color: var(--mute); font-size: 17px; max-width: 34em; margin: 0 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  padding: 15px 26px; border-radius: 999px; font: 700 16px Outfit, sans-serif; letter-spacing: .3px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); transition: .15s; }
.btn:hover { background: var(--card-hover); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff;
  box-shadow: 0 8px 30px rgba(125,103,203,.45); }
.btn.primary:hover { background: var(--accent-l); transform: translateY(-1px); }
.meta { margin-top: 16px; font-size: 13px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.meta span::before { content: "•"; margin-right: 6px; color: var(--accent-d); }
.meta span:first-child::before { content: none; }

.shot { position: relative; }
.shot::before { content: ""; position: absolute; inset: 10% 5%; background: var(--accent);
  filter: blur(80px); opacity: .35; z-index: -1; }
.shot img { width: 100%; height: auto; display: block; border-radius: 14px;
  border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0,0,0,.55); }

/* Sekcje */
section { padding: 64px 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-l); }
.sec-title { font-size: clamp(30px, 4.5vw, 42px); font-weight: 800; margin: 8px 0 12px; }
.sec-lead { color: var(--mute); max-width: 40em; margin: 0 0 36px; }

.versions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .versions { grid-template-columns: repeat(4, 1fr); } }
.ver { padding: 18px; border-radius: var(--radius); background: rgba(28,29,34,.8); border: 1px solid var(--border); }
.ver b { font: 800 24px Outfit, sans-serif; display: block; }
.ver small { font-size: 13px; color: var(--dim); }
.ver.on { border-color: var(--accent); background: linear-gradient(160deg, rgba(125,103,203,.22), rgba(28,29,34,.9)); }
.ver.on small { color: var(--ok); }
.ver.on small::before { content: "● "; }
.ver:not(.on) b { color: var(--dim); }

.features { display: grid; gap: 16px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feat { padding: 26px; border-radius: var(--radius); background: rgba(28,29,34,.8); border: 1px solid var(--border); }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(125,103,203,.16); color: var(--accent-l); margin-bottom: 16px; }
.feat .ico svg { width: 22px; height: 22px; }
.feat h3 { font-size: 20px; margin-bottom: 8px; }
.feat p { margin: 0; color: var(--mute); font-size: 15px; }
.tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: 3px;
  font: 600 11px Inter, sans-serif; letter-spacing: .5px; background: rgba(242,193,90,.15); color: var(--gold); }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--radius); background: rgba(28,29,34,.8); border: 1px solid var(--border); }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font: 800 18px Outfit, sans-serif; background: var(--accent); color: #fff; }
.steps h3 { font-size: 18px; margin: 2px 0 4px; }
.steps p { margin: 0; color: var(--mute); font-size: 15px; }
.steps a { color: var(--accent-l); }
.narrow { max-width: 820px; }

.mod-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
.mod-total { display: flex; align-items: baseline; gap: 10px; color: var(--mute); font-size: 15px; margin-bottom: 12px; }
.mod-total b { font: 800 clamp(40px, 6vw, 56px) Outfit, sans-serif; color: var(--gold); line-height: 1; }
.modules { display: grid; gap: 16px; }
@media (min-width: 700px) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .modules { grid-template-columns: repeat(3, 1fr); } }
.mod { padding: 22px; border-radius: var(--radius); background: rgba(28,29,34,.8); border: 1px solid var(--border); }
.mod h3 { font-size: 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mod h3 span { font: 600 12px Inter, sans-serif; color: var(--accent-l); background: rgba(125,103,203,.16);
  padding: 3px 10px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { list-style: none; font-size: 13px; padding: 4px 10px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.chips li.more { background: none; border-style: dashed; color: var(--dim); }
.chips { padding: 0; margin: 0; }
code { font: 500 .9em ui-monospace, Consolas, monospace; background: var(--bg); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 6px; color: var(--text); word-break: break-all; }

.faq { display: grid; gap: 10px; max-width: 820px; }
details { border-radius: var(--radius); background: rgba(28,29,34,.8); border: 1px solid var(--border); }
summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; display: flex; gap: 12px; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-l); font: 700 20px Outfit, sans-serif; line-height: 1; }
details[open] summary::after { content: "−"; }
details > p, .ans { margin: 0; padding: 0 22px 18px; color: var(--mute); font-size: 15px; }
.ans p { margin: 0 0 10px; }
.ans p:last-child { margin: 0; }
details a { color: var(--accent-l); }

.terms { max-width: 820px; margin: 0; padding: 8px 28px; list-style: none; counter-reset: t;
  border-radius: var(--radius); background: rgba(28,29,34,.8); border: 1px solid var(--border); }
.terms li { counter-increment: t; padding: 18px 0; border-top: 1px solid var(--border); color: var(--mute); font-size: 15px; }
.terms li:first-child { border-top: 0; }
.terms h3 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.terms h3::before { content: "§" counter(t) " "; color: var(--accent-l); }
.terms p { margin: 0; }
.terms-date { margin-top: 14px; font-size: 13px; color: var(--dim); }

.final { text-align: center; padding: 72px 20px; border-radius: 24px; border: 1px solid var(--border);
  background: radial-gradient(80% 120% at 50% 0%, rgba(125,103,203,.28), rgba(28,29,34,.85) 70%); }
.final img { width: 72px; height: 72px; margin-bottom: 16px; }
.final .cta { justify-content: center; margin-top: 28px; }

dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 20px;
  background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(8,8,12,.7); backdrop-filter: blur(4px); }
#dlform { padding: 28px; display: grid; gap: 14px; }
.dlg-logo { width: 44px; height: 44px; }
dialog h2 { font-size: 26px; }
dialog p { margin: 0; color: var(--mute); font-size: 15px; }
#gmail { padding: 13px 18px; border-radius: 999px; font: 500 15px Inter, sans-serif; background: var(--bg);
  color: var(--text); border: 1px solid var(--border); outline: none; }
#gmail:focus { border-color: var(--accent-l); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check a { color: var(--accent-l); }
.dlg-msg { min-height: 1.3em; font-size: 14px !important; }
.dlg-msg.err { color: #f0a04b !important; } .dlg-msg.ok { color: var(--ok) !important; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-actions .btn { padding: 12px 22px; font-size: 15px; }
.dlg-actions .btn[disabled] { opacity: .6; cursor: wait; }

footer { padding: 40px 0 56px; color: var(--dim); font-size: 13px; text-align: center; }

/* ---- podstrona modules/ ---- */
.page-hero { padding-top: 40px; text-align: center; }
.back { display: inline-block; margin-bottom: 28px; color: var(--mute); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }
.big-title { font-size: clamp(48px, 10vw, 112px); font-weight: 800; letter-spacing: -1px; margin: 0 auto 18px;
  position: relative; width: fit-content; }
.big-title #count { color: var(--gold); }
.big-lead { color: var(--mute); font-size: clamp(17px, 2.2vw, 21px); max-width: 36em; margin: 0 auto 44px; }
.gui-shot { margin: 0; }
.nav-links a[aria-current="page"] { color: var(--text); }
.mod-more { margin-top: 24px; }

/* easter egg: klepsydra i spadajace gwiazdy */
.egg { margin: 56px auto 0; display: grid; justify-items: center; gap: 14px; min-height: 120px; }
.hourglass { all: unset; display: inline-block; cursor: pointer; width: 34px; height: 46px; color: var(--dim); padding: 8px; border-radius: 12px;
  transform: rotate(var(--turn, 0deg)); transition: transform .9s cubic-bezier(.6, -0.3, .3, 1.3), color .3s; }
.hourglass:hover { color: var(--accent-l); }
.hourglass:focus-visible { outline: 2px solid var(--accent-l); outline-offset: 4px; }
.hourglass svg { width: 100%; height: 100%; display: block; }
.hourglass path.sand-top, .hourglass path.sand-bottom { fill: var(--gold); opacity: .85; transition: opacity .9s; }
.hourglass.flipped path.sand-top { opacity: .15; }
.hourglass:not(.flipped) path.sand-bottom { opacity: .15; }
.egg-msg { min-height: 1.6em; max-width: 34em; margin: 0; color: var(--dim); font-size: 15px; transition: color .6s; }
/* dymek jak w komiksie: ogonek wskazuje klepsydre */
.bubble { position: relative; display: inline-block; margin-top: 10px; padding: 14px 22px; border-radius: 22px;
  background: #f3f3f6; color: #1c1d22; font: 600 16px Inter, sans-serif; font-style: italic;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: bubble-in .45s cubic-bezier(.2, 1.5, .4, 1); transform-origin: 50% -10px; }
.bubble::before { content: ""; position: absolute; top: -10px; left: 50%; margin-left: -11px;
  border: 11px solid transparent; border-top: 0; border-bottom-color: #f3f3f6; }
.bubble::after { content: "z z z"; position: absolute; right: -34px; top: -22px; color: var(--accent-l); font: 700 13px Outfit, sans-serif;
  font-style: normal; letter-spacing: 2px; animation: zzz 2.4s ease-in-out infinite; }
@keyframes bubble-in { from { transform: scale(.3); opacity: 0; } }
@keyframes zzz { 50% { transform: translate(6px, -8px); opacity: .4; } }

/* ---- male easter eggi (assets/eggs.js) ---- */
body.barrel-roll { animation: barrel 1.4s cubic-bezier(.45, 0, .25, 1); }
@keyframes barrel { to { transform: rotate(360deg); } }
body.shake { animation: shake .5s linear 2; }
@keyframes shake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(6px, -3px); }
  60% { transform: translate(-4px, -2px); } 80% { transform: translate(4px, 2px); } }
.splash { position: absolute; right: -10px; bottom: -6px; transform: rotate(-18deg); color: #ffff55; white-space: nowrap;
  font: 700 clamp(14px, 2.2vw, 22px) Outfit, sans-serif; text-shadow: 2px 2px 0 #3f3f15; pointer-events: none;
  animation: splash .45s ease-in-out infinite alternate; }
@keyframes splash { to { transform: rotate(-18deg) scale(1.08); } }
.creeper { position: fixed; bottom: -120px; right: 24px; z-index: 30; width: 96px; height: 96px; background: #5aa33a;
  box-shadow: 0 0 0 4px #3d7a26; transition: bottom .6s cubic-bezier(.2, 1.3, .4, 1); pointer-events: none; }
.creeper.up { bottom: 0; }
.creeper i { position: absolute; background: #111; }
@media (prefers-reduced-motion: reduce) { body.barrel-roll, body.shake, .splash, .bubble::after { animation: none; } }
.starfall { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.starfall i { position: absolute; top: -20px; width: var(--size); height: var(--size); background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 6px rgba(242,193,90,.8)); animation: starfall var(--dur) ease-in var(--delay) forwards; }
@keyframes starfall { to { transform: translate(-30vw, 110vh) rotate(540deg); opacity: .2; } }
body.asleep .sky { filter: brightness(.55); transition: filter 2s; }

/* ---- wersja beta (pokazywane tylko gdy release.js ma channel "beta") ---- */
.beta-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
  font: 700 11px Inter, sans-serif; letter-spacing: .8px; background: var(--gold); color: #2a1e08; }
h2 .beta-tag { vertical-align: 6px; }
.beta-note { margin: 10px 0 0; font-size: 13px; color: var(--gold); opacity: .85; }

.credit { margin-top: 8px; font-size: 12px; opacity: .7; }
