/* Layout, components, and page sections. Mobile first. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

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

h1, h2, h3, p, ul, ol, figure { margin-top: 0; }

h1, h2, .offer {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: 0;
}

h1 { font-size: var(--fs-3xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-4); }
h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); line-height: var(--lh-tight); }

p { margin-bottom: var(--space-4); max-width: 68ch; }

a { color: var(--color-red-deep); }
a:hover { color: var(--color-red); }

:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--color-text);
}

.skip-link {
  position: fixed;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 70;
  transform: translateY(-160%);
  background: var(--color-yellow);
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { transform: none; }

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section { padding: var(--space-7) 0; }
.band { background: var(--color-surface); }

.muted, .fine, figcaption { color: var(--color-muted); }
.fine, figcaption { font-size: var(--fs-sm); }
figcaption { margin-top: var(--space-2); }

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-red);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.offer {
  display: inline-block;
  margin: 0 0 var(--space-4);
  padding: 0.4rem 0.75rem;
  background: var(--color-yellow);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xl);
}

.cluster, .hero__actions, .cookie__actions, .age-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

a.btn--primary,
a.btn--primary:hover,
button.btn--primary {
  background: var(--color-red);
  color: var(--color-white);
}

a.btn--primary:hover,
button.btn--primary:hover { background: var(--color-red-deep); }

a.btn--secondary,
button.btn--secondary {
  background: var(--color-white);
  color: var(--color-red);
  border-color: var(--color-red);
}

a.btn--yellow,
a.btn--yellow:hover,
button.btn--yellow {
  background: var(--color-yellow);
  color: var(--color-text);
}

a.btn--yellow:hover,
button.btn--yellow:hover { background: var(--color-yellow-deep); }

.note {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border-left: 4px solid var(--color-yellow-deep);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.note p:last-child { margin-bottom: 0; }

/* Header and navigation */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: var(--color-white);
  border-top: 4px solid var(--color-red);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: var(--space-3);
  row-gap: var(--space-2);
  padding-block: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  background: #000;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  line-height: 0;
}

.brand { min-width: 0; }

.brand img {
  height: 34px;
  width: auto;
  max-width: 100%;
}

.header__tools { grid-column: 1 / -1; }

.header__tools .btn { width: 100%; }

.nav-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0 var(--space-3);
  border: 2px solid var(--color-red);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-red);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav { display: none; }

.nav.is-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: var(--z-drawer);
  inset: var(--header-h) 0 0 0;
  padding: var(--space-5);
  background: var(--color-white);
  overflow: auto;
  gap: var(--space-4);
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 650;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a[aria-current="page"] { color: var(--color-red); }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
  font-size: var(--fs-sm);
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--color-muted);
}

/* Hero and media */

.hero {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-6) 0 var(--space-7);
  align-items: center;
}

.hero h2 {
  font-family: var(--font-body);
  font-size: var(--fs-xl);
  font-weight: 650;
}

.hero__frame {
  max-width: 320px;
  margin-inline: auto;
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.hero__frame img,
.shots img,
.detail__figure img,
.related img,
.logo-still {
  display: block;
  border-radius: var(--radius-md);
}

.hero__qr { display: none; }
.qr-block { max-width: 160px; }
.qr-block img { width: 100%; height: auto; background: var(--color-white); }

.shots {
  display: flex;
  gap: var(--space-3);
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
}

.shots figure {
  margin: 0;
  flex: 0 0 auto;
  width: min(220px, 68vw);
  scroll-snap-align: start;
}

.steps {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
}

.steps > li {
  position: relative;
  margin: 0 0 var(--space-4);
  padding-left: 3rem;
}

.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-red);
  color: var(--color-white);
  font-weight: 700;
  line-height: 2rem;
  text-align: center;
}

.steps { counter-reset: step; }

/* Games */

.toolbar {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.game-grid,
.related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.game-grid > li,
.related > li { min-width: 0; }

.game-card,
.related a {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.game-card span,
.related span {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 650;
}

.game-card:hover span,
.related a:hover span { color: var(--color-red); }

.detail {
  display: grid;
  gap: var(--space-5);
}

.detail__figure { margin: 0; max-width: 280px; }

.logo-still { max-width: 280px; background: #000; padding: var(--space-3); }

/* FAQ, forms, legal */

.faq { border-top: 1px solid var(--color-border); }

.faq__item { border-bottom: 1px solid var(--color-border); }

.faq h2,
.faq h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 650;
}

.faq__button {
  width: 100%;
  min-height: 44px;
  padding: var(--space-4) 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.field { margin-bottom: var(--space-4); max-width: 40rem; }

label { display: block; margin-bottom: var(--space-2); font-weight: 650; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(26 18 12 / 0.35);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

textarea { min-height: 9rem; resize: vertical; }

.field__error { margin: var(--space-2) 0 0; color: var(--color-red-deep); font-size: var(--fs-sm); }

.legal h2 { font-size: var(--fs-xl); margin-top: var(--space-6); }

/* CTA, footer, dialogs */

.cta-band, .footer {
  background: var(--color-red-deep);
  color: var(--color-white);
}

.cta-band { padding: var(--space-7) 0; }

.cta-band h2, .footer h2 { color: var(--color-white); }

.cta-band p, .footer p, .footer li { color: var(--color-white); }

.cta-band a:not(.btn), .footer a { color: var(--color-yellow); }
.cta-band a:not(.btn):hover, .footer a:hover { color: var(--color-white); }

.footer {
  padding: var(--space-7) 0 var(--space-6);
  border-top: 4px solid var(--color-yellow);
}

.footer__nav, .footer__legal {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.age-gate, .age-block { display: none; }

html.needs-age .age-gate {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: var(--z-age);
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgb(26 18 12 / 0.72);
}

html.needs-age,
html.needs-age body { overflow: hidden; }

html.needs-age #page-shell,
html.is-blocked #page-shell { display: none; }

.age-gate__panel, .age-block__panel {
  width: min(100%, 34rem);
  padding: var(--space-6);
  background: var(--color-white);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--color-red);
}

html.is-blocked .age-block {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: var(--space-4);
  background: var(--color-bg);
}

.cookie:not([hidden]) {
  position: fixed;
  z-index: var(--z-cookie);
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  display: grid;
  gap: var(--space-3);
  max-width: 42rem;
  margin-inline: auto;
  padding: var(--space-4);
  background: var(--color-white);
  color: var(--color-text);
  border-radius: var(--radius-md);
  border-left: 6px solid var(--color-yellow);
  box-shadow: var(--shadow-soft);
}

.cookie p { margin: 0; }

.dl-modal[hidden] { display: none; }

.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgb(26 18 12 / 0.72);
}

.dl-modal__panel {
  width: min(100%, 28rem);
  padding: var(--space-6);
  background: var(--color-white);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  border-top: 6px solid var(--color-red);
  text-align: center;
}

.dl-modal__panel h2 { margin-bottom: var(--space-3); }

.dl-modal__panel p { margin-inline: auto; }

.dl-modal__link {
  margin-top: var(--space-4);
  font-weight: 700;
  word-break: break-all;
}

.dl-timer {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.dl-timer__num {
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--color-red);
}

.dl-timer__track {
  width: min(100%, 16rem);
  height: 8px;
  border-radius: 99px;
  background: var(--color-border);
  overflow: hidden;
}

.dl-timer__bar {
  height: 100%;
  width: 100%;
  background: var(--color-red);
}

.dl-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

body.dl-open { overflow: hidden; }

body.age-open, body.nav-open { overflow: hidden; }

[id] { scroll-margin-top: calc(var(--header-h) + 0.75rem); }

@media (min-width: 768px) {
  :root { --header-h: 4.75rem; }

  .header__inner {
    display: flex;
    grid-template-columns: none;
    padding-block: 0;
    gap: var(--space-4);
  }

  .brand img { height: 40px; max-width: 210px; }

  .header__tools { width: auto; margin-left: 0; }

  .header__tools .btn { width: auto; }

  .nav-toggle { display: none; }

  .nav a.nav__cta { display: none; }

  .header__tools { margin-left: 0; }

  .nav, .nav.is-open {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    inset: auto;
    margin-left: auto;
    padding: 0;
    background: transparent;
    overflow: visible;
    gap: var(--space-4);
  }

  .nav__list { flex-direction: row; align-items: center; gap: var(--space-4); }

  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); }
  .hero__frame { margin-inline: 0; }
  .hero__visual { display: grid; grid-template-columns: minmax(0, 1fr) 148px; gap: var(--space-4); align-items: center; }
  .hero__qr { display: block; }
  .hero__qr img { width: 100%; background: var(--color-white); }

  .toolbar { grid-template-columns: minmax(0, 1fr) 12rem auto; align-items: end; }
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .related { grid-template-columns: repeat(3, minmax(0, 180px)); }
}

@media (min-width: 1200px) {
  .game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .game-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__frame { max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
