/* Yoploo studio site. Same look as Fair Ludo: purple night (dark, default) and sunny sky (light), Fredoka, candy buttons.
   Follows the system light/dark setting. No scripts anywhere on the site. */

@font-face {
  font-family: Fredoka; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/fredoka-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Fredoka; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/fredoka-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --sky-1: #4b3bd6; --sky-2: #2a1f7a; --sky-3: #170f4d; --dot: rgba(255, 255, 255, .10);
  --ink: #ffffff; --muted: rgba(255, 255, 255, .82); --heading: #ffffff;
  --card: rgba(255, 255, 255, .10); --card-2: rgba(255, 255, 255, .16); --line: rgba(255, 255, 255, .18);
  --dark-ink: #1e1648; --link: #ffe27a; --focus: #ffd84d;
  --red: #f2394a; --green: #1fb45a; --yellow: #ffc21a; --blue: #2e8bf0;
  --red-d: #b51f2e; --green-d: #128041; --yellow-d: #c98f00; --blue-d: #1a5fb0;
  --gold-d: #d59f00; --shadow: 0 6px 20px rgba(10, 4, 40, .35);
  --draft: #ffe27a; --draft-bg: rgba(255, 216, 77, .14);
  font-family: Fredoka, ui-rounded, "Segoe UI Rounded", "Segoe UI", system-ui, sans-serif;
}
/* Day = sunny sky. Used when the system is in light mode, unless the visitor picked night with the switch
   (assets/theme.js sets data-theme on <html>), or whenever they picked day. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --sky-1: #c9ecff; --sky-2: #7fd0ff; --sky-3: #4fabf3; --dot: rgba(255, 255, 255, .45);
    --ink: #1e1648; --muted: #2a2256; --heading: #1e1648;
    --card: rgba(255, 255, 255, .86); --card-2: #ffffff; --line: rgba(30, 22, 72, .12);
    --link: #24168a; --focus: #24168a; --shadow: 0 6px 20px rgba(20, 60, 120, .18);
    --draft: #6b4a00; --draft-bg: #fff1c4;
  }
}
:root[data-theme='light'] {
  color-scheme: light;
  --sky-1: #c9ecff; --sky-2: #7fd0ff; --sky-3: #4fabf3; --dot: rgba(255, 255, 255, .45);
  --ink: #1e1648; --muted: #2a2256; --heading: #1e1648;
  --card: rgba(255, 255, 255, .86); --card-2: #ffffff; --line: rgba(30, 22, 72, .12);
  --link: #24168a; --focus: #24168a; --shadow: 0 6px 20px rgba(20, 60, 120, .18);
  --draft: #6b4a00; --draft-bg: #fff1c4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-size: 1.0625rem; line-height: 1.5;
  background:
    radial-gradient(circle at 20% 10%, var(--dot) 0 2px, transparent 3px) 0 0 / 34px 34px,
    radial-gradient(120% 80% at 50% 0%, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 100%);
  background-color: var(--sky-3); background-attachment: scroll;
  display: flex; flex-direction: column;
}
main { flex: 1; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; }
ul { padding-left: 1.2em; }
li { margin-bottom: .35em; }

.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: #ffd84d; color: var(--dark-ink); padding: 10px 16px;
        border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header + nav */
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; padding: 4px; }
.brand img { height: 52px; width: auto; display: block; }
.site-head nav { margin-left: auto; }
/* Day/night switch: shows the moon by day (tap for night) and the sun by night. */
.theme-toggle { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
                background: var(--card-2); color: var(--ink); box-shadow: inset 0 -3px 0 var(--line); }
.theme-toggle:hover { background: var(--card); }
.theme-toggle[hidden], .theme-toggle[data-mode='day'] .sun, .theme-toggle[data-mode='night'] .moon { display: none; }
.theme-toggle svg { width: 24px; height: 24px; }
@media (max-width: 699px) { .site-head nav { order: 3; flex-basis: 100%; margin-left: 0; } .theme-toggle { margin-left: auto; } }
.nav { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { display: inline-block; padding: 10px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--card); }
.nav a[aria-current='page'] { background: var(--card-2); box-shadow: inset 0 -3px 0 var(--line); }
@media (max-width: 374px) { .nav { gap: 0; } .nav a { padding: 10px 6px; } }

/* Sections */
section { padding: 28px 0; }
.hero { padding: 24px 0 36px; }
.hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 820px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.lede { font-size: clamp(1.1rem, 3.2vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.kicker { display: inline-block; font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase;
          padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; }
.muted { color: var(--muted); }
.center { text-align: center; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
/* A lone card on the last row of a feature grid spans the row instead of leaving a gap. */
@media (min-width: 640px) and (max-width: 899px) { .grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 900px) { .grid.three > :last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
@media (min-width: 640px) and (max-width: 899px) { .grid.four { grid-template-columns: 1fr 1fr; } }

.badge { display: inline-block; font-size: .85rem; font-weight: 600; padding: 3px 12px; border-radius: 999px; color: var(--dark-ink);
         background: #ffd84d; box-shadow: inset 0 -2px 0 var(--gold-d); }
.dot { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 10px;
       color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.dot.red { background: var(--red); } .dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.blue { background: var(--blue); }
.dot svg { width: 24px; height: 24px; }

/* Candy buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border-radius: 18px;
       font: inherit; font-size: 1.1rem; font-weight: 600; text-decoration: none; color: var(--dark-ink);
       background: linear-gradient(#ffe36b, #ffbf1a); box-shadow: inset 0 -5px 0 var(--gold-d), 0 4px 12px rgba(0, 0, 0, .22); }
.btn:hover { background: linear-gradient(#ffeb8f, #ffc838); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--gold-d); }
.btn.secondary { color: var(--ink); background: var(--card-2); box-shadow: inset 0 -4px 0 var(--line), 0 4px 12px rgba(0, 0, 0, .12); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }

/* Game card on the home page */
.game-card { display: grid; gap: 18px; align-items: center; }
@media (min-width: 700px) { .game-card { grid-template-columns: 260px 1fr; } }
.game-card .art { border-radius: 20px; overflow: hidden; background: #2a1f7a; aspect-ratio: 1; }
.game-card h3 { font-size: 1.6rem; margin-bottom: .3em; }
.more-soon { border-style: dashed; box-shadow: none; display: grid; place-items: center; text-align: center; min-height: 120px; }

/* Illustrations */
.board-art { display: block; width: 100%; height: auto; }
.hero-art { max-width: 420px; justify-self: center; width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .bob { animation: bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
  .bob.b2 { animation-delay: -.8s; } .bob.b3 { animation-delay: -1.6s; } .bob.b4 { animation-delay: -2.4s; }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
}

/* CTA band */
.cta { text-align: center; padding: 28px 20px; }
.cta p { max-width: 52ch; margin-left: auto; margin-right: auto; }

/* Steps (fair dice) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 62px; margin: 0; background: var(--card); border: 2px solid var(--line); border-radius: 18px; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
                    display: grid; place-items: center; font-weight: 700; color: var(--dark-ink); background: #ffd84d; box-shadow: inset 0 -3px 0 var(--gold-d); }
.note { border-left: 6px solid #ffd84d; }

/* Screenshot placeholders */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shot { aspect-ratio: 9 / 19; border-radius: 26px; border: 3px dashed var(--line); background: var(--card); display: grid; place-items: center;
        text-align: center; padding: 10px; color: var(--muted); font-size: .9rem; }
@media (max-width: 480px) { .shots { grid-template-columns: 1fr 1fr; } .shot:nth-child(3) { display: none; } }

/* Long text pages (privacy, support) */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.4em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.1em; }
.draft { background: var(--draft-bg); color: var(--draft); border: 2px dashed currentColor; border-radius: 18px; padding: 14px 16px; font-weight: 500; }
.draft strong { font-weight: 700; }
details { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 0 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; margin-left: 1em; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.contact-list li { margin: 0; }
.contact-list a { font-weight: 600; font-size: 1.15rem; word-break: break-word; }

/* Footer */
.site-foot { margin-top: 40px; padding: 28px 0 36px; background: rgba(0, 0, 0, .16); border-top: 2px solid var(--line); }
@media (prefers-color-scheme: light) { :root:not([data-theme='dark']) .site-foot { background: rgba(255, 255, 255, .55); } }
:root[data-theme='light'] .site-foot { background: rgba(255, 255, 255, .55); }
.foot-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-foot h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .6em; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .2em; }
.site-foot a { display: inline-block; padding: 4px 0; }
.site-foot .brand img { height: 36px; }
.copy { margin-top: 20px; font-size: .95rem; color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m0 { margin: 0; } .mt { margin: 14px 0 0; } .small { font-size: .95rem; }
h2.h3 { font-size: 1.2rem; font-weight: 600; }
/* 404 */
.lost { text-align: center; padding: 40px 0; }
.lost-lede { margin-left: auto; margin-right: auto; }
.lost .actions { justify-content: center; }
/* About */
.about { display: grid; gap: 20px; align-items: center; }
@media (min-width: 700px) { .about { padding: 28px; } }
.center-dot { margin: 0 auto 10px; }

/* Mascot: the living Yoploo face. assets/mascot.js swaps the still image for a live SVG and moves its features;
   without JavaScript (or with reduced motion) the still smiling face stays. */
.mascot { width: 140px; flex: none; }
.mascot img, .mascot svg { display: block; width: 100%; height: auto; border-radius: 22%; box-shadow: var(--shadow); }
.mascot svg { cursor: pointer; }
.mascot-sm { width: 96px; margin: 0 auto 12px; }
.mascot-lg { width: 170px; margin: 0 auto 18px; }
@media (min-width: 700px) { .about { grid-template-columns: 200px 1fr; } .about .mascot { width: 200px; } }
@media (prefers-reduced-motion: no-preference) {
  .mascot .spark { animation: twinkle 2.4s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
  .mascot .spark:nth-of-type(2) { animation-delay: -.6s; } .mascot .spark:nth-of-type(3) { animation-delay: -1.2s; } .mascot .spark:nth-of-type(4) { animation-delay: -1.8s; }
  .mascot svg[data-mood='sleepy'] .zz { animation: snooze 2.6s infinite ease-out; }
  .mascot svg[data-mood='excited'] { animation: hop .45s infinite alternate ease-in-out; }
}
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .6; } }
@keyframes snooze { 0% { opacity: 0; transform: translate(0, 0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -44px); } }
@keyframes hop { from { transform: translateY(0); } to { transform: translateY(-6px); } }
