:root {
  --bg: #fff8e6;
  --card: #ffffff;
  --ink: #2b160c;
  --mustard: #ffd447;
  --sausage: #b8411f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
a { color: inherit; }
[hidden] { display: none !important; }

.top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-block: 20px; }
.logo { font-size: 1.6rem; font-weight: 900; text-decoration: none; letter-spacing: -.03em; }
.logo span { color: var(--sausage); }
nav { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 600; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding-block: 24px 56px; }
.badge { display: inline-block; margin: 0; padding: 4px 14px; background: var(--mustard); border: 2px solid var(--ink); border-radius: 99px; font-weight: 700; font-size: .9rem; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.08; margin: 18px 0; letter-spacing: -.03em; }
h1 em { font-style: normal; color: var(--sausage); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 8px; }
h3 { margin: 6px 0; }
.lead { font-size: 1.2rem; }

.countdown p { font-weight: 800; margin-bottom: 8px; }
#timer { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
#timer li { flex: 0 1 86px; text-align: center; padding: 10px 4px; background: var(--card); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
#timer b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
#timer span { font-size: .8rem; }

.mascots { margin: 0; text-align: center; min-width: 0; }
.bubble { display: inline-block; min-height: 2.9em; padding: 10px 18px; background: var(--card); border: 3px solid var(--ink); border-radius: 18px; font-weight: 700; }
figcaption { font-weight: 600; }
.mascot { display: block; width: min(448px, 100%); margin: 8px auto; padding: 0; border: 0; background: none; cursor: pointer; }
.mascot:focus-visible { outline: 3px dashed var(--sausage); }
.sprite { display: block; width: 100%; aspect-ratio: 112 / 132; background: url(/sprite.png) 0 0 / 800% 100% no-repeat; animation: frames 1.2s steps(8) infinite; }
.mascot.jump { animation: jump .7s steps(7); }
.sprite, .coin, .seal img, img.pixel, .pay img { image-rendering: pixelated; }
.pay { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.pay img { width: min(342px, calc(100% - 74px)); height: auto; }
.coin { flex: none; width: 60px; height: 60px; background: url(/coin.png) 0 0 / 400% 100% no-repeat; animation: spin .8s steps(4) infinite; }
.next { margin-top: 48px; }

@keyframes frames { to { background-position-x: 114.2857%; } }
@keyframes spin { to { background-position-x: 133.3333%; } }
@keyframes jump {
  20% { transform: scale(1.08, .9); }
  55% { transform: translateY(-36px); }
  80% { transform: scale(1.04, .96); }
}

main section:not(.hero) { padding-block: 40px; scroll-margin-top: 16px; }
.cards, .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cards article, .steps li { background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 22px; box-shadow: 6px 6px 0 var(--mustard); }
.cards span { font-size: 2.2rem; }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--sausage); color: #fff; font-weight: 900; }

.certificate { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 28px; background: var(--mustard); border: 3px solid var(--ink); border-radius: 18px; }
.certificate p { flex: 1 1 320px; margin: 0; font-size: 1.15rem; }
.seal { display: grid; place-content: center; width: 150px; height: 150px; border-radius: 50%; border: 5px double var(--ink); background: var(--card); text-align: center; font-size: 3rem; line-height: 1.2; }
.seal img { margin-inline: auto; }
.seal small { font-size: .8rem; font-weight: 800; }

footer { padding-block: 32px; border-top: 3px solid var(--ink); margin-top: 32px; }
.center { text-align: center; padding-block: 18vh; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  #timer { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sprite, .coin, .mascot.jump { animation: none; }
}
