/* Design tokens follow the JollyRoll Figma style guide (Sugamu Studio, Nov 2026). */

@font-face { font-family: "Jua"; src: url(assets/fonts/Jua-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Dongle"; src: url(assets/fonts/Dongle-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Dongle"; src: url(assets/fonts/Dongle-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --inkwell: #2F384A;
  --muted: #828892;
  --milk: #F8F8F6;
  --milk-20: #C6C6C5;
  --denim: #4A72B6;
  --denim-10: #4367A4;
  --denim-20: #3B5B92;
  --daydream: #ACDBFB;
  --daydream-10: #9BC5E2;
  --daydream-20: #8AAFC9;
  --sunbeam: #FEAE4A;
  --sunbeam-30: #FEC680;
  --sunbeam-20: #CB8B3B;
  --poolside: #7BD4DA;
  --bubblegum: #FE7BA7;
  --sand: #F3E9DA;

  --jua: "Jua", system-ui, sans-serif;
  --dongle: "Dongle", system-ui, sans-serif;

  /* 3.4 type scale, scaled from the game's 1080p UI to web size */
  --s: .75;
  --display-1: calc(128px * var(--s));
  --display-2: calc(80px * var(--s));
  --button-1: calc(72px * var(--s));
  --button-2: calc(48px * var(--s));
  --heading-1: calc(60px * var(--s));
  --body-1: calc(48px * var(--s));
  --body-2: calc(32px * var(--s));

  --drop: 0 4px 8px rgba(0, 0, 0, .25);
  --display-shadow: 0 2px 4px rgba(0, 0, 0, .25);
  --stroke: linear-gradient(#FFFFFF, var(--milk-20));
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  font-family: var(--dongle);
  font-size: var(--body-1);
  line-height: .8;
  color: var(--inkwell);
  background-color: var(--daydream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }

/* --- Icons --- */

.icon {
  display: inline-block;
  flex: none;
  width: .8em;
  height: .8em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* --- 4.3 Buttons --- */

.btn {
  --face: var(--denim);
  --base: var(--denim-20);
  --text: var(--milk);
  --face-pressed: var(--denim-10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  padding: calc(24px * var(--s) + .1em) calc(48px * var(--s)) calc(24px * var(--s));
  border-radius: 24px;
  font-family: var(--dongle);
  font-weight: 700;
  font-size: var(--button-2);
  line-height: .6;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--face);
  box-shadow: 0 4px 0 var(--base), 0 8px 8px rgba(0, 0, 0, .25);
  position: relative;
  transition: transform .08s ease, box-shadow .08s ease, background .08s ease;
}

.btn .icon { margin-top: -.18em; }

.btn:active { background: var(--face-pressed); transform: translateY(4px); box-shadow: 0 0 0 var(--base), 0 4px 4px rgba(0, 0, 0, .25); }

.btn-secondary {
  --face: var(--daydream);
  --base: var(--daydream-20);
  --text: var(--inkwell);
  --face-pressed: var(--daydream-10);
}

.btn-large { font-size: var(--button-1); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: var(--milk);
  background: var(--denim);
  box-shadow: 0 4px 0 var(--denim-20), 0 8px 8px rgba(0, 0, 0, .25);
  position: relative;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}

.icon-btn .icon { width: 28px; height: 28px; }

.icon-btn:active { background: var(--denim-10); transform: translateY(4px); box-shadow: 0 0 0 var(--denim-20), 0 4px 4px rgba(0, 0, 0, .25); }

/* --- Crayon hover outline (the game's SelectedOutline sprite) --- */

/* The sprite's ring sits 42/108 of the slice in from its edge, with an inner corner radius of 96/108 of the slice.
   --ring-w is chosen per shape so the ring's inner corner matches the shape's corner radius. */

.btn, .shot { --ring-w: 25px; --ring-gap: -1px; --ring-base: 4px; }
.shot { --ring-base: 0px; }
.icon-btn { --ring-w: 32px; --ring-gap: 0px; --ring-base: 4px; }
.shot-main { --ring-w: 40px; --ring-gap: -6px; }
.trailer-play { --ring-w: 58px; --ring-gap: -2px; }

.btn::after, .icon-btn::after, .shot::after {
  --ring-in: calc(var(--ring-w) * 42 / 108 + var(--ring-gap));
  content: "";
  position: absolute;
  inset: calc(var(--ring-in) * -1) calc(var(--ring-in) * -1) calc((var(--ring-in) + var(--ring-base)) * -1);
  border: var(--ring-w) solid transparent;
  border-image: url(assets/img/crayon-outline.png) 108 / var(--ring-w) stretch;
  pointer-events: none;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .12s ease, transform .25s cubic-bezier(.3, 1.6, .5, 1);
}

.btn:hover::after, .btn:focus-visible::after,
.icon-btn:hover::after, .icon-btn:focus-visible::after,
.shot:hover::after, .shot:focus-visible::after { opacity: 1; transform: scale(1); }

.btn:active, .icon-btn:active { --ring-base: 0px; }

.btn:focus-visible, .icon-btn:focus-visible, .shot:focus-visible { outline: none; }

/* --- Top bar --- */

.topbar {
  position: fixed;
  inset: 16px 16px auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 18px 14px 28px;
  border-radius: 999px;
  border: 4px solid transparent;
  background: url(assets/img/paper.webp) padding-box, var(--stroke) border-box;
  background-size: 300px, auto;
  box-shadow: var(--drop);
  transform: translateY(calc(-100% - 24px));
  transition: transform .35s cubic-bezier(.2, 1.4, .4, 1);
}

.topbar.is-visible { transform: translateY(0); }

.topbar-logo { flex: none; }

.topbar-logo img { width: 200px; height: auto; }

.topbar-nav { display: flex; gap: 32px; margin-right: auto; }

.topbar-nav a { font-weight: 700; font-size: var(--button-2); line-height: .6; text-decoration: none; color: var(--denim); padding-top: .15em; }

.topbar-nav a:hover { color: var(--inkwell); }

.topbar-actions { display: flex; align-items: center; gap: 16px; }

/* --- Hero --- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 120px 24px 100px;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(248, 248, 246, .55) 0%, rgba(248, 248, 246, 0) 60%);
}

.hero-content { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 36px; }

.hero-logo { margin: 0; width: min(720px, 86vw); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); animation: bob 4s ease-in-out infinite; }

.hero-tagline {
  font-family: var(--jua);
  font-size: var(--display-2);
  line-height: 1;
  padding: 16px 40px 12px;
  border-radius: 999px;
  border: 4px solid transparent;
  background: url(assets/img/paper.webp) padding-box, var(--stroke) border-box;
  background-size: 300px, auto;
  box-shadow: var(--drop);
  text-shadow: var(--display-shadow);
}

.hero-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }


@keyframes bob { 50% { transform: translateY(-10px) rotate(-1deg); } }

/* --- 4.4 Popups and containers --- */

.section { max-width: 1180px; margin: 0 auto; padding: 72px 24px; display: flex; flex-direction: column; align-items: center; }

.popup {
  width: 100%;
  padding: 80px;
  border-radius: 48px;
  border: 4px solid transparent;
  background: url(assets/img/paper.webp) padding-box, var(--stroke) border-box;
  background-size: 420px, auto;
  box-shadow: 0 8px 0 var(--milk-20), 0 12px 8px rgba(0, 0, 0, .25);
  text-align: center;
}

.display {
  margin: 0 auto 20px;
  max-width: 22ch;
  font-family: var(--jua);
  font-weight: 400;
  font-size: var(--display-2);
  line-height: 1;
  text-shadow: var(--display-shadow);
}

.lead { color: var(--denim); margin-bottom: 48px; }

.about .display { margin-bottom: 44px; }

.section-title { margin-bottom: 40px; }

.pill {
  display: inline-block;
  padding: .3em .7em .15em;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--body-1);
  line-height: .6;
  white-space: nowrap;
}

.pill-daydream { background: var(--daydream); }


/* --- About --- */

.trailer {
  margin: 0 auto 48px;
  border: 8px solid #fff;
  border-radius: 48px;
  overflow: hidden;
  background: var(--inkwell);
  box-shadow: var(--drop);
}

.trailer { position: relative; }

.trailer-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--inkwell); }

.trailer-play { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; }

.trailer-play .play-icon { width: 0; height: 0; margin-left: 8px; border-style: solid; border-width: 22px 0 22px 36px; border-color: transparent transparent transparent var(--milk); }

.trailer.is-playing .trailer-play { display: none; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; text-align: left; }

.feature {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  background: var(--sand);
}

.feature p { margin-top: 12px; }

.feature-wide { grid-column: 1 / -1; }

.feature-marble { position: relative; width: 84px; height: 84px; flex: none; background: var(--glass) center / contain no-repeat; }

.feature-marble::before,
.feature-marble::after { content: ""; position: absolute; inset: 0; background: center / contain no-repeat; }

.feature-marble::before { background-image: var(--core); }

.feature-marble::after { background-image: var(--shine); }

.marble-blue { --glass: url(assets/img/marble-blue-glass.webp); --core: url(assets/img/marble-blue-core.webp); --shine: url(assets/img/marble-blue-shine.webp); }
.marble-red { --glass: url(assets/img/marble-red-glass.webp); --core: url(assets/img/marble-red-core.webp); --shine: url(assets/img/marble-red-shine.webp); }
.marble-green { --glass: url(assets/img/marble-green-glass.webp); --core: url(assets/img/marble-green-core.webp); --shine: url(assets/img/marble-green-shine.webp); }
.marble-orange { --glass: url(assets/img/marble-orange-glass.webp); --core: url(assets/img/marble-orange-core.webp); --shine: url(assets/img/marble-orange-shine.webp); }
.marble-symbol { --glass: url(assets/img/marble-symbol-glass.webp); --core: url(assets/img/marble-symbol-core.webp); --shine: url(assets/img/marble-symbol-shine.webp); }


.feature-marble.is-rolling { animation: marble-shift 1.1s cubic-bezier(.45, 0, .25, 1); }

.feature-marble.is-rolling::before { animation: marble-spin 1.1s cubic-bezier(.45, 0, .25, 1); }

@keyframes marble-shift { 50% { transform: translateX(8px); } }

@keyframes marble-spin { 50% { transform: rotate(200deg); } 100% { transform: rotate(360deg); } }

/* --- Screenshots --- */

.gallery { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.shot {
  padding: 0;
  border: 6px solid #fff;
  border-radius: 24px;
  position: relative;
  background: #fff;
  box-shadow: var(--drop);
  cursor: zoom-in;
  transition: transform .15s ease;
}

.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; }

.shot:hover, .shot:focus-visible { transform: rotate(-.6deg); }

.shot-main { grid-column: 1 / -1; border-width: 8px; border-radius: 48px; }

.shot-main img { border-radius: 40px; }

.lightbox {
  max-width: min(1400px, 94vw);
  padding: 0;
  border: 8px solid #fff;
  border-radius: 48px;
  background: #fff;
  box-shadow: var(--drop);
  overflow: visible;
}

.lightbox::backdrop { background: rgba(47, 56, 74, .7); }

.lightbox img { border-radius: 40px; }

.lightbox-close { position: absolute; top: -22px; right: -22px; font-family: var(--jua); font-size: 36px; line-height: 1; padding-top: 4px; }

/* --- Say hello --- */

.hello .lead { max-width: 56ch; margin: 0 auto 44px; }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 52px; }

.socials .btn { padding-inline: calc(32px * var(--s)); }

@media (min-width: 901px) { .hello { padding-inline: 32px; } }

/* --- Team --- */

.team-intro { margin: -8px 0 44px; color: var(--denim); text-align: center; }

.team { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 24px;
  border-radius: 48px;
  border: 4px solid transparent;
  background: url(assets/img/paper.webp) padding-box, var(--stroke) border-box;
  background-size: 420px, auto;
  box-shadow: 0 8px 0 var(--milk-20), 0 12px 8px rgba(0, 0, 0, .25);
  text-align: center;
  flex: 0 1 calc((100% - 64px) / 3);
}

.member h3 { margin: 10px 0 0; font-size: var(--heading-1); line-height: .6; }

.portrait { width: 200px; height: 200px; border-radius: 50%; overflow: hidden; border: 6px solid #fff; box-shadow: var(--drop); }

.portrait-denim { background: var(--daydream); }
.portrait-bubblegum { background: var(--bubblegum); }
.portrait-poolside { background: var(--poolside); }
.portrait-sunbeam { background: var(--sunbeam); }

.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* --- Footer --- */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 24px;
  margin-top: 40px;
  border-top: 4px solid #fff;
  background: url(assets/img/paper.webp);
  background-size: 420px;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, .12);
  color: var(--muted);
}

.footer span { font-weight: 700; font-size: var(--body-2); line-height: .6; }

.footer img { width: 170px; }

.footer small { font-size: var(--body-2); line-height: .8; }

.footer small a { color: var(--denim); }

/* --- Privacy policy --- */

.page-plain { display: flex; flex-direction: column; min-height: 100svh; }

.policy-section { padding-top: 150px; width: 100%; flex: 1; }

.policy { text-align: left; max-width: 1000px; }

.policy .display { margin: 0 0 32px; max-width: none; }

.policy h2 {
  margin: 48px 0 16px;
  font-size: var(--heading-1);
  font-weight: 700;
  line-height: .6;
  padding-top: .15em;
}

.policy p, .policy li { line-height: .8; }

.policy p + p { margin-top: 16px; }

.policy ul { list-style: disc; padding-left: 1.1em; margin: 16px 0; }

.policy li + li { margin-top: 10px; }

.policy li::marker { color: var(--sunbeam); }

.policy a { color: var(--denim); }

.policy strong { font-weight: 700; }

.policy-table { margin-top: 20px; border-radius: 24px; overflow: hidden; background: var(--sand); }

.policy table { width: 100%; border-collapse: collapse; }

.policy th, .policy td { padding: 14px 20px 10px; text-align: left; vertical-align: top; line-height: .8; }

.policy th { font-weight: 700; color: var(--milk); background: var(--denim); }

.policy td:first-child { font-weight: 700; white-space: nowrap; }

.policy tbody tr + tr td { border-top: 2px solid rgba(47, 56, 74, .08); }

/* --- Responsive --- */

@media (max-width: 1100px) {
  .topbar-logo img { width: 200px; }
  .topbar-nav { gap: 20px; }
}

@media (max-width: 900px) {
  :root { --s: .65; }
  .topbar-nav { display: none; }
  .topbar-actions { margin-left: auto; }
  .popup { padding: 56px 32px; }
  .features { grid-template-columns: 1fr; }
  .team { max-width: 420px; }
  .member { flex-basis: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 520px) {
  :root { --s: .6; }
  .topbar { inset: 10px 10px auto; padding: 10px 12px 10px 20px; gap: 12px; }
  .topbar .icon-btn, .topbar .btn .icon { display: none; }
  .topbar .btn { padding-inline: 20px; }
  .hero-buttons .btn, .popup .btn-large { padding-inline: 16px; }
  .popup .btn-large { font-size: var(--button-2); }
  .display { font-size: calc(var(--display-2) * .8); }
  .hero-tagline { border-radius: 32px; padding: 14px 24px 10px; }
  .hero-buttons { flex-direction: column; align-items: stretch; width: 100%; gap: 22px; }
  .section { padding: 56px 16px; }
  .popup { padding: 44px 20px 48px; }
  .policy-section { padding-top: 110px; }
  .policy-table { overflow-x: auto; }
  .policy td:first-child { white-space: normal; }
  .policy th, .policy td { padding: 12px 12px 8px; }
  .feature { flex-direction: column; text-align: center; padding: 20px 16px; }
  .feature-marble { width: 64px; height: 64px; }
  .shot { border-width: 4px; border-radius: 18px; }
  .shot img { border-radius: 14px; }
  .shot-main { border-radius: 28px; }
  .shot-main img { border-radius: 24px; }
  .trailer { border-width: 4px; border-radius: 28px; margin-bottom: 32px; }
  .trailer-play { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
  .shot { --ring-w: 20px; }
  .shot-main { --ring-w: 28px; --ring-gap: -3px; }
  .trailer-play { --ring-w: 40px; }
  .trailer-play .play-icon { border-width: 15px 0 15px 24px; margin-left: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
