:root {
  color-scheme: dark;
  --bg: #161214;
  --diamonds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='54' height='79'%3E%3Cpolygon points='27,0 54,39.5 27,79 0,39.5' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
  --card-top: #2b1315;
  --card-bottom: #160a0b;
  --card-border: #a89a4f;
  --text: #f1e4e2;
  --text-muted: #cbb9b6;
  --text-dim: #8a7876;
  --heading: #f3e2df;
  --gold: #ecd48a;
  --gold-bottom: #b8933f;
  --gold-border: #6b5f2c;
  --gold-glow: rgba(212, 175, 90, 0.4);
  --gold-link: #c9a94e;
  --button-text: #2a1608;
  --divider: #3a2224;
  --row-bg: #1e1112;
  --field-fill: #1c1012;
  --field-border: #4a3336;
  --ok: #7fae7a;
  --answer-ok: #217343;
  --answer-skip: #661e24;
  --skip: #c96a5a;
  --secondary-border: #8c7333;
  --display: "Berkshire Swash", Georgia, serif;
  --body: Roboto, Arial, sans-serif;
}

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

[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(69, 17, 21, 0.47), transparent 420px) no-repeat,
    radial-gradient(ellipse 90% 40% at 50% 18%, rgba(120, 24, 34, 0.38), transparent 72%) no-repeat,
    var(--diamonds),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--gold-link); }
a:hover { color: var(--gold); }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 18px;
}
.brand {
  font-family: var(--display); font-size: 32px; line-height: 1.3;
  color: var(--heading); text-decoration: none;
  text-shadow: 0 4px 18px rgba(0,0,0,.6);
}
.brand:hover { color: var(--heading); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--text-muted); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--gold); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold), var(--gold-bottom));
  box-shadow: 0 4px 16px var(--gold-glow);
  color: var(--button-text);
  font: 700 17px/1.2 var(--body);
  text-decoration: none; cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.06); color: var(--button-text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .btn-secondary:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}
.btn--small { padding: 9px 16px; font-size: 15px; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--secondary-border);
  border-radius: 12px;
  background: rgba(230, 215, 180, .05);
  color: #e4d6d3;
  font: 500 16px/1.2 var(--body);
  text-decoration: none; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px;
  padding-block: 40px 72px;
}
.hero h1 {
  margin: 0 0 20px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 6vw, 66px); line-height: 1.3;
  padding-bottom: .12em;
  text-wrap: balance;
  background: linear-gradient(180deg, var(--gold) 20%, var(--gold-bottom));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
}
.hero .lead { margin: 0 0 28px; max-width: 30em; color: var(--text-muted); font-size: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-muted); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-link); }

/* phone held at the forehead: landscape, like the real game screen */
.stage { position: relative; display: grid; place-items: center; padding-block: 24px; }
.stage::before {
  content: ""; position: absolute; inset: 10% 5%;
  background: radial-gradient(closest-side, rgba(212,175,90,.18), transparent);
  filter: blur(10px);
}
.phone {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 19.5 / 9;
  padding: 12px;
  border-radius: 38px;
  background: #0c0a0b;
  border: 2px solid #2c2628;
  box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04);
  transform: rotate(-6deg);
  transition: transform .45s cubic-bezier(.3,1.4,.5,1);
}
.phone.is-tilt { transform: rotate(-6deg) perspective(700px) rotateX(-28deg) translateY(10px); }
.phone.is-tap  { transform: rotate(-6deg) scale(.97); }
.screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 28px;
  background: var(--diamonds), #221e20;
  display: grid; place-items: center; text-align: center;
  transition: background-color .2s;
}
.screen-word { padding-inline: 8%; }
.screen-word b {
  display: block; color: #f1e4e2; font-weight: 400;
  font-size: clamp(26px, 5.4vw, 44px); line-height: 1.1;
  text-wrap: balance;
}
.screen-word span { display: block; margin-top: 6px; color: #e6d6d3; font-size: clamp(14px, 2.4vw, 20px); }
.screen-timer { position: absolute; bottom: 9%; left: 0; right: 0; font-size: 17px; color: #e6d6d3; font-variant-numeric: tabular-nums; }
.screen-flash {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  font-size: clamp(22px, 4.4vw, 36px); font-weight: 400; color: #f1e4e2;
  opacity: 0; transition: opacity .18s;
}
.screen-flash::before {
  content: ""; position: absolute; inset: 0;
  background: 0 0 / 40px repeat;
  opacity: .07;
}
.screen-flash.ok::before { background-image: url(img/answer-correct.png); }
.screen-flash.skip::before { background-image: url(img/answer-wrong.png); }
.screen-flash span { position: relative; }
.screen-flash.ok { background-color: var(--answer-ok); }
.screen-flash.skip { background-color: var(--answer-skip); }
.screen-flash.show { opacity: 1; }
.stage-caption {
  position: relative; margin: 34px 0 0; min-height: 1.6em;
  font-size: 14px; color: var(--text-muted); text-align: center;
}
.stage-caption strong { color: var(--gold); font-weight: 500; }

/* ---------- sections ---------- */
section { padding-block: 64px; }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-head h2 {
  margin: 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 44px); line-height: 1.3;
  color: var(--heading); text-wrap: balance;
}
.section-head .rule {
  display: flex; align-items: center; gap: 10px; max-width: 360px; margin: 14px auto 16px;
}
.section-head .rule::before, .section-head .rule::after { content: ""; flex: 1; height: 1px; background: var(--card-border); opacity: .7; }
.section-head .rule i { width: 5px; height: 5px; border-radius: 50%; background: var(--card-border); }
.section-head p { margin: 0; color: var(--text-muted); font-size: 17px; }

.card {
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}

/* how to play */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding: 22px 20px; border: 1px solid var(--divider); border-radius: 14px; background: var(--row-bg); counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px;
  border-radius: 50%; border: 1px solid var(--gold-border);
  background: linear-gradient(180deg, var(--gold), var(--gold-bottom));
  color: var(--button-text); font-weight: 700;
}
.steps h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; color: var(--heading); }
.steps p { margin: 0; font-size: 15px; color: var(--text-muted); }

.gestures { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.gesture { display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
.gesture-icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; }
.gesture-icon svg { width: 30px; height: 30px; }
.gesture--ok .gesture-icon { background: rgba(127,174,122,.16); color: var(--ok); border: 1px solid rgba(127,174,122,.5); }
.gesture--skip .gesture-icon { background: rgba(201,106,90,.16); color: var(--skip); border: 1px solid rgba(201,106,90,.5); }
.gesture h3 { margin: 0; font-size: 18px; font-weight: 500; color: var(--heading); }
.gesture p { margin: 2px 0 0; color: var(--text-muted); font-size: 15px; }

/* categories */
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cat {
  flex: 0 0 calc((100% - 5 * 14px) / 6); min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px;
  aspect-ratio: 1; padding: 14px 10px 12px;
  border: 1.5px solid var(--card-border); border-radius: 12px;
  background: linear-gradient(180deg, #3a1418, #0d0708 88%);
  text-align: center;
}
/* PNG kategorii (img_url) ma glif na środkowej połowie płótna, a poświatę w marginesie —
   skala 2× daje glif wielkości pudełka, a poświata wychodzi poza nie bez wpływu na układ. */
.cat-icon {
  width: 46%; aspect-ratio: 1; margin-bottom: auto; margin-top: 8%;
  transform: scale(2); pointer-events: none;
}
.cat-name { font-size: 15px; line-height: 1.25; color: var(--text); }

/* together */
.together {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.together p { margin: 0 0 14px; color: var(--text-muted); max-width: 32em; }
.together ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.together li { display: flex; gap: 12px; align-items: baseline; }
.together li::before { content: "✓"; color: var(--gold); font-weight: 700; }

.chat { display: grid; gap: 12px; width: 100%; max-width: 400px; justify-self: center; }
.bubble {
  justify-self: start; max-width: 85%;
  padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  background: #2a2426; color: #eee4e2; font-size: 15px;
}
.link-preview {
  overflow: hidden;
  border-radius: 14px; border: 1px solid #3a3234; background: #221c1e;
}
.link-preview .lp-img {
  height: 92px; display: grid; place-items: center;
  background: var(--diamonds), linear-gradient(180deg, #3a1418, #160a0b);
  font-family: var(--display); font-size: 30px; line-height: 1.35; color: var(--heading);
}
.link-preview .lp-body { padding: 10px 14px 12px; }
.link-preview .lp-host { font-size: 12px; color: var(--text-dim); }
.link-preview .lp-title { font-weight: 500; color: var(--text); }
.link-preview .lp-desc { font-size: 13px; color: var(--text-muted); }

/* faq */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--divider); border-radius: 12px; background: var(--row-bg); }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 20px; cursor: pointer; list-style: none;
  font-weight: 500; color: var(--heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-muted); }

/* final cta */
.final { padding: 44px 28px; text-align: center; }
.final h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.6vw, 48px); line-height: 1.3; color: var(--heading); text-wrap: balance; }
.final p { margin: 0 0 24px; color: var(--text-muted); }

footer { padding-block: 32px 40px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--text-dim); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--text-dim); }
footer a:hover { color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 12px; padding-block: 16px 48px; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .facts { justify-content: center; }
  .stage { order: -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  /* 10 kafelków po 3 w rzędzie: flex zamiast grida, żeby ostatni, samotny kafelek był na środku */
  .cats { display: flex; flex-wrap: wrap; justify-content: center; max-width: 560px; margin-inline: auto; }
  .cat { flex: 0 0 calc((100% - 28px) / 3); min-width: 0; }
  .together { grid-template-columns: minmax(0, 520px); justify-content: center; gap: 32px; }
  .chat { max-width: none; }
}
@media (max-width: 560px) {
  section { padding-block: 44px; }
  .steps, .gestures { grid-template-columns: 1fr; }
  .phone { border-radius: 26px; padding: 8px; }
  .screen { border-radius: 20px; }
  .screen-timer { font-size: 14px; }
  .cats { gap: 10px; }
  /* Nazwy łamią się tu na dwie linie ("Postacie fikcyjne"), więc zamiast kwadratu stała ikona
     i miejsce na dwie linie tekstu — wszystkie kafelki mają tę samą wysokość. */
  .cat { flex-basis: calc((100% - 20px) / 3); aspect-ratio: auto; gap: 8px; padding: 14px 6px 10px; }
  .cat-icon { width: 44px; margin: 0; }
  .cat-name { font-size: 13px; min-height: 2.5em; display: flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .phone, .phone.is-tilt, .phone.is-tap { transition: none; transform: rotate(-6deg); }
  .screen-flash { transition: none; }
}
