/* Mati's Toyz — website styles.
   Same toy-box look as the game: chunky dark outlines, hard drop shadows,
   barn red, sunflower yellow, hero blue, Baloo 2 + Nunito. */
:root {
  --ink: #1d2a3a;
  --barn: #d8402f;
  --barn-dk: #8f2116;
  --sun: #ffcf2e;
  --blue: #2a63c9;
  --navy: #122a5e;
  --card: #fffaf0;
  --grass: #2f8f2e;
  --road: #5d6470;
  --muted: #4a5666;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 600 18px/1.5 var(--body); color: var(--ink); background: #fff; }
img, svg { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0 0 .35em; }
h1 { font-size: clamp(3rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
.wrap { width: min(1120px, 100% - 36px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 36px); }
section { padding: clamp(60px, 9vw, 104px) 0; position: relative; }
.head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.head .lead { margin-inline: auto; }
.kicker {
  display: inline-block; font: 800 .82rem var(--body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--sun); margin-bottom: 12px;
}
.kicker.red { color: var(--barn); }
.kicker.ink { color: var(--ink); }
.lead { font-size: 1.2rem; max-width: 54ch; color: #e6eeff; }
.lead.dark { color: var(--muted); }

/* chunky toy pieces */
.card { background: #fff; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 7px 0 var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 800 1.35rem/1 var(--display); padding: 14px 28px 12px; border-radius: 99px;
  border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn.go { background: linear-gradient(#ff6a55, var(--barn)); color: #fff; }
.btn.white { background: #fff; color: var(--ink); }
.btn.small { font-size: 1.05rem; padding: 9px 18px 7px; border-width: 3px; box-shadow: 0 4px 0 var(--ink); }
.btn.huge { font-size: 2rem; padding: 16px 48px 13px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 4px solid var(--ink); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap;
  background: var(--barn); color: #fff; font: 800 1.35rem/1.1 var(--display); padding: 7px 18px 5px 10px;
  border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); transform: rotate(-2deg);
}
.logo b { color: var(--sun); }
.ico { width: 2.1em; height: 1.4em; overflow: visible; flex: none; }
nav { display: flex; gap: 22px; }
nav a { text-decoration: none; font-weight: 800; font-size: 1rem; padding: 6px 2px; border-bottom: 4px solid transparent; white-space: nowrap; }
nav a:hover { border-color: var(--sun); }
.actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 3px solid var(--ink); border-radius: 99px; overflow: hidden; background: #fff; }
.lang button { border: 0; background: none; font: 800 .9rem var(--body); padding: 7px 11px; cursor: pointer; color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.menu { display: none; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; font-size: 1.2rem; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }

/* hero */
.hero { background: radial-gradient(circle at 70% 30%, #3f7be6, var(--blue) 40%, var(--navy)); color: #fff; padding: clamp(46px, 7vw, 84px) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; padding-bottom: clamp(50px, 7vw, 80px); }
.hero h1 { text-shadow: 0 5px 0 var(--ink); }
.hero h1 em { font-style: normal; color: var(--sun); display: inline-block; transform: rotate(-3deg); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pills li { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 4px 0 var(--ink); padding: 5px 14px; font-weight: 800; font-size: .95rem; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: min(100%, 470px); filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .25)); animation: vroom 2.4s ease-in-out infinite; }
.sun {
  position: absolute; width: min(92%, 440px); aspect-ratio: 1; border-radius: 50%; border: 5px solid var(--ink);
  background: repeating-conic-gradient(var(--sun) 0 15deg, #ffdf6b 15deg 30deg); box-shadow: 0 8px 0 var(--ink);
}
.bubble {
  position: absolute; top: 2%; right: 2%; background: #fff; color: var(--barn); font: 800 1.5rem/1 var(--display);
  padding: 12px 18px 9px; border: 4px solid var(--ink); border-radius: 22px 22px 22px 4px; box-shadow: 0 5px 0 var(--ink); transform: rotate(5deg);
}
@keyframes vroom { 50% { transform: translateY(-8px) rotate(-1deg); } }
.checker { height: 28px; background: conic-gradient(var(--ink) 25%, #fff 0 50%, var(--ink) 0 75%, #fff 0) 0 0 / 28px 28px; border-block: 4px solid var(--ink); }

/* road strip */
.road {
  height: 84px; background: repeating-linear-gradient(90deg, var(--sun) 0 46px, transparent 46px 92px) 0 50% / 100% 8px no-repeat, var(--road);
  border-bottom: 4px solid var(--ink); position: relative; overflow: hidden;
}
.roadcar { position: absolute; top: 50%; left: 0; width: 44px; height: 68px; margin-top: -34px; transform: rotate(90deg); animation: drive 9s linear infinite; }
@keyframes drive { from { left: -80px; } to { left: 100%; } }

/* bands */
.band.blue { background: radial-gradient(circle at 50% 0, var(--blue), var(--navy)); color: #fff; }
.band.yellow { background: var(--sun); }
.band.cream { background: var(--card); border-block: 4px solid var(--ink); }
.band.blue, .band.yellow { border-block: 4px solid var(--ink); }

/* how to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; padding: 30px 22px 22px; text-align: center; }
.step img { height: 150px; width: auto; margin: 0 auto 14px; object-fit: contain; }
.step p { color: var(--muted); margin: 0; }
.num {
  position: absolute; top: -22px; left: -10px; width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--sun); border: 4px solid var(--ink); border-radius: 50%; font: 800 1.7rem/1 var(--display); padding-top: 4px; transform: rotate(-8deg);
}
.step:nth-child(2) .num { background: #ff8f7f; }
.step:nth-child(3) .num { background: #9be08b; }

/* game peek */
.peek { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: clamp(28px, 6vw, 70px); align-items: center; }
.screen { background: var(--grass); border: 5px solid var(--ink); border-radius: 34px; box-shadow: 0 10px 0 var(--ink); overflow: hidden; aspect-ratio: 3 / 4; display: flex; flex-direction: column; }
.s-hud { display: flex; align-items: center; gap: 8px; padding: 12px; }
.s-hud img { width: 50px; height: 50px; background: #fff; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); flex: none; }
.s-say { flex: 1; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 3px 0 var(--ink); padding: 4px 14px; line-height: 1.1; }
.s-say b { display: block; font: 800 1.5rem/1.1 var(--display); color: var(--barn); }
.s-say span { font-size: .8rem; }
.s-pill { background: #fff3b0; border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink); padding: 4px 10px; font: 800 1.05rem var(--display); white-space: nowrap; }
.s-road {
  flex: 1; position: relative; margin: 0 14%;
  background: repeating-linear-gradient(var(--sun) 0 26px, transparent 26px 52px) 50% 0 / 6px 100% no-repeat, var(--road);
  border-inline: 5px solid #fff; animation: scroll .9s linear infinite;
}
@keyframes scroll { to { background-position: 50% 52px, 0 0; } }
.s-gates { position: absolute; top: 16%; left: -8%; right: -8%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.s-gates span { background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); font-size: clamp(2rem, 7vw, 2.8rem); text-align: center; padding: 6px 0; }
.s-gates .hit { background: #d9ffcf; border-color: #1c7a35; box-shadow: 0 5px 0 #1c7a35; animation: vroom 1.2s ease-in-out infinite; }
.s-car { position: absolute; bottom: 8%; left: 50%; width: 54px; height: 82px; margin-left: -27px; animation: steer 3s ease-in-out infinite; }
@keyframes steer { 0%, 100% { transform: translateX(-34px) rotate(-6deg); } 50% { transform: translateX(34px) rotate(6deg); } }

/* worlds */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 760px; margin: 0 auto 30px; }
.tab {
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); min-height: 58px; cursor: pointer;
  font: 800 1.15rem var(--display); color: var(--ink); padding: 6px 4px;
}
.tab:nth-child(1) { background: #ffe9a8; } .tab:nth-child(2) { background: #ffd0cb; }
.tab:nth-child(3) { background: #d3f5c8; } .tab:nth-child(4) { background: #e6d4ff; }
.tab[aria-pressed="true"] { background: #fff; transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); outline: 4px solid var(--sun); outline-offset: 1px; }
.worldgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.world {
  --wc: #5cc24f; color: var(--ink); text-align: center; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 7px 0 var(--ink);
  padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 216px; justify-content: space-between;
  background: linear-gradient(90deg, transparent 36%, var(--road) 36%, var(--road) 64%, transparent 64%), var(--wc);
  position: relative; overflow: hidden;
}
.world::before { content: ""; position: absolute; inset: 0 calc(50% - 2px); background: repeating-linear-gradient(var(--sun) 0 10px, transparent 10px 20px); }
.world > * { position: relative; }
.world .wi { font-size: 3rem; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); }
.world b { background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: 2px 12px 0; font: 800 1.05rem/1.3 var(--display); }
.world small { background: rgba(255, 255, 255, .88); border-radius: 8px; padding: 1px 8px; font-weight: 800; font-size: .8rem; }
.world .boss { background: var(--ink); color: #fff; border-radius: 12px; padding: 4px 8px; font-size: .78rem; font-weight: 800; line-height: 1.25; width: 100%; }
.world .boss i { font-style: normal; font-size: 1.2rem; display: block; }

/* meet mati */
.mati-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 6vw, 70px); align-items: center; }
.frame { background: #cfe1ff; border: 5px solid var(--ink); border-radius: 40px; box-shadow: 0 10px 0 var(--ink); padding: 26px 20px 0; transform: rotate(-2deg); overflow: hidden; }
.frame img { margin: 0 auto -12%; width: 86%; }
.moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0 0; }
.mood { margin: 0; padding: 14px 8px 10px; text-align: center; }
.mood img { height: 120px; width: auto; margin: 0 auto 8px; object-fit: contain; }
.mood figcaption { font: 800 1.05rem/1.15 var(--display); }
.mood:nth-child(1) { background: #d9ffcf; } .mood:nth-child(2) { background: #ffe1dc; } .mood:nth-child(3) { background: #fff3b0; }

/* garage */
.garage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.garage .card { padding: 24px; }
.rides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.rides .big { font-size: 2.8rem; display: block; line-height: 1.2; }
.rides b { font-size: .9rem; line-height: 1.2; display: block; }
.paint { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; text-align: center; font-weight: 800; font-size: .9rem; }
.paint i { display: block; width: 34px; height: 50px; margin: 0 auto 4px; border-radius: 12px; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.extras { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-weight: 800; }

/* parents */
.parents { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.checks li { padding-left: 46px; position: relative; color: var(--muted); }
.checks li b { color: var(--ink); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center;
  background: #9be08b; border: 3px solid var(--ink); border-radius: 50%; font-weight: 800; color: var(--ink); font-size: 1rem;
}
.parent-art img { width: min(100%, 320px); margin-inline: auto; }

/* faq */
.faq { display: grid; gap: 14px; }
.faq details { padding: 0 22px; box-shadow: 0 5px 0 var(--ink); border-width: 3px; border-radius: 20px; }
.faq summary { font: 800 1.25rem/1.2 var(--display); padding: 16px 30px 13px 0; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.8rem; color: var(--barn); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 0 0 18px; }

/* finish line */
.finish { background: var(--grass); color: #fff; padding-top: 0; text-align: center; }
.finish-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 50px; padding-top: clamp(50px, 8vw, 90px); }
.finish img { width: min(70%, 340px); filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .25)); }
.finish h2 { font-size: clamp(2.4rem, 6vw, 4rem); text-shadow: 0 4px 0 var(--ink); }
.finish p { font-size: 1.2rem; font-weight: 700; }
.stamp {
  display: inline-block; background: var(--sun); color: var(--ink); font: 800 1.2rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 18px 7px; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); transform: rotate(-4deg); margin-bottom: 18px;
}

footer { background: var(--ink); color: #c9d3e0; padding: 30px 0; font-size: .95rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }

@media (max-width: 1000px) {
  .menu { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--card); border-bottom: 4px solid var(--ink); padding: 6px 18px 14px; }
  nav.open { display: flex; }
  nav a { padding: 12px 0; font-size: 1.1rem; }
  .worldgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .hero-grid, .mati-grid, .parents, .peek { grid-template-columns: 1fr; }
  .hero-grid { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .cta, .pills { justify-content: center; }
  .hero-art { max-width: 420px; margin-inline: auto; }
  .steps, .garage { grid-template-columns: 1fr; gap: 34px; }
  .screen, .mati-photo, .parent-art { max-width: 340px; margin-inline: auto; width: 100%; }
  .parent-art { order: -1; max-width: 200px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .worldgrid, .tabs { grid-template-columns: repeat(2, 1fr); }
  .moods { gap: 10px; }
  .mood img { height: 84px; }
  .logo { font-size: 1.1rem; padding: 6px 12px 4px 6px; }
  .top .btn.go { display: none; }
  .btn.huge { font-size: 1.6rem; padding-inline: 34px; }
  .bubble { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
