@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500 800; font-style: normal; font-display: swap; src: url("../assets/fonts/manrope-latin-wght-normal.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--paper); font-family: var(--ui); font-weight: 500; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, canvas, svg { display: block; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }

/* A scene: one screen-filling stack of painted layers. */
/* Sized from the small viewport: on an iPhone that is what shows before the first scroll, and it does
   not change when the toolbar slides away, so nothing jumps. */
.scene { position: relative; height: 100vh; height: 100svh; overflow: clip; isolation: isolate; background: var(--night); }
.scene .layer, .scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .layer { will-change: transform; pointer-events: none; }
.scene .layer img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A picture shows only once it has arrived (its onload marks it "in"), and then fades up, so a slow
   connection never shows one half-drawn. One that failed shows nothing at all, never a broken-image mark. */
.scene .layer img { opacity: 0; }
.scene .layer img.in { opacity: 1; }
img.failed { visibility: hidden; }
/* (a late picture fades; the first arrival of all of them is the opening, in css/hero.css) */
@media (prefers-reduced-motion: no-preference) {
  html:not(.js) .scene .layer img, .scene.settled .layer img { transition: opacity var(--dawn) ease-out; }
}

/* The sound control: a small brass bell in the bottom left corner, in the dark of the leaves. */
.sound { position: fixed; z-index: 20; left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); width: var(--tap); height: var(--tap); padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(7, 9, 18, 0.5), rgba(7, 9, 18, 0)); color: var(--brass); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sound svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 3px rgba(7, 9, 18, 0.7)); }
.sound .ring { opacity: 0; }
.sound[aria-pressed="true"] { color: var(--amber); }
.sound[aria-pressed="true"] .ring { opacity: 1; }
.sound[aria-pressed="true"] .mute { opacity: 0; }
.sound:focus-visible { outline: 1.5px solid var(--amber); outline-offset: 2px; }
@media (hover: hover) { .sound:hover { color: var(--enamel); } .sound[aria-pressed="true"]:hover { color: var(--filament); } }      /* a finger's "hover" would stick after the tap */
html:not(.js) .sound { display: none; }       /* without JavaScript there is no sound to turn on */
@media (prefers-reduced-motion: no-preference) {
  .sound, .sound .ring, .sound .mute { transition: color var(--fade), opacity var(--fade); }
}
