/* Tim – page styles (no framework) */

:root {
  --cream: #f6ecd9;
  --cream-2: #fbf5ea;
  --paper: #fffaf1;
  --wood: #b9844f;
  --wood-dark: #7a5130;
  --ink: #4a3426;
  --ink-soft: #7a6352;
  --yellow: #ffc83d;
  --yellow-dark: #d99a12;
  --red: #e2453a;
  --green: #5aa04b;
  --sky: #dcecf8;
  --line: #e8d8bd;
  --shadow: 0 10px 28px rgba(122, 81, 48, .16);
  --radius: 22px;
  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px;
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* Buttons – styled after the yellow in-game buttons */
.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  color: var(--ink); text-decoration: none; cursor: pointer;
  background: linear-gradient(#ffd866, var(--yellow));
  border: 3px solid var(--yellow-dark);
  border-radius: 16px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 var(--yellow-dark);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn { padding: 12px 22px; min-height: 52px; }
.btn--small { padding: 6px 18px; min-height: 42px; }
.btn--ghost {
  background: var(--paper); border-color: var(--line);
  box-shadow: 0 4px 0 var(--line);
}
/* Square arrow buttons – same as the in-game ball maze controls */
.icon-btn {
  width: 52px; height: 52px; padding: 0;
  border: 2.5px solid #7a4e24; border-radius: 14px;
  background: linear-gradient(#ffd963 0%, #fcc23c 55%, #f2a922 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 236, 170, .9), inset 0 -4px 0 rgba(196, 120, 20, .35), 0 3px 0 #7a4e24, 0 6px 10px rgba(74, 52, 38, .25);
}
.icon-btn .arrow { width: 32px; height: 32px; fill: #fff8e8; stroke: #7a4e24; stroke-width: 1.6; stroke-linejoin: round; }
.icon-btn .arrow--right { transform: scaleX(-1); }
.icon-btn .arrow--up { transform: rotate(90deg); }
.icon-btn:active { box-shadow: inset 0 0 0 2px rgba(255, 236, 170, .9), 0 1px 0 #7a4e24; }
.btn:hover, .icon-btn:hover { transform: translateY(-2px); }
.btn:active, .icon-btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 1px 0 var(--yellow-dark); }
.btn--ghost:active { box-shadow: 0 1px 0 var(--line); }

.play-badge { display: inline-block; border-radius: 14px; transition: transform .15s ease; }
.play-badge:hover { transform: translateY(-2px); }
.play-badge img { width: 216px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 2px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.brand__home { width: 26px; height: 26px; fill: var(--wood); }
.socials { display: flex; gap: 6px; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--ink); transition: background .15s ease;
}
.socials a:hover { background: var(--cream); }
.socials img, .socials svg { width: 22px; height: 22px; }

/* Hero */
.hero {
  position: relative;
  padding: 48px 0 72px;
  background:
    radial-gradient(circle at 20px 20px, rgba(185, 132, 79, .09) 3px, transparent 4px) 0 0 / 40px 40px,
    linear-gradient(var(--cream-2), var(--cream));
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  background: linear-gradient(var(--wood), var(--wood-dark));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25);
}
.hero__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 1fr 1.25fr; gap: 56px; } }

.hero__icon {
  width: 112px; height: 112px; border-radius: 28px;
  border: 4px solid #fff; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.eyebrow {
  margin: 0 0 6px; color: var(--wood); font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; font-size: .85rem;
}
.hero__title {
  font-size: clamp(3.6rem, 12vw, 5.6rem); font-weight: 700; color: var(--red);
  text-shadow: 0 4px 0 #fff, 0 6px 14px rgba(122, 81, 48, .2);
  letter-spacing: .01em;
}
.hero__tagline { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.35rem, 4vw, 1.75rem); margin: 6px 0 12px; }
.hero__lead { margin: 0 0 26px; color: var(--ink-soft); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
/* The badge image has ~14px of empty space around it; pull it in so its
   visible edge lines up with the text and the "Watch gameplay" button. */
.hero__actions .play-badge { margin: -14px; }

.tablet {
  position: relative; aspect-ratio: 16 / 10;
  border: 14px solid var(--wood-dark);
  border-radius: 30px;
  background: var(--wood-dark);
  box-shadow: 0 0 0 3px var(--wood), 0 22px 44px rgba(74, 52, 38, .28);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.tablet img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 16px;
  opacity: 0; transition: opacity .9s ease;
}
.tablet img.is-active { opacity: 1; }

/* Sections */
.section { padding: 72px 0; }
.section--alt { background: var(--paper); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.section__title { font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 700; color: var(--ink); }
.section__lead { margin: 8px 0 0; color: var(--ink-soft); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }

/* Mini games grid */
.games {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.game {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 12px 12px 18px; box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.game:hover { transform: translateY(-4px) rotate(-.4deg); }
.game img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; margin-bottom: 14px;
}
.game h3 { font-size: 1.3rem; font-weight: 600; padding: 0 6px; }
.game p { margin: 4px 0 0; padding: 0 6px; color: var(--ink-soft); }

/* How it plays */
.steps {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.step { text-align: center; padding: 8px 12px; }
.step__badge {
  display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(#ffd866, var(--yellow));
  border: 3px solid var(--yellow-dark);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 4px 0 var(--yellow-dark);
  margin-bottom: 14px;
}
.step__badge svg { width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.step h3 { font-size: 1.3rem; font-weight: 600; }
.step p { margin: 6px auto 0; color: var(--ink-soft); max-width: 22em; }

/* Screenshot strip */
.scroller-nav { display: none; gap: 10px; }
@media (min-width: 720px) { .scroller-nav { display: flex; } }
.shots {
  list-style: none; margin: 28px 0 0; padding: 6px 16px 18px;
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 16px; scrollbar-width: thin;
}
@media (min-width: 1160px) {
  .shots { padding-left: calc((100vw - 1160px) / 2 + 32px); scroll-padding-left: calc((100vw - 1160px) / 2 + 32px); }
}
.shots li { flex: 0 0 min(84vw, 480px); scroll-snap-align: start; }
.shots button {
  display: block; width: 100%; padding: 0; border: 3px solid #fff; border-radius: 18px;
  background: none; cursor: zoom-in; overflow: hidden; box-shadow: var(--shadow);
}
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .3s ease; }
.shots button:hover img { transform: scale(1.03); }

/* Video */
.video {
  position: relative; margin-top: 28px; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden; background: var(--ink);
  border: 6px solid var(--wood-dark); box-shadow: var(--shadow);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__poster { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; width: 100%; }
.video__poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); }
.video__play {
  position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px;
  border-radius: 50%; background: var(--yellow); border: 4px solid var(--yellow-dark);
  box-shadow: 0 6px 0 var(--yellow-dark); transition: transform .15s ease;
}
.video__play::after {
  content: ""; position: absolute; left: 36px; top: 26px;
  border-style: solid; border-width: 18px 0 18px 28px; border-color: transparent transparent transparent var(--ink);
}
.video__poster:hover .video__play { transform: scale(1.08); }
.video__label {
  position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
  color: #fff; font-family: var(--font-head); font-weight: 600; text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

/* Closing call to action */
.cta {
  background:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, .18) 3px, transparent 4px) 0 0 / 40px 40px,
    linear-gradient(#e9b97f, var(--wood));
  color: var(--ink);
}
.cta__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.cta__inner > img { width: 104px; height: 104px; border-radius: 26px; border: 4px solid #fff; box-shadow: var(--shadow); }
.cta__title { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 700; color: #fff; text-shadow: 0 3px 0 var(--wood-dark); margin-top: 8px; }
.cta p { margin: 0 0 8px; font-weight: 700; }

/* Footer */
.footer { background: var(--wood-dark); color: #f6e6cf; padding: 24px 0; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer p { margin: 0; }
.footer__links { display: flex; gap: 22px; }
.footer__links a { text-decoration: none; font-weight: 700; padding: 6px 0; }
.footer__links a:hover { text-decoration: underline; }

/* Cookie notice */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  background: var(--paper); border: 3px solid var(--line); border-radius: 20px;
  padding: 14px 16px 14px 20px; box-shadow: 0 14px 36px rgba(74, 52, 38, .25);
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0; font-size: .95rem; }
@media (max-width: 480px) { .cookie { flex-direction: column; align-items: stretch; text-align: center; } }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; margin: 0;
}
.lightbox::backdrop { background: rgba(43, 30, 22, .88); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1280px); max-height: 84vh; border-radius: 16px; border: 4px solid #fff; }
.lightbox__close { position: fixed; top: 16px; right: 16px; }
.lightbox__prev, .lightbox__next { position: fixed; top: 50%; margin-top: -24px; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
@media (max-width: 720px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; margin: 0; }
  .lightbox__prev { left: calc(50% - 60px); }
  .lightbox__next { right: calc(50% - 60px); }
}

/* Back to top */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .12s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
body.has-cookie .to-top { bottom: 120px; }
