/* BusClimb — strona gry. Układ i ruch jak na busearch.pl, kolory z gry:
   granatowe niebo, żółty autobus, zielone wzgórza, kremowe tło. */
:root {
  --ink: #3b2a25;
  --muted: #6f5e57;
  --navy: #2c3a63;
  --navy-2: #3c4c7a;
  --yellow: #f2b21c;
  --amber: #c98a00;
  --cream: #fbf7ef;
  --card: #ffffff;
  --line: #eadfcd;
  --green: #6b9a5c;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Nunito, "Segoe UI", Roboto, system-ui, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
:where(a, button):focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; border-radius: 6px; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.page { position: relative; overflow-x: clip; }

/* ---------- Nagłówek ---------- */
.header { position: absolute; z-index: 5; inset: 0 0 auto; color: #fff; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 900; white-space: nowrap; }
.brand img { border-radius: 10px; }
.header nav { display: flex; align-items: center; gap: 26px; }
.header nav a { color: #e5e9f3; font-size: 15px; font-weight: 600; }
.header nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.header .nav-cta { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; color: #fff; border: 1px solid #d8e0fa88; border-radius: 10px; }
.header .nav-cta:hover { background: #ffffff18; text-decoration: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: 76px; padding-bottom: 150px; color: #fff; overflow: hidden;
  background: radial-gradient(700px 480px at 80% 28%, #6a74b3 0%, transparent 62%),
              radial-gradient(520px 380px at 10% 95%, #e8a25a55 0%, transparent 70%),
              linear-gradient(170deg, #2a355c 0%, #34426f 50%, #4a5585 100%); }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .7; }
.sun { position: absolute; right: 8%; top: 120px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, #ffe08a 0 45%, #ffe08a55 46% 62%, transparent 63%); opacity: .55; }
.hero-grid { position: relative; z-index: 1; min-height: 600px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .85fr); gap: 52px; align-items: center; }
.hero-copy { padding: 40px 0 30px; }
.hero h1 { font-weight: 900; letter-spacing: -.04em; line-height: 1.05; }
.hero-main { display: block; font-size: clamp(50px, 6.4vw, 82px); }
.hero-sub { display: block; margin-top: 16px; font-size: clamp(25px, 3.2vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.2; color: #ffe6a6; }
.lead { max-width: 500px; margin-top: 24px !important; color: #e0e5f2; font-size: 17px; line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 30px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 9px 18px; border-radius: 10px; background: #080a09; color: #fff; border: 1px solid #ffffff2a; transition: transform .15s ease, filter .15s ease; }
.store:hover { transform: translateY(-1px); filter: brightness(1.1); }
.store span { line-height: 1.1; }
.store small { display: block; font-size: 10px; letter-spacing: .05em; }
.store strong { display: block; margin-top: 3px; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.btn-ghost { display: inline-flex; align-items: center; min-height: 58px; padding: 0 22px; border-radius: 12px; background: var(--yellow); color: #3a2a12; font-weight: 800; font-size: 16px; box-shadow: 0 5px 0 #b07c00, 0 12px 26px #10183244; transition: transform .15s ease, box-shadow .15s ease; }
.btn-ghost:hover { transform: translateY(-1px); }
.store:active, .btn-ghost:active, .nav-cta:active { transform: scale(.96); transition-duration: .08s; }
.points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 0; list-style: none; color: #dbe3f6; font-size: 15px; }
.points i { font-style: normal; color: #9fe6b6; font-weight: 900; margin-right: 4px; }

/* Telefon w hero i światło padające na niego (jak HomeLight na busearch.pl) */
.device-stage { position: relative; display: flex; justify-content: center; padding: 130px 0 20px; }
.rig { --tilt: 3deg; --radius: 44px; position: relative; width: min(300px, 70vw); transform: rotate(var(--tilt)); transition: transform .2s ease-out; }
.rig:hover { transform: rotate(var(--tilt)) scale(1.02); }
.device { position: relative; z-index: 1; border: 10px solid #151a2b; border-radius: var(--radius); overflow: hidden; background: #151a2b; box-shadow: 0 30px 70px #0b10244d; }
.device img { width: 100%; height: auto; }
.light { position: absolute; inset: 0; pointer-events: none; clip-path: inset(-200vh -30px -30px -30px round var(--radius)); }
.beam { position: absolute; left: 80%; bottom: calc(100% - 40px); width: 260px; height: 150vh; transform: translateX(-50%); transform-origin: top;
  background: linear-gradient(90deg, transparent calc(50% - 3px), #fff 50%, transparent calc(50% + 3px)),
              linear-gradient(90deg, transparent 44%, #fff4cfcc 50%, transparent 56%),
              linear-gradient(90deg, transparent 25%, #fff4cf55 50%, transparent 75%);
  -webkit-mask-image: linear-gradient(to top, transparent, #000 90px, #000 55%, transparent);
  mask-image: linear-gradient(to top, transparent, #000 90px, #000 55%, transparent); }
.splash { position: absolute; left: 80%; top: -40px; width: 240px; height: 90px; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 55%, #fff 0, #fff4cf88 30%, transparent 72%); filter: blur(4px); }
.rim { position: absolute; inset: -3px; padding: 3px; border-radius: calc(var(--radius) + 3px);
  background: radial-gradient(circle at 80% 0, #fff 0, #fff 14%, #ffe9a8e6 24%, #ffe9a866 48%, transparent 78%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.rim-glow { inset: -16px; padding: 16px; border-radius: calc(var(--radius) + 16px); filter: blur(14px); }

.hero-hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 220px; z-index: 0; }
.hero-hills + * { position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; background: linear-gradient(transparent, var(--cream)); z-index: 0; }

/* ---------- Sekcje ---------- */
.section { padding: 96px 0; }
.eyebrow { color: var(--amber); font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.section h2, .download h2 { margin-top: 10px; font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -.035em; font-weight: 900; }
.section-heading { max-width: 680px; margin: 0 auto 54px; text-align: center; }
.section-heading > p:last-child, .section-lead { margin-top: 16px !important; color: var(--muted); font-size: 17px; }

/* Jak grać */
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 480px); gap: 64px; align-items: center; }
.rules { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.rules li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 18px #5a3d1a0d; }
.rule-n { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 4px solid #e59a00; font-weight: 900; font-size: 17px; }
.rules li:first-child .rule-n { background: #2fae6b; border-color: #1f8d55; color: #fff; }
.rules strong { display: block; font-size: 17px; }
.rules small { display: block; color: var(--muted); font-size: 15px; }
.board-card { margin: 0; padding: 18px; border-radius: 30px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 70px #5a3d1a1f; }
.board { width: 100%; height: auto; display: block; }
.board-card figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-weight: 700; min-height: 1.6em; }
.board .cell { transition: filter .3s; }
.board.win .cell { animation: cell-win .7s var(--ease) calc(var(--i) * 18ms) both; }
@keyframes cell-win { 40% { filter: brightness(1.18) saturate(1.3); transform: scale(1.04); } }
.board .cell { transform-box: fill-box; transform-origin: center; }
.board .stop { transition: transform .35s var(--ease); transform-box: fill-box; transform-origin: center; }
.board .stop.hit { transform: scale(1.15); }

/* Funkcje */
.features { background: linear-gradient(#fff8ea, var(--cream)); border-block: 1px solid var(--line); }
.features-showcase { display: grid; grid-template-columns: 1fr 300px 1fr; gap: 40px; align-items: center; }
.feat-col { display: grid; gap: 22px; }
.feat { padding: 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 22px #5a3d1a12; transition: transform .2s var(--ease), box-shadow .2s; }
.feat:hover { transform: translateY(-3px); box-shadow: 0 16px 30px #5a3d1a1c; }
.feat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-size: 24px; margin-bottom: 12px; background: var(--tint); }
.feat h3 { font-size: 19px; font-weight: 900; }
.feat p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.f-yellow { --tint: #fff1c4; } .f-orange { --tint: #ffe2c7; } .f-green { --tint: #dcf2d3; }
.f-blue { --tint: #dbe7fb; } .f-purple { --tint: #ece0fb; } .f-red { --tint: #fbe0dc; }
.phone { border: 10px solid #151a2b; border-radius: 42px; overflow: hidden; background: #151a2b; box-shadow: 0 30px 70px #2c1f0f33; }
.features-phone { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Liczby */
.numbers { padding: 56px 0; background: var(--navy); color: #fff; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.numbers strong { display: block; font-size: clamp(38px, 5vw, 58px); font-weight: 900; color: var(--yellow); line-height: 1.1; font-variant-numeric: tabular-nums; }
.numbers span { color: #d4dbef; font-weight: 700; }

/* Znaki */
.sign-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.sign { padding: 24px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 22px #5a3d1a12; }
.sign svg { width: 72px; height: 72px; margin-bottom: 14px; }
.sign h3 { font-size: 19px; font-weight: 900; }
.sign p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* Pobierz */
.download { padding: 20px 0 96px; }
.download-card { display: flex; align-items: center; gap: 28px; padding: 34px; border-radius: 30px; color: #fff; background: radial-gradient(500px 300px at 90% 0, #6a74b3, transparent 70%), linear-gradient(160deg, var(--navy-2), var(--navy)); box-shadow: 0 30px 70px #2c3a6340; }
.download-card > img { border-radius: 22px; flex: none; box-shadow: 0 10px 26px #0006; }
.download-card > div { flex: 1; }
.download-card h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); }
.download-card p { margin-top: 8px; color: #dbe3f6; }

/* Stopka i wzgórza pod nią */
.footer { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; padding: 36px 0 30px; border-top: 1px solid var(--line); }
.footer p { color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; font-weight: 700; }
.footer nav a:hover { color: var(--amber); }
.copyright { grid-column: 1 / -1; font-size: 14px; }
.hills-footer { display: flex; align-items: flex-end; gap: 1px; height: 26vh; min-height: 160px; overflow: hidden; pointer-events: none; }
.hills-footer span { flex: 1; height: calc(var(--h) * 100%); transform: translateY(101%); transition: transform 1.1s cubic-bezier(.16, 1, .3, 1) calc(var(--d) * 70ms); }
.hills-footer[data-risen] span { transform: none; }
.hills-footer span i { display: block; height: 100%; background: var(--c); transform-origin: bottom; }

/* ---------- Ruch ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } }
@keyframes word { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
@keyframes twinkle { 50% { opacity: .15; } }
@keyframes beam-drop { from { transform: translateX(-50%) scaleY(0); opacity: 0; } }
@keyframes flash { 0% { opacity: 0; transform: translateX(-50%) scale(.4); } 40% { opacity: 1; } }
@keyframes breathe { 50% { opacity: .75; } }
@keyframes rim-in { from { opacity: 0; } }
@keyframes sway { 50% { transform: scaleY(.93); } }
@keyframes sun { 50% { transform: translateY(-8px) scale(1.04); } }

@media (prefers-reduced-motion: no-preference) {
  .header-inner { animation: rise .5s var(--ease) backwards; }
  .hero .word { display: inline-block; animation: word .55s var(--ease) calc(120ms + var(--w) * 45ms) backwards; }
  .hero .lead { animation: rise .5s var(--ease) .55s backwards; }
  .hero .actions { animation: rise .5s var(--ease) .65s backwards; }
  .hero .points { animation: rise .5s var(--ease) .75s backwards; }
  .rig { animation: rise .8s var(--ease) .2s backwards; transform: translateY(calc(var(--recede, 0) * 36px)) scale(calc(1 - var(--recede, 0) * .2)) rotate(var(--tilt)); }
  .hero-copy { transform: translateY(calc(var(--recede, 0) * -40px)); opacity: calc(1 - var(--recede, 0) * .55); }
  .light { opacity: calc(1 - var(--recede, 0) * .85); }
  .beam { animation: beam-drop .8s cubic-bezier(.5, 0, .2, 1) .35s backwards, breathe 6s ease-in-out 2s infinite; }
  .splash { animation: flash .9s var(--ease) 1s backwards, breathe 6s ease-in-out 2.4s infinite; }
  .rim { animation: rim-in 1.4s var(--ease) 1.05s backwards; }
  .star { animation: twinkle 3.2s ease-in-out var(--d) infinite; }
  .sun { animation: sun 9s ease-in-out infinite; }
  .hills-footer span i { animation: sway 6.5s ease-in-out calc(var(--d) * -.6s) infinite; }

  .page[data-motion] [data-reveal]:not([data-revealed]), .page[data-motion] [data-group] > :not([data-revealed]) { opacity: 0; }
  .page[data-motion] [data-revealed] { animation: rise .55s var(--ease) calc(var(--ri, 0) * 60ms) backwards; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hills-footer span { transform: none; transition: none; }
  .features-phone { animation: none; }
  .mini-bus { display: none; }
}

/* ---------- Telefon ---------- */
@media (max-width: 960px) {
  .header nav a:not(.nav-cta) { display: none; }
  .hero-grid, .how-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding-bottom: 130px; }
  .hero-copy { padding-bottom: 0; }
  .device-stage { padding-top: 90px; }
  .rig { --tilt: 0deg; }
  .features-showcase { grid-template-columns: 1fr; }
  .features-phone { order: -1; width: min(280px, 75vw); margin: 0 auto 10px; }
  .numbers-grid, .sign-grid { grid-template-columns: repeat(2, 1fr); }
  .download-card { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 70px 0; }
  .sign-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; }
  .store strong { font-size: 20px; }
}

/* ---------- Dokument (polityka prywatności) ---------- */
.doc-hero { padding: 120px 0 60px; color: #fff; background: radial-gradient(600px 360px at 85% 20%, #6a74b3 0%, transparent 62%), linear-gradient(170deg, #2a355c, #3c4c7a); }
.doc-hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 900; letter-spacing: -.035em; line-height: 1.1; }
.doc-hero p { margin-top: 12px; color: #dbe3f6; }
.doc { max-width: 780px; padding: 56px 0 90px; }
.doc .intro { font-size: 18px; color: var(--muted); }
.doc h2 { margin: 44px 0 12px; font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.doc h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 900; }
.doc p, .doc li { font-size: 16.5px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: #9a6700; text-decoration: underline; text-underline-offset: 3px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { width: 30%; background: #fff6e2; font-weight: 800; }
.doc tr:last-child th, .doc tr:last-child td { border-bottom: 0; }
.doc .note { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: #fff1c4; }
.doc-hero .back { display: inline-flex; margin-top: 22px; color: #ffe6a6; font-weight: 800; }
