/* DEMO ONLY: grainy blurred gradients for the dark room, from Renni's reference board (2026-11-29).
   Loaded after lt.css by light-table/dirty-bg.html. Switch with ?bg=<name>.
   Each variant = soft colour fields (--dg-col) on html::before + a fine noise layer on html::after
   blended with overlay. The sticky contact footer repeats both, clipped to itself, so they line up.
   Light variants (data-tone="light", set by the page script) flip the dark-room text to dark ink.
   Old smudge/dust version: dirty-v1.css. */
:root{
  --dg-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --dg-grain-size:240px; --dg-grain-op:.55;
}
html[data-bg]{background:#111}
html[data-bg] body,html[data-bg] .view > .contact{background:transparent}
html[data-bg] .view > .contact{clip-path:inset(0)}
html[data-bg]::before,html[data-bg]::after,html[data-bg] .view > .contact::before,html[data-bg] .view > .contact::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none}
html[data-bg]::before,html[data-bg] .view > .contact::before{background:var(--dg-col)}
html[data-bg]::after,html[data-bg] .view > .contact::after{background:var(--dg-noise) 0 0/var(--dg-grain-size) var(--dg-grain-size);mix-blend-mode:overlay;opacity:var(--dg-grain-op)}

/* ---- dark ---- */
/* dusk: amber → rust → black → steel blue, coarse heavy grain */
html[data-bg="dusk"]{--dg-grain-size:150px;--dg-grain-op:.9;--dg-col:
  radial-gradient(60% 30% at 50% 0%,rgba(236,180,90,.85),transparent 80%),
  radial-gradient(45% 30% at 50% 28%,rgba(110,40,22,.9),transparent 80%),
  radial-gradient(70% 35% at 50% 104%,rgba(52,112,165,.95),transparent 80%),
  linear-gradient(180deg,#c48a3e 0%,#6a2f19 22%,#140f0d 50%,#151c24 72%,#2d5f8f 100%)}
/* ink: charcoal with a navy wash and a pale fog bleeding in from the left */
html[data-bg="ink"]{--dg-col:
  radial-gradient(45% 38% at 72% 28%,rgba(72,82,140,.95),transparent 75%),
  radial-gradient(22% 30% at 4% 58%,rgba(220,220,218,.85),transparent 75%),
  radial-gradient(40% 35% at 40% 62%,rgba(44,52,96,.7),transparent 75%),
  linear-gradient(160deg,#3a3b3e,#202124 45%,#19191b)}
/* flare: a yellow-orange burn on the left edge falling into violet-black */
html[data-bg="flare"]{--dg-grain-size:180px;--dg-grain-op:.75;--dg-col:
  radial-gradient(30% 60% at 0% 70%,rgba(250,220,120,.8),transparent 75%),
  linear-gradient(95deg,#e9b95a 0%,#d77a2e 9%,#9a3517 20%,#3a1011 34%,#120812 52%,#0a0814 100%)}
/* horizon: from her photo ref. Slate-green sky brightening to a pale lime haze, faint ridge line,
   near-black ground. Measured from the viewport bottom so the footer's copyright row lands on the ground. */
:root{--dg-ridge:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C60 22 110 18 160 24 S260 14 330 20 S430 30 470 26 S560 16 640 22 S760 34 820 26 S930 18 1000 24 S1120 30 1200 22 V80 H0Z' fill='%23a3ab8b' fill-opacity='.75'/%3E%3Cpath d='M0 52 C120 44 220 50 330 46 S540 40 640 48 S860 54 980 46 S1140 44 1200 50 V80 H0Z' fill='%238f977a' fill-opacity='.7'/%3E%3C/svg%3E")}
html[data-bg="horizon"]{--dg-grain-size:200px;--dg-grain-op:.65;--dg-col:
  linear-gradient(180deg,transparent calc(100% - 110px),#15181b calc(100% - 110px)),
  var(--dg-ridge) 0 calc(100% - 109px)/100% 90px no-repeat,
  radial-gradient(90% 34% at 50% calc(100% - 120px),rgba(196,206,156,.55),transparent 80%),
  linear-gradient(180deg,#22282b 0%,#2d3433 22%,#3f4740 45%,#606b52 calc(100% - 360px),#9ea67e calc(100% - 230px),#bdc59a calc(100% - 150px),#c3ca9f calc(100% - 110px))}
/* text that sits on the lime haze goes dark; the copyright row stays light on the ground */
html[data-bg="horizon"] .contact{--glass-ink:#1c211c;--glass-mute:#2f372d;color:var(--glass-ink)}
html[data-bg="horizon"] .contact h2{background:linear-gradient(180deg,#1c211c,#38402f);-webkit-background-clip:text;background-clip:text}
html[data-bg="horizon"] .contact .pill:not(.on-table){border-color:rgba(28,33,28,.4)}
html[data-bg="horizon"] .contact .foot{--glass-ink:#e8ecdc;--glass-mute:#a9b096;color:var(--glass-mute);border-top-color:transparent}

/* ---- light ---- */
/* fog (v6, impressionist): one long scrolling scene, nothing fixed. html::before spans the document:
   a sunrise: the site's near-black at the top of the page through muted mauve, rose and peach
   to pale gold at the horizon (the sun glows just below the land), then a painted landscape at the very bottom of the
   page. Landscapes (gen_land.py → land-*.svg) live in a .dg-lands strip the page script adds; hovering the
   four footer pills crossfades wheat / forest / lake / flowers (&land= sets the first one).
   The sticky footer is transparent, so it never carries its own copy of the scene. */
html[data-bg="fog"]{position:relative;--dg-grain-op:.45;--dg-sky:
  /* the sun is still below the horizon at the very end of the page: a warm glow rising behind the land */
  radial-gradient(42% 260px at 62% 100%,rgba(252,218,165,.9),rgba(240,196,160,.4) 45%,transparent 80%),
  radial-gradient(90% 9% at 50% 86%,rgba(236,190,165,.28),transparent 75%),
  radial-gradient(60% 8% at 30% 66%,rgba(168,150,160,.2),transparent 75%),
  /* sunrise: the site's own near-black (--night) at the top of the page → smoky mauve → dusty rose →
     muted peach → pale gold at the horizon (kept low-saturation in the middle, her 2026-11-29 note) */
  linear-gradient(180deg,#0d0e11 0%,#16171c 12%,#25262e 26%,#3d3c48 40%,#635b67 53%,#8f8186 65%,#b9a196 76%,#d8bba4 85%,#ebd3b8 92%,#f4e4ca calc(100% - 140px))}
html[data-bg="fog"]::before{background:var(--dg-sky)}
/* (sky brush dabs removed 2026-11-29: she wants brushwork only in the paintings; sky = smooth gradient + grain) */
/* v16 sky grain (her reference board, "only the dirty gradient texture"): one fine, even film grain, nothing else.
   No specks, no smudge. Grey noise centred on mid-grey laid over the gradient at low opacity, so it reads the same
   on the near-black top and the pale horizon (overlay vanished on black). Filter region pinned to the tile or it seams.
   v15 (specks + smudge) kept in dirty-v15.css. --dg-sky-grain = strength. */
html[data-bg="fog"]{
  --dg-film:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='1' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1.7 0 0 0 -.35 1.7 0 0 0 -.35 1.7 0 0 0 -.35 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --dg-sky-grain:.12}
html[data-bg="fog"]::after{mix-blend-mode:normal;opacity:var(--dg-sky-grain);background:var(--dg-film) 0 0/200px 200px;filter:none}
/* the four painted landscapes sit at the very bottom of the page and crossfade (hover a footer pill) */
.dg-lands{position:absolute;left:0;right:0;bottom:0;height:320px;z-index:-1;pointer-events:none}
.dg-lands > i{position:absolute;inset:0;background:50% 100%/max(100%,2880px) 320px no-repeat;opacity:0;transition:opacity .9s ease}
.dg-lands > i.on{opacity:1}
/* v15 slim: each scene is a 2x WebP colour layer (5760×640, transparent areas column-filled so edges don't fringe)
   plus a 1x WebP transparency mask (black + alpha; was a greyscale luminance mask until 2026-11-29, but WebKit's
   -webkit-mask has no luminance mode, so iPhones showed the whole rectangle); made from land-*.svg by raster/run.sh. ~770KB for all four vs 3.66MB SVG,
   and no displacement filter over 15k paths to repaint on every crossfade. */
.dg-lands > i{-webkit-mask-position:50% 100%;mask-position:50% 100%;-webkit-mask-size:max(100%,2880px) 320px;mask-size:max(100%,2880px) 320px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.dg-lands > [data-k="wheat"]{background-image:url(land-wheat.webp);-webkit-mask-image:url(land-wheat-alpha.webp);mask-image:url(land-wheat-alpha.webp)}
.dg-lands > [data-k="forest"]{background-image:url(land-forest.webp);-webkit-mask-image:url(land-forest-alpha.webp);mask-image:url(land-forest-alpha.webp)}
.dg-lands > [data-k="lake"]{background-image:url(land-lake.webp);-webkit-mask-image:url(land-lake-alpha.webp);mask-image:url(land-lake-alpha.webp)}
.dg-lands > [data-k="flowers"]{background-image:url(land-flowers.webp);-webkit-mask-image:url(land-flowers-alpha.webp);mask-image:url(land-flowers-alpha.webp)}
@media (prefers-reduced-motion:reduce){.dg-lands > i{transition:none}}
html[data-bg="fog"]::before,html[data-bg="fog"]::after{position:absolute}
html[data-bg="fog"] .view > .contact{clip-path:none}
html[data-bg="fog"] .view > .contact::before,html[data-bg="fog"] .view > .contact::after{content:none}
/* text: light on the dusky top (nav), dark ink on the pale horizon, frosted pills over the field,
   copyright light with a soft shadow on the painted ground */
html[data-bg="fog"] .contact{--glass-ink:#1f232a;--glass-mute:#3f4550;color:var(--glass-ink)}
html[data-bg="fog"][data-tone] .contact h2{background:linear-gradient(180deg,#1f232a,#3d444e);-webkit-background-clip:text;background-clip:text}
html[data-bg="fog"] .contact .pill:not(.on-table){color:#1f232a;background:rgba(250,246,238,.72);border-color:rgba(255,255,255,.6);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
html[data-bg="fog"] .contact .pill:not(.on-table):hover{background:rgba(255,255,255,.9)}
html[data-bg="fog"] .contact .foot{--glass-ink:#fff;--glass-mute:#fbf7ef;color:var(--glass-mute);border-top-color:transparent;text-shadow:0 1px 2px rgba(0,0,0,.55),0 0 8px rgba(0,0,0,.35)}
.dg-land{display:flex;gap:4px;width:100%}
/* lilac: lavender with periwinkle and pink-grey bands */
html[data-bg="lilac"]{--dg-col:
  radial-gradient(40% 18% at 64% 18%,rgba(110,110,190,.8),transparent 75%),
  radial-gradient(70% 18% at 35% 42%,rgba(222,206,216,.85),transparent 75%),
  radial-gradient(45% 18% at 38% 66%,rgba(140,122,196,.75),transparent 75%),
  radial-gradient(70% 20% at 60% 88%,rgba(200,184,222,.85),transparent 75%),
  linear-gradient(180deg,#8f80c0,#c0b2d2 45%,#a490c8)}
/* sage: cream paper with one soft sage moon */
html[data-bg="sage"]{--dg-col:
  radial-gradient(28% 32% at 50% 48%,rgba(140,154,124,.95),rgba(170,180,152,.5) 45%,transparent 80%),
  #ebe5d9}
/* sand: taupe and stone, out of focus */
html[data-bg="sand"]{--dg-col:
  radial-gradient(45% 22% at 42% 26%,rgba(218,198,172,.9),transparent 75%),
  radial-gradient(40% 25% at 70% 58%,rgba(160,146,130,.8),transparent 75%),
  radial-gradient(55% 20% at 30% 86%,rgba(206,198,190,.9),transparent 75%),
  radial-gradient(30% 25% at 90% 15%,rgba(200,206,214,.7),transparent 75%),
  #bba892}
/* apricot: pale mint top, a teal band, then orange melting into red */
html[data-bg="apricot"]{--dg-col:
  radial-gradient(60% 10% at 30% 20%,rgba(140,180,180,.75),transparent 80%),
  linear-gradient(180deg,#ecebd8 0%,#c9d3c4 14%,#e7c7a4 30%,#e39a62 50%,#de7a3e 72%,#cf4a1a 100%)}
/* meadow: green field, a red stain and a white light leak (swatches #f2efe8 #a9b38f #6e8d5c #3f5638 #d9705a) */
html[data-bg="meadow"]{--dg-col:
  radial-gradient(30% 35% at 22% 92%,rgba(217,112,90,.95),transparent 75%),
  radial-gradient(14% 40% at 52% 92%,rgba(246,243,234,.95),transparent 75%),
  radial-gradient(35% 30% at 88% 96%,rgba(214,236,170,.9),transparent 75%),
  radial-gradient(50% 35% at 30% 45%,rgba(63,86,56,.55),transparent 75%),
  linear-gradient(150deg,#5f9466 0%,#78ad6c 40%,#a9cf8f 100%)}

/* light tones: dark ink for the text that sits on the room (switcher keeps its own dark pill) */
html[data-tone="light"] .room{--glass-ink:#1f1d1a;--glass-mute:#4a463f;color:var(--glass-ink)}
html[data-tone="light"] .room .pill:not(.on-table){border-color:rgba(31,29,26,.35)}
html[data-tone="light"] .room .pill:not(.on-table):hover{background:rgba(31,29,26,.08);border-color:rgba(31,29,26,.6)}
html[data-tone="light"] .contact h2{background:linear-gradient(180deg,#1f1d1a,#45413a);-webkit-background-clip:text;background-clip:text}
html[data-tone="light"] .foot{border-top-color:rgba(31,29,26,.15)}

.bg-switch{flex-wrap:wrap;max-width:calc(100vw - 24px)}
.dg-badge{font:500 10.5px/1 var(--f-label);letter-spacing:.06em;text-transform:uppercase;color:var(--glass-mute);padding:7px 8px 7px 10px;align-self:center}
.dg-sep{width:1px;align-self:stretch;margin:4px 2px;background:rgba(255,255,255,.18)}


/* footer hover bubbles: same as "Next note, please" (ink glass), not the white .light bubble the room
   normally gets, since the fog footer is pale. The page script adds .dg-ink while the pointer is in the footer. */
html[data-bg="fog"][data-alpha] .mtip.dg-ink .mt-pill::before{background:var(--ink-dark)}
html[data-bg="fog"] .mtip.light.dg-ink.on .mt-pill{color:#fdfcf9}
