/* Newsreader (SIL OFL 1.1, licence in /fonts/OFL.txt), served from this site: the page calls no other origin. Subset: Latin, Vietnamese, a few marks. */
@font-face { font-family: 'Newsreader'; src: url(/fonts/newsreader-var.woff) format('woff'); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #f3eee4;
  --paper-solid: #f7f2e9;
  --ink: #221c16;
  --ink-soft: #5c5348;
  --ochre: #9a5728;
  --ochre-ink: #fff8f1;
  --rule: rgba(34, 28, 22, 0.16);
  --serif: 'Newsreader', 'Iowan Old Style', Palatino, Georgia, serif;
  /* Same picture corner and dark-mode dim as the game (game/src/ui/style.css --art-radius, --art-filter). */
  --art-radius: 10px;
  --art-filter: none;
}
@media (prefers-color-scheme: dark) {
  /* The paintings' own paper edge is near white: dim it so the torn edge is not a glaring line on a dark page. */
  .paper-art img { filter: brightness(.82); }
  :root {
    color-scheme: dark;
    --paper: #14110e;
    --paper-solid: #1b1713;
    --ink: #f4eee6;
    --ink-soft: #cbbba8;
    --ochre: #e2a86a;
    --ochre-ink: #24180f;
    --rule: rgba(244, 238, 230, 0.16);
    --art-filter: brightness(.91);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.5; }
a { color: inherit; text-underline-offset: 0.22em; }
a:hover { color: var(--ochre); }
a:focus-visible { outline: 2px solid var(--ochre); outline-offset: 5px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: 0; left: 16px; padding: 8px; background: var(--paper-solid); transform: translateY(-150%); z-index: 2; }
.skip-link:focus { transform: none; }
.topbar { max-width: 1120px; margin: auto; padding: 20px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; }
.small-brand { color: var(--ink-soft); }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; text-decoration: none; }
.topbar [aria-current] { text-decoration: underline; color: var(--ochre); }
.intro { text-align: center; padding: 28px 16px 0; }
h1 { margin: 0; font-weight: 600; font-size: clamp(64px, 13vw, 112px); line-height: 0.94; letter-spacing: -0.03em; }
h1 span { display: block; }
.subtitle { font-size: clamp(22px, 5.5vw, 30px); line-height: 1.3; margin: 26px auto 16px; max-width: 620px; }
.pitch { color: var(--ink-soft); max-width: 490px; margin: 0 auto 24px; font-size: 20px; }
figure { margin: 0; }
.paper-art { position: relative; isolation: isolate; }
/* The paintings already carry their own watercolour paper edge: show each one whole, at its own ratio,
   never cropped and never faded (user 2026-10-21: «mép luôn phải là loang lổ», no straight cut edge). */
.paper-art img, .paper-art video { display: block; width: 100%; height: auto;
  -webkit-mask: url(/img/deckle.svg) center / 100% 100% no-repeat; mask: url(/img/deckle.svg) center / 100% 100% no-repeat; }
@media (prefers-color-scheme: dark) { .paper-art img, .paper-art video { -webkit-mask-image: url(/img/deckle-dark.svg); mask-image: url(/img/deckle-dark.svg); } }
.hero-art { width: 100%; max-width: 460px; margin-inline: auto; }
/* Hero shows the top 3:4 of the painting: the bottom fifth is only watercolour wash (art director 2026-10-27); it stops at the mud bank. */
.hero-art img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.hero-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.birth-button { display: inline-flex; align-items: center; justify-content: center; gap: 36px; background: var(--ochre); color: var(--ochre-ink); text-decoration: none; padding: 15px 28px; min-height: 52px; border-radius: 6px; font-size: 24px; margin-top: 20px; }
.beta-note { margin: 10px 0 0; font-size: 15px; color: var(--ink-soft); }
.birth-button:disabled { background: transparent; color: var(--ink-soft); border: 1px dashed var(--rule); cursor: default; font-size: 20px; font-family: inherit; }
.birth-button:hover:not(:disabled) { color: var(--ochre-ink); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ochre); }
.soon { margin: 26px auto 0; font-size: 22px; letter-spacing: 0.02em; color: var(--ochre); }
.points { max-width: 1000px; margin: 64px auto 0; padding: 0 16px; }
.points ul { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; text-align: center; }
.points h2 { font-size: 26px; margin: 0 0 8px; font-weight: 500; }
.points p { margin: 0 auto; max-width: 320px; color: var(--ink-soft); font-size: 20px; }
@media (min-width: 700px) { .points ul { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.species { max-width: 1000px; margin: 76px auto 0; padding: 0 16px; }
h2 { font-size: clamp(28px, 6vw, 38px); font-weight: 400; text-align: center; line-height: 1.2; margin: 0 0 40px; }
.species-row { display: grid; gap: 12px; margin-bottom: 44px; align-items: center; }
h3 { font-size: 28px; line-height: 1.2; font-weight: 500; margin: 0 0 10px; }
.species-row p { color: var(--ink-soft); margin: 0; max-width: 370px; font-size: 21px; }
.follow { max-width: 620px; margin: 76px auto 0; padding: 0 16px; text-align: center; }
.follow h2 { margin-bottom: 14px; }
.follow-line { margin: 0 auto 22px; max-width: 420px; color: var(--ink-soft); font-size: 20px; }
.follow-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.follow-buttons a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--ochre); border-radius: 999px; color: var(--ochre); text-decoration: none; font-size: 18px; }
.follow-buttons a:hover { background: var(--ochre); color: var(--ochre-ink); }
.species-page { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; }
.species-head { text-align: center; }
.species-head h1 { font-size: clamp(48px, 11vw, 84px); }
.species-head .eco-tag { margin: -6px 0 16px; }
.species-place { margin: 14px 0 18px; color: var(--ink-soft); font-size: 20px; }
.species-hero { margin: 8px 0 0; }
/* Page-top plate (ecosystem and species pages) shows the painting whole, its own ivory paper margin included, like the
   game's start-screen species cards (game/src/ui/start-screen.css .start-card img; user 2026-10-25: the hero must sit on
   the white paper like those cards). No deckle mask here: the mask cut the paper margin away and the torn edge ran into the page. */
.species-hero img { -webkit-mask: none; mask: none; border-radius: var(--art-radius); filter: var(--art-filter); }
.facts { margin-top: 64px; }
.fact { display: grid; gap: 14px; margin-bottom: 44px; }
.fact p { margin: 0; font-size: 21px; line-height: 1.5; }
.fact .paper-art { max-width: 460px; }
.fact-source { margin-top: 10px; font-size: 16px; color: var(--ink-soft); }
.species-cta { text-align: center; margin-top: 24px; }
.species-cta p { color: var(--ink-soft); font-size: 20px; margin: 0 0 18px; }
@media (min-width: 700px) { .fact:has(.paper-art) { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; } }
.crumbs { margin: 0 0 20px; font-size: 16px; color: var(--ink-soft); }
.crumbs a { display: inline-block; padding: 10px 0; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 8px; }
.eco-tag { display: inline-block; margin: 0; padding: 2px 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 15px; color: var(--ink-soft); }
.eco-list { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.eco-item { display: grid; gap: 8px; justify-items: start; }
.eco-item h3 { margin: 0; }
.eco-species { grid-template-columns: 56px 1fr; align-items: center; gap: 16px; }
.eco-species > div { display: grid; gap: 8px; justify-items: start; }
.eco-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rule); background: var(--paper, #fff); }
.eco-item h3 a { color: var(--ochre); text-decoration: underline; text-underline-offset: 0.22em; }
.eco-item h3 a::after { content: '\2192'; margin-left: 0.3em; text-decoration: none; display: inline-block; }
.eco-item .paper-art { max-width: 460px; width: 100%; }
.ecosystems { max-width: 1000px; margin: 76px auto 0; padding: 0 16px; }
.ecosystems .eco-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.versus { margin-top: 56px; padding: 22px 20px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-solid); }
.versus h2 { text-align: left; font-size: 26px; margin: 0 0 12px; }
footer { max-width: 1000px; margin: 64px auto 0; padding: 32px 16px 36px; border-top: 1px solid var(--rule); text-align: center; }
.footer-brand { font-size: 24px; margin: 0 0 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 16px; color: var(--ink-soft); }
.footer-links a { padding-block: 8px; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .intro { padding-top: 44px; }
  .species-row { grid-template-columns: 1.15fr 1fr; gap: 52px; margin-bottom: 56px; }
  .species-row:nth-of-type(even) figure { order: 2; }
  .species-row:nth-of-type(even) .species-copy { order: 1; padding-left: 24px; }
}
