/* Quavaris - mała galeria gier mobilnych
   Biała galeria: obraz pierwszy, tekst drugi.
   Rukopisny CSS, mobile-first, zero frameworków. */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --indigo: #556e9b;
  --indigo-deep: #3f5375;
  --orange: #ff7617;
  --orange-ink: #c85200;
  --pewter: #757575;
  --concrete: #d8d8d8;
  --stone: #eaeaea;
  --plaster: #f0f0f0;
  --steel: #b1bacb;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* warstwa arkadowa: jedno ciemne pasmo i akcenty automatu do gier */
  --void: #14161c;
  --void-2: #1c1f27;
  --void-line: #2c3140;
  --void-ink: #f2f3f6;
  --neon: #9db0d8;

  --gutter: clamp(18px, 5vw, 96px);
  --band: clamp(56px, 9vw, 132px);
  --hair: 1px solid var(--concrete);
  --bevel: 4px 4px 0 var(--ink);
  --bevel-sm: 3px 3px 0 var(--ink);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(16px, 0.5vw + 15px, 17px);
  line-height: 1.62;
  font-synthesis-weight: none;
}

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

a { color: var(--indigo); text-decoration: none; border-bottom: 1px solid var(--steel); }
a:hover { color: var(--orange-ink); border-bottom-color: var(--orange); }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 90; border: 0;
}
.skip:focus { left: 0; }

.pad { padding-inline: var(--gutter); }
.measure { max-width: 66ch; }
.measure-tight { max-width: 54ch; }

/* ---------- Typografia ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

.display {
  font-size: clamp(2.4rem, 8.5vw, 6.1rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.band-title {
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.02;
}

/* Etykieta sekcji z pomaranczowa kreska: rytm dla calej strony */
.label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.label::before {
  content: "";
  width: 22px; height: 4px;
  background: var(--orange);
  flex: 0 0 auto;
}
.label--muted { color: var(--pewter); }

.rule { border: 0; border-top: var(--hair); margin: 0; }

.lede {
  font-size: clamp(1.06rem, 1.1vw + 0.9rem, 1.34rem);
  line-height: 1.48;
}

.meta { font-size: 0.86rem; color: var(--pewter); line-height: 1.45; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.figure-caption {
  font-size: 0.78rem;
  color: var(--pewter);
  padding-top: 8px;
  line-height: 1.4;
}

/* ---------- Nagłówek ---------- */

.masthead {
  background: var(--void);
  color: var(--void-ink);
  border-bottom: 1px solid var(--void-line);
  padding-block: 16px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  border: 0;
  line-height: 1;
}
.masthead .wordmark { color: var(--void-ink); }
.wordmark:hover { color: var(--orange); }
.wordmark span { color: var(--neon); font-weight: 400; font-family: var(--text); font-size: 0.62em; letter-spacing: 0; margin-left: 10px; }

.masthead .nav a { color: var(--neon); }
.masthead .nav a:hover { color: var(--orange); }
.masthead .nav a[aria-current="page"] { color: var(--void-ink); box-shadow: inset 0 -2px 0 var(--orange); }
.masthead .nav-toggle { color: var(--void-ink); border-color: var(--void-line); }
.masthead .nav-toggle:hover { border-color: var(--orange); color: var(--orange); }

.nav-toggle {
  margin-left: auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--ink);
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink);
  border-radius: 0;
}

.nav {
  flex-basis: 100%;
  display: none;
  padding-top: 14px;
}
.nav[data-open="true"] { display: block; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.nav a { font-size: 0.98rem; border-bottom: 0; }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--orange); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav { display: block; flex-basis: auto; margin-left: auto; padding-top: 0; }
  .nav ul { flex-direction: row; gap: clamp(14px, 1.7vw, 28px); align-items: baseline; }
  .nav a { font-size: 0.92rem; }
}

/* ---------- Wejście ---------- */

/* Wejscie to ekran automatu: ciemne, z siatka i jednym duzym kadrem. */
.entry {
  padding-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(28px, 4vw, 56px);
  position: relative;
  overflow: hidden;
  background: var(--void);
  color: var(--void-ink);
}

.entry::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(157,176,216,0.10) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, rgba(157,176,216,0.10) 1px, transparent 1px) 0 0 / 48px 48px;
  pointer-events: none;
}
/* linie skanujace, tak slabe, ze widac je dopiero z bliska */
.entry::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.03) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

.entry > * { position: relative; z-index: 1; }

.entry__type { max-width: 16ch; color: var(--void-ink); }
.entry__lede { margin-top: clamp(16px, 2vw, 26px); max-width: 44ch; color: var(--neon); }

.entry .tag { border-color: var(--void-line); color: var(--neon); }
.entry .tag--key { border-color: var(--void-ink); color: var(--void-ink); }
.entry .tag--live { border-color: var(--orange); color: var(--orange); }
.entry .tag--live::before { background: var(--orange); }

.entry__actions a:not(.cta) { color: var(--neon); border-bottom-color: var(--void-line); }
.entry__actions a:not(.cta):hover { color: var(--orange); border-bottom-color: var(--orange); }

.entry__trust { border-top-color: var(--void-line) !important; color: #8792ab !important; }

/* pasek startowy: numer wydania i skrót tego, co jest w środku */
.entry__hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(12px, 2vw, 22px);
  margin-bottom: clamp(16px, 2.2vw, 26px);
}
.entry__hud .tag--live { animation: none; }

.entry__actions {
  margin-top: clamp(20px, 2.6vw, 32px);
  display: flex;
  gap: 26px;
  align-items: baseline;
  flex-wrap: wrap;
}

/* przycisk-klawisz: twardy bevel zamiast miękkiego cienia */
.cta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  box-shadow: var(--bevel);
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}
.cta::after {
  content: "";
  width: 0; height: 0;
  border-left: 7px solid var(--orange);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.cta:hover {
  color: var(--paper);
  background: var(--indigo-deep);
  border-color: var(--indigo-deep);
  box-shadow: 6px 6px 0 var(--orange);
  transform: translate(-2px, -2px);
}
.cta:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.entry__trust {
  margin-top: clamp(22px, 3vw, 36px);
  padding-top: 12px;
  border-top: var(--hair);
  font-size: 0.84rem;
  color: var(--pewter);
  max-width: 52ch;
}

/* Kadr wejsciowy w ramce, zeby czytal sie jak ekran, a nie jak tlo */
.entry__print { margin-top: clamp(26px, 4vw, 46px); padding-inline: var(--gutter); }
.entry__print img { width: 100%; border: 2px solid var(--void-line); }
.entry__print .figure-caption { color: #8792ab; }

/* Przycisk startu na ciemnym: pomaranczowy, bo to jedyne wezwanie na ekranie */
.entry .cta {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--void);
  box-shadow: 4px 4px 0 var(--void-ink);
}
.entry .cta::after { border-left-color: var(--void); }
.entry .cta:hover {
  background: var(--void-ink); border-color: var(--void-ink); color: var(--void);
  box-shadow: 6px 6px 0 var(--orange);
}
.entry .cta:hover::after { border-left-color: var(--orange); }
.entry .cta:active { box-shadow: 1px 1px 0 var(--void-ink); }

/* Licznik wejsciowy na ciemnym tle */
.entry .hud { border-color: var(--void-line); background: var(--void-line); box-shadow: 4px 4px 0 rgba(0,0,0,0.45); }
.entry .hud__cell { background: var(--void-2); }
.entry .hud__num { color: var(--void-ink); }
.entry .hud__key { color: #8792ab; }
.entry .hud__cell:first-child .hud__num { color: var(--orange); }

/* ---------- Pasma sekcji ---------- */

.band { padding-block: var(--band); }
.band--tight { padding-block: clamp(38px, 6vw, 78px); }
.band--wash { background: var(--plaster); }

.band__head { margin-bottom: clamp(22px, 3vw, 40px); }

/* Kurator: przesunięta wąska kolumna */
.curator { display: grid; gap: clamp(20px, 3vw, 38px); }
@media (min-width: 900px) {
  .curator { grid-template-columns: 1fr 2.15fr; align-items: start; }
  .curator__body { padding-right: clamp(0px, 6vw, 120px); }
}
.curator__name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.curator__where { font-size: 0.86rem; color: var(--pewter); margin-top: 6px; }

/* Metoda: asymetryczna siatka punktów */
.method { display: grid; gap: clamp(24px, 3vw, 44px) clamp(24px, 4vw, 64px); }
@media (min-width: 760px) { .method { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) {
  .method { grid-template-columns: 1.35fr 1fr 1fr; }
  .method__item:first-child { grid-row: span 2; }
}
.method__item h3 { font-size: 1.06rem; line-height: 1.24; margin-bottom: 8px; }
.method__item p { font-size: 0.94rem; }
.method__num {
  font-family: var(--display); font-weight: 700; font-size: 0.74rem;
  color: var(--indigo); letter-spacing: 0.12em; display: block; margin-bottom: 7px;
}

/* ---------- Eksponaty ---------- */

.exhibit { padding-block: clamp(40px, 6vw, 96px); border-top: var(--hair); }
.exhibit:first-of-type { border-top: 0; }

.exhibit__frame { margin-bottom: clamp(18px, 2.4vw, 30px); position: relative; }
.exhibit__frame img { width: 100%; }

/* celownik na kadrze: rogi zamiast ramki, zeby obraz zostal pierwszy */
.exhibit__frame::before,
.exhibit__frame::after {
  content: "";
  position: absolute;
  width: clamp(20px, 3vw, 38px);
  height: clamp(20px, 3vw, 38px);
  border: 3px solid var(--orange);
  opacity: 0;
  pointer-events: none;
}
.exhibit__frame::before { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.exhibit__frame::after { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }
.exhibit:hover .exhibit__frame::before,
.exhibit:hover .exhibit__frame::after { opacity: 1; }

/* Naglowek eksponatu jako czarny pasek: numer, tytul, studio i tagi w jednym bloku */
.exhibit__hud {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px clamp(14px, 2.2vw, 22px);
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(12px, 1.8vw, 18px) clamp(14px, 2vw, 22px);
  margin-bottom: clamp(16px, 2vw, 24px);
}
.exhibit__hud .exhibit__title { grid-column: 2; color: var(--paper); }
.exhibit__hud .exhibit__studio { grid-column: 2; color: var(--steel); margin-top: 2px; }
.exhibit__hud .chips { grid-column: 2; margin-top: 8px; }
.exhibit__hud .tag { border-color: #4a4a4a; color: var(--steel); }
.exhibit__hud .tag--key { border-color: var(--paper); color: var(--paper); }
.exhibit__hud .tag--warn { border-color: var(--orange); color: var(--orange); }
.exhibit__hud .tag--live { border-color: var(--steel); color: var(--paper); }
.exhibit__hud .tag--live::before { background: var(--orange); }
.exhibit__hud .exhibit__mark {
  grid-column: 2;
  color: var(--orange);
  box-shadow: none;
  margin-bottom: 2px;
}

.rank {
  grid-row: 1 / span 4;
  grid-column: 1;
  align-self: start;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  padding-right: clamp(12px, 2vw, 20px);
  border-right: 1px solid #3a3a3a;
}
.rank span { display: block; color: #6f6f6f; font-size: 0.32em; letter-spacing: 0.1em; margin-top: 6px; }

/* wariant: obraz jest przesunięty i dobija do prawej krawędzi ekranu */
@media (min-width: 900px) {
  .exhibit--bleed .exhibit__frame { margin-left: clamp(0px, 8vw, 160px); }
}

/* wariant: portret obok tabliczki */
.exhibit--portrait .exhibit__frame img { max-width: min(420px, 100%); }
@media (min-width: 900px) {
  .exhibit--portrait .exhibit__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
  .exhibit--portrait .exhibit__frame { margin-bottom: 0; }
}

.exhibit__title { font-size: clamp(1.55rem, 3.4vw, 2.5rem); line-height: 1.02; }
.exhibit__studio { font-size: 0.9rem; color: var(--pewter); margin-top: 8px; }
.exhibit__mark {
  display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange-ink);
  box-shadow: inset 0 -0.55em 0 rgba(255, 118, 23, 0.28);
  margin-bottom: 10px;
}

.exhibit__body { margin-top: clamp(16px, 2vw, 26px); display: grid; gap: clamp(18px, 2.4vw, 34px); }
@media (min-width: 900px) { .exhibit__body { grid-template-columns: 1.5fr 1fr; } }

.exhibit__note { font-size: 0.94rem; border-left: 2px solid var(--orange); padding-left: 14px; }
.exhibit__note strong { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 4px; }

/* Tabliczka Zasięgu: odczyt z automatu, trzy liczby w jednym rzedzie */
.plaque {
  display: flex; flex-wrap: wrap;
  margin-top: clamp(16px, 2vw, 24px);
  border: 2px solid var(--ink);
  box-shadow: var(--bevel-sm);
  background: var(--paper);
}
.plaque__cell {
  padding: 14px clamp(14px, 2vw, 22px);
  border-right: 1px solid var(--concrete);
  flex: 1 1 8rem;
}
.plaque__cell:last-child { border-right: 0; }

/* Na waskim ekranie pierwsza komorka dostaje caly wiersz, bo niesie pasek */
@media (max-width: 640px) {
  .plaque__cell { flex: 1 1 45%; }
  .plaque__cell:first-child {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid var(--concrete);
  }
  .meter__scale { font-size: 0.55rem; letter-spacing: 0.06em; }
}
.plaque__key {
  font-family: var(--display); font-weight: 700; font-size: 0.64rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--pewter);
  display: block; margin-bottom: 4px;
}
.plaque__figure {
  font-family: var(--display); font-weight: 700; color: var(--indigo);
  line-height: 0.94; letter-spacing: -0.02em; display: block;
  font-variant-numeric: tabular-nums;
}
/* im mniejszy zasięg, tym większa pierwsza liczba */
.plaque__figure--loud  { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
.plaque__figure--mid   { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
.plaque__figure--quiet { font-size: clamp(1.2rem, 2.4vw, 1.7rem); }
.plaque__figure--flat  { font-size: clamp(1.2rem, 2.4vw, 1.7rem); }

.specs { margin: 0; font-size: 0.88rem; }
.specs div { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dotted var(--concrete); }
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--pewter); flex: 0 0 8.5em; margin: 0; }
.specs dd { margin: 0; }

.store-links { margin-top: clamp(16px, 2vw, 24px); display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }
.store-link {
  font-family: var(--display); font-weight: 700; font-size: 0.9rem;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  box-shadow: var(--bevel-sm);
  padding: 11px 16px; min-height: 46px;
  display: inline-flex; align-items: center; gap: 9px;
}
.store-link::before {
  content: ""; width: 9px; height: 9px; background: var(--indigo); flex: 0 0 auto;
}
.store-link:hover {
  color: var(--paper); background: var(--indigo-deep); border-color: var(--indigo-deep);
  box-shadow: 5px 5px 0 var(--orange);
  transform: translate(-2px, -2px);
}
.store-link:hover::before { background: var(--orange); }
.store-link:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------- Skala (zestawienie) ---------- */

.scale { margin-top: clamp(20px, 3vw, 36px); }

.scale__row { padding-block: clamp(16px, 2.2vw, 26px); border-top: var(--hair); }
.scale__row:last-child { border-bottom: var(--hair); }

.scale__name { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.scale__year { font-size: 0.8rem; color: var(--pewter); font-weight: 400; font-family: var(--text); margin-left: 8px; }

.scale__metrics { display: grid; gap: 14px; margin-top: 12px; }
@media (min-width: 780px) {
  .scale__row { display: grid; grid-template-columns: 14.5rem 1fr; gap: clamp(16px, 3vw, 40px); align-items: start; }
  .scale__metrics { margin-top: 0; grid-template-columns: 1.1fr 1.3fr 0.7fr; gap: clamp(16px, 2.4vw, 34px); }
}

.metric__key {
  font-family: var(--display); font-weight: 700; font-size: 0.6rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--pewter);
  display: block; margin-bottom: 6px;
}
.metric__val { font-family: var(--display); font-weight: 700; font-size: 0.94rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* drabinka przedziałów: przedział, nie punkt */
.steps { display: flex; gap: 2px; margin-bottom: 6px; }
.steps span {
  height: 12px; flex: 1 1 0;
  background: var(--stone);
  border-bottom: 2px solid transparent;
}
.steps span[data-on="1"] { background: var(--indigo); }

/* policzalne kropki: jedna kropka = jedna ocena */
.dots { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; max-width: 15rem; }
.dots i {
  width: 9px; height: 9px; background: var(--indigo); display: block; border-radius: 50%;
}
.dots i[data-hollow="1"] { background: transparent; box-shadow: inset 0 0 0 1px var(--steel); }

.gap-cell {
  font-family: var(--display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; color: var(--orange-ink);
  background: repeating-linear-gradient(135deg, rgba(255,118,23,0.16) 0 5px, transparent 5px 10px);
  padding: 4px 8px; display: inline-block;
}

.scale__legend { margin-top: clamp(18px, 2.4vw, 28px); font-size: 0.84rem; color: var(--pewter); }
.scale__legend p { max-width: 74ch; }

/* ---------- Wybór, odrzucone, finanse ---------- */

.pick { display: grid; gap: clamp(18px, 2.6vw, 34px); }
@media (min-width: 960px) { .pick { grid-template-columns: 1.25fr 1fr; align-items: end; } }
.pick__title { font-size: clamp(1.9rem, 5vw, 3.6rem); line-height: 0.98; }
.pick__title em { font-style: normal; box-shadow: inset 0 -0.14em 0 var(--orange); }

.outside { display: grid; gap: 2px; }
.outside__item { padding-block: 14px; border-bottom: var(--hair); display: grid; gap: 4px; }
@media (min-width: 720px) { .outside__item { grid-template-columns: 15rem 1fr; gap: clamp(14px, 3vw, 40px); align-items: baseline; } }
.outside__name { font-family: var(--display); font-weight: 700; font-size: 0.98rem; }
.outside__why { font-size: 0.93rem; }

.faq { display: grid; gap: 0; }
.faq details { border-top: var(--hair); padding-block: 14px; }
.faq details:last-of-type { border-bottom: var(--hair); }
.faq summary {
  font-family: var(--display); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.18rem);
  cursor: pointer; list-style: none; display: flex; gap: 14px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
/* strzalka jak kursor wyboru w menu gry */
.faq summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0; height: 0;
  border-left: 8px solid var(--concrete);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translateY(2px);
  transition: border-color 160ms ease, transform 160ms ease;
}
.faq summary:hover::before { border-left-color: var(--orange); }
.faq details[open] summary::before { border-left-color: var(--indigo); transform: translateY(2px) rotate(90deg); }
.faq summary::after { content: "+"; margin-left: auto; color: var(--indigo); font-weight: 700; }
.faq details[open] summary::after { content: "-"; }
.faq details[open] summary { color: var(--indigo); }
.faq__answer { padding-top: 10px; padding-left: 22px; font-size: 0.96rem; max-width: 68ch; }

/* ---------- Formularz ---------- */

.subscribe { display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 940px) { .subscribe { grid-template-columns: 1fr 1.1fr; align-items: start; } }

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-family: var(--display); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.field input[type="text"], .field input[type="email"] {
  font-family: var(--text); font-size: 1rem;
  border: 0; border-bottom: 1px solid var(--ink); background: transparent;
  padding: 9px 2px; border-radius: 0; color: var(--ink); width: 100%;
}
.field input::placeholder { color: var(--pewter); opacity: 1; }
.field input:focus { border-bottom-color: var(--indigo); }
.field__hint { font-size: 0.8rem; color: var(--pewter); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; margin-bottom: 20px; max-width: 56ch; }
.consent input { margin-top: 5px; width: 17px; height: 17px; accent-color: var(--indigo); flex: 0 0 auto; }

.submit {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-radius: 0; padding: 13px 24px; cursor: pointer;
  min-height: 48px; box-shadow: var(--bevel);
}
.submit:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); box-shadow: 6px 6px 0 var(--orange); transform: translate(-2px, -2px); }
.submit:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.form-note { font-size: 0.8rem; color: var(--pewter); margin-top: 14px; max-width: 60ch; }
.form-msg { margin-top: 14px; font-size: 0.94rem; color: var(--indigo-deep); font-weight: 600; }
.form-msg--error { color: var(--orange-ink); }
.form-msg[hidden] { display: none; }

/* ---------- Stopka ---------- */

.footer {
  border-top: 2px solid var(--ink);
  padding-block: clamp(34px, 5vw, 64px);
  background: var(--void);
  color: var(--void-ink);
}
.footer h2 { color: var(--void-ink); }
.footer .meta { color: #8792ab; }
.footer a { color: var(--neon); border-bottom-color: var(--void-line); }
.footer a:hover { color: var(--orange); border-bottom-color: var(--orange); }
.footer .btn-inline { color: var(--neon); border-bottom-color: var(--void-line); }
.footer .btn-inline:hover { color: var(--orange); border-bottom-color: var(--orange); }
.footer__legal { border-top-color: var(--void-line) !important; color: #78829a !important; }
.footer__grid { display: grid; gap: clamp(22px, 3vw, 40px); }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h2 { font-size: 1.1rem; margin-bottom: 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.92rem; }
.footer__legal { margin-top: clamp(26px, 3.4vw, 44px); padding-top: 16px; border-top: var(--hair); font-size: 0.76rem; color: var(--pewter); }
.footer__legal p { max-width: 92ch; }
.btn-inline {
  background: none; border: 0; padding: 0; font: inherit; color: var(--indigo);
  cursor: pointer; border-bottom: 1px solid var(--steel);
}
.btn-inline:hover { color: var(--orange-ink); border-bottom-color: var(--orange); }

/* ---------- Strony treściowe ---------- */

/* Naglowek strony wewnetrznej: ten sam ekran co na wejsciu, tylko nizszy */
.page-head {
  padding-top: clamp(28px, 5vw, 62px);
  padding-bottom: clamp(26px, 4vw, 52px);
  background: var(--void);
  color: var(--void-ink);
  border-bottom: 1px solid var(--void-line);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(157,176,216,0.10) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, rgba(157,176,216,0.10) 1px, transparent 1px) 0 0 / 48px 48px;
  pointer-events: none;
}
.page-head > * { position: relative; }
.page-title { font-size: clamp(2rem, 6vw, 4.2rem); line-height: 0.98; letter-spacing: -0.03em; max-width: 18ch; }
.page-head .page-title { color: var(--void-ink); }
.page-head .lede { margin-top: 16px; max-width: 52ch; color: var(--neon); }
.page-head .meta { color: #8792ab; }
.page-head a { color: var(--neon); border-bottom-color: var(--void-line); }
.page-head a:hover { color: var(--orange); border-bottom-color: var(--orange); }

.prose h2 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); margin-top: clamp(28px, 3.4vw, 46px); margin-bottom: 10px; line-height: 1.12; }
.prose h3 { font-size: 1.02rem; margin-top: 22px; margin-bottom: 6px; }
.prose > *:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 1.05em; }
.prose li { margin-bottom: 7px; }
.prose { max-width: 72ch; }
.legal { font-size: 0.95rem; }
.legal .updated { font-size: 0.82rem; color: var(--pewter); margin-top: 30px; padding-top: 12px; border-top: var(--hair); }

.error-page { padding-block: clamp(60px, 12vw, 160px); }
.error-code { font-family: var(--display); font-weight: 700; font-size: clamp(4rem, 20vw, 13rem); line-height: 0.82; color: var(--indigo); letter-spacing: -0.05em; }

.thanks { padding-block: clamp(50px, 9vw, 130px); }

/* ---------- Warstwa arkadowa: tagi, paski, licznik, tablica wyników ---------- */

/* Tagi gatunku i cech, czytane jednym rzutem oka */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--display); font-weight: 700; font-size: 0.64rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 9px; border: 1px solid var(--concrete); color: var(--pewter);
  display: inline-flex; align-items: center; gap: 6px; line-height: 1;
}
.tag--key { border-color: var(--ink); color: var(--ink); }
.tag--warn { border-color: var(--orange); color: var(--orange-ink); }
.tag--live { border-color: var(--indigo); color: var(--indigo-deep); }
.tag--live::before {
  content: ""; width: 6px; height: 6px; background: var(--indigo); flex: 0 0 auto;
}

/* Pasek zasięgu: segmenty, bo Google podaje próg, a nie liczbę */
.meter { margin-top: 10px; }
.meter__track { display: flex; gap: 3px; }
.meter__track i {
  height: 10px; flex: 1 1 0; background: var(--stone); display: block;
}
.meter__track i[data-on="1"] { background: var(--indigo); }
.meter__track i[data-cap="1"] {
  background: repeating-linear-gradient(135deg, var(--steel) 0 3px, var(--stone) 3px 6px);
}
.meter__scale {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-family: var(--display); font-weight: 700; font-size: 0.58rem;
  letter-spacing: 0.1em; color: var(--pewter);
}

/* Pasek startowy: trzy liczby, ktore opisuja caly numer */
.hud {
  display: grid; gap: 2px;
  border: 2px solid var(--ink); box-shadow: var(--bevel);
  background: var(--ink);
  margin-top: clamp(24px, 3.4vw, 40px);
}
@media (min-width: 700px) { .hud { grid-template-columns: repeat(4, 1fr); } }
.hud__cell { background: var(--paper); padding: clamp(14px, 2vw, 20px); }
.hud__num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 0.9;
  letter-spacing: -0.03em; color: var(--indigo);
  font-variant-numeric: tabular-nums; display: block;
}
.hud__key {
  font-family: var(--display); font-weight: 700; font-size: 0.62rem;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--pewter);
  display: block; margin-top: 8px;
}

/* Ciemne pasmo: jedyny ekran automatu na calej stronie */
.band--arcade {
  background: var(--void);
  color: var(--void-ink);
  position: relative;
  overflow: hidden;
}
.band--arcade::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.028) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.band--arcade > * { position: relative; }
.band--arcade .band-title,
.band--arcade .label { color: var(--void-ink); }
.band--arcade .meta,
.band--arcade .scale__legend { color: var(--neon); }
.band--arcade a { color: var(--neon); border-bottom-color: var(--void-line); }
.band--arcade a:hover { color: var(--orange); border-bottom-color: var(--orange); }
.band--arcade .scale__row { border-top-color: var(--void-line); }
.band--arcade .scale__row:last-child { border-bottom-color: var(--void-line); }
.band--arcade .scale__name { color: var(--void-ink); }
.band--arcade .scale__year,
.band--arcade .metric__key { color: var(--neon); }
.band--arcade .metric__val { color: var(--void-ink); }
.band--arcade .steps span { background: var(--void-2); }
.band--arcade .steps span[data-on="1"] { background: var(--neon); }
.band--arcade .dots i { background: var(--neon); }
.band--arcade .gap-cell {
  color: var(--void);
  background: repeating-linear-gradient(135deg, var(--orange) 0 6px, #ffa15c 6px 12px);
}

/* Miejsce w kolejce po lewej stronie wiersza tablicy */
.scale__id { grid-column: 1; }
.scale__place {
  font-family: var(--display); font-weight: 700; font-size: 0.7rem;
  letter-spacing: 0.14em; color: var(--pewter); display: block; margin-bottom: 5px;
}
.band--arcade .scale__place { color: #6f7a94; }
.band--arcade .scale__row:hover .scale__place { color: var(--orange); }

/* Wybor kuratorki: jedyne miejsce, gdzie cos "wygrywa" */
.pick__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 8px 12px; margin-bottom: 14px;
  box-shadow: 3px 3px 0 var(--orange);
}
.pick__badge::before {
  content: ""; width: 0; height: 0;
  border-bottom: 9px solid var(--orange);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
}

/* Odrzucone pozycje z powodem odrzucenia jako kodem */
.outside__id { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (min-width: 720px) { .outside__id { display: grid; gap: 7px; justify-items: start; align-content: start; } }
.outside__item { border-left: 3px solid var(--concrete); padding-left: 14px; }
.outside__item:hover { border-left-color: var(--orange); }

/* Punkty metody w ramkach, zeby czytaly sie jak zasady rozgrywki */
.method__item {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
}
.method__num { color: var(--indigo); font-size: 0.8rem; }

/* Panel zapisu jak konsola, a nie jak zwykly formularz */
.subscribe form {
  border: 2px solid var(--ink);
  box-shadow: var(--bevel);
  background: var(--paper);
  padding: clamp(18px, 2.6vw, 30px);
}

/* ---------- Baner zgód ---------- */

.consent-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 80;
  background: var(--paper); border-top: 2px solid var(--ink);
  padding: 18px var(--gutter) 20px;
}
.consent-bar[hidden] { display: none; }
.consent-bar h2 { font-size: 1.02rem; margin-bottom: 6px; }
.consent-bar p { font-size: 0.85rem; max-width: 78ch; margin-bottom: 12px; }
.consent-bar__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-bar button {
  font-family: var(--display); font-weight: 700; font-size: 0.84rem;
  padding: 11px 18px; border: 1px solid var(--ink); background: var(--paper);
  color: var(--ink); cursor: pointer; border-radius: 0; min-height: 44px;
}
.consent-bar button:hover { border-color: var(--indigo); color: var(--indigo-deep); }
.consent-options { margin-bottom: 12px; font-size: 0.85rem; display: grid; gap: 8px; }
.consent-options[hidden] { display: none; }
.consent-options label { display: flex; gap: 9px; align-items: flex-start; }
.consent-options input { margin-top: 4px; accent-color: var(--indigo); }

/* Sprzężenie zwrotne przy naciśnięciu: element ma reagować na dotyk od razu */
.submit, .consent-bar button, .nav-toggle { transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.submit:active, .consent-bar button:active, .nav-toggle:active { transform: scale(0.97); }

@media (prefers-reduced-motion: no-preference) {
  a, summary, .store-link, .cta { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1); }
  .exhibit__frame::before, .exhibit__frame::after { transition: opacity 200ms ease; }
  .exhibit__frame img { transition: filter 320ms ease; }
  .exhibit:hover .exhibit__frame img { filter: saturate(1.08) contrast(1.03); }

  /* Segmenty paska wypelniaja sie po kolei, gdy wiersz wjezdza w kadr */
  .meter__track i[data-on="1"] { transform-origin: left center; }
  .reveal[data-seen="1"] .meter__track i[data-on="1"] { animation: seg-in 260ms cubic-bezier(0.23, 1, 0.32, 1) both; }
  .reveal[data-seen="1"] .meter__track i:nth-child(2) { animation-delay: 90ms; }
  .reveal[data-seen="1"] .meter__track i:nth-child(3) { animation-delay: 180ms; }
  @keyframes seg-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  /* Kropki-oceny pojawiaja sie policzalnie, jedna po drugiej */
  .reveal[data-seen="1"] .dots i { animation: dot-in 220ms ease both; }
  .reveal .dots i:nth-child(1) { animation-delay: 30ms; }
  .reveal .dots i:nth-child(2) { animation-delay: 60ms; }
  .reveal .dots i:nth-child(3) { animation-delay: 90ms; }
  .reveal .dots i:nth-child(4) { animation-delay: 120ms; }
  .reveal .dots i:nth-child(5) { animation-delay: 150ms; }
  .reveal .dots i:nth-child(n+6) { animation-delay: 180ms; }
  @keyframes dot-in { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

  /* Sekcje wjezdzaja raz, bez powrotu.
     Ukrywamy dopiero wtedy, gdy JS potwierdzi, ze ma co pokazac z powrotem. */
  html[data-reveal="on"] .reveal { opacity: 0; transform: translateY(14px); transition: opacity 420ms ease, transform 420ms cubic-bezier(0.23, 1, 0.32, 1); }
  html[data-reveal="on"] .reveal[data-seen="1"] { opacity: 1; transform: none; }

  /* Baner zgód wjeżdża zamiast pojawiać się skokiem */
  .consent-bar { animation: consent-in 220ms cubic-bezier(0.23, 1, 0.32, 1) both; }
  @keyframes consent-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit:active, .consent-bar button:active, .nav-toggle:active { transform: none; }
  .cta:hover, .store-link:hover, .submit:hover,
  .cta:active, .store-link:active, .submit:active { transform: none; }
  .consent-bar { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
