@font-face { font-family: "Patrick Hand"; src: url("/fonts/PatrickHand-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito-Variable.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --ink: #2a2a2a;
  --pencil: #b2b7bb;
  --paper: #f6f1e6;
  --grid: rgba(120, 150, 170, .13);
  --white: #fff;
  --red: #fc5c65;
  --yellow: #ffb600;
  --green: #37d98c;
  --muted: #5d6266;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
  --text: "Nunito", system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 18px/1.55 var(--text);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, .kicker, nav, .btn, .lang, .tag, .pills li, .tagline, .sub, .logo, .mail, .made, .ph {
  font-family: var(--hand); font-weight: 400;
}
h2 { font-size: clamp(2.4rem, 6vw, 3.5rem); line-height: 1; margin: 0 0 .4em; }
h3 { font-size: 1.9rem; line-height: 1.1; margin: 0; }
p { margin: 0 0 .8em; }
.lead { max-width: 34em; font-size: 1.15rem; }
.meta { color: var(--muted); font-size: .9rem; }

/* ---- drżąca ramka ---- */
.box { position: relative; background: var(--white); }
.box::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 4px solid var(--ink);
  border-radius: 18px 12px 20px 10px / 12px 20px 10px 18px;
  filter: url(#w1);
  animation: boil .5s steps(1) infinite;
}
@keyframes boil { 0% { filter: url(#w1); } 33% { filter: url(#w2); } 66% { filter: url(#w3); } }
@media (prefers-reduced-motion: reduce) { .box::before, h1 { animation: none; } }

/* ---- nagłówek ---- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .6rem var(--pad);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 2px dashed var(--pencil);
}
.logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-size: 1.8rem; }
nav { display: flex; gap: 1.3rem; margin-left: auto; font-size: 1.35rem; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline wavy var(--red); text-underline-offset: 5px; }
.lang {
  text-decoration: none; font-size: 1.1rem; padding: .1rem .7rem;
  background: var(--white); border: 3px solid var(--ink); border-radius: 10px;
}
.top .lang { margin-left: 0; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); }
.ico:hover { color: #d93a46; }
.btn .steam, .btn .dc { margin-right: .4rem; }
.links { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 760px) { nav { display: none; } .top .lang { margin-left: auto; } }

main { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }

/* ---- hero ---- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; padding: clamp(2rem, 5vw, 3.5rem) 0 3rem; }
.hero-text { flex: 1 1 420px; min-width: 0; }
.kicker { font-size: 1.4rem; margin: 0 0 .4rem; color: var(--muted); }
h1 {
  font-size: clamp(3.4rem, 8vw, 5.8rem); line-height: .95; margin: 0 0 .3em; letter-spacing: .01em;
  color: var(--white);
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
  text-shadow: 5px 6px 0 var(--red);
  filter: url(#w1);
  animation: boil .6s steps(1) infinite;
}
.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }
.cta.left { margin-top: .4rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  font-size: 1.35rem; padding: .3rem 1.3rem; text-decoration: none;
  background: var(--white); border: 4px solid var(--ink);
  border-radius: 14px 10px 16px 9px / 9px 16px 10px 14px; transition: transform .12s;
}
.btn:hover { transform: rotate(-1.5deg) translateY(-2px); }
.btn.red { background: var(--red); }
.hero-art { flex: 1 1 400px; min-width: 0; position: relative; padding: 0 0 26px 26px; }
.shot {
  display: block; width: 100%; background: var(--white);
  border: 4px solid var(--ink); border-radius: 10px 14px 9px 13px / 13px 9px 14px 10px;
}
.tilt { transform: rotate(1.5deg); }
.mascot { position: absolute; left: 0; bottom: 0; width: 120px; height: 120px; user-select: none; }

/* ---- gry ---- */
.games { display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem 0 3rem; }
.h-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; }
.h-row h2 { margin: 0; }
.sub { font-size: 1.35rem; color: var(--muted); margin: 0; }
.game { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; padding: 1.6rem; }
.game.flip { flex-direction: row-reverse; }
.gallery { flex: 1 1 440px; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.gallery .wide { grid-column: 1 / -1; }
.info { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.info p { margin: 0; }
.title { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.title h3 { font-size: 2.8rem; }
.tagline { font-size: 1.6rem; line-height: 1.15; }
.tag {
  padding: .05rem .7rem; border: 3px solid var(--ink); border-radius: 12px 8px 12px 8px;
  background: var(--yellow); font-size: 1.05rem;
}
.tag.green { background: var(--green); }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills li {
  padding: .15rem .8rem; background: var(--white); border: 3px solid var(--ink);
  border-radius: 9px 13px 8px 12px; font-size: 1.1rem;
}
.ph {
  width: 100%; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
  background: #efe9db; border: 4px dashed var(--pencil); border-radius: 12px; color: var(--muted); font-size: 1.4rem;
}

/* ---- jak robimy gry ---- */
.about { padding: 1.5rem 0 3rem; }
.rules { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.2rem; }
.rules article { flex: 1 1 280px; min-width: 0; padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.rules h3 { font-size: 1.8rem; }
.rules p { margin: 0; }

/* ---- nowości ---- */
.news { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem 1.6rem 1.3rem; margin: 0 0 3.5rem; }
.news-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem; }
.news h2 { font-size: 2.4rem; margin: 0; }
.news p { margin: 0; }
.news .cta { margin: 0; }

/* ---- kontakt ---- */
.contact { padding: 1rem 0 3.5rem; }
.contact h2 { font-size: 2.6rem; margin: 0 0 .2em; }
.contact p { margin: 0; }
.mail { font-size: 1.8rem; }

/* ---- stopka ---- */
footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 1.5rem;
  padding: 1.2rem var(--pad); border-top: 2px dashed var(--pencil);
  font-size: .9rem; color: var(--muted);
}
.made { display: inline-flex; align-items: center; gap: .35rem; font-size: 1.35rem; color: var(--ink); }
