/* Arakot Render Lab · v14 · SAHNE · the page's scene (motion.js draws it)
   A misty highland valley rendered in Blender (lab/blender/sahne.py), two
   weathered limestone rocks in front of the window, the window's own shadow.
   #zemin is a plain wrapper (no box of its own): its children are fixed
   layers at z-index -1 in the page's root stacking context, behind the
   pinned stage. Bottom to top:
     .sh-arka   the landscape: one <img> per light of the day, stacked; the
                lights crossfade by opacity, the wrapper drifts (transform).
                A hidden light is visibility: hidden (not composited).
     .sh-sis    the local mist: soft pools under the story's words (their
                contrast), nowhere else; none at night
     .sh-gece   the night of the interludes (GECE's own ground, #05060f, so
                the hand-off is seamless) and the short dimming while a
                render forms (ACILIS)
     .sh-perde  the web sections' plain ground (--sc-canvas): after the story
                it covers the scene, which then rests (visibility: hidden).
   In #stage (motion.js puts it there, over the window, under the page's
   words, z-index 24): .sh-taslar, the two rocks.
   In #winSh (app.js places it with the window): .sh-golge, the shadow, and
   .sh-isilti, the screen's light on the mist at night. #winSh's own
   box-shadow (v13) is gone: one shadow, drawn once, dithered.
   Only opacity and transform change while scrolling. */
:root {
  --sc-sahne-ilk: #DAD5CF;     /* the dawn's mist, before its render arrives */
  --sc-gece: #05060F;          /* the interludes' night (GECE, AuthKit's midnight) */
  --sc-sis-rgb: 231 228 223;   /* the mist band (.sh-sis) */
  /* v13's names, kept for whoever still reads them (masaustu.css) */
  --sc-wall: var(--sc-canvas);
  --sc-graphite: var(--sc-ink-soft);
  --sc-graphite-line: color-mix(in srgb, var(--sc-ink-soft) 62%, transparent);
}
html { background-color: var(--sc-canvas); }

.zemin { position: static; }
.zemin > * { position: fixed; left: 0; top: 0; z-index: -1; pointer-events: none; }
.sh-arka {
  width: 100vw; height: 100vh; overflow: hidden;
  background: var(--sc-sahne-ilk);
  transform-origin: 50% 0;
  will-change: transform;
  contain: strict;
}
.sh-kat {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 0;
  opacity: 0; visibility: hidden;
  will-change: opacity;
  user-select: none; -webkit-user-drag: none;
}
.sh-kat[data-durum="safak"] { opacity: 1; visibility: visible; }   /* before motion.js */
/* v14 r2: the local mist behind the story's words (motion.js): two soft pools
   of the scene's own mist, drawn once, placed under each visible group of words
   (their pair), as strong as the words are visible. The landscape keeps its
   detail everywhere else. */
.sh-sis { width: 100%; height: 100%; overflow: hidden; }
.sh-havuz {
  position: absolute; left: 0; top: 0; display: block; max-width: none;
  transform-origin: 0 0; opacity: 0; visibility: hidden;
  will-change: transform, opacity; pointer-events: none;
}
/* the night of the interludes (GECE's own ground is #05060f: the hand-off is seamless)
   and the short dimming while a render forms (ACILIS: the particles read better) */
.sh-gece { width: 100%; height: 100%; background: var(--sc-gece, #05060F); opacity: 0; visibility: hidden; will-change: opacity; }
.sh-perde { width: 100%; height: 100%; background: var(--sc-canvas); opacity: 0; will-change: opacity; }
/* the reader's own full screen covers the scene; it rests */
.is-mfull .zemin { visibility: hidden; }
/* the reader's own hands on the plugin (manual mode, full screen): the rocks step aside */
.is-mfull .sh-taslar, .is-manual .sh-taslar { visibility: hidden !important; }

/* the stage and the web sections are panes in front of the scene */
.stage { background: transparent; }

/* ============================================================ the rocks */
.sh-taslar { position: absolute; inset: 0; z-index: 24; pointer-events: none; overflow: hidden; contain: strict; }
.sh-tas {
  position: absolute; left: 0; top: 0; display: block; max-width: none;
  transform-origin: 50% 50%;
  will-change: transform;
  user-select: none; -webkit-user-drag: none;
}

/* ================================================ the window's shadow
   #winSh is app.js's (its place and opacity follow the window); its look is
   the scene's: no box-shadow, only the hairline edge ACILIS gave it. */
#winSh.win-sh.has-sahne {
  box-shadow: 0 -1px 0 0 var(--sc-pencere-isik, transparent), 0 0 0 1px var(--sc-pencere-kenar, rgba(17, 21, 23, 0.5));
  overflow: visible;
}
.sh-golge, .sh-isilti {
  position: absolute; left: 0; top: 0; display: block; max-width: none;
  pointer-events: none;
}
.sh-golge { opacity: 0.5; }
.sh-isilti { opacity: 0; visibility: hidden; mix-blend-mode: plus-lighter; }

/* phones: the same, smaller radius (app.css gives #winSh 20 px) */
@media (prefers-reduced-motion: reduce) {
  .sh-arka, .sh-tas { will-change: auto; }
}
/* lab switches (motion.js): ?sahne=duz, ?sahne=durum:<ad> */
.zemin.lab-0 { display: none; }
/* the window stands right behind the rocks: each rock darkens it a little on
   its inner side (soft, toward the window; the light is high and soft) */
.sh-tas--sol { filter: drop-shadow(14px 8px 22px rgba(26, 22, 18, 0.30)); }
.sh-tas--sag { filter: drop-shadow(-12px 8px 22px rgba(26, 22, 18, 0.26)); }
