@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("fonts/NunitoSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("fonts/NunitoSans-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --sky: #8ccdf2;
  --sky-deep: #3f8fcb;
  --paper: #fbf4e4;
  --paper-2: #f3e7cc;
  --ink: #2b2340;
  --muted: #5d5670;
  --gold: #f4b81c;
  --gold-deep: #b97f00;
  --leaf: #67bf6a;
  --leaf-deep: #3f9a47;
  --storm: #3d3852;
  --storm-2: #2a2638;
  --radius: 22px;
  /* Torn paper edges, used on every section boundary. */
  --tear-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V18L41 14L86 13L133 23L181 30L223 30L245 30L291 25L333 14L360 5L393 8L422 8L461 4L501 4L523 15L551 16L581 9L627 9L654 21L701 11L727 18L768 20L794 12L816 4L844 16L872 9L899 6L931 4L970 13L1012 7L1039 17L1067 17L1098 5L1131 6L1158 4L1188 4L1200 4V40z' fill='black'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--sky-deep); font-weight: 800; }
h1, h2, h3 { font-family: "Fredoka", "Nunito Sans", sans-serif; font-weight: 700; line-height: 1.1; margin: 0 0 0.35em; }
h2 { font-size: clamp(32px, 4.6vw, 48px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }

/* Header: floats over the hero, turns solid on paper pages. */
.top { position: absolute; inset: 0 0 auto 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: "Fredoka", sans-serif; font-size: 22px; white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 3px 0 rgba(0,0,0,0.2); }
.top nav { display: flex; gap: 22px; }
.top nav a { color: #fff; text-decoration: none; font-size: 15px; text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.top.solid { position: sticky; top: 0; background: var(--paper); border-bottom: 3px dashed var(--gold); }
.top.solid .brand, .top.solid nav a { color: var(--ink); text-shadow: none; }

/* Section rhythm: every band is a sheet of paper with a torn top edge. */
.band { position: relative; padding: 90px 0 100px; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: -26px; height: 28px; background: inherit; -webkit-mask: var(--tear-top) center / 100% 100% no-repeat; mask: var(--tear-top) center / 100% 100% no-repeat; }
.band.paper { background: var(--paper); }
.band.paper-2 { background: var(--paper-2); }
.band.sky { background: var(--sky); }
.band.storm { background: var(--storm); color: #fff; }
.band.storm p { color: #d9d4ea; }

.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: "Fredoka", sans-serif; color: var(--gold-deep); font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.kicker::before, .kicker::after { content: "×××"; letter-spacing: 0.1em; color: var(--gold); }
.storm .kicker { color: var(--gold); }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--storm-2); }
.hero .picture { position: relative; }
.hero .picture img { width: 100%; height: min(78vh, 46vw); min-height: 340px; object-fit: cover; object-position: 50% 35%; }
.hero .picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,38,56,0.45) 0%, rgba(42,38,56,0) 18%, rgba(42,38,56,0) 62%, var(--storm-2) 100%); }
.hero .content { position: relative; z-index: 2; margin-top: -90px; padding: 0 0 100px; text-align: center; }
.hero .logo { width: min(560px, 86%); margin: 0 auto 10px; filter: drop-shadow(0 8px 0 rgba(0,0,0,0.25)); }
.hero .tag { font-family: "Fredoka", sans-serif; font-size: clamp(22px, 3vw, 30px); margin: 0 0 24px; text-shadow: 0 3px 0 rgba(0,0,0,0.4); }
.hero + .band::before { top: -27px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: "Fredoka", sans-serif; font-size: 20px; line-height: 1.1; color: var(--ink); text-decoration: none;
  background: var(--gold); padding: 15px 30px; border-radius: 999px; border: 3px solid #fff;
  box-shadow: 0 6px 0 var(--gold-deep), 0 14px 28px rgba(0,0,0,0.25); transition: transform 0.1s;
}
.btn:hover { transform: translateY(-2px); }
.btn small { display: block; font-family: "Nunito Sans", sans-serif; font-weight: 800; font-size: 12px; opacity: 0.75; }
.btn.ghost { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.75); box-shadow: none; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Story: three panels like pages of a book. */
.story { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.panel { background: #fff; padding: 12px 12px 18px; border-radius: 16px; box-shadow: 0 4px 0 #e6d8b8, 0 18px 36px rgba(43,35,64,0.16); }
.panel:nth-child(1) { transform: rotate(-1.6deg); }
.panel:nth-child(3) { transform: rotate(1.4deg); }
.panel img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.panel p { margin: 14px 6px 0; font-size: 16px; color: var(--muted); }
.panel b { display: block; font-family: "Fredoka", sans-serif; font-weight: 700; color: var(--ink); font-size: 20px; margin-bottom: 2px; }

/* Play: phone with real gameplay beside three steps. */
.play { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
.device { justify-self: center; width: min(420px, 100%); padding: 14px; background: var(--ink); border-radius: 44px; box-shadow: 0 30px 60px rgba(43,35,64,0.35); transform: rotate(-2deg); }
.device img { border-radius: 32px; aspect-ratio: 2007 / 2853; object-fit: cover; }
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.steps .num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--ink); font-family: "Fredoka", sans-serif; font-size: 26px; border: 3px dashed #fff; box-shadow: 0 4px 0 var(--gold-deep); }
.steps h3 { margin: 4px 0 2px; }
.steps p { margin: 0; color: var(--muted); font-size: 17px; }

/* Cast: monsters stand on a stitched shelf line. */
.cast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 46px 24px; margin-top: 46px; }
.monster { text-align: center; }
.monster .stand { height: 150px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 4px dashed var(--gold); padding-bottom: 10px; }
.monster .fig { position: relative; display: inline-block; line-height: 0; transition: transform 0.25s; filter: drop-shadow(0 10px 8px rgba(43,35,64,0.18)); }
.monster img { max-height: 140px; width: auto; }
.monster .fig .blink { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; opacity: 0; }
.monster:hover .fig { transform: translateY(-8px) rotate(-3deg); }
.monster:hover .fig .blink { animation: blink 1.6s steps(1, end) infinite; }
@keyframes blink { 0%, 100% { opacity: 0; } 8% { opacity: 1; } 16% { opacity: 0; } 24% { opacity: 1; } 32% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .monster:hover .fig { transform: none; } .monster:hover .fig .blink { animation: none; } }
.monster h3 { margin: 14px 0 0; font-size: 21px; }
.monster p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* Gadgets */
.gadgets { display: grid; grid-template-columns: repeat(7, 1fr); gap: 18px; margin-top: 44px; }
.gadget { text-align: center; }
.gadget .chip { width: 100%; aspect-ratio: 1 / 1; height: auto; box-sizing: border-box; overflow: hidden; border-radius: 50%; background: var(--paper); display: grid; place-items: center; padding: 18%; border: 3px dashed var(--gold); box-shadow: 0 6px 0 #d9c9a4; }
.gadget .chip { position: relative; }
.gadget img { position: absolute; inset: 17%; width: 66%; height: 66%; object-fit: contain; }
.gadget h3 { font-size: 17px; margin: 12px 0 2px; white-space: nowrap; }
.gadget p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.35; white-space: nowrap; }
.gadget.star .chip { background: #fff3cf; border-color: var(--gold-deep); }

/* Daily Storm */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.art { border-radius: var(--radius); box-shadow: 0 24px 50px rgba(0,0,0,0.3); }
.share { margin-top: 24px; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 18px 22px; font-family: 'Fredoka', 'Nunito Sans', system-ui, sans-serif; font-weight: 700; font-size: 16px; letter-spacing: 0.01em; line-height: 1.6; white-space: pre-line; border: 3px dashed var(--gold); max-width: 420px; }
.rules { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.rules li { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* Holidays */
.events { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.event { background: #fff; border-radius: 18px; padding: 22px 26px; box-shadow: 0 4px 0 #e6d8b8; border-left: 8px solid var(--gold); }
.event.snow { border-left-color: var(--sky-deep); }
.event .when { font-weight: 800; color: var(--gold-deep); font-size: 15px; }
.event.snow .when { color: var(--sky-deep); }
.event p { margin: 4px 0 0; color: var(--muted); }

/* Closing call to action */
.cta { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 140px 0 150px; background: var(--storm-2); }
.cta > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta::after { content: ""; position: absolute; inset: 0; background: rgba(20,16,36,0.55); }
.cta .content { position: relative; z-index: 2; }
.cta h2 { text-shadow: 0 4px 0 rgba(0,0,0,0.4); }
.cta p { font-size: 20px; margin-bottom: 26px; }

/* Text pages (privacy, support, challenge, 404) */
.page { background: var(--sky); min-height: 100vh; }
.doc { padding: 50px 0 70px; }
.paper { background: var(--paper); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); box-shadow: 0 6px 0 #e6d8b8, 0 18px 40px rgba(43,35,64,0.18); position: relative; }
.paper.stitched::after { content: ""; position: absolute; inset: 10px; border: 3px dashed var(--gold); border-radius: calc(var(--radius) - 8px); pointer-events: none; }
.doc .paper { max-width: 820px; margin: 0 auto; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); }
.doc h2 { font-size: 26px; margin-top: 1.4em; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.meta { color: var(--muted); font-size: 15px; }
details { border-bottom: 2px dashed #e6d8b8; padding: 12px 0; }
details summary { font-family: "Fredoka", sans-serif; font-size: 19px; cursor: pointer; list-style: none; }
details summary::before { content: "+ "; color: var(--gold-deep); }
details[open] summary::before { content: "– "; }
details p { margin: 10px 0 0; color: var(--muted); }
.page .btn.ghost { color: var(--ink); border-color: var(--ink); }

footer { background: var(--storm-2); color: #cfc9e2; padding: 34px 0 40px; font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; }
footer a { color: #fff; }

@media (max-width: 900px) {
  .gadgets { grid-template-columns: repeat(4, 1fr); }
  .cast { grid-template-columns: repeat(2, 1fr); }
  .play, .split { grid-template-columns: 1fr; gap: 40px; }
  .story { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .panel:nth-child(n) { transform: none; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .top nav a.opt { display: none; }
  .top nav { gap: 14px; }
  .brand { font-size: 18px; }
  .brand img { width: 34px; height: 34px; }
  .hero .content { margin-top: -50px; }
  .story { max-width: 300px; }
  .gadgets { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .gadget h3 { font-size: 14px; }
  .gadget p { display: none; }
  .events { grid-template-columns: 1fr; }
  .band { padding: 70px 0 80px; }
  .hero .content { padding-bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
