/* What the built site adds around the look (look.css, the one source of tokens and rules, copied as is): the fonts,
   the page's frame the board's own chrome gives it, the painting as files, and the page fade. W3c. */

/* ---------- fonts: Alegreya and Alegreya Sans, self-hosted, Google Fonts' latin subset (OFL, fonts/OFL-*.txt).
   Alegreya Sans has no 600; a 600 rule takes the 700, as it did from Google Fonts. Each family's fallback is a local
   face sized to its metrics (size-adjust and the overrides, from fontTools against Georgia and Arial), named in the
   look's --serif, --text and --sc, so the swap moves no line. ---------- */
@font-face { font-family: 'Alegreya'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/Alegreya-400-600.woff2) format('woff2'); }
@font-face { font-family: 'Alegreya'; font-style: italic; font-weight: 400 500; font-display: swap; src: url(/fonts/Alegreya-400-500-italic.woff2) format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/AlegreyaSans-400.woff2) format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/AlegreyaSans-500.woff2) format('woff2'); }
@font-face { font-family: 'Alegreya Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/AlegreyaSans-700.woff2) format('woff2'); }
@font-face { font-family: 'Alegreya Sans SC'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/AlegreyaSansSC-500.woff2) format('woff2'); }
@font-face { font-family: 'Alegreya fallback'; font-style: normal; src: local('Georgia'); size-adjust: 91.75%; ascent-override: 110.74%; descent-override: 37.6%; line-gap-override: 0%; }
@font-face { font-family: 'Alegreya fallback'; font-style: italic; src: local('Georgia Italic'), local('Georgia-Italic'); size-adjust: 81.85%; ascent-override: 124.13%; descent-override: 42.15%; line-gap-override: 0%; }
@font-face { font-family: 'Alegreya Sans fallback'; src: local('Arial'), local('ArialMT'); size-adjust: 87.18%; ascent-override: 91.77%; descent-override: 22.94%; line-gap-override: 22.94%; }
@font-face { font-family: 'Alegreya Sans SC fallback'; src: local('Arial'), local('ArialMT'); size-adjust: 97.51%; ascent-override: 82.04%; descent-override: 20.51%; line-gap-override: 20.51%; }

/* ---------- the page ---------- */
[hidden] { display: none !important; }
body { margin: 0; background: #fbf1e1; }
.site { container-type: inline-size; min-height: 100vh; }
/* A control the keyboard reaches lands below the sticky header (WCAG 2.4.11): the header's depth at each of the look's
   widths, on the root, which its container queries can't reach (the board's own rule, at the look's breaks). */
html { scroll-padding-top: 96px; }
@media (max-width: 1199px) { html { scroll-padding-top: 124px; } }
@media (max-width: 640px) { html { scroll-padding-top: 120px; } }

/* ---------- the painting as files (site/art.mjs): views of one file, cropped as the board's inline SVG was ---------- */
.d-home-ground .d-home-ground-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The hero is painted 1200 wide and the stage crops it from the left, as the board's 1200 px SVG did at 800; wider
   than 1200 it grows to the page. */
.d-home-ground .hr-pic > .d-home-ground-art, .d-home-ground .hr-pic > .hr-drift { right: auto; width: max(100%, 1200px); }
.d-home-ground .hr-pic > .d-home-ground-art > .hr-lamp { position: absolute; inset: 0; width: 100%; height: 100%; }
.d-home-ground .hr-pic > .d-home-ground-art > picture { display: contents; }
.d-home-ground .hr-pic > .d-home-ground-art .is-phone { display: none; }
@container (max-width: 640px) {
  .d-home-ground .hr-pic > .d-home-ground-art, .d-home-ground .hr-pic > .hr-drift { width: auto; }
  .d-home-ground .hr-pic > .d-home-ground-art { position: relative; aspect-ratio: 790 / 634; }
  .d-home-ground .hr-pic > .d-home-ground-art .is-wide { display: none; }
  .d-home-ground .hr-pic > .d-home-ground-art .is-phone { display: block; }
}
/* Under the words, the season's sky, down to the painting's top edge (site.js measures it; the board's paintAll). On
   .site itself, which its own container query can't reach: the same width as a media query, since .site is the page. */
@media (max-width: 640px) {
  .d-home-ground:has(.hero) { background: linear-gradient(var(--sky-a, #ecd3c4) 0px, var(--sky-b, #f1d5bf) calc(var(--hr-top, 420px) * .35), var(--sky-c, #f3c6a9) var(--hr-top, 420px), var(--sky-c, #f3c6a9) calc(var(--hr-top, 420px) + 1px)); }
}

/* ---------- the page fade: a cross-document view transition, CSS only; none under reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: cubic-bezier(.2,.7,.2,1); }
}
