:root {
  --ice: #E8EEF4;
  --navy: #243056;
  --lingon: #C73E3A;
  --card: #FFFFFF;
  --ink: #1C2438;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(28, 36, 56, 0.08);
  --max: 1100px;
  --font-display: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ice);
  overflow-x: hidden;
}

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

a {
  color: var(--navy);
}

a:hover {
  color: var(--lingon);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
}

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

.site-header {
  background: var(--card);
  border-bottom: 2px solid #d5dde8;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img {
  width: 48px;
  height: 48px;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--navy);
  background: var(--card);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
  padding: 0.35rem 0.2rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--lingon);
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

[data-auth="user"] {
  display: none;
}

body.is-user [data-auth="guest"] {
  display: none !important;
}

body.is-user [data-auth="user"] {
  display: inline-flex !important;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--lingon);
  color: #fff;
  border-color: var(--lingon);
}

.btn-primary:hover {
  background: #a83330;
  color: #fff;
}

.btn-secondary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: #1a2444;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-ghost:hover {
  background: var(--ice);
  color: var(--navy);
}

.hero {
  padding: 2.5rem 0 1rem;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero-copy {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.section {
  padding: 2.5rem 0;
}

.section-head {
  margin-bottom: 1.5rem;
  max-width: 42rem;
}

.games-grid,
.reasons-grid,
.info-grid {
  display: grid;
  gap: 1.25rem;
}

.game-card,
.plain-card,
.reason-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.game-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.game-card h3 {
  margin-bottom: 0.5rem;
}

.story-block {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.story-block img {
  width: 100%;
  border-radius: 8px;
}

.band {
  padding: 2.5rem 0 3rem;
}

.band-inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow: hidden;
}

.band-inner h2,
.band-inner p {
  color: #fff;
}

.band-inner img {
  width: 100%;
  border-radius: 8px;
}

.page-intro {
  padding: 2.25rem 0 1rem;
}

.page-intro .intro-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  max-width: 48rem;
}

.content-block {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.content-block ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.content-block li {
  margin-bottom: 0.45rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  font: inherit;
  padding: 0.85rem 0.95rem;
  border: 2px solid #c7d0de;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 600;
}

.check-row input {
  margin-top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
}

.form-error {
  color: var(--lingon);
  font-weight: 700;
  min-height: 1.4em;
}

#contact-ok {
  display: none;
  background: #e7f4ea;
  border: 2px solid #2f7a45;
  color: #1d4d2c;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  font-weight: 700;
}

#contact-ok.is-visible {
  display: block;
}

.site-footer {
  background: var(--navy);
  color: #e8eef4;
  padding: 2.5rem 0 2rem;
  margin-top: 1rem;
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: #ffd4d2;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.footer-note {
  font-size: 1.05rem;
  max-width: 48rem;
}

.footer-note p {
  margin-bottom: 0.6rem;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 36, 56, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 80;
}

.overlay.is-open {
  display: flex;
}

.modal {
  width: min(100%, 420px);
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal h2 {
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--navy);
}

.modal-switch {
  margin-top: 1rem;
  text-align: center;
}

.age-box,
.cookie-box {
  width: min(100%, 480px);
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

#cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: none;
}

#cookie-banner.is-open {
  display: block;
}

.cookie-box {
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(28, 36, 56, 0.18);
}

.cookie-actions,
.age-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 760px) {
  .hero-grid,
  .story-block,
  .band-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .auth-bar {
    width: 100%;
  }
}
