@font-face {
  font-family: "Geist"; font-weight: 300 800; font-display: swap;
  src: url(app/fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist"; font-weight: 300 800; font-display: swap;
  src: url(app/fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono"; font-weight: 400 600; font-display: swap;
  src: url(app/fonts/geist-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Geist Mono"; font-weight: 400 600; font-display: swap;
  src: url(app/fonts/geist-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F;
}

:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --card: #fffdf8;
  --ink: #1d1b16;
  --muted: #7a7366;
  --line: #ded7c6;
  --accent: #2b40c9;
  --marker: #f6e27a;
  --again: #c53b2c; --hard: #a8701a; --good: #2f7d4f; --easy: #2b40c9;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 2px 4px rgba(60,50,30,.05), 0 30px 60px -30px rgba(60,50,30,.35);
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
code { font: 500 .86em "Geist Mono", ui-monospace, monospace; background: var(--paper-2); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.page { overflow-x: hidden; width: 100%; max-width: 100%; position: relative; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav: pływająca pastylka ---------- */
.nav {
  position: fixed; z-index: 50; top: 16px; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: 28px;
  width: min(calc(100% - 32px), 760px); padding: 8px 8px 8px 16px; border-radius: 99px;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 16px 40px -20px rgba(40,30,10,.35);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.03em; font-size: 17px; }
.brand img { border-radius: 8px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.nav-links a { transition: color .3s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 10px 18px; border-radius: 99px; background: var(--ink); color: var(--card); font-weight: 600; font-size: 14.5px; transition: scale .4s var(--ease); }
.nav-cta:hover { scale: 1.04; }
@media (max-width: 640px) { .nav-links { display: none; } .nav { gap: 12px; } .nav-cta { margin-left: auto; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 99px;
  font-weight: 600; font-size: 16.5px; letter-spacing: -.01em; transition: translate .5s var(--ease), box-shadow .5s var(--ease);
}
.btn:hover { translate: 0 -2px; }
.btn-dark { background: var(--ink); color: var(--card); padding-right: 10px; box-shadow: 0 14px 30px -14px rgba(30,25,10,.6); }
.btn-light { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn-paper { background: var(--paper); color: var(--ink); padding: 20px 14px 20px 32px; font-size: 19px; }
.btn-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.14); transition: transform .5s var(--ease); }
.btn-paper .btn-arrow { background: var(--ink); color: var(--paper); width: 42px; height: 42px; }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero: Artistic Asymmetry ---------- */
.hero { position: relative; padding: clamp(150px, 20vh, 210px) var(--gutter) clamp(120px, 16vw, 220px); max-width: 1320px; margin: 0 auto; }
.hero-glow {
  position: absolute; inset: -10% -20% auto auto; width: 900px; height: 900px; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(246,226,122,.55), transparent 70%), radial-gradient(closest-side at 30% 70%, rgba(43,64,201,.12), transparent 70%);
  filter: blur(20px);
}
.hero-title {
  max-width: 72rem; margin: 0; font-weight: 700; letter-spacing: -.055em; line-height: .98;
  font-size: clamp(2.6rem, 5.6vw, 5.8rem);
}
.hero-title .line { display: block; }
.pill-img {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 1.9em; height: .82em; margin: 0 .08em; border-radius: 99px; position: relative; top: -.06em;
  background: linear-gradient(135deg, #3d55e0, #1f2f9c); overflow: hidden;
}
.mini-card { width: .9em; height: .58em; border-radius: .08em; background: var(--card); transform: rotate(-6deg); padding: .08em .1em; display: flex; flex-direction: column; gap: .05em; box-shadow: 0 .05em .15em rgba(0,0,0,.3); }
.mini-card i { display: block; height: .05em; border-radius: 1em; background: #c9d4f7; }
.mini-card i:first-child { background: var(--accent); width: 70%; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 48px; margin-top: 44px; max-width: 760px; }
.hero-lead { margin: 0; font-size: clamp(17px, 1.5vw, 19.5px); color: #4a463d; max-width: 34rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.phone-float { position: absolute; right: var(--gutter); bottom: -60px; width: clamp(240px, 26vw, 330px); z-index: 2; }
@media (max-width: 980px) {
  .phone-float { position: relative; right: auto; bottom: auto; margin: 64px auto 0; width: min(300px, 78vw); }
}
.phone { position: relative; aspect-ratio: 9 / 19; border-radius: 46px; padding: 11px; background: #15130f; box-shadow: 0 50px 90px -30px rgba(30,25,10,.55), 0 0 0 1.5px #3a3529 inset; transform: rotate(4deg); }
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 30%; height: 22px; border-radius: 99px; background: #000; z-index: 2; }
.screen { height: 100%; border-radius: 36px; background: var(--paper); padding: 54px 12px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; font-size: 11px; }
.s-top { display: flex; justify-content: space-between; font-weight: 600; font-size: 11px; }
.s-top b { color: var(--accent); font-weight: 600; }
.s-progress { height: 3px; border-radius: 99px; background: var(--paper-2); }
.s-progress i { display: block; height: 100%; border-radius: 99px; background: var(--ink); }
.s-card {
  flex: 1; border-radius: 16px; padding: 12px; box-shadow: var(--shadow);
  background: linear-gradient(rgba(197,59,44,.35), rgba(197,59,44,.35)) 0 36px / 100% 1px no-repeat, repeating-linear-gradient(transparent 0 19px, rgba(43,64,201,.07) 19px 20px) 0 36px / 100% 100% no-repeat, var(--card);
}
.s-card small { display: block; font-size: 7.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; height: 14px; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-front { font-weight: 650; font-size: 13.5px; line-height: 1.32; letter-spacing: -.02em; margin: 0; }
.s-div { border-top: 1px dashed var(--line); margin: 12px 0; }
.s-back { margin: 0; font-size: 11.5px; line-height: 1.5; }
.s-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.s-grades span { background: var(--card); border-radius: 10px; padding: 7px 0; text-align: center; font-weight: 650; font-size: 9.5px; box-shadow: var(--shadow); }
.s-grades small { display: block; font: 500 8px "Geist Mono", monospace; color: var(--muted); margin-top: 1px; }
.g1 { color: var(--again); } .g2 { color: var(--hard); } .g3 { color: var(--good); } .g4 { color: var(--easy); }

/* ---------- chapters ---------- */
.chapter { max-width: 1320px; margin: 0 auto; padding: clamp(110px, 14vw, 190px) var(--gutter); }
.chapter-title { margin: 0 0 56px; max-width: 64rem; font-size: clamp(2rem, 3.8vw, 3.6rem); line-height: 1.04; letter-spacing: -.05em; font-weight: 700; }

/* ---------- bento: 4 kolumny × 2 rzędy, A 2×2 + B 2×1 + C 1×1 + D 1×1 = 8 pól ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(250px, auto); grid-auto-flow: dense; gap: 14px; }
.tile {
  position: relative; overflow: hidden; border-radius: 28px; padding: 30px; background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: translate .7s var(--ease);
}
.tile:hover { translate: 0 -4px; }
.tile h3 { margin: 0 0 8px; font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.04em; line-height: 1.1; font-weight: 680; }
.tile p { margin: 0; color: var(--muted); font-size: 15.5px; }
.tile-a { grid-column: span 2; grid-row: span 2; }
.tile-b { grid-column: span 2; }
.tile-c, .tile-d { grid-column: span 1; }
.tile-copy { max-width: 30rem; }

.timeline { margin-top: auto; padding-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.tl-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 14px; font: 500 12.5px "Geist Mono", monospace; color: var(--muted); }
.tl-row i { display: block; height: 16px; width: var(--w); border-radius: 99px; background: var(--ink); transform-origin: left; }
.tl-row i::after { content: none; }
.tl-row:nth-child(-n+2) i { background: var(--hard); }

.tile-b { background: var(--ink); color: var(--card); }
.tile-b p { color: rgba(255,253,248,.62); }
.tile-b { flex-direction: row; gap: 28px; align-items: flex-end; }
.tile-b .tile-copy { flex: 1; align-self: flex-start; }
.diff { flex: none; display: flex; flex-direction: column; gap: 10px; font: 500 22px "Geist Mono", monospace; background: rgba(255,255,255,.07); border-radius: 18px; padding: 16px 20px; transition: transform .7s var(--ease); }
.tile-b:hover .diff { transform: scale(1.05); }
.diff small { display: block; font: 600 10px "Geist", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,253,248,.5); margin-bottom: 2px; }
.diff .ok { color: #6fd39a; } .diff .bad { color: #ff8a7a; text-decoration: line-through; } .diff .miss { color: #ff8a7a; background: rgba(255,138,122,.18); border-radius: 4px; }

.tile-c { background: var(--marker); justify-content: flex-end; }
.tile-c p { color: #5e5326; }
.tile-icon { position: absolute; top: 26px; left: 28px; width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; transition: transform .7s var(--ease); }
.tile-c:hover .tile-icon { transform: rotate(-8deg) scale(1.1); }
.tile-d { justify-content: flex-end; }
.mini-heat { position: absolute; top: 26px; left: 28px; right: 28px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.mini-heat i { aspect-ratio: 1; border-radius: 3px; background: var(--paper-2); transition: transform .5s var(--ease); }
.tile-d:hover .mini-heat i { transform: scale(1.08); }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-a, .tile-b { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile-a, .tile-b, .tile-c, .tile-d { grid-column: span 1; }
  .tile-b { flex-direction: column; align-items: flex-start; }
  .tile-c, .tile-d { min-height: 230px; }
}

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 26px 0; }
.marquee-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 48s linear infinite; }
.marquee span { font-size: clamp(30px, 4.2vw, 60px); font-weight: 700; letter-spacing: -.05em; white-space: nowrap; }
.marquee span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.marquee b { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- pinned split ---------- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-left { padding-top: 8px; }
.split-title { margin: 0 0 18px; font-size: clamp(2.2rem, 4.2vw, 4.2rem); line-height: 1; letter-spacing: -.055em; font-weight: 700; }
.split-right { display: flex; flex-direction: column; gap: 72px; }
.step { margin: 0; }
.step-media { overflow: hidden; border-radius: 26px; aspect-ratio: 3 / 2; background: var(--paper-2); }
.step-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15) sepia(.18); mix-blend-mode: multiply; opacity: .92; transition: transform .9s var(--ease); }
.step:hover .step-media img { transform: scale(1.05); }
.step figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; max-width: 34rem; }
.step figcaption b { font-size: 24px; letter-spacing: -.04em; font-weight: 680; }
.step figcaption span { color: var(--muted); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- scrub reveal ---------- */
.reveal-wrap { padding-top: 40px; }
.reveal-text { margin: 0 auto; max-width: 62rem; font-size: clamp(1.7rem, 3.4vw, 3.1rem); line-height: 1.16; letter-spacing: -.045em; font-weight: 650; }
.reveal-text .w { opacity: .12; }

/* ---------- horizontal accordion ---------- */
.accordion { display: flex; gap: 12px; height: 380px; }
.acc-panel {
  position: relative; flex: 1; min-width: 0; overflow: hidden; cursor: pointer; outline: none;
  border-radius: 28px; padding: 28px; background: var(--card); box-shadow: var(--shadow);
  transition: flex .8s var(--ease), background .5s var(--ease), color .5s var(--ease);
}
.acc-panel.is-open { flex: 3.2; background: var(--ink); color: var(--card); }
.acc-num { font: 600 64px/1 "Geist", sans-serif; letter-spacing: -.06em; opacity: .9; }
.acc-body { position: absolute; left: 28px; right: 28px; bottom: 28px; opacity: 0; transform: translateY(12px); transition: opacity .4s var(--ease), transform .6s var(--ease); min-width: 240px; }
.acc-panel.is-open .acc-body { opacity: 1; transform: none; transition-delay: .2s; }
.acc-label { position: absolute; left: 30px; bottom: 30px; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 650; font-size: 19px; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; transition: opacity .3s var(--ease); }
.acc-panel.is-open .acc-label { opacity: 0; }
.acc-panel:not(.is-open):hover { background: var(--paper-2); }
.acc-body h3 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.045em; }
.acc-body p { margin: 0; max-width: 26rem; color: rgba(255,253,248,.7); }
@media (max-width: 760px) {
  .accordion { flex-direction: column; height: auto; }
  .acc-panel { flex: none; min-height: 84px; display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
  .acc-panel.is-open { flex: none; min-height: 210px; align-items: flex-start; }
  .acc-num { font-size: 40px; }
  .acc-body { position: static; min-width: 0; display: none; }
  .acc-label { position: static; writing-mode: horizontal-tb; transform: none; color: var(--ink); font-size: 17px; }
  .acc-panel.is-open .acc-label { display: none; }
  .acc-panel.is-open .acc-body { display: block; align-self: flex-end; }
  .acc-panel.is-open { flex-direction: column; justify-content: space-between; }
}

/* ---------- CTA + footer ---------- */
.cta {
  margin: 40px var(--gutter) 0; border-radius: 40px; padding: clamp(110px, 14vw, 200px) var(--gutter);
  background: radial-gradient(60rem 30rem at 80% 0%, rgba(61,85,224,.55), transparent 60%), radial-gradient(40rem 30rem at 0% 100%, rgba(246,226,122,.18), transparent 60%), var(--ink);
  color: var(--paper); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 44px;
}
.cta-title { margin: 0; max-width: 72rem; font-size: clamp(2.8rem, 7.4vw, 7.4rem); line-height: .95; letter-spacing: -.065em; font-weight: 700; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 34px var(--gutter) 44px; font-size: 14px; max-width: 1320px; margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  * { transition: none !important; }
}
