/* Dogmination — landing. Design: DogminationUI.html (Claude Design) */

/* ── Fonty (self-hosted, licencje obok plikow w /assets/fonts) ─────── */
@font-face {
  font-family: "Luckiest Guy";
  src: url("../fonts/luckiest-guy.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
/* Titan One zamiast Lilita One z designu — Lilita nie ma polskich znakow (ą ć ę ń ś ź ż) */
@font-face {
  font-family: "Titan One";
  src: url("../fonts/titan-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}

:root {
  --green: #1E4A2A;
  --green-deep: #173B21;
  --cream: #FFF3D6;
  --yellow: #FFC83D;
  --red: #E8483A;
  --blue: #3B82F6;
  --lime: #3DBE5A;
  --ink: #24180F;
  --brown: #4A3A2C;
  --mint: #DCEBD6;
  --sage: #CFE3C8;
  --sand: #CBB894;

  --gutter: clamp(16px, 4vw, 64px);
  /* Szeroki kontener — strona wypelnia ekran, na bardzo duzych monitorach rosnie tez typografia */
  --wrap: min(1760px, 100% - 2 * var(--gutter));
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  background: var(--green);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--cream); }
a:hover { color: var(--yellow); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.h { font-family: "Titan One", system-ui, sans-serif; font-weight: 400; letter-spacing: .3px; }
.wrap { width: var(--wrap); margin-inline: auto; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { top: 8px; }

/* Zielone tlo w paski (jak w grze) — paski powoli plyna */
.stripes {
  background-color: var(--green);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 28px, transparent 28px 56px);
  background-size: 79.2px 79.2px;
  animation: stripes 6s linear infinite;
}
@keyframes stripes { to { background-position: 79.2px 0; } }

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 20px;
  position: relative; z-index: 3;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: clamp(40px, 2.6vw, 58px); height: auto; aspect-ratio: 1; border-radius: 12px; border: 3px solid var(--ink); transition: transform .4s var(--ease-back); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.logo {
  font-family: "Luckiest Guy", system-ui, sans-serif;
  letter-spacing: 1px; line-height: 1;
  font-size: clamp(24px, 1.5vw, 34px); color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
.lang { display: flex; gap: 14px; font-weight: 900; font-size: clamp(15px, .9vw, 20px); }
.lang a { text-decoration: none; }
.lang [aria-current] { color: var(--yellow); }

/* ── Hero (pelny ekran) ──────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.hero-body {
  flex: 1;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(16px, 4vh, 48px) clamp(64px, 10vh, 112px);
  position: relative; z-index: 2;
}
.hero-copy {
  flex: 1 1 520px; min-width: 0;
  display: flex; flex-direction: column; gap: 24px;
  color: var(--cream);
}
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 4.6vw, 132px);
  line-height: 1.02;
}
.hero h1 .line { display: block; }
.hero h1 .accent { color: var(--yellow); }
.lead {
  margin: 0; max-width: 34ch;
  font-size: clamp(18px, 1.3vw, 30px); line-height: 1.5;
  color: var(--mint);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }
.note { font-weight: 800; font-size: clamp(15px, .9vw, 20px); color: var(--sage); }

/* Oficjalna odznaka Google Play — bez modyfikacji grafiki */
.badge { display: inline-block; border-radius: 12px; transition: transform .25s var(--ease-back), filter .25s; }
.badge img { height: clamp(56px, 3.4vw, 84px); width: auto; }
.badge:hover { transform: translateY(-3px) scale(1.03); filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.badge:active { transform: translateY(1px) scale(.98); }

.hero-art { flex: 1.15 1 480px; min-width: 0; position: relative; padding-bottom: 40px; }
.shot {
  background: var(--ink); border-radius: 32px; padding: 11px;
  box-shadow: 0 10px 0 rgba(0,0,0,.3);
  transform: rotate(-2deg);
}
.shot img { width: 100%; height: auto; border-radius: 22px; }
.shot-float { animation: float 6s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(.6deg); }
}
.hero-dog {
  position: absolute; left: -24px; bottom: -14px;
  width: 34%; max-width: 300px;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
}
.hero-dog .body { display: block; transform: scaleX(-1); transform-origin: 50% 100%; animation: breathe 2.4s ease-in-out infinite; }
.hero-dog img { width: 100%; height: auto; transform-origin: 50% 100%; }
.hero-dog.hop img { animation: hop .5s var(--ease-out); }
.hero-dog .bubble { left: 40%; }

/* Plamy terenu w tle hero (rysowane w JS) */
.turf {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
}
.turf svg { position: absolute; overflow: visible; }
.turf path { transform-box: fill-box; transform-origin: center; }

/* Slady lap przechodzace przez hero */
.paws { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.paw {
  position: absolute; width: 22px; height: 22px;
  color: rgba(255, 243, 214, .16);
  opacity: 0;
  animation: paw 3.2s ease-out forwards;
}
@keyframes paw {
  0% { opacity: 0; scale: .4; }
  10% { opacity: 1; scale: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 18px; z-index: 2;
  translate: -50% 0;
  color: var(--sage); opacity: .7;
  animation: hint 2s ease-in-out infinite;
}
@keyframes hint { 50% { transform: translateY(8px); } }

/* ── Sekcja: dwa przyciski ───────────────────────────────────────── */
.controls {
  background: var(--cream);
  border-block: 4px solid var(--ink);
}
.controls .wrap {
  padding-block: clamp(64px, 9vw, 112px);
  display: flex; flex-direction: column; gap: clamp(40px, 3vw, 72px);
}
.section-title {
  margin: 0; text-align: center;
  font-size: clamp(32px, 3.4vw, 76px); line-height: 1.05;
}
.buttons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px; width: min(1000px, 100%); margin-inline: auto;
}
.control { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.control > :not(.pad) { position: relative; z-index: 1; }
.control h3 { margin: 10px 0 0; font-size: clamp(26px, 1.7vw, 40px); }
.control p { margin: 0; font-size: clamp(17px, 1vw, 22px); line-height: 1.5; color: var(--brown); max-width: 30ch; }
.control .hint { font-size: clamp(13px, .75vw, 16px); font-weight: 800; color: #8a7760; text-transform: uppercase; letter-spacing: .6px; }

.pad {
  --btn: clamp(96px, 5.6vw, 150px);
  position: relative; width: calc(var(--btn) * 1.375); height: calc(var(--btn) * 1.375);
  display: grid; place-items: center;
}
.game-btn {
  position: relative; z-index: 2;
  width: var(--btn); height: var(--btn); border-radius: 50%;
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  display: grid; place-items: center;
  font: 400 calc(var(--btn) * .2)/1 "Titan One", system-ui, sans-serif; color: var(--ink);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform .12s, box-shadow .12s;
}
.game-btn:active, .game-btn.is-down { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-mark { background: var(--yellow); font-size: calc(var(--btn) * .17); }
.btn-bark { background: var(--red); color: var(--cream); font-size: calc(var(--btn) * .24); }

/* Pierscien pecherza wokol OZNACZ */
.bladder {
  position: absolute; inset: 8px; z-index: 1; border-radius: 50%;
  background: conic-gradient(var(--yellow) calc(var(--fill, 1) * 360deg), rgba(36,24,15,.15) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
}
/* Plama rosnaca pod OZNACZ */
.puddle {
  position: absolute; z-index: 0; left: 50%; top: 50%;
  width: calc(var(--btn) * 2.7); height: calc(var(--btn) * 2.7); translate: -50% -50%;
  pointer-events: none;
}
.puddle path { transition: opacity .6s; }

/* Fale szczekniecia */
.ring {
  position: absolute; z-index: 0; left: 50%; top: 50%;
  width: var(--btn); height: var(--btn); margin: calc(var(--btn) / -2) 0 0 calc(var(--btn) / -2); border-radius: 50%;
  border: 4px solid var(--red);
  pointer-events: none;
  animation: ring .9s var(--ease-out) forwards;
}
@keyframes ring {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(2.9); opacity: 0; }
}
.shake { animation: shake .4s; }
@keyframes shake {
  0%, 100% { translate: 0; }
  20% { translate: -6px 0; rotate: -6deg; }
  40% { translate: 6px 0; rotate: 5deg; }
  60% { translate: -4px 0; rotate: -3deg; }
  80% { translate: 3px 0; }
}
.idle-pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { scale: 1.06; } }

/* Dymek komiksowy (szczekniecie) */
.bubble {
  position: absolute; z-index: 5; left: 50%; bottom: 100%;
  translate: -50% 0;
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px;
  padding: 4px 10px;
  font: 400 clamp(18px, 1.1vw, 26px)/1.1 "Titan One", system-ui, sans-serif;
  white-space: nowrap; pointer-events: none;
  animation: bubble 1.1s var(--ease-back) forwards;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  width: 12px; height: 12px; margin-left: -6px; margin-top: -6px;
  background: #fff; border: solid var(--ink); border-width: 0 3px 3px 0;
  rotate: 45deg;
}
@keyframes bubble {
  0% { opacity: 0; transform: translateY(10px) scale(.4) rotate(-8deg); }
  20% { opacity: 1; transform: translateY(0) scale(1.05) rotate(3deg); }
  30% { transform: scale(1) rotate(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px) scale(.95); }
}

/* ── Sekcja: tryby, mapy, psy ────────────────────────────────────── */
.modes { color: var(--cream); padding-top: clamp(72px, 9vw, 120px); overflow: hidden; }
.modes .wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.modes .sub { margin: 0; font-size: clamp(18px, 1.1vw, 24px); color: var(--sage); max-width: 56ch; line-height: 1.5; }
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; width: min(1200px, 100%); margin-top: 8px;
}
.card {
  background: rgba(255, 243, 214, .08);
  border: 3px solid var(--cream); border-radius: 20px;
  padding: clamp(22px, 1.6vw, 36px) clamp(24px, 1.8vw, 40px); text-align: left;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .35s var(--ease-back), background .35s, box-shadow .35s;
}
.card:hover { transform: translateY(-6px) rotate(-.6deg); background: rgba(255,243,214,.13); box-shadow: 0 8px 0 rgba(0,0,0,.25); }
.card:nth-child(2):hover { transform: translateY(-6px) rotate(.6deg); }
.card h3 { margin: 0; font-size: clamp(28px, 1.8vw, 40px); color: var(--yellow); }
.card p { margin: 0; font-size: clamp(17px, 1vw, 22px); line-height: 1.5; color: var(--mint); }

/* Pasek map — nieskonczona karuzela */
.maps {
  width: 100%; margin-top: 40px;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.maps-track {
  display: flex; gap: 20px; width: max-content;
  padding-block: 12px 18px;
  animation: marquee 60s linear infinite;
}
.maps:hover .maps-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 10px)); } }
.map {
  flex: none; width: clamp(220px, 14vw, 340px); margin: 0;
  background: var(--ink); border-radius: 18px; padding: 6px;
  box-shadow: 0 6px 0 rgba(0,0,0,.3);
  rotate: -1.5deg;
  transition: rotate .3s var(--ease-back), scale .3s var(--ease-back);
}
.map:nth-child(even) { rotate: 1.5deg; }
.map:hover { rotate: 0deg; scale: 1.06; }
.map img { width: 100%; height: auto; aspect-ratio: 7 / 4; object-fit: cover; border-radius: 13px; }
.map figcaption { padding: 8px 8px 4px; text-align: left; }
.map strong { display: block; font: 400 clamp(18px, 1.1vw, 24px)/1.15 "Titan One", system-ui, sans-serif; color: var(--cream); }
.map span { font-size: clamp(13px, .8vw, 17px); color: var(--sand); }

/* Psy na dole */
.pack {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  width: min(1600px, 100%); margin: 36px auto 0;
  padding-inline: 8px;
}
.dog {
  position: relative; flex: none;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  --run: 0;
}
.dog img { width: 100%; height: auto; transform-origin: 50% 100%; position: relative; z-index: 2; }
.dog .body { display: block; transform-origin: 50% 100%; }
/* Oddychanie w spoczynku */
.pack.is-in .dog .body { animation: breathe var(--breath, 2.6s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes breathe {
  0%, 100% { scale: 1 1; }
  50% { scale: 1.015 .975; }
}
/* Wbieganie od lewej */
.dog { translate: -120vw 0; }
.pack.is-in .dog { animation: run-in 1.3s var(--ease-out) forwards; animation-delay: var(--enter, 0s); }
@keyframes run-in {
  0% { translate: -120vw 0; }
  100% { translate: 0 0; }
}
.pack.is-in .dog img { animation: gallop .22s ease-in-out 6; animation-delay: var(--enter, 0s); }
@keyframes gallop {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12%) rotate(-4deg); }
}
.dog.hop img { animation: hop .5s var(--ease-out) !important; }
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.06, .9); }
  50% { transform: translateY(-16%) scale(.96, 1.06) rotate(-3deg); }
  80% { transform: translateY(0) scale(1.04, .95); }
  100% { transform: translateY(0) scale(1); }
}
.dog.wag img { animation: wag .9s ease-in-out !important; }
@keyframes wag {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
.dog .mark {
  position: absolute; z-index: 1; left: 18%; bottom: -6px;
  width: 64%; height: 22px; border-radius: 50%;
  background: var(--c, var(--yellow));
  opacity: 0; scale: 0;
  transition: scale 1.6s var(--ease-out), opacity .4s;
}
.dog.marking .mark { opacity: .75; scale: 1; }
.dog .tip {
  position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px);
  translate: -50% 6px;
  width: max-content; max-width: 220px;
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px;
  padding: 6px 10px; text-align: center;
  font-size: 13px; line-height: 1.3;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, translate .25s var(--ease-back);
}
.dog .tip b { display: block; font: 400 16px/1.2 "Titan One", system-ui, sans-serif; }
.dog:hover .tip, .dog:focus-visible .tip { opacity: 1; translate: -50% 0; }

/* ── CTA ─────────────────────────────────────────────────────────── */
.cta {
  background: var(--yellow); border-top: 4px solid var(--ink);
  position: relative; z-index: 1;
}
.cta .wrap {
  padding-block: clamp(56px, 7vw, 96px);
  display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center;
}
.cta h2 { margin: 0; font-size: clamp(36px, 4.4vw, 104px); line-height: 1; }
.cta h2 .word { display: inline-block; }
.cta.is-in h2 .word { animation: wave 2.4s var(--ease-out) both; animation-delay: calc(var(--i) * 80ms); }
@keyframes wave {
  0% { transform: translateY(40%) rotate(6deg); opacity: 0; }
  40% { transform: translateY(-8%) rotate(-2deg); opacity: 1; }
  60%, 100% { transform: none; opacity: 1; }
}
.wiggle { animation: wiggle 5s ease-in-out infinite 2s; }
@keyframes wiggle {
  0%, 88%, 100% { rotate: 0deg; }
  91% { rotate: -4deg; }
  94% { rotate: 4deg; }
  97% { rotate: -2deg; }
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--sand); }
.site-footer .wrap {
  padding-block: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  font-size: 14px; font-weight: 800;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--yellow); }
.site-footer .legal-note { margin-left: auto; font-weight: 700; font-size: 13px; }

/* ── Wejscia przy przewijaniu ────────────────────────────────────── */
.reveal { opacity: 0; translate: 0 32px; transition: opacity .7s var(--ease-out), translate .7s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; translate: 0 0; }

/* Wejscie hero po zaladowaniu */
.intro { opacity: 0; animation: intro .8s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes intro {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
.intro-pop { opacity: 0; animation: pop .9s var(--ease-back) forwards; animation-delay: var(--d, 0s); }
@keyframes pop {
  from { opacity: 0; transform: translateY(40px) rotate(6deg) scale(.85); }
  to { opacity: 1; transform: none; }
}
.intro-dog { opacity: 0; animation: dog-in 1s var(--ease-back) forwards; animation-delay: var(--d, 0s); }
@keyframes dog-in {
  from { opacity: 0; transform: translateX(-60%) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}

/* ── Strony prawne ───────────────────────────────────────────────── */
.legal-page { min-height: 100vh; display: flex; flex-direction: column; }
.legal-page main { flex: 1; padding-block: 24px 80px; }
.doc {
  width: min(960px, 100%); margin-inline: auto;
  background: var(--cream); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 28px;
  box-shadow: 0 10px 0 rgba(0,0,0,.3);
  padding: clamp(24px, 5vw, 56px);
  font-weight: 600; line-height: 1.65; font-size: clamp(17px, .95vw, 20px);
}
.doc h1 { font: 400 clamp(32px, 4.5vw, 52px)/1.05 "Titan One", system-ui, sans-serif; margin: 0 0 8px; }
.doc h2 { font: 400 clamp(22px, 1.4vw, 30px)/1.2 "Titan One", system-ui, sans-serif; margin: 2em 0 .5em; }
.doc .meta { color: #7a6650; font-weight: 700; margin: 0 0 1.5em; }
.doc a { color: #9a3412; }
.doc a:hover { color: var(--red); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: .35em 0; }
.doc strong { font-weight: 900; }
.doc mark { background: #ffe08a; padding: 0 3px; border-radius: 4px; }
.doc .lede { font-size: 19px; }
.toc { background: rgba(36,24,15,.06); border-radius: 16px; padding: 14px 20px; }
.toc ol { margin: 0; columns: 2 220px; }

.notfound { text-align: center; color: var(--cream); padding-block: 10vh; }
.notfound .big { font: 400 clamp(96px, 18vw, 200px)/1 "Luckiest Guy", system-ui, sans-serif; color: var(--yellow); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink); }
.notfound img { width: 220px; margin: 0 auto 16px; }
.notfound p { font-size: 20px; }

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .logo { font-size: 22px; }
  .brand img { width: 38px; height: 38px; }
  .hero-art { padding-bottom: 28px; }
  .hero-dog { left: -8px; width: 30%; }
  .badge img { height: 56px; }
  .site-footer .legal-note { margin-left: 0; }
  .map { width: 190px; }
  /* Na telefonie psy wieksze i lekko na siebie nachodza — jak stado */
  .pack { width: 130%; margin: 24px -15% 0; }
  .dog { margin-inline: -2.6%; }
  .dog .tip { display: none; }
}

/* ── Ograniczony ruch ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .maps-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .maps-track [aria-hidden] { display: none; }
  .maps { -webkit-mask: none; mask: none; }
  .dog { translate: 0 0; }
  .turf, .paws { display: none; }
}
