/* DEMO ONLY (2026-11-29): ways to make the light table (.bench) sit IN the sunrise sky instead of on top of it.
   Her ask: "make the light table more integrated to the background, explore ways". Switch with &blend=<name>
   on dirty-bg.html?bg=fog (none = current bench). Each variant takes one idea and nothing else:
     glass   integration by transparency: the bench is a translucent sheet, the sky colours it from behind
     sunlit  integration by shared light: the bench stays opaque paper but is lit by the same sunrise,
             cool and dim at the top, warm gold at the bottom, with a warm rim where the sun is
     feather integration by losing the edge: no frame or shadow, the bench dissolves into the sky
   All three swap the bench's own multiply noise for the sky's film grain (--dg-film), so one grain runs across both. */

/* shared: same grain as the sky on the bench surface */
html[data-bg="fog"][data-blend] .bench::before{background:var(--dg-film) 0 0/200px 200px;mix-blend-mode:normal;opacity:var(--dg-sky-grain)}

/* ---- glass ---- */
html[data-bg="fog"][data-blend="glass"] .bench{
  background:linear-gradient(180deg,rgba(236,236,242,.80),rgba(246,242,236,.84) 60%,rgba(250,240,226,.80));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 0 0 1px rgba(255,255,255,.22),0 30px 80px -40px rgba(20,18,30,.35)}
html[data-bg="fog"][data-blend="glass"] .bench::after{opacity:.7}

/* ---- sunlit ---- */
html[data-bg="fog"][data-blend="sunlit"] .bench{
  background:
    radial-gradient(60% 520px at 62% 100%,rgba(255,226,180,.55),transparent 75%),
    linear-gradient(180deg,#e4e4ea 0%,#ecebee 30%,#f2eee9 62%,#f6ebdc 88%,#f7e4c9 100%);
  box-shadow:inset 0 0 70px rgba(40,30,40,.10),0 0 0 1px rgba(255,236,210,.18),0 -1px 0 rgba(255,255,255,.08),0 40px 120px -50px rgba(250,200,150,.45)}

/* ---- dawn = sunlit + soft bottom (her pick 2026-11-29) ----
   Same sunrise grading, but the last ~180px of the surface fades to transparent so the table melts into the horizon.
   Only the SURFACE fades (background layers, grain, dots); content keeps full opacity, so nothing gets clipped.
   Top and sides keep their crisp edge; the outline ring and inset shadow are dropped because they would draw a
   line across the faded bottom, replaced by a top-and-sides-only inner shade. */
html[data-bg="fog"][data-blend="dawn"] .bench{
  --fade:180px;
  border-radius:14px 14px 0 0;
  background:
    radial-gradient(60% 420px at 62% calc(100% - var(--fade)),rgba(255,226,180,.45),transparent 75%),
    linear-gradient(180deg,#e4e4ea 0%,#ecebee 30%,#f2eee9 62%,#f6ebdc 85%,#f7e4c9 calc(100% - var(--fade)),rgba(247,228,201,0) 100%);
  /* top shade only: side inset shades can't fade with the surface, so they left a hard corner at the faded bottom */
  box-shadow:inset 0 70px 70px -70px rgba(40,30,40,.12)}
html[data-bg="fog"][data-blend="dawn"] .bench::before,html[data-bg="fog"][data-blend="dawn"] .bench::after{
  -webkit-mask:linear-gradient(180deg,#000 calc(100% - var(--fade)),transparent);mask:linear-gradient(180deg,#000 calc(100% - var(--fade)),transparent)}

/* ---- feather ---- */
html[data-bg="fog"][data-blend="feather"] .bench{
  background:linear-gradient(180deg,#ebeaee,#f3efea 60%,#f5ead9);
  box-shadow:none;border-radius:0;
  -webkit-mask:linear-gradient(90deg,transparent,#000 64px,#000 calc(100% - 64px),transparent),linear-gradient(180deg,transparent,#000 64px,#000 calc(100% - 64px),transparent);
  -webkit-mask-composite:source-in;
  mask:linear-gradient(90deg,transparent,#000 64px,#000 calc(100% - 64px),transparent),linear-gradient(180deg,transparent,#000 64px,#000 calc(100% - 64px),transparent);
  mask-composite:intersect}

/* switcher */
.blend-switch{position:fixed;top:14px;left:50%;transform:translateX(-50%);z-index:9999;display:flex;gap:2px;padding:4px;border-radius:99px;
  background:rgba(14,15,18,.82);font:500 11px/1 "IBM Plex Mono",monospace;text-transform:uppercase;letter-spacing:.06em}
.blend-switch span{color:#8b8f99;padding:7px 8px 7px 10px}
.blend-switch a{color:#cfd3dc;text-decoration:none;padding:7px 10px;border-radius:99px}
.blend-switch a[aria-current]{background:#f4f1ea;color:#15171b}
