/* ==== 16.11.2026, owner: "esiletõst means drop shadow on the top and bottom borders" (dev feedback #154-#172, fade.png) ====
   EVERY SECTION GROUND IS ONE OF TWO, named by one attribute, data-ground:
     raised  the dark damask ("tume keskaja tapeet"). It casts a soft shadow outwards over its top AND bottom edge, onto the plain neighbour.
     plain   the plain page brown, no pattern.
   site/html.js toneSections writes the attribute on every top-level section of every page (data-tone a = plain, b = raised); a page that
   wants a particular ground pins it in its template (data-tone-pin). Anything else can carry the attribute by hand (the Menu's chapter bar
   does), so a section can be switched later by changing one word. Dark theme only: the light theme has no pattern ground (its sections are
   parchment, vellum and the dark photo bands), so it is left exactly as it was.
   The shadow is a pseudo-element of the raised section, not a box-shadow: the Kujundus lab (public/ds/lab.js) recolours a section with an
   inset box-shadow, and an outer one would be lost under it. Two raised sections in a row are ONE block: the shadow only runs along the
   block's outer edges. The footer is plain (#164). Loaded after site-after.css (and after b2b-dark.css on the partner pages). */
html[data-theme="dark"]{--g-plain:#231007;--g-sh:92px;--g-sh-a:.62}
html[data-theme="dark"] [data-ground="plain"]{background:#231007}
html[data-theme="dark"] [data-ground="raised"]{background:linear-gradient(rgba(30,14,8,.82),rgba(30,14,8,.82)),#3a1610 url(../site-img/5141e707e141eafb93768f777d536906.jpg) center/536px repeat}
html[data-theme="dark"] .foot{background:#231007;border-top:1px solid var(--oh-ln)}
/* positioned and above its neighbours so the shadow lands on them; :where() keeps this at zero specificity, so a sticky chapter bar stays sticky */
:where(html[data-theme="dark"] [data-ground="raised"]){position:relative;z-index:1}
html[data-theme="dark"] [data-ground="raised"]::before,html[data-theme="dark"] [data-ground="raised"]::after{content:"";position:absolute;left:0;right:0;height:var(--g-sh);pointer-events:none;z-index:2;transition:opacity .9s ease}
html[data-theme="dark"] [data-ground="raised"]::before{bottom:100%;background:linear-gradient(0deg,rgba(8,3,1,var(--g-sh-a)) 0%,rgba(8,3,1,calc(var(--g-sh-a) * .55)) 20%,rgba(8,3,1,calc(var(--g-sh-a) * .22)) 50%,rgba(8,3,1,calc(var(--g-sh-a) * .06)) 78%,rgba(8,3,1,0) 100%)}
html[data-theme="dark"] [data-ground="raised"]::after{top:100%;background:linear-gradient(180deg,rgba(8,3,1,var(--g-sh-a)) 0%,rgba(8,3,1,calc(var(--g-sh-a) * .55)) 20%,rgba(8,3,1,calc(var(--g-sh-a) * .22)) 50%,rgba(8,3,1,calc(var(--g-sh-a) * .06)) 78%,rgba(8,3,1,0) 100%)}
/* one block: no shadow between two raised sections (the later one paints above the earlier, so the fallback without :has() is the same picture) */
html[data-theme="dark"] [data-ground="raised"]+[data-ground="raised"]::before{display:none}
html[data-theme="dark"] [data-ground="raised"]:has(+[data-ground="raised"])::after{display:none}
/* a photo banner (its title stands on its own fade) casts NO shadow: owner 16.11.2026, "on about right after here should be no shadow" (this overrides #168).
   It stays above its neighbours (z-index), so a raised section below never darkens it.
   28.11.2026 (#40): the banner's own overflow stays hidden (site-after.css), like the light theme: the painted initial of the title (h1 span.ic, taller than its line) used to hang out
   over the section below; now it ends at the banner's lower edge, as if the next section lay over it. */
html[data-theme="dark"] .pbanner{z-index:2}
/* the Menu's chapter bar ("riba", owner's unsent note: "Riba also in muster"): the damask, and only its lower edge casts */
html[data-theme="dark"] .chapbar[data-ground="raised"]::before{display:none}
html[data-theme="dark"] .chapbar[data-ground="raised"]::after{height:36px}
@media (max-width:899px){html[data-theme="dark"]{--g-sh:56px;--g-sh-a:.58}}
/* a section that scrolls into view (data-reveal): its content fades up and its shadow comes in with it (#156 #159). site.js adds .is-in; without
   script (no html.js) and under reduced motion nothing is hidden or animated. */
html.js[data-theme="dark"] [data-reveal]:not(.is-in)::before,html.js[data-theme="dark"] [data-reveal]:not(.is-in)::after{opacity:0}
html.js [data-reveal]>*{transition:opacity .9s ease,transform .9s ease}
html.js [data-reveal]:not(.is-in)>*{opacity:0;transform:translateY(26px)}
@media (prefers-reduced-motion:reduce){
html.js [data-reveal]>*{transition:none}
html.js [data-reveal]:not(.is-in)>*{opacity:1;transform:none}
html.js[data-theme="dark"] [data-reveal]:not(.is-in)::before,html.js[data-theme="dark"] [data-reveal]:not(.is-in)::after{opacity:1}
html[data-theme="dark"] [data-ground="raised"]::before,html[data-theme="dark"] [data-ground="raised"]::after{transition:none}
}
