@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;700&display=swap');

:root {
  --bg: #090d12;
  --bg-card: #0c121a;
  --accent: #ddf247;
  --text: #e4e4e4;
  --text-muted: rgba(228, 228, 228, 0.5);
  --border: rgba(228, 228, 228, 0.07);
  --container: 1200px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.divider {
  width: 100%;
  max-width: var(--container);
  height: 8px;
  margin: 0 auto;
  opacity: 0.8;
  background-image: url(/wp-content/themes/jorikkrossmalkor/../img/divider.webp);
  background-repeat: repeat-x;
  background-size: auto 100%;
}

/* ---------- Header ---------- */
.site-header {
  padding: 20px 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.brand span {
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 50px;
  border-radius: 60px;
  font-weight: 700;
  font-size: 14px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(221, 242, 71, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(221, 242, 71, 0.7);
}

/* ---------- Star/Sparkle icon ---------- */
.sparkle {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.sparkle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Section base ---------- */
section {
  padding: 40px 0;
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 30px;
}

.hero .hero-row {
  display: flex;
  gap: 30px;
  align-items: center;
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 566px;
  flex-shrink: 0;
}

.hero-title {
  margin: 0;
  font-weight: 700;
  font-size: 70px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
}

.hero-title .accent {
  color: var(--accent);
}

.hero-image {
  width: 336px;
  height: 553px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  width: 238px;
  flex-shrink: 0;
}

.hero-side p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

.hero-side .arrow {
  width: 116px;
  height: 75px;
}

.hero-side .arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Advantages ---------- */
.advantages {
  padding: 60px 0;
}

.advantages-grid {
  display: grid;
  grid-template-columns: 387px 1fr;
  gap: 20px;
  align-items: start;
}

.advantages-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  margin: 0;
  font-weight: 700;
  font-size: 60px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text);
}

.section-title .accent {
  color: var(--accent);
}

.advantages-image {
  width: 100%;
  height: 274px;
  border-radius: 20px;
  overflow: hidden;
}

.advantages-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.advantages-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 239px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(221, 242, 71, 0.3);
}

.card h3 {
  margin: 0;
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  line-height: 1.2;
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

/* ---------- Top Games ---------- */
.top-games .intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  max-width: 911px;
  margin: 0 auto;
}

.top-games .section-title {
  text-align: center;
}

.top-games .intro-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  max-width: 911px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.game-card .thumb {
  width: 100%;
  height: 257px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--bg);
}

.game-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .thumb img {
  transform: scale(1.05);
}

.game-card h3 {
  margin: 0;
  font-weight: 700;
  font-size: 26px;
  color: var(--accent);
  text-align: center;
}

/* ---------- Visual Gallery ---------- */
.gallery {
  padding: 80px 0 0;
}

.gallery-intro {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1098px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-intro p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.gallery-image {
  margin-top: 30px;
  width: 100%;
  height: 431px;
  background: url(/wp-content/themes/jorikkrossmalkor/../img/gallery.webp) center / cover no-repeat;
}

/* ---------- Contacts ---------- */
.contacts {
  padding: 60px 0;
}

.contacts .intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
  max-width: 911px;
  margin: 0 auto;
}

.contacts-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.contacts-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.contacts-text .highlight {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
}

.contacts-text .highlight + .highlight {
  margin-top: 4px;
}

.contacts-map {
  width: 100%;
  max-width: 793px;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
  margin: 0 auto;
}

.contacts-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 60px 0 40px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-nav a {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent);
}

.socials {
  display: flex;
  gap: 15px;
  align-items: center;
}

.socials a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.socials a:hover {
  transform: translateY(-2px);
}

.socials img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.copyright {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Game page ---------- */
.game-page {
  padding: 30px 0 0;
}

.game-hero {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  text-align: center;
  max-width: 1035px;
  margin: 0 auto;
}

.game-hero .section-title {
  color: var(--accent);
  text-align: center;
}

.game-hero-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  max-width: 753px;
}

.game-hero-image {
  width: 387px;
  height: 257px;
  overflow: hidden;
  border: 1px solid var(--bg);
}

.game-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-about {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-start;
  width: 100%;
  max-width: 1098px;
  margin: 0 auto;
  padding: 0 20px;
}

.game-about .section-title {
  color: var(--accent);
  text-align: left;
}

.game-about-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.game-about-image {
  width: 100%;
  max-width: 500px;
  height: 240px;
  border-radius: 20px;
  overflow: hidden;
}

.game-about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 720px) {
  .game-hero-image {
    width: 100%;
    max-width: 387px;
    height: 220px;
  }
  .game-about-image {
    height: 200px;
  }
}

/* ---------- Legal page ---------- */
.legal-page {
  padding: 30px 0 60px;
}

.legal-page .container {
  max-width: 1098px;
  padding: 0 20px;
}

.legal-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.legal-header .section-title {
  color: var(--accent);
  text-align: left;
}

.legal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.legal-body h2 {
  margin: 16px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  margin: 0;
}

.legal-body .legal-contact {
  margin-top: 8px;
}

/* ---------- Cookie modal ---------- */
.cookies-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.cookies-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.cookies {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 40px);
  max-width: 640px;
  background: #0a0f15;
  border: 1px solid rgba(228, 228, 228, 0.08);
  border-radius: 28px;
  padding: 40px;
  z-index: 100;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookies.is-hidden {
  opacity: 0;
  transform: translate(-50%, -45%);
  pointer-events: none;
}

.cookies-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 24px;
}

.cookies-title {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}

.cookies p {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.cookies p a {
  color: var(--accent);
  text-decoration: underline;
}

.cookies-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookies-btn {
  width: 100%;
  padding: 18px 28px;
  font-size: 16px;
  border-radius: 60px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.cookies-btn--primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  box-shadow: 0 0 35px rgba(221, 242, 71, 0.45);
}

.cookies-btn--primary:hover {
  box-shadow: 0 0 45px rgba(221, 242, 71, 0.7);
  transform: translateY(-1px);
}

.cookies-btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.cookies-btn--secondary:hover {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 560px) {
  .cookies {
    padding: 28px 24px;
    border-radius: 22px;
  }
  .cookies-icon {
    font-size: 44px;
    margin-bottom: 18px;
  }
  .cookies-title {
    font-size: 24px;
  }
  .cookies p {
    font-size: 14px;
    margin-bottom: 24px;
  }
  .cookies-btn {
    padding: 15px 24px;
    font-size: 15px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 56px;
  }
  .section-title {
    font-size: 48px;
  }
}

@media (max-width: 1024px) {
  .hero .hero-row {
    flex-wrap: wrap;
  }
  .hero-copy,
  .hero-image,
  .hero-side {
    width: 100%;
  }
  .hero-image {
    height: 420px;
  }
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  .advantages-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .hero-title {
    font-size: 40px;
  }
  .section-title {
    font-size: 36px;
  }
  .main-nav {
    gap: 18px;
  }
  .main-nav a {
    font-size: 13px;
  }
  .advantages-cards {
    grid-template-columns: 1fr;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
  .game-card .thumb {
    height: 220px;
  }
  .site-header .container {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .btn {
    padding: 14px 32px;
  }
  .footer-nav {
    gap: 18px;
  }
}
