:root {
  --wood: #ffebc2;
  --wood-light: #fff7e7;
  --cream: #fff9eb;
  --cream-deep: #ffe8b9;
  --brown: #9f4125;
  --brown-dark: #6f2b1e;
  --blue: #1fa8ef;
  --blue-deep: #087fc9;
  --red: #ff5258;
  --red-deep: #df242f;
  --mint: #32d6b4;
  --mint-deep: #0cad91;
  --yellow: #ffd02c;
  --yellow-deep: #f3a500;
  --pale: #dbeeff;
  --ink: #613425;
  --display: "Titan One", "Arial Rounded MT Bold", sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --gold-border: linear-gradient(145deg, #fff36a 0%, #ffd428 42%, #f4a600 100%);
  --soft-shadow: 0 22px 55px rgb(118 66 16 / 18%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--wood);
  background-image: linear-gradient(rgb(255 244 220 / 46%), rgb(255 232 187 / 46%)), url("assets/wood-background.webp");
  background-size: auto, 720px 720px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { text-wrap: balance; }
h1, h2, h3 { margin-top: 0; line-height: 1.05; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }

.skip-link {
  position: fixed;
  z-index: 200;
  top: 1rem;
  left: 1rem;
  padding: .65rem 1rem;
  border-radius: 12px;
  background: white;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  width: min(1180px, calc(100% - 40px));
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}
.brand { display: flex; align-items: center; gap: .75rem; color: var(--brown-dark); font-weight: 900; text-decoration: none; }
.brand img { border: 3px solid white; border-radius: 15px; box-shadow: 0 8px 18px rgb(120 65 16 / 20%); }
.site-header nav { display: flex; align-items: center; gap: 2rem; }
.site-header nav a { font-weight: 900; text-decoration: none; transition: transform .2s, color .2s; }
.site-header nav a:hover { color: var(--red-deep); transform: translateY(-2px); }
.site-header .play-small {
  padding: .68rem 1.2rem;
  border: 3px solid white;
  border-radius: 999px;
  color: white;
  background: linear-gradient(#43d98e, #24bd70);
  box-shadow: 0 7px 0 #168d52, 0 12px 24px rgb(18 118 67 / 22%);
}

.hero {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  min-height: 850px;
  margin: 0 auto;
  padding: 135px 0 80px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero::before, .hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
}
.hero::before { width: 520px; height: 520px; top: 100px; left: -350px; background: rgb(255 255 255 / 60%); }
.hero::after { width: 430px; height: 430px; right: -260px; bottom: 40px; background: rgb(50 214 180 / 17%); }

.eyebrow, .kicker {
  margin: 0 0 1rem;
  color: var(--red-deep);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-logo { width: min(650px, 100%); margin: -1rem 0 0 -1.7rem; filter: drop-shadow(0 22px 20px rgb(106 54 10 / 17%)); }
.hero-lede { max-width: 600px; margin: 0 0 2rem; color: #754737; font-size: clamp(1.08rem, 1.8vw, 1.3rem); font-weight: 700; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.store-badge {
  width: 190px;
  display: block;
  line-height: 0;
  transition: transform .2s, filter .2s;
}
.store-badge:hover { transform: translateY(-3px); filter: drop-shadow(0 10px 12px rgb(64 37 10 / 18%)); }
.store-badge img { width: 100%; }
.primary-button {
  min-width: 190px;
  padding: .74rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  border: 4px solid white;
  border-radius: 18px;
  color: white;
  background: linear-gradient(180deg, #27b6fb, var(--blue));
  box-shadow: 0 8px 0 var(--blue-deep), 0 17px 30px rgb(17 119 183 / 22%);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.08;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.primary-button:hover { transform: translateY(-3px); box-shadow: 0 10px 0 var(--blue-deep), 0 20px 32px rgb(17 119 183 / 24%); }
.primary-button small { display: block; font-size: .62rem; font-weight: 800; opacity: .8; }
.button-play { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--blue-deep); background: white; font-size: .8rem; }
.text-link { color: var(--brown); font-weight: 900; text-decoration: none; border-bottom: 2px solid rgb(159 65 37 / 26%); }

.hero-game { position: relative; justify-self: center; }
.phone-shell {
  position: relative;
  z-index: 2;
  width: min(390px, 75vw);
  padding: 13px;
  border: 5px solid #fffdf6;
  border-radius: 42px;
  background: linear-gradient(145deg, #ffdf70, #ffb800);
  box-shadow: 0 32px 65px rgb(105 61 13 / 28%), inset 0 2px 2px white;
  transform: rotate(2deg);
}
.phone-shell::after { position: absolute; inset: 9px; content: ""; border: 1px solid rgb(255 255 255 / 50%); border-radius: 28px; pointer-events: none; }
.phone-shell img { width: 100%; border-radius: 28px; }
.phone-speaker { position: absolute; z-index: 3; top: 23px; left: 50%; width: 60px; height: 7px; border-radius: 999px; background: rgb(113 62 28 / 30%); transform: translateX(-50%); }
.temporary-note { margin: 1rem 0 0; color: #92634d; font-size: .78rem; font-weight: 800; text-align: center; }
.temporary-note span { color: var(--red); }

.floating-tile {
  position: absolute;
  z-index: 4;
  width: 95px;
  aspect-ratio: 1;
  padding: 9px;
  border-radius: 25px;
  background: var(--gold-border);
  box-shadow: 0 16px 24px rgb(97 51 5 / 23%), inset 0 2px 2px white;
}
.floating-tile::before {
  display: block;
  width: 100%;
  height: 100%;
  content: "";
  border-radius: 17px;
  background: linear-gradient(145deg, rgb(255 255 255 / 52%), transparent 31%), var(--tile-color);
  box-shadow: inset 0 -8px 12px rgb(89 0 0 / 13%), inset 0 3px 4px white;
}
.tile-red { --tile-color: var(--red); top: 11%; right: -56px; transform: rotate(13deg); }
.tile-yellow { --tile-color: var(--yellow); bottom: 18%; left: -80px; width: 75px; transform: rotate(-12deg); }
.tile-mint { --tile-color: var(--mint); right: -70px; bottom: 7%; width: 72px; transform: rotate(24deg); }

.color-ribbon {
  min-height: 110px;
  padding: 1.2rem 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: white;
  background: var(--brown-dark);
  box-shadow: inset 0 8px 20px rgb(50 10 0 / 13%);
}
.color-ribbon span { width: 30px; height: 30px; border: 4px solid #ffd329; border-radius: 9px; box-shadow: inset 0 3px 4px rgb(255 255 255 / 70%); transform: rotate(45deg); }
.color-ribbon p { margin: 0 0 0 .7rem; font-family: var(--display); font-size: clamp(1rem, 2.6vw, 1.35rem); }
.ribbon-blue { background: var(--blue); }
.ribbon-red { background: var(--red); }
.ribbon-mint { background: var(--mint); }
.ribbon-yellow { background: var(--yellow); }

.section { padding: 105px max(24px, calc((100vw - 1160px) / 2)); }
.section-heading { max-width: 720px; margin: 0 auto 4rem; text-align: center; }
.section-heading h2, .tactile-copy h2, .cta-card h2 { margin-bottom: 1.2rem; color: var(--brown-dark); font-size: clamp(2.6rem, 5vw, 4.8rem); }
.section-heading h2 span, .tactile-copy h2 span, .cta-card h2 span { color: var(--red); }
.section-heading > p:last-child { margin: 0; color: #816154; font-size: 1.08rem; }

.how { background: rgb(255 250 239 / 83%); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.step-card {
  min-height: 340px;
  padding: 2rem;
  border: 4px solid white;
  border-radius: 30px;
  background: linear-gradient(145deg, #fffdf7, #ffefc9);
  box-shadow: var(--soft-shadow);
}
.step-card:nth-child(2) { transform: translateY(22px); }
.step-top { min-height: 145px; display: flex; align-items: flex-start; justify-content: space-between; }
.step-top > span { color: rgb(134 65 29 / 18%); font-family: var(--display); font-size: 3.3rem; }
.step-card h3 { margin-bottom: .7rem; color: var(--brown-dark); font-size: 1.4rem; }
.step-card p { margin: 0; color: #806055; }
.mini-rack { display: flex; gap: 7px; transform: translateY(25px) rotate(-4deg); }
.mini-rack i, .drag-demo i {
  width: 55px;
  height: 55px;
  border: 6px solid var(--yellow);
  border-radius: 14px;
  background: var(--blue);
  box-shadow: inset 0 4px 5px rgb(255 255 255 / 65%), 0 8px 13px rgb(100 55 8 / 17%);
}
.mini-rack i:nth-child(2) { background: var(--pale); transform: translateY(10px); }
.mini-rack i:nth-child(3) { background: var(--mint); }
.drag-demo { position: relative; width: 135px; height: 120px; }
.drag-demo i { position: absolute; right: 8px; bottom: 4px; background: var(--red); transform: rotate(6deg); }
.drag-demo b { position: absolute; top: 10px; left: 5px; color: var(--blue); font-size: 3.8rem; transform: rotate(-10deg); }
.merge-demo { width: 116px; display: grid; grid-template-columns: repeat(2, 54px); gap: 5px; transform: rotate(4deg); }
.merge-demo i { height: 54px; border: 5px solid var(--yellow); border-radius: 13px; background: var(--mint); box-shadow: inset 0 4px 5px rgb(255 255 255 / 62%); }
.merge-demo i:nth-child(2), .merge-demo i:nth-child(3) { background: var(--red); }

.tactile { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(3rem, 8vw, 8rem); overflow: hidden; }
.tactile-copy > p:not(.kicker) { color: #805c4f; font-size: 1.1rem; }
.tactile-copy ul { margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; list-style: none; font-weight: 900; }
.tactile-copy li { display: flex; align-items: center; gap: .8rem; }
.dot { width: 18px; height: 18px; border: 3px solid var(--yellow); border-radius: 6px; box-shadow: inset 0 2px 3px white; transform: rotate(45deg); }
.dot-blue { background: var(--blue); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--red); }
.material-board { position: relative; padding: 24px; border: 8px solid #ffc31a; border-radius: 38px; background: var(--blue); box-shadow: 0 30px 60px rgb(90 47 6 / 25%), inset 0 4px 9px rgb(255 255 255 / 65%); transform: rotate(2deg); }
.material-frame { min-height: 460px; padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 9px; border: 7px solid var(--yellow); border-radius: 23px; background: #ffedac; box-shadow: inset 0 8px 18px rgb(112 53 8 / 18%); }
.material-cell { border: 6px solid var(--yellow); border-radius: 20px; background: var(--cell-color); box-shadow: inset 0 10px 8px rgb(255 255 255 / 38%), inset 0 -10px 12px rgb(80 20 10 / 13%), 0 8px 10px rgb(80 41 5 / 18%); }
.material-cell.blue { --cell-color: var(--blue); }
.material-cell.red { --cell-color: var(--red); }
.material-cell.mint { --cell-color: var(--mint); }
.material-cell.yellow { --cell-color: var(--yellow); }
.material-cell.pale { --cell-color: var(--pale); }
.material-cell.wide { grid-column: span 2; }
.material-cell.tall { grid-row: span 2; }

.gallery { background: rgb(255 247 228 / 87%); }
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; gap: clamp(1.2rem, 3vw, 2.4rem); }
.level-card { margin: 0; padding: 13px; border: 5px solid white; border-radius: 32px; background: linear-gradient(145deg, #ffdd62, #ffb715); box-shadow: var(--soft-shadow); transform: rotate(-2deg); }
.level-card { grid-column: span 2; }
.level-card.featured { transform: translateY(-18px) rotate(1.4deg); }
.level-card-three { transform: rotate(2.5deg); }
.level-card-four { grid-column: 2 / span 2; transform: rotate(1.5deg); }
.level-card-five { grid-column: 4 / span 2; transform: rotate(-1.5deg); }
.level-card > img { width: 100%; aspect-ratio: 9 / 16; border-radius: 20px 20px 12px 12px; object-fit: cover; }
.placeholder-board { aspect-ratio: 9 / 15; padding: 15%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-content: center; gap: 7px; border-radius: 20px 20px 12px 12px; background: linear-gradient(145deg, #2cb8f3, #0a91dc); overflow: hidden; }
.placeholder-board span { min-width: 0; border: 4px solid var(--yellow); border-radius: 11px; background: var(--pale); box-shadow: inset 0 5px 5px rgb(255 255 255 / 52%), 0 5px 7px rgb(26 66 94 / 18%); }
.placeholder-board span:first-child { grid-column: span 2; background: var(--red); }
.placeholder-board span:nth-child(2) { grid-row: span 2; background: var(--mint); }
.placeholder-board span:nth-child(4) { grid-column: span 2; background: var(--red); }
.placeholder-board span:nth-child(5) { background: var(--mint); }
.level-card-two .placeholder-board span:first-child, .level-card-two .placeholder-board span:nth-child(5) { background: var(--yellow); }
.level-card-three .placeholder-board span:nth-child(3), .level-card-three .placeholder-board span:nth-child(4) { background: var(--blue); }
.level-card figcaption { padding: 1rem .7rem .45rem; color: var(--brown-dark); text-align: center; }
.level-card figcaption strong, .level-card figcaption span { display: block; }
.level-card figcaption span { margin-top: .25rem; color: #94674f; font-size: .78rem; font-weight: 800; }

.final-cta { background: rgb(255 250 240 / 74%); }
.cta-card { max-width: 1000px; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem); display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); border: 6px solid white; border-radius: 42px; background: linear-gradient(145deg, #ffefbd, #ffd878); box-shadow: 0 28px 70px rgb(97 52 6 / 18%); }
.cta-card > img { width: min(280px, 100%); border: 7px solid white; border-radius: 32%; box-shadow: 0 25px 50px rgb(105 53 6 / 25%); transform: rotate(-5deg); }
.cta-card > div > p:not(.kicker) { margin-bottom: 1.5rem; color: #7e5747; }

footer { padding: 35px max(24px, calc((100vw - 1160px) / 2)); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 3rem; color: rgb(255 255 255 / 70%); background: var(--brown-dark); font-size: .9rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; color: white; }
.footer-brand img { border: 2px solid white; border-radius: 13px; }
.footer-brand strong, .footer-brand span { display: block; line-height: 1.35; }
.footer-brand span { color: rgb(255 255 255 / 55%); font-size: .75rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: white; }
footer > p { margin: 0; white-space: nowrap; }

.reveal { transition: opacity .6s ease, transform .6s ease; }
.reveal-ready .reveal { opacity: 0; transform: translateY(25px); }
.reveal-ready .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 930px) {
  .hero { min-height: 1080px; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .hero-logo { margin-left: 0; }
  .steps { grid-template-columns: 1fr; max-width: 700px; margin: auto; }
  .step-card { min-height: 250px; }
  .step-card:nth-child(2) { transform: none; }
  .tactile { grid-template-columns: 1fr; }
  .tactile-copy { max-width: 700px; }
  .material-board { max-width: 700px; }
  footer { grid-template-columns: 1fr auto; }
  footer > p { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .site-header { width: calc(100% - 28px); min-height: 78px; }
  .brand span { display: none; }
  .site-header nav { gap: .7rem; }
  .site-header nav a:not(.play-small) { display: none; }
  .hero { width: calc(100% - 30px); min-height: auto; padding: 120px 0 80px; grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-logo { margin: -1rem auto 0; }
  .hero-actions { align-items: center; gap: .8rem; }
  .hero-game { margin-top: 2rem; }
  .phone-shell { width: min(350px, 76vw); }
  .tile-red { right: -25px; }
  .tile-yellow { left: -30px; }
  .tile-mint { right: -20px; }
  .color-ribbon { flex-wrap: wrap; }
  .color-ribbon span { width: 23px; height: 23px; }
  .color-ribbon p { width: 100%; margin: .45rem 0 0; text-align: center; }
  .section { padding: 78px 20px; }
  .section-heading { margin-bottom: 2.7rem; }
  .step-card { min-height: 320px; }
  .material-frame { min-height: 370px; }
  .gallery-grid { grid-template-columns: 1fr; max-width: 390px; margin: auto; gap: 2rem; }
  .level-card, .level-card.featured, .level-card-three, .level-card-four, .level-card-five { grid-column: auto; transform: none; }
  .cta-card { grid-template-columns: 1fr; text-align: center; border-radius: 30px; }
  .cta-card > img { width: 175px; margin: auto; }
  .cta-card .store-badge { margin-inline: auto; }
  footer { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .footer-brand, .footer-links { justify-content: center; }
  footer > p { grid-column: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .phone-shell { animation: phone-float 5.5s ease-in-out infinite; }
  .tile-red { animation: tile-float 4.4s ease-in-out infinite alternate; }
  .tile-yellow { animation: tile-float 5.1s .8s ease-in-out infinite alternate-reverse; }
  .tile-mint { animation: tile-float 4.8s .3s ease-in-out infinite alternate; }
  @keyframes phone-float { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(.8deg) translateY(-10px); } }
  @keyframes tile-float { to { translate: 0 -12px; rotate: 6deg; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
