/* PROTOTYPE (client, 28.10.2026: "it should look like we are listing the book"; plan docs/PLAN-2026-10-28-veeb-raamat.md).
   Linked ONLY on the landing page, and only when site/view.js book(req) is set (staging / the version switch, the after view, ?raamat=punane|tume).
   OWNER RULE 28.10.2026: there is NO animation when going from one page of the website to another (no fade, slide, flip, curtain, view transition);
   the book animation exists only here, on the landing page, as the book opening and its leaves turning. Under reduced motion it is the static end state.
   The leather boards are the client's covers nahkkaaned_*.png (tools/site-book-leather.js). Everything is prefixed .rk-.

   Three modes of the same markup:
     flat   (default: no script, a phone or tablet under 1100 px, an editor's draft view): the leather is a frame, the pages lie one
            after another as papers, the cover is not shown, nothing is hidden;
     3d     (raamat.js adds .rk-3d on a wide screen): a closed leather book -> open it -> turn the page; the cover and the leaves turn
            around the spine (CSS 3D, one rotateY each), the pages that are turned away are inert for keyboard and screen readers;
     reduced motion: the same states, no animation. */
html[data-book]{--rk-parch:url(/backgrounds/pergamentti.webp)}
html[data-book="red"]{--rk-leather:url(/ds/book-leather-red.webp)}
html[data-book="dark"]{--rk-leather:url(/ds/book-leather-dark.webp)}
.rk{--rk-paper:#F4E9CC;--rk-edge:rgba(63,27,11,.35);--rk-t:.95s;position:relative}
html[data-theme="dark"] .rk{--rk-edge:rgba(0,0,0,.55)}

.rk-proto{margin:0 0 20px;padding:8px 12px;border:1px dashed rgba(226,164,104,.6);font-size:14px;line-height:1.45;font-style:italic;color:inherit}
.rk-proto a{color:inherit;text-decoration:underline}

/* ---- flat: a leather frame with the pages one after another ---- */
.rk{background:var(--rk-leather) center/cover no-repeat,#3a1c0e;border-radius:8px;padding:clamp(12px,3vw,40px);box-shadow:0 18px 40px -22px rgba(0,0,0,.85),inset 0 0 0 1px rgba(0,0,0,.4)}
.rk-stage,.rk-book,.rk-leaf{display:contents}
.rk-book{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(12px,2vw,24px)}
@media (min-width:900px){.rk-stage{display:block}.rk-book{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.rk-half-l,.rk-face[data-rk-face="c"]{display:none}
.rk-half-r{display:contents}
.rk-face{display:block}
.rk-paper{position:relative;display:flex;flex-direction:column;height:100%;box-sizing:border-box;padding:clamp(16px,2.4vw,32px);background:var(--rk-paper) var(--rk-parch) center/cover;color:#532511;border-radius:2px;box-shadow:0 0 0 1px var(--rk-edge),0 3px 8px rgba(0,0,0,.35)}
.rk-paper::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,.14),rgba(0,0,0,0) 9%)}
.rk-face[data-rk-face="i"] .rk-paper::after,.rk-face[data-rk-face="a"] .rk-paper::after{background:linear-gradient(270deg,rgba(0,0,0,.14),rgba(0,0,0,0) 9%)}
.rk-page,.rk-intro{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0}
.rk-page .acts,.rk-intro .btnrow{margin-top:auto;padding-top:16px}
.rk-page .acts{display:flex;gap:12px;flex-wrap:wrap}
.rk-page .acts .btn{flex:1 1 180px}
.rk-intro .h2{margin:0}
.rk-intro .lead{margin:0}
.rk-last{justify-content:flex-start}
.rk-index{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.rk-nav[hidden],.rk-nav [hidden]{display:none}
/* dev feedback #120 (client, 13.11.2026: "in the editing view the book's title stands above the book; in the ordinary view there is no title"): the section's
   heading and lead were visually hidden above the closed leather book on a desktop and shown only where the book lies flat (the editor's view, a phone).
   Now they stand above the book everywhere. */
.rk-head{margin-bottom:28px}

/* ---- 3d: a closed book that opens ---- */
.rk-3d{background:none;padding:0;border-radius:0;box-shadow:none}
.rk-3d .rk-stage{display:block}
.rk-3d .rk-book{display:block;position:relative;width:min(1120px,100%);margin:0 auto;aspect-ratio:1400/920;perspective:2600px;transition:transform var(--rk-t) cubic-bezier(.45,.05,.25,1)}
.rk-3d[data-state="0"] .rk-book{transform:translateX(-25%)}
.rk-3d .rk-half,.rk-3d .rk-leaf{display:block;position:absolute;top:0;height:100%;width:50%}
.rk-3d .rk-half-l{left:0;display:block;background:var(--rk-leather) 0 0/200% 100% no-repeat;border-radius:8px 0 0 8px;opacity:0;transition:opacity .35s ease;box-shadow:0 22px 40px -24px rgba(0,0,0,.9)}
.rk-3d:not([data-state="0"]) .rk-half-l{opacity:1;transition-delay:.25s}
.rk-3d .rk-half-r{right:0;background:var(--rk-leather) 100% 0/200% 100% no-repeat;border-radius:0 8px 8px 0;z-index:1;box-shadow:0 22px 40px -24px rgba(0,0,0,.9)}
.rk-3d .rk-leaf{right:0;transform-origin:left center;transform-style:preserve-3d;transition:transform var(--rk-t) cubic-bezier(.45,.05,.25,1)}
.rk-3d .rk-leaf[data-rk-leaf="1"]{z-index:2}
.rk-3d .rk-leaf[data-rk-leaf="0"]{z-index:3}
.rk-3d .rk-leaf[data-rk-leaf="0"].is-flipped{z-index:2}
.rk-3d .rk-leaf[data-rk-leaf="1"].is-flipped{z-index:3}
.rk-3d .rk-leaf.is-turning{z-index:100!important}
.rk-3d .rk-leaf.is-flipped{transform:rotateY(-180deg)}
.rk-3d .rk-face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:block}
.rk-3d .rk-back{transform:rotateY(180deg)}
.rk-3d .rk-face[data-rk-face="c"]{display:block;background:var(--rk-leather) 100% 0/200% 100% no-repeat;border-radius:0 8px 8px 0}
.rk-3d .rk-face.rk-board-l{background:var(--rk-leather) 0 0/200% 100% no-repeat;border-radius:8px 0 0 8px}
/* the paper sits inside the leather board: a margin all round, a thin one at the spine */
.rk-3d .rk-paper{position:absolute;height:auto;padding:clamp(14px,1.9vw,26px);overflow:hidden;inset:4.6% 4.2% 4.6% 2.4%}
.rk-3d .rk-face[data-rk-face="i"] .rk-paper,.rk-3d .rk-face[data-rk-face="a"] .rk-paper{inset:4.6% 2.4% 4.6% 4.2%}
.rk-3d .rk-face.rk-board .rk-paper{box-shadow:0 0 0 1px var(--rk-edge),0 2px 6px rgba(0,0,0,.4)}
.rk-3d .rk-page,.rk-3d .rk-intro{gap:clamp(8px,1vw,12px)}
.rk-3d .rk-page .gal{margin:0}
.rk-3d .rk-page .gal-frame{aspect-ratio:16/10}
.rk-3d .rk-intro{justify-content:center}
.rk-3d .rk-intro .h2{font-size:clamp(40px,4.4vw,64px)}
.rk-3d .h3.dish{font-size:clamp(26px,2.5vw,36px)}
/* shading while a leaf turns: the page darkens toward the spine and back */
.rk-3d .rk-leaf::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:0;background:linear-gradient(90deg,rgba(0,0,0,.35),rgba(0,0,0,0) 60%);transition:opacity var(--rk-t) ease;backface-visibility:hidden}
.rk-3d .rk-leaf.is-turning::after{opacity:.55}
/* the AUTOMATIC opening is slower (owner 26.11.2026, staging comment: "you can't notice the cover at all, it opens in under a second"): raamat.js
   holds the closed cover still for 2 s once the book is in view, then turns it with .rk-slow; the Open button and the keys keep .95 s */
.rk-3d.rk-slow{--rk-t:1.6s}
.rk-3d.rk-slow:not([data-state="0"]) .rk-half-l{transition-delay:.42s}

/* the cover: the title blind-stamped into the leather */
.rk-cover{container-type:inline-size;position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,1.4vw,20px);padding:10%;text-align:center;color:#EBD3A5}
/* no inner border on the cover (dev feedback #87 #90, 08.11.2026: "take out the border"; the title ran over it) */
.rk-cover-k{margin:0;font-family:'OH Antique',Georgia,serif;font-size:clamp(13px,1.3vw,18px);letter-spacing:.32em;text-transform:uppercase;text-shadow:0 -1px 1px rgba(0,0,0,.7),0 1px 0 rgba(255,225,180,.18)}
.rk-cover-t{margin:0;font-family:'OH Script',Georgia,serif;font-size:clamp(38px,4.3vw,72px);font-size:min(72px,13cqw);   /* the title is sized by the COVER, so the longest one (Menüüraamat: 7.2 em) fits inside its padding at every width */
  line-height:1.02;text-shadow:0 -1px 1px rgba(0,0,0,.75),0 2px 1px rgba(255,225,180,.16)}
.rk-cover-t .ic{text-shadow:none;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.6))}
.rk-open{margin-top:clamp(6px,1vw,16px);min-width:200px;background:rgba(20,9,4,.35);color:#F4E2BC;box-shadow:inset 0 0 0 1px rgba(235,211,165,.7)}
.rk-open:hover{background:rgba(20,9,4,.6)}
.rk-open:focus-visible{outline:2px solid #F2C48F;outline-offset:3px}
@media (max-width:1099.98px){.rk-cover{display:none}}

.rk-nav{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 16px;margin-top:26px}
/* dev feedback #29 (client, 27.11.2026): the "Open the book" button under the book is gone (the cover has its own). The row keeps the height of a button, so the page below
   does not jump by 44 px when the book opens and "Close the book" appears in it. */
.rk-3d .rk-nav{min-height:44px}
.rk-status{min-width:9em;text-align:center;font-family:'OH Antique',Georgia,serif;font-size:14px;letter-spacing:.12em;text-transform:uppercase}
.rk-nav .btn[disabled]{opacity:.4;cursor:default}

@media (prefers-reduced-motion:reduce){.rk-3d .rk-book,.rk-3d .rk-leaf,.rk-3d .rk-leaf::after,.rk-3d .rk-half-l{transition:none!important}}

/* the book may be wider than the text column of the page */
.rk-section>.wrap{max-width:1240px}
/* ---- 04.11.2026, client (muudatused 29.10): "MENUU RAAMAT - sisu lehtede varv: vanutatud hele leht taustaks pruuni asemel" ----
   The content pages are PARCHMENT (public/backgrounds/pergamentti.webp, the aged "pergamentti" texture of the reservation pages) in BOTH themes, with
   the ink colours of the light theme: the dark theme's tokens (theme-dark.css) are put back to their light values INSIDE the paper, so every dark rule
   (headings, lead, rubric, links, first letters, buttons) reads dark ink on parchment. Contrast on the darkest parchment pixel: body #532511 and lead #6B4F35
   measure 9.4:1 and 5.5:1, the red links 6.5:1 (tests/site-raamat.test.js measures the file). The painted initials go back to the light art (generated below). */
@media (min-width:900px){
html[data-theme="dark"] .rk-paper{color-scheme:light;--oh-tx:#532511;--oh-hd:#532511;--oh-mu:#6B4F35;--oh-acc:#8B241D;--oh-lk:#8B241D;--oh-lkh:#5E1712;--oh-ln:rgba(83,37,17,.3);--oh-edge:#8B6E51;--oh-init:#C96125;--oh-btn:#8B241D;--oh-btnh:#6F1C17;--oh-focus:#8B241D;color:#532511}
html[data-theme="dark"] .rk-paper .btn-red{color:#FBF4E2;box-shadow:inset 0 0 0 1px rgba(226,164,104,.6)}
html[data-theme="dark"] .rk-paper .btn-red:hover{color:#FBF4E2}
html[data-theme="dark"] .rk-paper .btn-line:hover{color:#F4ECD6}
/* GENERATED from olde-hansa.css and ru-initials.css (the light initials): the dark initials are Golden Ochre for a dark ground */
html[data-theme="dark"] .rk-paper .ic-A{background-image:url(../site-img/6341bb97155ece7f9aedbdb386371fb3.webp)}
html[data-theme="dark"] .rk-paper .ic-B{background-image:url(../site-img/e917a560e7cd6a7838f51a7c9d4053e2.webp)}
html[data-theme="dark"] .rk-paper .ic-C{background-image:url(../site-img/308d2fccca2776cf24c3faec78c00784.webp)}
html[data-theme="dark"] .rk-paper .ic-D{background-image:url(../site-img/0042dfe1930b7d86c78dcc90a8b4b500.webp)}
html[data-theme="dark"] .rk-paper .ic-E{background-image:url(../site-img/b2e5b1cc0ecab5f3f97e58bf0f536bce.webp)}
html[data-theme="dark"] .rk-paper .ic-F{background-image:url(../site-img/71644a7e13b55cfbe85ee19f59a47d8a.webp)}
html[data-theme="dark"] .rk-paper .ic-G{background-image:url(../site-img/99caef315c9b267bbb1f1a75c25e2565.webp)}
html[data-theme="dark"] .rk-paper .ic-H{background-image:url(../site-img/a8c528d9a24d004971c9d37c9cd066a8.webp)}
html[data-theme="dark"] .rk-paper .ic-I{background-image:url(../site-img/62db4895eff57836ee27d2b802296951.webp)}
html[data-theme="dark"] .rk-paper .ic-J{background-image:url(../site-img/b60d4fe9cd15003502ac8a5c557f3aaf.webp)}
html[data-theme="dark"] .rk-paper .ic-K{background-image:url(../site-img/cc0584095a7cb8c1223e0ab790a087b0.webp)}
html[data-theme="dark"] .rk-paper .ic-L{background-image:url(../site-img/9497db3ff98c43d0b4e32464a919b0b7.webp)}
html[data-theme="dark"] .rk-paper .ic-M{background-image:url(../site-img/cc0c5fe3aedc514672d836ff5391dbab.webp)}
html[data-theme="dark"] .rk-paper .ic-N{background-image:url(../site-img/1f9a078d07a00418543ed2966f04ffa3.webp)}
html[data-theme="dark"] .rk-paper .ic-O{background-image:url(../site-img/397525bcd369b59994cdca256d4ef31f.webp)}
html[data-theme="dark"] .rk-paper .ic-P{background-image:url(../site-img/600de446082e776f67bf662b28ae0de0.webp)}
html[data-theme="dark"] .rk-paper .ic-Q{background-image:url(../site-img/62fac07fe5fba9d7a5843e0995d3eba0.webp)}
html[data-theme="dark"] .rk-paper .ic-R{background-image:url(../site-img/9d4423dc2d2abfaef448ad3a88d3accd.webp)}
html[data-theme="dark"] .rk-paper .ic-S{background-image:url(../site-img/5456decc977c277630d7a758b113bfea.webp)}
html[data-theme="dark"] .rk-paper .ic-T{background-image:url(../site-img/775fe26576125bc69d4c22b690b01dbd.webp)}
html[data-theme="dark"] .rk-paper .ic-U{background-image:url(../site-img/827b56d86a25f2071efc99bc4b014617.webp)}
html[data-theme="dark"] .rk-paper .ic-V{background-image:url(../site-img/fbc53fd98713ee8479ba8274b0d605ed.webp)}
html[data-theme="dark"] .rk-paper .ic-W{background-image:url(../site-img/f6156917f361df5885626f793742df2d.webp)}
html[data-theme="dark"] .rk-paper .ic-X{background-image:url(../site-img/1a332c425eeac0345f7d033b7cd7cea0.webp)}
html[data-theme="dark"] .rk-paper .ic-Y{background-image:url(../site-img/9f2b19b23e512ede1341ec3a4bba1ebb.webp)}
html[data-theme="dark"] .rk-paper .ic-Z{background-image:url(../site-img/c0b91c5bb1d989ed1ee245f770378c3e.webp)}
html[data-theme="dark"] .rk-paper .ic-Otilde{background-image:url(../site-img/ini-Otilde.webp)}
html[data-theme="dark"] .rk-paper .ic-Ouml{background-image:url(../site-img/ini-Ouml.webp)}
html[data-theme="dark"] .rk-paper .ic-Auml{background-image:url(../site-img/ini-Auml.webp)}
html[data-theme="dark"] .rk-paper .ic-Uuml{background-image:url(../site-img/ini-Uuml.webp)}
html[data-theme="dark"] .rk-paper .ic-А{background-image:url(../site-img/ru-ini-0410.webp)}
html[data-theme="dark"] .rk-paper .ic-Б{background-image:url(../site-img/ru-ini-0411.webp)}
html[data-theme="dark"] .rk-paper .ic-В{background-image:url(../site-img/ru-ini-0412.webp)}
html[data-theme="dark"] .rk-paper .ic-Г{background-image:url(../site-img/ru-ini-0413.webp)}
html[data-theme="dark"] .rk-paper .ic-Ж{background-image:url(../site-img/ru-ini-0416.webp)}
html[data-theme="dark"] .rk-paper .ic-З{background-image:url(../site-img/ru-ini-0417.webp)}
html[data-theme="dark"] .rk-paper .ic-И{background-image:url(../site-img/ru-ini-0418.webp)}
html[data-theme="dark"] .rk-paper .ic-Й{background-image:url(../site-img/ru-ini-0419.webp)}
html[data-theme="dark"] .rk-paper .ic-К{background-image:url(../site-img/ru-ini-041A.webp)}
html[data-theme="dark"] .rk-paper .ic-Л{background-image:url(../site-img/ru-ini-041B.webp)}
html[data-theme="dark"] .rk-paper .ic-М{background-image:url(../site-img/ru-ini-041C.webp)}
html[data-theme="dark"] .rk-paper .ic-Н{background-image:url(../site-img/ru-ini-041D.webp)}
html[data-theme="dark"] .rk-paper .ic-О{background-image:url(../site-img/ru-ini-041E.webp)}
html[data-theme="dark"] .rk-paper .ic-П{background-image:url(../site-img/ru-ini-041F.webp)}
html[data-theme="dark"] .rk-paper .ic-Р{background-image:url(../site-img/ru-ini-0420.webp)}
html[data-theme="dark"] .rk-paper .ic-С{background-image:url(../site-img/ru-ini-0421.webp)}
html[data-theme="dark"] .rk-paper .ic-Т{background-image:url(../site-img/ru-ini-0422.webp)}
html[data-theme="dark"] .rk-paper .ic-У{background-image:url(../site-img/ru-ini-0423.webp)}
html[data-theme="dark"] .rk-paper .ic-Ф{background-image:url(../site-img/ru-ini-0424.webp)}
html[data-theme="dark"] .rk-paper .ic-Х{background-image:url(../site-img/ru-ini-0425.webp)}
html[data-theme="dark"] .rk-paper .ic-Ц{background-image:url(../site-img/ru-ini-0426.webp)}
html[data-theme="dark"] .rk-paper .ic-Ч{background-image:url(../site-img/ru-ini-0427.webp)}
html[data-theme="dark"] .rk-paper .ic-Ш{background-image:url(../site-img/ru-ini-0428.webp)}
html[data-theme="dark"] .rk-paper .ic-Щ{background-image:url(../site-img/ru-ini-0429.webp)}
html[data-theme="dark"] .rk-paper .ic-Ъ{background-image:url(../site-img/ru-ini-042A.webp)}
html[data-theme="dark"] .rk-paper .ic-Ы{background-image:url(../site-img/ru-ini-042B.webp)}
html[data-theme="dark"] .rk-paper .ic-Ь{background-image:url(../site-img/ru-ini-042C.webp)}
html[data-theme="dark"] .rk-paper .ic-Э{background-image:url(../site-img/ru-ini-042D.webp)}
html[data-theme="dark"] .rk-paper .ic-Ю{background-image:url(../site-img/ru-ini-042E.webp)}
html[data-theme="dark"] .rk-paper .ic-Я{background-image:url(../site-img/ru-ini-042F.webp)}
}

/* the buttons of the book wrap instead of running out of the page (04.11.2026: "AVASTAGE MEIE PIDUSÖÖMINGUD" was clipped at 390 px; .btn is nowrap with letter-spacing; fi/de are longer still) */
.rk .btn{white-space:normal;text-align:center;line-height:1.25;padding-top:10px;padding-bottom:10px}

/* ---- 04.11.2026, owner: "on the phone the book is only on the Menu page, not on the landing page" ----
   Below the site's mobile breakpoint (899 px, public/ds/site.css) the landing page's menu section is NOT a book: the same markup (nothing is lost:
   intro, feasts, a la carte, whole menu, every heading, text, photo and button, in order) lies as plain sections on the page ground: no leather,
   no parchment, no page shadows, no dev note, and the leather picture is not even fetched. 900-1099 px (small laptops, tablets in landscape) keep
   the flat leather frame with two columns; 1100 px and wider the opening book. The parchment colours above apply from 900 px up only. */
@media (max-width:899.98px){
  .rk-proto{display:none}
  .rk{background:none;padding:0;border-radius:0;box-shadow:none}
  .rk-book{gap:44px}
  .rk-paper{background:none;color:inherit;padding:0;box-shadow:none;border-radius:0;height:auto}
  .rk-paper::after,.rk-face[data-rk-face="i"] .rk-paper::after,.rk-face[data-rk-face="a"] .rk-paper::after{display:none}
}
/* ==== 25.11.2026 (owner, dev feedback on the home page's open book: "this and the right should be parallel and symmetric") ====
   The two pages of the open book now line up row for row, whatever the (editable) texts are: the title reserves two lines on both pages, so the rubric, the text and the buttons start at the
   same height on the left and on the right; both pages' buttons have the same height (a long label that wraps no longer makes one page's row taller than the other's) and stand on the same
   line at the foot; the picture is a little flatter (16:9, was 16:10) and a long text stops at four lines, so the foot of the right page is never cut off (the "Avasta rohkem" button was). */
.rk-3d .rk-page .gal-frame{aspect-ratio:16/9}
.rk-3d .rk-page h3.dish{min-height:2.3em}
.rk-3d .rk-page>p:not(.rubric){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
.rk-page .acts .btn{min-height:58px}
