/* Shared look for every page: fonts, colours, buttons, the sky header and footer. */
@font-face { font-family: Fredoka; src: url(/fonts/Fredoka-Variable.ttf) format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Lilita One"; src: url(/fonts/LilitaOne-Regular.ttf) format("truetype"); font-display: swap; }

:root {
  --bg: #f1fae6; --card: #ffffff; --ink: #24324a; --muted: #5d6b82; --line: #dcebcf;
  --accent: #2dc653; --accent-ink: #ffffff; --accent-shadow: #1f9a3f; --step: #3a86ff;
  --sky-top: #9fd8ff; --sky-bottom: #e4f6ff; --hill-back: #a8dc84; --hill-mid: #7cc95c; --stem: #3e8e3a;
  --cloud: #ffffff; --sun: #ffd43b; --sun-glow: rgba(255, 212, 59, .35); --stars: 0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #142019; --card: #1c2b23; --ink: #e8eef7; --muted: #a8b8b0; --line: #2a3d32;
    --accent: #51cf66; --accent-ink: #10202a; --accent-shadow: #2f8f45; --step: #6aa5ff;
    --sky-top: #0c1430; --sky-bottom: #2a3a6b; --hill-back: #2c5138; --hill-mid: #22432d; --stem: #3a7a46;
    --cloud: #3a4670; --sun: #f4f1d6; --sun-glow: rgba(244, 241, 214, .18); --stars: 1;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 Fredoka, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: inherit; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
h1, h2 { font-family: "Lilita One", Fredoka, sans-serif; font-weight: 400; letter-spacing: .5px; }
h3 { font-weight: 600; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; padding: 10px 20px; border-radius: 14px; box-shadow: 0 4px 0 var(--accent-shadow); transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-shadow); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-shadow); }
a:focus-visible { outline: 3px solid var(--step); outline-offset: 3px; }

/* Sky with stars (dark mode), sun or moon, clouds and hills */
.sky { position: relative; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-bottom)); }
.sky::before { content: ""; position: absolute; inset: 0; opacity: var(--stars); pointer-events: none;
  background-image: radial-gradient(2px 2px at 12% 18%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 28% 40%, #fff 50%, transparent), radial-gradient(2px 2px at 47% 12%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 66% 30%, #fff 50%, transparent), radial-gradient(2px 2px at 88% 22%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 8% 52%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 76% 48%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 38% 58%, #fff 50%, transparent);
  animation: twinkle 4s ease-in-out infinite alternate; }
.sun { position: absolute; top: 34px; right: max(16px, calc(50% - 420px)); width: 76px; height: 76px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 14px var(--sun-glow), 0 0 0 30px var(--sun-glow); animation: pulse 5s ease-in-out infinite; }
.cloud { position: absolute; width: 90px; height: 30px; border-radius: 30px; background: var(--cloud); opacity: .9; animation: drift linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 44px; height: 44px; left: 14px; top: -22px; }
.cloud::after { width: 34px; height: 34px; left: 44px; top: -14px; }
.c1 { top: 70px; animation-duration: 70s; animation-delay: -20s; }
.c2 { top: 150px; transform: scale(.7); animation-duration: 95s; animation-delay: -60s; }
.c3 { top: 30px; transform: scale(.5); animation-duration: 120s; animation-delay: -5s; }
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 150px; display: block; }

/* Header on inner pages: a short strip of the home page's meadow */
.top { padding: 18px 16px 84px; }
.top .sun { top: 14px; width: 48px; height: 48px; box-shadow: 0 0 0 10px var(--sun-glow), 0 0 0 20px var(--sun-glow); animation: none; }
.top .c1 { top: 44px; }
.top .hills { height: 80px; }
.logo { position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 680px; font: 24px "Lilita One", sans-serif; letter-spacing: .5px; color: #fff; text-shadow: 0 2px 0 #3a86ff; text-decoration: none; }
.logo img { width: 36px; height: 36px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover img { transform: rotate(-10deg) scale(1.1); }
.top-in { position: relative; max-width: 680px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a { padding: 4px 14px; border-radius: 99px; background: rgba(255, 255, 255, .7); color: #24324a; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
.nav a:hover { background: #fff; transform: translateY(-2px); }
@media (max-width: 480px) { .nav { gap: 4px; } .nav a { padding: 4px 9px; font-size: 14px; } }
@media (max-width: 360px) { .nav { gap: 3px; } .nav a { padding: 3px 6px; font-size: 13px; } }

footer { text-align: center; padding: 0 16px 32px; color: var(--muted); font-size: 14px; }
footer a { white-space: nowrap; }

@keyframes drift { from { left: -140px; } to { left: 100%; } }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 18px var(--sun-glow), 0 0 0 38px var(--sun-glow); } }
@keyframes twinkle { to { opacity: calc(var(--stars) * .4); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cloud { left: 20%; } .c2 { left: 70%; } .c3 { left: 45%; }
}
