:root { color-scheme: light; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; background: #F5F0E6; color: #0D1A1D; -webkit-font-smoothing: antialiased; }
::selection { background: #F2B21B; color: #0D1A1D; }

/* Fraunces optical size + soft axis for the warm, hand-made feel */
.font-display { font-variation-settings: "SOFT" 60, "WONK" 0; }
.wonk { font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }

.label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

/* Grain overlay to keep dark sections from looking flat */
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s } .reveal-d2 { transition-delay: .16s } .reveal-d3 { transition-delay: .24s }

/* Image wipe-in */
.wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s cubic-bezier(.7,0,.2,1); }
.wipe.in { clip-path: inset(0 0 0 0); }
.wipe img { transform: scale(1.12); transition: transform 1.8s cubic-bezier(.2,.7,.2,1); }
.wipe.in img { transform: scale(1); }

/* Marquee */
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Nav state */
#nav.scrolled { background: rgba(13,26,29,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Underline link */
.ulink { background: linear-gradient(currentColor,currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.ulink:hover { background-size: 100% 1px; }

/* Gallery */
.masonry { columns: 2; column-gap: 12px; }
@media (min-width: 768px) { .masonry { columns: 3; column-gap: 16px; } }
@media (min-width: 1200px) { .masonry { columns: 4; } }
.masonry > figure { break-inside: avoid; margin-bottom: 12px; }
@media (min-width: 768px) { .masonry > figure { margin-bottom: 16px; } }
.masonry figure.hide { display: none; }

#lightbox { opacity: 0; pointer-events: none; transition: opacity .3s; }
#lightbox.open { opacity: 1; pointer-events: auto; }

/* Horizontal scroller */
.hscroll { scrollbar-width: none; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }

/* Donate amount chips */
.amt[aria-pressed="true"] { background: #0D1A1D; color: #F5F0E6; border-color: #0D1A1D; }
.freq[aria-pressed="true"] { background: #F2B21B; color: #0D1A1D; }

.counter { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .wipe, .wipe img { transition: none; opacity: 1; transform: none; clip-path: none; }
  .marquee { animation: none; }
  html { scroll-behavior: auto; }
}
