/* Gobthrottle — landing. Wartosci z designu (Gob.dc.html), bez inline styles (CSP style-src 'self'). */

@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/pixelify-sans.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "VT323";
  src: url("../fonts/vt323.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded Logo";
  src: url("../fonts/unbounded-logo.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #1D1426;
  --bg-2: #2B2240;
  --ink: #0D0A12;
  --text: #EFE6CC;
  --soft: #CFC3DD;
  --muted: #A99BB8;
  --yellow: #F5D24B;
  --yellow-hi: #FFE680;
  --red: #E2462D;
  --cream: #FFF3E0;
  --green: #8BC63A;
  --frame: #352B4D;
  --dash: #3D3355;
  --wrap: 1200px;
  --gutter: 24px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "VT323", ui-monospace, monospace;
  font-size: 22px;
  line-height: 1.35;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

a { color: var(--yellow); }
a:hover { color: var(--yellow-hi); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--yellow-hi);
  outline-offset: 3px;
}

.px { font-family: "Pixelify Sans", ui-monospace, monospace; font-weight: 700; }
.pix { image-rendering: pixelated; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--bg); padding: 8px 14px; border: 3px solid var(--ink);
  font-family: "Pixelify Sans", monospace; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Linie CRT nad wszystkim */
.scanlines {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
}

/* ── Przyciski ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--yellow); color: var(--bg);
  border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  text-decoration: none;
  transition: transform .08s, box-shadow .08s, background-color .15s;
}
.btn:hover { background: var(--yellow-hi); color: var(--bg); transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn svg { flex: none; }
.btn-sm { border-width: 3px; box-shadow: 0 4px 0 var(--ink); padding: 6px 16px; font-size: 18px; }
.btn-sm:hover { box-shadow: 0 6px 0 var(--ink); }
.btn-sm:active { box-shadow: 0 1px 0 var(--ink); transform: translateY(3px); }
.btn-play { padding: 10px 24px 10px 18px; min-height: 64px; }
.btn-play .lines { display: flex; flex-direction: column; line-height: 1; }
.btn-play .small { font-size: 18px; }
.btn-play .big { font-size: 26px; }
.btn-go { padding: 14px 28px; gap: 14px; font-size: 30px; align-self: flex-start; }

/* ── Naglowek ────────────────────────────────────────────────────── */
.site-header {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 10px; transition: transform .2s; }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.brand span { font-size: 28px; color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); }
.nav { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; font-size: 24px; }
.nav-link { color: var(--text); text-decoration: none; }
.nav-link:hover { color: var(--yellow); }
.lang { display: flex; gap: 2px; font-family: "Pixelify Sans", monospace; font-weight: 700; font-size: 18px; }
.lang a, .lang span { padding: 4px 8px; border: 3px solid transparent; text-decoration: none; line-height: 1; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--yellow); border-color: var(--frame); }
.lang [aria-current] { color: var(--yellow); border-color: var(--ink); background: var(--bg-2); }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero { position: relative; padding-top: 24px; }
.hero-bg {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%;
  object-fit: cover; object-position: center bottom; opacity: .55;
}
.hero-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(29, 20, 38, .6) 45%, rgba(29, 20, 38, .2) 75%, var(--bg) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  padding-top: 40px; padding-bottom: 96px;
}
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.badge {
  align-self: flex-start; background: var(--red); color: var(--cream);
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  padding: 4px 12px; font-size: 18px; transform: rotate(-2deg);
}
.hero-copy { container-type: inline-size; }
/* Tytul w jednej linii: szerokosc napisu w Pixelify Sans ~6.5em, wiec rozmiar liczony od szerokosci kolumny */
.hero h1 {
  margin: 0; font-size: clamp(40px, 7vw, 100px); font-size: min(14.8cqi, 104px); line-height: .9; color: var(--yellow);
  text-shadow: 5px 5px 0 var(--ink), 0 0 28px rgba(245, 210, 75, .35);
  white-space: nowrap;
}
.tagline { margin: 0; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; color: var(--green); text-shadow: 3px 3px 0 var(--ink); }
.lead { margin: 0; font-size: 26px; max-width: 520px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 4px; }
.note { font-size: 22px; color: var(--muted); }

.hero-art { flex: 1 1 340px; min-width: 0; display: flex; justify-content: center; position: relative; padding-bottom: 20px; }
.hero-phone-wrap { position: relative; width: min(320px, 100%); }

.phone {
  background: var(--ink); border-radius: 38px; padding: 12px;
  box-shadow: 0 0 0 4px var(--frame), 0 18px 0 rgba(0, 0, 0, .4);
}
.phone img { display: block; width: 100%; border-radius: 28px; }
.tilt-r { transform: rotate(3deg); }
.tilt-l { transform: rotate(-3deg); }

.hero-goblin { position: absolute; left: -46%; bottom: -10px; width: 62%; }
.boom { position: absolute; font-family: "Pixelify Sans", monospace; font-weight: 700; text-shadow: 3px 3px 0 var(--ink); pointer-events: none; }
.boom-1 { right: -18%; top: 16%; font-size: 38px; color: var(--yellow); --r: 12deg; transform: rotate(var(--r)); }
.boom-2 { right: -24%; top: 52%; font-size: 30px; color: var(--red); --r: -8deg; transform: rotate(var(--r)); }

/* Telefon przy prawej krawedzi ekranu: okrzyki blizej, zeby nie wychodzily poza ekran */
@media (max-width: 1100px) {
  .boom-1 { right: -6%; }
  .boom-2 { right: -8%; }
}
/* Linki menu tylko gdy mieszcza sie w jednym rzedzie z logo */
@media (max-width: 960px) {
  .nav-link { display: none; }
}
/* Uklad jednokolumnowy: mniejszy telefon, goblin i okrzyki mieszcza sie w ekranie */
@media (max-width: 760px) {
  .hero-phone-wrap { width: min(270px, 62vw); margin-left: 12vw; }
  .hero-goblin { left: -38%; width: 56%; }
  .boom-1 { right: -16%; font-size: 32px; }
  .boom-2 { right: -18%; font-size: 26px; }
}

/* ── Sekcje ──────────────────────────────────────────────────────── */
.band { background: var(--bg-2); border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.section { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.kicker { font-size: 18px; color: var(--green); }
.heading { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
h2 {
  margin: 0; font-family: "Pixelify Sans", monospace; font-weight: 700;
  font-size: clamp(36px, 4.4vw, 56px); line-height: 1; color: var(--yellow); text-shadow: 4px 4px 0 var(--ink);
}

.card { background: var(--bg); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }

/* Jak grac */
.how { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.steps { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step { padding: 20px; display: flex; flex-direction: column; gap: 8px; transition: translate .15s, rotate .15s; }
/* translate/rotate zamiast transform — transform zajmuje animacja wejscia */
.step:hover { translate: 0 -3px; rotate: -.5deg; }
.step-title { font-size: 22px; color: var(--yellow); }
.demolka {
  flex: 1 1 380px; min-width: 0; position: relative;
  background: var(--red); color: var(--cream);
  border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink);
  padding: 26px 28px; display: flex; flex-direction: column; gap: 12px;
}
.demolka-kicker { font-size: 20px; }
.demolka-title { font-size: clamp(38px, 4vw, 54px); line-height: .95; color: var(--yellow); text-shadow: 4px 4px 0 var(--ink); }
.demolka-text { font-size: 24px; }
.demolka-goblin { position: absolute; right: -10px; top: -86px; width: 120px; }

/* Garaz */
.garage { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 88px; }
.garage-art { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; position: relative; }
.garage-art .phone { width: min(300px, 70vw); border-radius: 36px; padding: 11px; box-shadow: 0 0 0 4px var(--frame), 0 16px 0 rgba(0, 0, 0, .4); }
.garage-art .phone img { border-radius: 26px; }
.garage-goblin { position: absolute; right: 0; bottom: -20px; width: 40%; max-width: 170px; }
.garage-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.garage-copy p { margin: 0; font-size: 24px; color: var(--soft); max-width: 560px; }
.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.parts li {
  display: flex; flex-wrap: wrap; gap: 2px 16px; align-items: baseline;
  border-bottom: 2px dashed var(--dash); padding-bottom: 10px;
}
.parts li:last-child { border-bottom: 0; }
.parts .part { font-size: 22px; color: var(--yellow); flex: 0 0 240px; transition: transform .15s; }
.parts li:hover .part { transform: translateX(6px); }

/* Scenerie */
.worlds-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.worlds-head > span { font-size: 24px; color: var(--soft); }
.worlds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.world { display: flex; flex-direction: column; overflow: hidden; }
.world img { display: block; width: 100%; aspect-ratio: 3 / 1.4; object-fit: cover; border-bottom: 4px solid var(--ink); transition: transform .4s; }
.world:hover img { transform: scale(1.06); }
.world div { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; position: relative; background: var(--bg); }
.world-name { font-size: 22px; color: var(--yellow); }
.world-text { font-size: 20px; color: var(--soft); }

/* Galeria */
.gallery { padding: 80px 0; }
.shots {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x proximity;
  max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter) 24px;
  list-style: none;
  scrollbar-color: var(--frame) transparent;
}
.shots li { flex: 0 0 min(250px, 62vw); scroll-snap-align: center; }
.shots .phone { border-radius: 30px; padding: 9px; box-shadow: none; transition: transform .2s; }
.shots .phone img { border-radius: 22px; }
.shots li:nth-child(1) .phone { transform: rotate(-2deg); }
.shots li:nth-child(2) .phone { transform: rotate(1.5deg); }
.shots li:nth-child(3) .phone { transform: rotate(-1deg); }
.shots li:nth-child(4) .phone { transform: rotate(2deg); }
.shots li .phone:hover { transform: rotate(0) scale(1.03); }

/* CTA */
.cta { position: relative; border-top: 4px solid var(--ink); overflow: hidden; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.cta-shade { position: absolute; inset: 0; background: rgba(29, 20, 38, .55); }
.cta-inner {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px;
  padding-top: 96px; padding-bottom: 96px;
}
.cta-copy { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.cta h2 { font-size: clamp(40px, 5.4vw, 72px); line-height: .95; text-shadow: 5px 5px 0 var(--ink); }
.cta-copy p { margin: 0; font-size: 26px; }
.cta-copy .note { font-size: 20px; color: var(--soft); }
.cta-goblin { width: min(260px, 50vw); }

/* Goblin: klik = podskok i okrzyk */
.goblin { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.goblin.hop { animation: hop .55s cubic-bezier(.3, 1.6, .5, 1); }
.shout {
  position: absolute; z-index: 6; pointer-events: none;
  font-family: "Pixelify Sans", monospace; font-weight: 700; font-size: 30px; color: var(--yellow);
  text-shadow: 3px 3px 0 var(--ink); white-space: nowrap;
  animation: shout 1s ease-out forwards;
}

/* ── Stopka ──────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding-top: 24px; padding-bottom: 24px; font-size: 20px; }
.by { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; }
.by:hover { color: var(--text); }
.dareia { display: flex; gap: 2px; font-family: "Unbounded Logo", sans-serif; font-weight: 800; font-size: 10px; line-height: 1; }
.dareia span {
  width: 18px; height: 18px; border-radius: 4px; background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.dareia .acc { background: #FF5A36; color: #15131C; }
.by:hover .dareia span:nth-child(odd) { transform: translateY(-3px); }
.by:hover .dareia span:nth-child(even) { transform: translateY(3px); }
.footer-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.legal-note { flex-basis: 100%; font-size: 18px; }

/* ── Strony tekstowe (polityka prywatnosci, 404) ─────────────────── */
.doc { max-width: 820px; padding-top: 24px; padding-bottom: 80px; }
.doc h1 { margin: 0 0 6px; font-family: "Pixelify Sans", monospace; font-size: clamp(38px, 6vw, 60px); line-height: 1; color: var(--yellow); text-shadow: 4px 4px 0 var(--ink); }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: clamp(26px, 3vw, 32px); text-shadow: 3px 3px 0 var(--ink); margin: 36px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 26px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--green); }
.doc strong { color: var(--yellow); font-weight: 400; }
.summary { padding: 18px 22px; margin: 0 0 8px; }
.summary ul { margin: 0; }
.back { margin-top: 36px; }

.notfound { text-align: center; padding-top: 40px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.notfound .big { font-family: "Pixelify Sans", monospace; font-weight: 700; font-size: clamp(90px, 20vw, 180px); line-height: .9; color: var(--yellow); text-shadow: 6px 6px 0 var(--ink); }
.notfound img { width: 200px; }
.notfound p { margin: 0; font-size: 24px; }
.notfound h1 { margin: 8px 0 0; font-size: clamp(30px, 5vw, 44px); color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); }

/* ── Waski ekran ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .brand span { font-size: 24px; }
  .hero-inner { padding-top: 16px; padding-bottom: 72px; gap: 56px; }
  .lead { font-size: 24px; }
  .section, .gallery { padding-top: 64px; padding-bottom: 64px; }
  .garage { padding-top: 72px; padding-bottom: 72px; }
  .demolka { margin-top: 64px; }
  .parts .part { flex-basis: 100%; }
  .footer-links { margin-left: 0; }
}
/* Telefon: naglowek w jednym rzedzie — sama ikona (nazwa jest zaraz pod nia w H1, zostaje dla czytnikow ekranu) */
@media (max-width: 480px) {
  .site-header { flex-wrap: nowrap; padding-top: 14px; padding-bottom: 14px; }
  .brand span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .nav { flex-wrap: nowrap; gap: 14px; }
  .hero { padding-top: 8px; }
}
@media (max-width: 360px) {
  .brand img { width: 38px; height: 38px; }
  .btn-sm { padding: 5px 10px; font-size: 16px; }
}

/* ── Animacje (tylko gdy uzytkownik ich nie wylaczyl) ────────────── */
@keyframes hop {
  0% { transform: translateY(0); }
  35% { transform: translateY(-22px) rotate(-4deg); }
  70% { transform: translateY(0) scaleY(.92); }
  100% { transform: translateY(0); }
}
@keyframes shout {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.5) rotate(-10deg); }
  20% { opacity: 1; transform: translate(-50%, -18px) scale(1.15) rotate(-6deg); }
  100% { opacity: 0; transform: translate(-50%, -60px) scale(1) rotate(-6deg); }
}
@keyframes pop {
  0%, 70%, 100% { transform: rotate(var(--r)) scale(1); }
  78% { transform: rotate(var(--r)) scale(1.25); }
  86% { transform: rotate(var(--r)) scale(.95); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .boom-1 { animation: pop 2.6s ease-in-out infinite; }
  .boom-2 { animation: pop 2.6s ease-in-out 1.3s infinite; }
  .hero-goblin, .cta-goblin { animation: bob 2.4s ease-in-out infinite; }
  .demolka-goblin { animation: bob 1.6s ease-in-out infinite; }
  .hero-copy > * { animation: rise .6s cubic-bezier(.2, .9, .3, 1.2) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .hero-copy > :nth-child(5) { animation-delay: .32s; }

  /* Wejscie kart przy przewijaniu — bez JS, tam gdzie przegladarka obsluguje scroll-driven animations */
  @supports (animation-timeline: view()) {
    .step, .demolka, .world, .parts li, .shots li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .goblin.hop { animation: none; }
  .shout { animation-duration: .01s; }
}
