/* Design elements of the new website (loaded on every page; Veebisisu, 17.11.2026).
   1. ILLUSTRATIONS an editor placed on a section (dev feedback #210): lib/cms/overlay.js illustrate() puts ONE clipping layer as the section's last child.
      left / top / width are percents of the section's box, so the picture stays on its section when the text grows or shrinks. A picture marked ref "col" is measured from the
      TEXT COLUMN instead (.ohill-layer-c below, owner 27.11.2026): the same size and the same place beside its text on every screen of 1280 px and up.
   2. The hall that the visible carousel photo shows is marked in the halls list (dev feedback #195), public/ds/experiences.js.
   3. The gift card as an object, the same as the Shoppe's (.gc3d, dev feedback #208): rests at an angle, leans toward the pointer, turns over. NO keyframe animations. */

/* ---- 1. illustrations ---- */
/* THE Z-ORDER LADDER (owner 25.11.2026: "always on top of the content, but not on top of the text"; 28.11.2026, #41: a picture is also above the shadow a raised section casts;
   29.11.2026: each picture has its own layer, chosen in the editor: lib/cms/overlay.js z -> ohill-zt / ohill-zx / ohill-zu, none = the default):
   the LAYER is no longer a stacking context (z-index auto): each PICTURE carries its own z-index in the PAGE's one stacking context (no block that holds a layer may make a context of
   its own: no isolation, no z-index on it), so a picture anchored in one section paints over the NEXT section's background, photos AND edge shadow too. FROM BOTTOM TO TOP:
     z auto / 0   section backgrounds, bands, cards, and the BANNER / HERO photo (.herobg, the hero's slides and video, scrims, fades): the owner's choice 29.11.2026, that photo is background,
                  so even "under both" is drawn over it
     z 2          .ohill-zu   "Teksti ja piltide all"          under the text, under the content photos and under the edge shadows
     z 3          the content photos: a photo, video, frame or canvas inside a section (the zero-specificity :where rule below; not the banner / hero)
     z 4          the edge shadows of the raised sections (dark theme, below): ABOVE the content photos, as before (a shadow darkens the neighbour section's photo edge, 28.11.2026: the
                  photos were z auto then; they moved up to 3 and the shadows with them, so nothing existing changes); BELOW the default picture (#41)
     z 5          .ohill      "Piltide peal, teksti all"       THE DEFAULT, the 25.11 rule: over the photos and the shadows, under the text
     z 6          every text leaf and control (the :where rules below, zero specificity so a class rule still wins), and the containers that hold text at z 2 elsewhere
                  (the banner's title block, the hero's, the hall panel, the carousel buttons): they move up with the leaves, or a picture would cover them
     z 7          .ohill-zx   "Teksti peal, piltide all"       over the text, under the photos it touches
     z 8          .ohill-up   a content photo that a .ohill-zx picture touches: public/ds/ill-layers.js measures the page and lifts only those (text is above photos everywhere else, so no
                  single order can hold text < picture < photo AND photo < text)
     z 9          .ohill-up-t the text printed on such a lifted photo (same script), so it stays readable
     z 10         .ohill-zt   "Teksti ja piltide peal"        over everything on the page
   The header (40), sticky bars (30), the footer and dialogs sit higher still. */
.ohill-layer{position:absolute;inset:0;overflow:visible;pointer-events:none;z-index:auto}
.ohill-layer .ohill{z-index:5}
.ohill-layer .ohill.ohill-zu{z-index:2}
.ohill-layer .ohill.ohill-zx{z-index:7}
.ohill-layer .ohill.ohill-zt{z-index:10}
/* THE TEXT COLUMN, defined ONCE (lib/cms/overlay.js COL, public/cms/edit.js colBox and tools/cms-illustrations-to-column.js read the same numbers; tests/ill-column-1127.test.js keeps them equal):
   the standard .wrap of every section (olde-hansa.css): 1280 px wide with 40 px sides = 1200 px of text, 20 px sides on a phone. A column layer is exactly that box, centred in its
   block (left / right 0 + auto margins, no transform: a transform would make a stacking context and break the z-order sandwich), so a percent inside it is a fixed number of pixels
   from 1280 px up and shrinks with the column below. The layer's top and bottom are the block's, so the em offsets of an anchored picture count from the block's top as before. */
:root{--ohcol-max:1200px;--ohcol-gut:40px}
@media (max-width:899px){:root{--ohcol-gut:20px}}
/* ayv (lib/cms/overlay.js VERTICAL ORIGIN): from 900 px up the top is the section's vertical origin --ohvo (a length from the layer's top: the section's CSS sets it; none = the top) plus --ohv.
   max(0px, ...): a picture that follows a line far below the top (the hero's) can never leave the section on a short window; the editor gives ayv only to a picture nearer the line than the top. !important: the inline top (em from the section's top) is what a phone and a gone anchor use. A phone is not touched: no rule below 900 px. */
@media (min-width:900px){.ohill-layer .ohill.ohill-v{top:max(0px,calc(var(--ohvo,0px) + var(--ohv)))!important}}
.ohill-layer .ohill.ohill-lp{left:var(--ohld)}   /* ref "text" with lp: the desktop left is --ohld, a phone's is --ohlp (lib/cms/overlay.js); ill-phone.js still sets its own px on top */
.ohill-layer-c{width:min(calc(100% - 2 * var(--ohcol-gut)),var(--ohcol-max));margin-left:auto;margin-right:auto}
/* ref "text" (owner 27.11.2026): the same fixed-size column box as above, with the extra class .ohill-layer-x. Where the section's text IS the column the box is the column. In a SPLIT
   section (a photo half and a text half) the text block is centred in its half and starts elsewhere: site-after.css (the file that lays the split out) moves the layer's left edge
   to the text's start with the layout's own numbers. */
:where([data-section]):has(> .ohill-layer){position:relative}
.ohill-layer .ohill{position:absolute;display:block;width:var(--ohw,15%);height:auto;max-width:none;margin:0;padding:0;border:0;border-radius:0;outline:0!important;box-shadow:none;background:none;filter:none;transform-origin:50% 50%;-webkit-user-select:none;user-select:none}
/* an illustration never takes a click or a tap (the menu's dishes and links stay usable under it); the editor's frame lives outside the page */
.ohill-layer,.ohill-layer .ohill{pointer-events:none}
/* ANCHORED to a block (the Menu page's dish rows and chapters, lib/cms/overlay.js): the layer is the block's last child, not clipped, so a picture can sit beside the dish */
:where([data-anchor]):has(> .ohill-layer){position:relative}
/* sections that made themselves a stacking context (ground.css: a raised ground and the page banner sit at z-index 1 / 2 so their edge shading paints over the neighbour) would hide a picture
   under the whole section, photos included, and trap their own text below the pictures: on a page with pictures they stay in the page context.
   NOT the menu's chapter ribbon (.chapbar): it carries data-ground="raised" too, but it is a STICKY bar and keeps its own z-index 30 (site.css), above the pictures (up to 10) and the
   text (6). Reset to auto it let every section heading that scrolled under it paint OVER it (owner 26.11.2026, seen after zooming the menu page in / out). */
html:has(.ohill-layer)[data-theme] [data-ground="raised"]:not(.chapbar),html:has(.ohill-layer)[data-theme] .pbanner,html:has(.ohill-layer) [data-ground="raised"]:not(.chapbar),html:has(.ohill-layer) .pbanner{z-index:auto}
/* the edge shadows of the raised sections sit BELOW the default pictures (z 4 < 5, owner 28.11.2026, #41); in the page's one context they still cover the neighbour's photos (z 3; z auto before the
   photos joined the ladder: the shadow darkens a photo edge as it always did) */
html:has(.ohill-layer)[data-theme="dark"] [data-ground="raised"]::before,html:has(.ohill-layer)[data-theme="dark"] [data-ground="raised"]::after{z-index:4}
/* a photo banner is never darkened (owner 16.11.2026, ground.css): on a page with pictures the banner no longer keeps z-index 2, so the shadow a raised section casts UP over its top
   edge is simply not drawn when that section follows the banner (it used to darken the banner's lower fade and the title: seen on /keskaegne-elamus/) */
html:has(.ohill-layer)[data-theme="dark"] .pbanner+[data-ground="raised"]::before{display:none}
/* containers that hold text and carry z-index 2 / 3 of their own stay above the default pictures (5) with the leaves (6) */
html:has(.ohill-layer) :is(.hero-in,.pbanner-in,.hallpanel,.pbanner-note,.gal-btn,.gal-count,.car-nav,.hero-play,.vid-pause){z-index:6}
html:has(.ohill-layer) .b2b-hero .split>.text{z-index:6}   /* the B2B hero's text block (b2b.css gives it z 2): its own rule, so a :is() list does not raise the specificity of the others */
/* the text sits ABOVE the default pictures: leaves only (a container with z-index would trap its pictures below its neighbours' text). A link that holds a photo is a card, not text. */
html:where(:has(.ohill-layer)) :where(h1,h2,h3,h4,h5,h6,p,dt,dd,th,td,label,figcaption,blockquote,summary,button,input,select,textarea,span,em,strong,b,i,small,time,cite,a:not(:has(img,picture,svg,video))){position:relative;z-index:6}
/* the content photos join the ladder at 3 (owner 29.11.2026), below the shadows (4) and the default picture (5): zero specificity, so a class that makes a photo absolute (.split .media>img) keeps its position and
   only gains the z-index. NOT the banner / hero photo (.herobg, the hero's slides and video): that is BACKGROUND, it keeps z auto and every picture is drawn over it. */
html:where(:has(.ohill-layer)) :where([data-section],[data-anchor]) :where(img,video,iframe,canvas):where(:not(.ohill,.herobg,.hero *,.b2b-hero *)){position:relative;z-index:3}
/* the hall / menu carousel (site-after.css): the slide on show keeps its own z-index 1 (a class rule beats the zero-specificity rule above), which would put it under every "under both" picture (2); it is a content photo (3) and the
   slides on the way out are invisible (opacity 0), so they take no part */
html:has(.ohill-layer) .gal .gal-slide.on{z-index:3}
html:where(:has(.ohill-layer)) .gal .gal-slide:not(.on){z-index:auto}
/* the photos a "Teksti peal, piltide all" picture touches (public/ds/ill-layers.js): above that picture (7), and the text printed on them above the photo (a container that holds the text, like the
   hall panel, is lifted whole: the leaves inside it cannot leave its own context) */
html:has(.ohill-layer) .ohill-up,html:has(.ohill-layer) .gal .gal-slide.on.ohill-up{z-index:8}
html:has(.ohill-layer) .ohill-up-t,html:has(.ohill-layer) :is(.gal-btn,.gal-count,.car-nav,.hero-play,.vid-pause,.hallpanel,.pbanner-note).ohill-up-t{z-index:9}
/* until the script has measured, an "above text, under photos" picture is not drawn (no flash over a photo): a page without the script never gets the class (html.ohill-lj) */
html.ohill-lj .ohill-layer .ohill.ohill-zx:not(.ohill-zok):not(.ohcms-ill-live){visibility:hidden}
.ohill-layer-a{overflow:visible}
/* nothing a picture overhangs may make the page scroll sideways: the page is clipped at its own width only */
body:has(.ohill-layer){overflow-x:clip}
@media (max-width:899px){
  .ohill-layer .ohill{width:var(--ohwp,var(--ohw,15%))}
  .ohill-layer .ohill-np{display:none}
  .ohill-layer .ohill.ohill-lp{left:var(--ohlp,var(--ohld))}
  /* TWO SETS (owner 25.11.2026): a phone (<= 899 px, the site's phone breakpoint) draws the PHONE set only; the desktop set stays out of the way unless the page has no phone set
     yet (.ohill-auto): that layer is then adapted by public/ds/ill-phone.js and shown only after the script approved each picture */
  .ohill-layer.ohill-set-d:not(.ohill-auto){display:none}
  .ohill-layer.ohill-set-m{display:block}
  html.ohill-js .ohill-layer.ohill-auto .ohill:not(.ohill-ok){visibility:hidden}
  html.ohill-js .ohill-layer .ohill.ohcms-ill-live{visibility:visible}
}
@media (min-width:900px){.ohill-layer.ohill-set-m{display:none}}
@media print{.ohill-layer{display:none}}

/* ---- 2. the hall the photo shows ---- */
.hallkey{display:none}
.hallsec .clist li[data-hall]{position:relative;padding:5px 12px;margin:-5px -12px;border-radius:2px;transition:background-color .25s ease,box-shadow .25s ease}
.hallsec .clist li.is-here{background:rgba(226,164,104,.16);box-shadow:inset 3px 0 0 #E2A468}
.hallsec .clist li.is-here .nm{color:#FBF4E2}
@media (prefers-reduced-motion:reduce){.hallsec .clist li[data-hall]{transition:none}}

/* ---- 3. the gift card (the Shoppe's .gc3d: public/css/shoppe.css) ---- */
.gc3d{--gc-px:0;--gc-py:0;--gc-mx:50%;--gc-my:50%;--gc-max:13deg;--gc-rx:4deg;--gc-ry:-9deg;position:relative;width:100%;max-width:520px;margin:0 auto}
.gc3d.is-hover{--gc-rx:0deg;--gc-ry:0deg}
.gc3d__toggle{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
.gc3d__stage{display:block;position:relative;perspective:1150px;perspective-origin:50% 45%}
.gc3d.is-live .gc3d__stage{cursor:pointer}
.gc3d__tilt{display:block;transform-style:preserve-3d;transform:rotateX(calc(var(--gc-rx) + var(--gc-py) * var(--gc-max))) rotateY(calc(var(--gc-ry) - var(--gc-px) * var(--gc-max)));transition:transform .3s ease-out}
.gc3d__card{display:block;position:relative;aspect-ratio:1000 / 998;transform-style:preserve-3d;transition:transform .9s cubic-bezier(.2,.7,.2,1)}
.gc3d__toggle:checked ~ .gc3d__stage .gc3d__card{transform:rotateY(180deg)}
.gc3d__face{position:absolute;inset:0;display:block;-webkit-backface-visibility:hidden;backface-visibility:hidden;border:1px solid rgba(83,37,17,.38);box-shadow:0 18px 38px -16px rgba(38,14,4,.55);background:#EFE4C7}
.gc3d__face .photo,.gc3d__face .lowres-alert{display:block;width:100%;height:100%;margin:0;outline:0!important;object-fit:cover}
.gc3d__face--back{transform:rotateY(180deg)}
.gc3d__gloss{position:absolute;inset:0;pointer-events:none;opacity:0;mix-blend-mode:soft-light;background:radial-gradient(38% 44% at var(--gc-gx) var(--gc-my),rgba(255,250,236,.62),rgba(255,242,214,.18) 46%,rgba(255,240,210,0) 72%);transition:opacity .35s ease}
.gc3d__face--front .gc3d__gloss{--gc-gx:var(--gc-mx)}
.gc3d__face--back .gc3d__gloss{--gc-gx:calc(100% - var(--gc-mx))}
.gc3d.is-hover .gc3d__gloss{opacity:1}
.gc3d__shadow{position:absolute;left:10%;right:10%;bottom:-20px;height:26px;pointer-events:none;background:radial-gradient(50% 50% at 50% 50%,rgba(58,24,8,.34),rgba(58,24,8,0) 70%);transform:translateX(calc(var(--gc-px) * -14px));transition:transform .18s ease-out,opacity .35s ease;opacity:.7}
.gc3d.is-hover .gc3d__shadow{opacity:.9}
.gc3d__turn{display:block;margin-top:26px;text-align:center;font-family:'OH Antique',Georgia,serif;font-size:13px;letter-spacing:.18em;text-transform:uppercase;color:#8B241D;cursor:pointer}
.gc3d__turn:hover{color:#C96125}
.gc3d__toggle:focus-visible ~ .gc3d__turn{outline:2px solid #8B241D;outline-offset:3px}
@media (max-width:899px){.gc3d{max-width:420px}}
@media (prefers-reduced-motion:reduce){
  .gc3d__card,.gc3d__tilt,.gc3d__shadow,.gc3d__gloss{transition:none}
  .gc3d__toggle:checked ~ .gc3d__stage .gc3d__card{transform:none}
  .gc3d__face{-webkit-backface-visibility:visible;backface-visibility:visible}
  .gc3d__face--back{transform:none;opacity:0}
  .gc3d__toggle:checked ~ .gc3d__stage .gc3d__face--front{opacity:0}
  .gc3d__toggle:checked ~ .gc3d__stage .gc3d__face--back{opacity:1}
}
/* the default theme is dark */
html[data-theme="dark"] .gc3d__turn{color:#E2A468}
html[data-theme="dark"] .gc3d__turn:hover{color:#F3C890}
html[data-theme="dark"] .gc3d__toggle:focus-visible ~ .gc3d__turn{outline-color:#E2A468}
/* ---- 4. ROOM an editor added under a section or a text (Veebisisu "Lisa ruumi", owner 27.11.2026): lib/cms/overlay.js spaces() puts ONE empty .ohsp as the block's last
   child (a section's: a <div> that is also an illustration anchor; a text's: a <span> inside its paragraph). Its height is the editor's number for this screen: --ohsp-d from
   900 px up, --ohsp-m below. A screen without a number does not draw it (display:none: no flex gap, no grid row), unless an illustration is fastened in it: then it stays as a
   line of no height so the picture keeps its place. clear:both: a floated initial above cannot swallow it. Not printed, like the illustrations. */
.ohsp{display:none}
.ohsp:has(> .ohill-layer){display:block;height:0;clear:both}
@media (min-width:900px){.ohsp.ohsp-d{display:block;clear:both;height:var(--ohsp-d);margin:0;padding:0;border:0}}
@media (max-width:899px){.ohsp.ohsp-m{display:block;clear:both;height:var(--ohsp-m);margin:0;padding:0;border:0}}
@media print{.ohsp{display:none!important}}
