:root {
  color-scheme: light dark;
  --page: #fffaf1;
  --paper: #ffffff;
  --ink: #25251f;
  --muted: #77766e;
  --line: #e9e3d7;
  --sun: #f4bd42;
  --sun-soft: #fff2ce;
  --shadow: 0 18px 48px rgb(59 47 19 / 9%);
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-display: "Manrope", "DM Sans", sans-serif;
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171816;
    --paper: #22231f;
    --ink: #f8f5ed;
    --muted: #aaa79c;
    --line: #393a33;
    --sun: #f4c34e;
    --sun-soft: #39311f;
    --shadow: 0 18px 48px rgb(0 0 0 / 24%);
  }
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(255 229 163 / 26%), transparent 36rem),
    var(--page);
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; }
button { font: inherit; }

.page-shell {
  width: min(100% - 48px, 1040px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgb(37 37 31 / 8%);
  overflow: hidden;
  border-radius: 13px;
  background: #fefdf8;
}

.wordmark-mark img { display: block; width: 100%; height: 100%; }

.wordmark-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.055em;
}

.wordmark-name span { color: var(--muted); font-weight: 600; }

.header-contact {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.header-contact:hover { transform: translateY(-1px); border-color: var(--sun); background: var(--paper); }
.header-contact span { color: var(--muted); font-size: 15px; }

.intro {
  padding: clamp(62px, 10vw, 106px) 0 clamp(56px, 9vw, 92px);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
}

.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #7bc64c; box-shadow: 0 0 0 4px rgb(123 198 76 / 15%); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 17px;
  font-family: var(--font-display);
  font-size: clamp(46px, 7.7vw, 76px);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .99;
}

h1 span { color: #9a7440; }

.intro-copy { margin: 0; color: var(--muted); font-size: clamp(15px, 2.2vw, 17px); }

.games { padding-bottom: clamp(64px, 9vw, 98px); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 25px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.045em;
}

.game-count { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }

.game-card {
  min-width: 0;
  text-align: center;
  animation: arrive 570ms both cubic-bezier(.2,.75,.25,1);
  animation-delay: calc(var(--entry-order) * 110ms + 80ms);
}

.game-icon-button {
  position: relative;
  display: block;
  width: min(100%, 206px);
  aspect-ratio: 1;
  margin: 0 auto 17px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 23%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  box-shadow: 0 15px 32px rgb(47 41 31 / 16%), 0 2px 5px rgb(47 41 31 / 10%);
  transition: transform 240ms cubic-bezier(.2,.8,.25,1), box-shadow 240ms ease;
}

.game-icon-button:hover .game-icon { transform: translateY(-5px) rotate(-2deg) scale(1.025); box-shadow: 0 22px 40px rgb(47 41 31 / 21%), 0 3px 7px rgb(47 41 31 / 12%); }
.game-icon-button:active .game-icon { transform: translateY(1px) scale(.97); }
.game-icon-button[aria-expanded="true"] .game-icon { transform: translateY(-3px) rotate(1.5deg) scale(1.02); box-shadow: 0 20px 38px rgb(47 41 31 / 20%); }

.game-icon-button:focus-visible,
.header-contact:focus-visible,
.contact-button:focus-visible,
.store-link:focus-visible,
.footer-links a:focus-visible {
  outline: 3px solid #587f38;
  outline-offset: 4px;
}

.icon-hint {
  position: absolute;
  right: -8px;
  bottom: -8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid var(--page);
  border-radius: 50%;
  color: #29271f;
  background: var(--game-accent);
  box-shadow: 0 3px 9px rgb(43 35 20 / 18%);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transition: transform 220ms ease;
}

.game-icon-button[aria-expanded="true"] .icon-hint { transform: rotate(45deg); }

.game-name {
  display: flex;
  min-height: 2.8em;
  align-items: flex-start;
  justify-content: center;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.7vw, 17px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.3;
  text-wrap: balance;
}

.store-panel {
  display: grid;
  grid-template-rows: 0fr;
  margin-inline: auto;
  opacity: 0;
  transition: grid-template-rows 300ms cubic-bezier(.2,.75,.25,1), opacity 200ms ease, margin-top 300ms ease;
}

.store-panel.is-open { grid-template-rows: 1fr; margin-top: 13px; opacity: 1; }

.store-panel-inner { min-height: 0; overflow: hidden; }

.store-link {
  display: flex;
  width: 100%;
  min-height: 55px;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 4px 12px rgb(52 43 24 / 4%);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.store-link:hover { transform: translateY(-2px); border-color: var(--game-accent); box-shadow: 0 8px 18px rgb(52 43 24 / 8%); }
.store-icon { flex: 0 0 22px; width: 22px; height: 22px; }
.store-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.15; }
.store-kicker { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.store-name { margin-top: 3px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.store-arrow { color: var(--muted); font-size: 14px; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: clamp(55px, 8vw, 82px);
  padding: 24px clamp(19px, 4vw, 34px);
  border: 1px solid #f0dfb6;
  border-radius: 20px;
  background: linear-gradient(115deg, var(--sun-soft), var(--paper) 72%);
}

@media (prefers-color-scheme: dark) {
  .contact-card { border-color: #4a412d; }
  h1 span { color: #e7c47c; }
}

.contact-sparkle { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 15px; color: #6c4c12; background: var(--sun); font-size: 23px; }
.contact-card h2 { margin: 0 0 3px; font-family: var(--font-display); font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.contact-card p { margin: 0; color: var(--muted); font-size: 12px; }
.contact-button { display: inline-flex; min-height: 43px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; margin-left: auto; padding: 0 16px; border-radius: 999px; color: #29251c; background: var(--sun); font-size: 12px; font-weight: 800; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.contact-button:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgb(114 82 15 / 18%); }
.contact-button span { font-size: 14px; }

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-company p { margin: 0 0 3px; font-size: 10px; }
.footer-company p:first-child { color: var(--ink); font-weight: 600; }
.footer-links { display: flex; max-width: 470px; flex-wrap: wrap; justify-content: flex-end; gap: 8px 17px; }
.footer-links a { color: var(--muted); font-size: 10px; text-decoration-color: transparent; text-underline-offset: 3px; transition: color 150ms ease, text-decoration-color 150ms ease; }
.footer-links a:hover { color: var(--ink); text-decoration-color: currentColor; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(17px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 36px, 460px); }
  .site-header { min-height: 72px; }
  .intro { padding: 66px 0 64px; }
  .eyebrow { margin-bottom: 19px; font-size: 9px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 17px; row-gap: 29px; }
  .game-card:last-child { grid-column: 1 / -1; width: min(100%, 250px); justify-self: center; }
  .game-icon-button { width: min(100%, 146px); margin-bottom: 14px; }
  .game-name { max-width: 176px; min-height: 2.7em; font-size: 14px; }
  .store-panel { width: min(100%, 220px); }
  .contact-card { gap: 12px; padding: 19px 16px; }
  .contact-sparkle { width: 39px; height: 39px; flex-basis: 39px; }
  .contact-card h2 { font-size: 15px; }
  .contact-card p { max-width: 170px; font-size: 11px; }
  .contact-button { min-height: 40px; gap: 6px; padding-inline: 12px; font-size: 11px; }
  .site-footer { flex-direction: column; gap: 14px; }
  .footer-links { justify-content: flex-start; gap: 9px 15px; }
}

@media (max-width: 360px) {
  .page-shell { width: min(100% - 28px, 460px); }
  .game-grid { column-gap: 12px; }
  .contact-card { flex-wrap: wrap; }
  .contact-button { margin-left: 51px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
