:root {
  --ink: #241f1b;
  --ink-soft: #5a4d42;
  --paper: #f7f0e1;
  --paper-deep: #e8dcc7;
  --gold: #d6a13e;
  --pink: #d85b82;
  --teal: #2d9b8d;
  --blue: #477fb0;
  --hand: "Chalkboard SE", "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive;
  --display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.08), transparent 36%),
    radial-gradient(circle at 84% 86%, rgba(214, 161, 62, 0.1), transparent 40%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 14px),
    #1d1916;
  font-family: var(--hand);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 52px);
  border: 2.5px solid var(--ink);
  border-radius: 22px 11px 24px 13px / 12px 24px 11px 20px;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(90, 68, 42, 0.08) 24px 25px),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.75), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), rgba(175, 140, 90, 0.08));
  box-shadow:
    0 0 0 5px rgba(247, 240, 225, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.48);
}

.hero {
  max-width: 760px;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(52px, 10vw, 112px);
  line-height: 0.84;
  letter-spacing: -0.055em;
  text-shadow: 3px 4px 0 rgba(214, 161, 62, 0.34);
}

.lede {
  max-width: 590px;
  margin: 18px 0 0;
  font-size: clamp(16px, 2.1vw, 24px);
  line-height: 1.35;
  color: var(--ink-soft);
}

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
}

.game {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 285px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 2px solid var(--ink);
  border-radius: 15px 8px 17px 10px / 9px 16px 8px 14px;
  background: rgba(255, 250, 238, 0.82);
  text-decoration: none;
  box-shadow: 6px 8px 0 rgba(36, 31, 27, 0.14);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.game:hover,
.game:focus-visible {
  transform: translate(-3px, -4px);
  background: #fffbf2;
  box-shadow: 10px 13px 0 rgba(36, 31, 27, 0.16);
}

.game:active {
  transform: translate(1px, 1px);
  box-shadow: 3px 4px 0 rgba(36, 31, 27, 0.16);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  box-shadow: 2px 3px 0 rgba(36, 31, 27, 0.18);
}

.game-hokm .mark {
  background: #cfe7df;
}

.game-shelem .mark {
  background: #d4e2f2;
}

.kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h2 {
  margin: 4px 0 10px;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.game p {
  margin: 0;
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 1.4;
  color: var(--ink-soft);
}

.play {
  margin-top: auto;
  padding-top: 22px;
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 700;
  color: var(--ink);
}

.game-hokm:hover .play {
  color: #176b5f;
}

.game-shelem:hover .play {
  color: #2f5f93;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: clamp(26px, 4vw, 42px);
  padding-top: 18px;
  border-top: 1.5px dashed rgba(36, 31, 27, 0.25);
  font-size: 12px;
  color: var(--ink-soft);
}

footer span:first-child {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 760px) {
  .games {
    grid-template-columns: 1fr;
  }

  .game {
    min-height: 0;
  }

  .game .play {
    padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}
