/* Living Park's support, privacy and terms pages: clean white, the game's own two faces,
   its ink and sap green, the painter's red seal, and a bed of the park's own flowers. */
@font-face { font-family: 'Young Serif'; src: url('fonts/YoungSerif-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('fonts/AtkinsonHyperlegible-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('fonts/AtkinsonHyperlegible-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #2A2820;
  --muted: #5C5544;
  --line: #E6DDCB;
  --accent: #4A7240;
  --wash: #F6F2E8;
  --seal: #AB3B3A;
  --display: 'Young Serif', Georgia, serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* Going from page to page: the old page fades away and the new one comes up softly, as a
   wash settles on paper, never a cut. Browsers that cannot do this get the same from
   pages.js. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 0.3s ease-in both; }
::view-transition-new(root) { animation: page-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
html.leaving body { opacity: 0; transition: opacity 0.28s ease-in; }
html.arriving body { opacity: 0; }
body { transition: opacity 0.5s ease-out; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #FFFFFF; color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.6; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #34552D; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(720px, 100% - 32px); margin: 0 auto; }

/* ---- the top: the icon and the name, and the other pages ---- */
.site-header { padding: 22px 0 6px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.wordmark img { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 1px 0 rgba(58, 47, 37, 0.12), 0 4px 14px rgba(70, 52, 30, 0.16); }
.wordmark span { font-family: var(--display); font-size: 23px; }
.nav { display: flex; gap: 20px; font-weight: 700; font-size: 16px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--accent); }

/* ---- a page of words ---- */
main { padding: 18px 0 0; flex: 1 0 auto; }
.back { display: inline-block; margin: 8px 0 18px; font-weight: 700; font-size: 16px; text-decoration: none; }
h1 { position: relative; margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 7vw, 52px); line-height: 1.1; }
.updated { margin: 0 0 26px; color: var(--muted); font-size: 16px; }
h2 { margin: 36px 0 8px; font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.25; }
h3 { margin: 22px 0 4px; font-size: 18px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 22px; }
strong { font-weight: 700; }

/* The short version, pressed with the painter's red seal, as the game signs a finished park. */
.short { display: flex; gap: 18px; align-items: flex-start; margin: 0 0 30px; padding: 20px 22px; border-radius: 18px; background: var(--wash); }
.short .seal { flex: 0 0 46px; height: 46px; display: grid; place-items: center; border-radius: 6px; background: var(--seal); color: #FBF1E4; transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(251, 241, 228, 0.5); }
.short .seal svg { width: 26px; height: 26px; }
.short p { margin: 0; font-size: 19px; }
.short b { display: block; font-family: var(--display); font-weight: 400; font-size: 21px; margin-bottom: 4px; }

.mail { display: inline-block; margin: 6px 0 4px; padding: 13px 22px; border-radius: 26px; background: var(--accent); color: #FFFFFF; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(74, 114, 64, 0.22); }
.mail:hover { background: #3E6236; color: #FFFFFF; }
.qa { padding: 2px 0 6px; border-top: 1px solid var(--line); }
.qa:first-of-type { border-top: 0; }
.signoff { margin: 40px 0 0; font-family: var(--display); font-size: 21px; text-align: center; color: var(--muted); }

/* ---- the foot: the small print, and under it a bed of the park's flowers along the bottom ---- */
/* The same small print as the home page: centred links in sap green, and one quiet line. */
footer { margin-top: 64px; padding: 10px 16px 4px; text-align: center; color: var(--muted); font-size: 14px; }
footer .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
footer a { color: var(--accent); text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }
footer > div:last-child { min-height: 32px; display: flex; align-items: center; justify-content: center; }
/* Under the small print, a bed of the park's flowers along the very bottom of the page. */
.bed { position: relative; flex: 0 0 auto; height: 96px; overflow: hidden; pointer-events: none; }
.bed img { position: absolute; bottom: -22px; height: 104px; width: auto; transform-origin: 50% 80%; animation: bed-rise 0.8s cubic-bezier(0.2, 0.8, 0.25, 1) both, bed-sway 3.4s ease-in-out infinite alternate; }
/* As a page arrives, its flowers come up from the ground, one after another. */
@keyframes bed-rise { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes bed-sway { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }

/* ---- the page's life: a bee, and a cardinal on the title ---- */
.life { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.life .critter { position: absolute; left: 0; top: 0; will-change: transform; }
.life .critter img { position: absolute; left: 0; top: 0; }
.life .wings { animation: bee-buzz 0.05s steps(2) infinite alternate; transform-origin: 50% 55%; }
@keyframes bee-buzz { from { opacity: 0.95; transform: scaleY(1); } to { opacity: 0.55; transform: scaleY(0.55); } }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .short { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bed img, .life .wings { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  html.leaving body, html.arriving body { opacity: 1; }
}
