:root {
  --barn-rust: #c45c26;
  --corn-gold: #e8b84a;
  --coop-cream: #f7f0e4;
  --asphalt-ink: #2c241b;
  --fence-sage: #6a8f5a;
  --chalk-white: #fff9f0;
  --dust-muted: #6e6358;
  --glass: rgba(255, 249, 240, 0.55);
  --glass-border: rgba(44, 36, 27, 0.12);
  --header-height: 72px;
  --font-heading: "Quicksand", sans-serif;
  --font-body: "Open Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden !important;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--asphalt-ink);
  min-height: 100vh;
  background-color: var(--coop-cream);
}

.tk-theme {
  background-color: var(--coop-cream);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(232, 184, 74, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(196, 92, 38, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 45% at 50% 100%, rgba(106, 143, 90, 0.2), transparent 55%),
    linear-gradient(180deg, #efe4d2 0%, var(--coop-cream) 40%, #ebe2d4 100%);
  background-attachment: fixed;
}

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

a {
  color: var(--barn-rust);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--fence-sage);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--asphalt-ink);
}

.u-flex { display: flex; }
.u-flex-col { display: flex; flex-direction: column; }
.u-items-center { align-items: center; }
.u-justify-between { justify-content: space-between; }
.u-gap-1 { gap: 1rem; }
.u-text-center { text-align: center; }
.u-mt-2 { margin-top: 2rem; }
.u-mb-0 { margin-bottom: 0; }
.u-w-full { width: 100%; }
.u-rounded-lg { border-radius: 1rem; }

.l-wrap {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

.l-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.l-page__main {
  flex: 1;
  padding-bottom: 3rem;
}

.l-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 240, 228, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.l-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.m-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--asphalt-ink);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.m-brand span {
  color: var(--barn-rust);
}

.m-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.55rem;
  border: 2px solid var(--asphalt-ink);
  border-radius: 0.5rem;
  background: var(--glass);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.m-burger span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--asphalt-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.m-nav__list {
  display: flex;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.m-nav__link {
  text-decoration: none;
  color: var(--dust-muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.m-nav__link:hover,
.m-nav__link.is-active {
  color: var(--asphalt-ink);
}

.m-hero {
  padding: 3.25rem 0 2rem;
}

.m-hero__tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--barn-rust);
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.m-hero__title {
  font-size: clamp(2rem, 4.8vw, 3.15rem);
  margin: 0 0 1rem;
  max-width: 18ch;
}

.m-hero__lead {
  margin: 0;
  max-width: 60ch;
  color: var(--dust-muted);
}

.m-section {
  padding: 2rem 0;
}

.m-section__title {
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.m-section__sub {
  margin: 0 0 1.75rem;
  color: var(--dust-muted);
  max-width: 58ch;
}

.m-section__title--center {
  text-align: center;
}

.m-section__title--spaced {
  margin-bottom: 1.75rem;
}

.m-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.35rem;
}

.m-game {
  border: 1px solid var(--glass-border);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  padding: 0;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(44, 36, 27, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.m-game:hover {
  transform: translateY(-5px);
  border-color: rgba(196, 92, 38, 0.35);
  box-shadow: 0 16px 40px rgba(196, 92, 38, 0.18);
}

.m-game__thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8dcc8;
}

.m-game__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-game__body {
  padding: 1rem 1.1rem 1.25rem;
}

.m-game__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.m-game__hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--dust-muted);
}

.m-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.m-feature {
  padding: 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(44, 36, 27, 0.06);
}

.m-feature__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.m-feature__text {
  margin: 0;
  color: var(--dust-muted);
}

.m-faq {
  max-width: 720px;
  margin-inline: auto;
}

.m-faq__item {
  margin-bottom: 0.85rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
  overflow: hidden;
}

.m-faq__question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  background: none;
  border: none;
  color: var(--asphalt-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.m-faq__answer {
  display: none;
  padding: 0 1.15rem 1.1rem;
  color: var(--dust-muted);
}

.m-faq__item.is-open .m-faq__answer {
  display: block;
}

.m-cta {
  text-align: center;
  padding: 2.25rem 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 1.1rem;
  box-shadow: 0 10px 36px rgba(44, 36, 27, 0.08);
}

.m-cta h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

.m-cta p {
  color: var(--dust-muted);
}

.m-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  border: none;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.m-btn--grad {
  background: linear-gradient(135deg, var(--corn-gold) 0%, var(--barn-rust) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(196, 92, 38, 0.35);
}

.m-btn--grad:hover {
  color: #fff;
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.m-btn--fill {
  background: linear-gradient(135deg, var(--corn-gold), var(--barn-rust));
  color: #fff;
}

.m-btn--fill:hover {
  filter: brightness(1.05);
  color: #fff;
}

.l-footer {
  margin-top: auto;
  padding: 2.5rem 0 1.5rem;
  background: var(--asphalt-ink);
  color: #c9b8a6;
}

.l-footer a {
  color: var(--chalk-white);
}

.l-footer a:hover {
  color: var(--corn-gold);
}

.l-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.l-footer__heading {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: #fff;
}

.l-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.l-footer__links a {
  text-decoration: none;
}

.l-footer__links li {
  margin-bottom: 0.35rem;
}

.l-footer__bottom {
  font-size: 0.9rem;
  color: #8a7a6c;
}

.m-cookie {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 50;
  max-width: min(420px, calc(100% - 2rem));
  padding: 1rem 1.15rem;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(44, 36, 27, 0.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.m-cookie p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dust-muted);
}

.m-page-head {
  padding: 2.5rem 0 1rem;
}

.m-page-head h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
}

.m-page-head__lead {
  margin: 0;
  color: var(--dust-muted);
  max-width: 58ch;
}

.m-prose h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.m-prose p,
.m-prose li {
  color: var(--dust-muted);
}

.m-prose ul {
  padding-left: 1.2rem;
}

.m-form {
  max-width: 520px;
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

.m-form__group {
  margin-bottom: 1rem;
}

.m-form__label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.m-form__input,
.m-form__textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--glass-border);
  border-radius: 0.65rem;
  background: rgba(255, 249, 240, 0.85);
  color: var(--asphalt-ink);
  font: inherit;
}

.m-form__input:focus,
.m-form__textarea:focus {
  outline: none;
  border-color: var(--barn-rust);
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.2);
}

.m-form__textarea {
  min-height: 140px;
  resize: vertical;
}

.m-form__status {
  margin-top: 0.75rem;
  color: var(--fence-sage);
  font-weight: 700;
}

.m-blog {
  display: grid;
  gap: 1.5rem;
}

.m-blog-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1.25rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  overflow: hidden;
}

.m-blog-card__thumb img {
  height: 100%;
  min-height: 160px;
  width: 100%;
  object-fit: cover;
}

.m-blog-card__content {
  padding: 1.1rem 1.2rem 1.25rem 0;
}

.m-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--dust-muted);
  margin: 0.75rem 0 1rem;
}

.m-badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--corn-gold), var(--barn-rust));
  color: #fff;
  font-weight: 700;
  font-family: var(--font-heading);
}

.m-article {
  padding: 2rem 0 3rem;
}

.m-article__header h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}

.m-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  color: var(--dust-muted);
  font-size: 0.9rem;
}

.m-article__content section {
  margin-bottom: 2rem;
}

.m-article__content p {
  color: var(--dust-muted);
}

.m-article__content h2 {
  font-size: 1.4rem;
}

.m-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(44, 36, 27, 0.72);
  backdrop-filter: blur(6px);
}

.m-modal.is-open {
  display: flex;
}

.m-modal__panel {
  width: min(960px, 100%);
  height: min(85vh, 720px);
  background: var(--chalk-white);
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.m-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--asphalt-ink);
}

.m-modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-heading);
  color: #fff;
}

.m-modal__close {
  border: none;
  background: linear-gradient(135deg, var(--corn-gold), var(--barn-rust));
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}

.m-modal__close:hover {
  filter: brightness(1.08);
}

.m-modal__frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #111;
}

@media (max-width: 900px) {
  .m-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .m-burger {
    display: flex;
  }

  .m-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    background: rgba(255, 249, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .m-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .m-nav__list {
    flex-direction: column;
  }

  .m-burger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .m-burger.is-open span:nth-child(2) {
    opacity: 0;
  }

  .m-burger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .m-blog-card {
    grid-template-columns: 1fr;
  }

  .m-blog-card__content {
    padding: 0 1rem 1.25rem;
  }

  .m-cookie {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
