@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka-Variable.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("fonts/NunitoSans-Variable.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
	--ink: #17384d;
	--ink-soft: #55788d;
	--sky: #dcefff;
	--snow: #f7fbff;
	--ice: #bfe3f7;
	--accent: #2f7fc1;
	--gold: #e9b949;
	--card: #ffffff;
	--line: #d3e6f3;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--snow);
	color: var(--ink);
	font: 17px/1.6 "Nunito Sans", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.bar a.home { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Fredoka"; font-weight: 600; font-size: 20px; }
.bar a.home img { width: 36px; height: 36px; border-radius: 9px; }
.bar nav a { margin-left: 18px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.bar nav a:hover { color: var(--accent); }
.bar.solid { position: static; background: #fff; border-bottom: 1px solid var(--line); }

/* Hero: the painting with Roly removed; the game's own Roly rolls on it. */
.hero { position: relative; background: var(--snow); max-width: 1800px; margin: 0 auto; }
.scene {
	position: relative; overflow: hidden;
	aspect-ratio: 1672 / 940; width: 100%;
	background: url("img/hero.jpg") center / cover no-repeat;
}
.scene::after { content: ""; position: absolute; inset: auto 0 0 0; height: 14%; background: linear-gradient(transparent, var(--snow)); pointer-events: none; }
.copy { position: absolute; left: 5%; top: 12%; width: 40%; z-index: 3; }
/* A soft snowy haze keeps the words readable over the painted trees. */
.copy::before { content: ""; position: absolute; inset: -28% -22% -30% -14%; z-index: -1; pointer-events: none;
	background: radial-gradient(ellipse at 40% 50%, rgba(247, 251, 255, 0.88) 0%, rgba(247, 251, 255, 0.6) 45%, rgba(247, 251, 255, 0) 72%); }
.copy .wordmark { width: 100%; max-width: 560px; filter: drop-shadow(0 6px 14px rgba(30, 80, 120, 0.18)); }
.copy p.tag { font-family: "Fredoka"; font-weight: 500; font-size: clamp(16px, 2.1vw, 28px); margin: 0.6em 0 1em; text-shadow: 0 1px 10px rgba(255,255,255,0.85); }
.badge {
	display: inline-block;
	background: var(--ink); color: #fff; text-decoration: none;
	padding: 12px 22px; border-radius: 14px; font-weight: 800; font-size: clamp(13px, 1.3vw, 16px);
	box-shadow: 0 8px 22px rgba(23, 56, 77, 0.25);
}
.badge small { display: block; font-weight: 600; font-size: 12px; opacity: 0.8; }

/* The live Roly and the falling snow are drawn on one canvas over the painting. */
.scene canvas.live { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; cursor: pointer; touch-action: manipulation; }
.copy { pointer-events: none; }
.copy .badge, .copy a { pointer-events: auto; }

/* Moods */
.moods-wrap { padding-top: 24px; }
h2.center { text-align: center; font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 26px; }
.moods { text-align: center; }
.mood-roly { display: block; width: min(320px, 78vw); aspect-ratio: 1; margin: 0 auto; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; border-radius: 50%; }
.mood-roly:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.mood-roly canvas { display: block; width: 100%; height: 100%; }
.mood-caption { font-family: "Fredoka"; font-weight: 600; font-size: 22px; color: var(--ink); margin: 6px 0 0; }
.mood-caption.show { animation: caption-in 0.35s cubic-bezier(.34,1.56,.64,1); }
@keyframes caption-in { from { opacity: 0; transform: translateY(8px) scale(0.92); } to { opacity: 1; transform: none; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Sections */
section { padding: 56px 0; }
.intro { text-align: center; max-width: 720px; margin: 0 auto; }
.intro h2 { font-size: clamp(28px, 4vw, 38px); }
.intro p { color: var(--ink-soft); font-size: 18px; }

.features { display: grid; gap: 28px; }
.feature { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; }
.feature img { border-radius: 18px; box-shadow: 0 14px 34px rgba(23, 56, 77, 0.16); border: 4px solid #fff; }
.feature h3 { font-size: 26px; }
.feature p { color: var(--ink-soft); margin: 0; }
@media (min-width: 820px) {
	.feature { grid-template-columns: 1.45fr 1fr; gap: 36px; }
	.feature.flip { grid-template-columns: 1fr 1.45fr; }
	.feature.flip img { order: 2; }
}

/* Text pages */
.page { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px clamp(20px, 4vw, 44px); margin: 36px auto 56px; max-width: 780px; }
.page h1 { font-size: clamp(30px, 5vw, 42px); }
.page h2 { font-size: 21px; margin-top: 1.6em; }
.page .meta { color: var(--ink-soft); }
.faq dt { font-weight: 800; margin-top: 1.2em; }
.faq dd { margin: 0.3em 0 0; color: var(--ink-soft); }
.contact { background: var(--sky); border-radius: 14px; padding: 18px 20px; margin-top: 28px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-soft); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
footer nav a { margin-right: 18px; color: var(--ink-soft); }

@media (max-width: 700px) {
	.bar nav a { margin-left: 12px; font-size: 14px; }
	.bar a.home span { display: none; }
	/* Phones: the words above, the painting (and Roly) below at its own shape. */
	.hero { padding-top: 64px; background: linear-gradient(#cfe6fb, var(--snow) 60%); }
	.hero { display: flex; flex-direction: column; }
	.copy { position: static; order: -1; width: auto; padding: 8px 20px 18px; }
	.copy::before { display: none; }
	.copy .wordmark { max-width: 340px; }
	.copy p.tag { font-size: 19px; }
}
.hint { text-align: center; color: var(--ink-soft); margin: -14px 0 18px; font-size: 15px; }

/* Roly's own layer: over the whole window, never in the way of a click. */
.roly-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 20; }
