/* =====================================================================
   Кара-Жорго — warm hearth editorial.
   Charcoal-brown ground, cream type, one ember accent, a paper card for
   the reservation. Cormorant Garamond (display) + Manrope (body).
   Type scale 1.25, spacing 4/8-based. Mobile-first. No build step.
   ===================================================================== */

:root {
  --bg: #140f0b;
  --bg-2: #1c1510;
  --surface: #241b14;
  --paper: #f1e6d2;
  --paper-2: #e4d6bc;
  --ink: #1c1510;
  --ink-2: #4a3a2b;
  --ink-3: #6b5a45; /* 5.3:1 on --paper */
  --cream: #f3e9d7;
  --cream-2: #cbbea6;
  --muted: #a5977f;
  --ember: #e2782e;
  --ember-2: #f08a3f;
  --gold: #c9a35a;
  --ok: #55d47a;
  --line: rgba(243, 233, 215, 0.14);
  --line-strong: rgba(243, 233, 215, 0.3);
  --wa: #25d366;
  --tg: #2aabee;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  /* type scale, ratio 1.25 from 16px */
  --t-1: 0.8125rem; --t0: 1rem; --t1: 1.25rem; --t2: 1.5625rem; --t3: 1.953rem;
  --t4: 2.441rem; --t5: 3.052rem; --t6: 3.815rem;
  /* spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --wrap: 1200px;
  --pad: 20px;
  --header-h: 64px;
  --radius: 3px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.28s;
  --grade: sepia(0.34) saturate(1.06) contrast(1.03);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  color-scheme: dark; scrollbar-color: #4a3a2b var(--bg);
}
/* overflow-x only on <html>: set on <body> too, <body> stops propagating to the viewport
   and becomes a (never-scrolling) scroll container — the sticky header sticks to IT and
   scrolls away with the page. `clip` on body clips without creating a scroll container. */
html { overflow-x: hidden; }
body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font-family: var(--body); font-size: var(--t0); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ember); color: #1a0f05; }
/* grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.grade { filter: var(--grade); }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.08; font-family: var(--display); text-wrap: balance; }
p { margin: 0 0 1em; }
/* no single-word last lines on running text (Chrome 117+; others ignore) */
p, .note, .stats dd, .review footer span { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--s8); position: relative; }
.muted { color: var(--muted); }
.num { font-variant-numeric: lining-nums tabular-nums; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ember); color: #1a0f05; padding: 8px 14px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--body); font-size: var(--t-1); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--s4); font-weight: 600; text-wrap: balance;
}
.h2 { font-size: clamp(var(--t4), 4.6vw, var(--t6)); letter-spacing: -0.01em; margin-bottom: var(--s4); }
.h3 { font-size: var(--t2); margin-bottom: var(--s2); }
.lede { font-size: var(--t1); font-family: var(--display); font-style: italic; color: var(--cream-2); max-width: 46ch; line-height: 1.4; }
.section-head { margin-bottom: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.section-head .lede { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
  white-space: nowrap;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ember-2);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ember); color: #1a0f05; border-color: var(--ember); }
.btn-primary:hover { border-color: var(--ember-2); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line-strong); }
.btn-ghost::before { background: rgba(243, 233, 215, 0.08); }
.btn-ghost:hover { border-color: var(--cream); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-wa { background: transparent; color: #7ff0a6; border-color: rgba(37, 211, 102, 0.45); }
.btn-wa::before { background: rgba(37, 211, 102, 0.16); }
.btn-tg { background: transparent; color: #8fd4ff; border-color: rgba(42, 171, 238, 0.45); }
.btn-tg::before { background: rgba(42, 171, 238, 0.16); }
/* text link with a drawn underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  color: var(--cream); text-decoration: none; font-weight: 600; font-size: 15px;
}
.link-arrow span { position: relative; }
.link-arrow span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--ember);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.link-arrow:hover span::after { transform: scaleX(1); }
.link-arrow svg { width: 16px; height: 16px; color: var(--ember); transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateY(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 15, 11, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur);
}
.site-header.condensed { background: rgba(20, 15, 11, 0.92); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); transition: min-height var(--dur) var(--ease); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); margin-right: auto; min-width: 0; }
.brand-mark { width: 32px; height: 32px; color: var(--ember); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font-family: var(--display); font-size: var(--t1); font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.brand-tag {
  display: none; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin-top: 3px; white-space: nowrap; overflow: hidden; max-height: 16px; transition: max-height var(--dur) var(--ease), opacity var(--dur);
}
.condensed .brand-tag { max-height: 0; opacity: 0; margin-top: 0; }
@media (min-width: 480px) {
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 22px; }
  .brand-tag { display: block; }
}
.nav { display: none; gap: 26px; }
.nav a { text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--cream-2); position: relative; padding: 4px 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover { color: var(--cream); }
.nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lang { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.lang button {
  background: none; border: 0; padding: 6px 4px; cursor: pointer; font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 600; border-radius: 3px; min-height: 44px; min-width: 28px;
}
@media (min-width: 480px) { .header-actions { gap: 10px; } .lang { gap: 4px; } }
.lang button:hover { color: var(--cream); }
.lang button[aria-pressed="true"] { color: var(--ember); }
.phone-link { display: none; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--cream); }
.phone-link svg { width: 18px; height: 18px; color: var(--ember); }
.phone-link:hover { color: var(--ember); }
.header-actions .btn-primary { display: none; }
.burger {
  width: 44px; height: 44px; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  display: grid; place-content: center; gap: 4px; cursor: pointer;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--cream); transition: transform 0.3s var(--ease), opacity 0.3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile nav drawer — the header's backdrop-filter is its containing block, so the
   height must be explicit (top/bottom would collapse inside a 64 px header) */
body.nav-open { overflow: hidden; }
.nav.open {
  display: flex; flex-direction: column; gap: 0;
  position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 49;
  height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
  background: var(--bg-2); padding: var(--s2) var(--pad) var(--s6); overflow-y: auto;
  animation: drop 0.3s var(--ease);
}
.nav.open a { padding: 16px 0; font-size: var(--t2); border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 500; color: var(--cream); }
.nav.open a::after { display: none; }
/* drawer foot: phone + the reservation CTA, so a CTA exists while the drawer is open */
.nav-extra { display: none; }
.nav.open .nav-extra { display: flex; flex-direction: column; gap: var(--s3); margin-top: auto; padding-top: var(--s6); }
.nav.open .nav-extra a { border: 0; padding: 0; }
.nav.open .nav-phone { font-size: var(--t3); color: var(--cream); text-decoration: none; padding: var(--s2) 0; }
.nav.open .nav-phone small { display: block; font-family: var(--body); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.nav.open .nav-extra .btn { font-family: var(--body); font-size: 15px; font-weight: 600; padding: 12px 24px; color: #1a0f05; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* mobile bottom bar: phone · WhatsApp · reserve */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 48;
  display: flex; gap: 8px; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  background: rgba(20, 15, 11, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform 0.35s var(--ease);
}
.mobile-cta.show { transform: none; }
.mobile-cta .btn-primary { flex: 1; }
.mobile-cta .btn-ghost, .mobile-cta .btn-wa { flex: 0 0 48px; padding: 0; }
.mobile-cta svg { width: 20px; height: 20px; }
.mobile-cta .btn-ghost svg { color: var(--ember); }

/* ---------- Hero: type on the ground, the fire bleeding in from the right ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--bg); }
.hero-media { position: relative; height: 56svh; min-height: 300px; max-height: 520px; overflow: hidden; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover; object-position: 62% 38%;
  transform: scale(1.06); animation: heroZoom 7s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,15,11,0.35) 0%, rgba(20,15,11,0) 30%, rgba(20,15,11,0.2) 60%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 1; margin-top: -88px; padding-bottom: var(--s7); }
.hero .eyebrow { color: var(--gold); margin-bottom: var(--s3); }
.hero-title {
  font-size: clamp(2.75rem, 6.6vw, 5.5rem); line-height: 0.96; letter-spacing: -0.015em;
  font-weight: 500; margin-bottom: var(--s5); max-width: 12ch;
}
.hero-title em { font-style: italic; font-weight: 500; color: var(--ember); }
/* Kyrgyz runs longer: one more ch keeps «тамагы, жалын» and «кечки тамактар» whole */
html[lang="ky"] .hero-title { max-width: 14ch; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.125rem); color: var(--cream-2); max-width: 46ch; margin-bottom: var(--s5); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin-bottom: var(--s6); }
.hero-facts {
  list-style: none; margin: 0; padding: var(--s4) 0 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--cream-2);
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts .num { white-space: nowrap; }
.hero-facts .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(85,212,122,0.18); }

/* page-load orchestration: 5 pieces, 80 ms apart, 600 ms each — the last lands at 0.96 s */
.reveal-load { opacity: 0; transform: translateY(16px); animation: rise 0.6s var(--ease) forwards; }
.reveal-load:nth-child(1) { animation-delay: 0.04s; }
.reveal-load:nth-child(2) { animation-delay: 0.12s; }
.reveal-load:nth-child(3) { animation-delay: 0.2s; }
.reveal-load:nth-child(4) { animation-delay: 0.28s; }
.reveal-load:nth-child(5) { animation-delay: 0.36s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* scroll reveal — only when JS is there to flip it */

/* ---------- Facts bar ---------- */
.facts-bar { background: var(--bg-2); border-block: 1px solid var(--line); position: relative; z-index: 1; }
.facts-inner { display: grid; gap: var(--s4); padding-block: var(--s5); }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fact-value { font-size: 15.5px; color: var(--cream); text-decoration: none; font-weight: 500; }
a.fact-value:hover { color: var(--ember); }
/* hours: three segments — stacked below 900 so no « · » ever dangles at a line end,
   one dotted line from 900 where the column is sized for the KG/EN strings */
.fact-value .seg { display: block; white-space: nowrap; }
.fact-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; margin-top: 2px; }
.fact-links a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(201,163,90,0.35); transition: border-color var(--dur); }
.fact-links a:hover { border-color: var(--gold); }

/* ---------- Ornament divider (kochkor-muyuz rhombus rhythm) ---------- */
.ornament {
  height: 14px; margin: 0 auto; width: min(100% - 2 * var(--pad), 520px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M7 1l6 6-6 6-6-6z' fill='none' stroke='%23c9a35a' stroke-width='1.1'/%3E%3Cpath d='M21 4l3 3-3 3-3-3z' fill='%23e2782e'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center; opacity: 0.8;
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: var(--s7); align-items: center; }
.about-text .h2 { margin-bottom: var(--s5); }
.about-text p:not(.eyebrow) { color: var(--cream-2); font-size: var(--t0); max-width: 62ch; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: var(--s6) 0 0; padding-top: var(--s5); border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats dt { font-family: var(--display); font-size: var(--t4); color: var(--ember); line-height: 1; font-variant-numeric: lining-nums; }
.stats dd { margin: 0; font-size: var(--t-1); color: var(--muted); line-height: 1.4; max-width: 18ch; }
.about-media { position: relative; padding-bottom: 56px; }
.about-img-main { width: 80%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.about-img-small {
  position: absolute; right: 0; bottom: 0; width: 50%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); border: 6px solid var(--bg); box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}

/* ---------- Menu: a printed card, and the dish that follows your hand ---------- */
.menu { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 25%, var(--bg-2) 75%, var(--bg) 100%); }
.menu-foot { display: flex; flex-direction: column; gap: var(--s5); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.note { font-size: 14px; color: var(--muted); margin: 0; max-width: 60ch; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; grid-auto-rows: 150px; grid-auto-flow: dense; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.5s; filter: var(--grade); }
.gallery-grid figure:hover img { transform: scale(1.03); filter: sepia(0.05) saturate(1.04) contrast(1.02); }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
.g-flame img { object-position: 58% 44%; } /* the pan and the flame, not the ceiling */
.about-img-small { object-position: 50% 55%; }

/* ---------- Reviews: typeset, not carded ---------- */
.review-grid { display: grid; gap: 0; border-top: 1px solid var(--line); }
.review { margin: 0; padding: var(--s5) 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.review p:not(.stars) { font-family: var(--display); font-style: italic; font-size: var(--t2); line-height: 1.3; color: var(--cream); flex: 1; margin-bottom: var(--s4); text-wrap: pretty; }
.review p:not(.stars)::before { content: "«"; color: var(--ember); }
.review p:not(.stars)::after { content: "»"; color: var(--ember); }
.review footer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.review cite { font-style: normal; font-weight: 600; font-size: 14.5px; }
.review footer span { font-size: var(--t-1); color: var(--muted); }
.stars { color: var(--gold); letter-spacing: 0.08em; font-size: 12px; margin: 0 0 var(--s2); order: -1; }

/* ---------- Reservation: a maître d' card ---------- */
.reserve { background: var(--bg-2); }
.reserve-grid { display: grid; gap: var(--s7); }
.reserve-intro .h2 { margin-bottom: var(--s4); }
.reserve-intro .lede { margin-bottom: var(--s6); }
.or-call { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: var(--s3); }
.msgr-row { display: flex; flex-wrap: wrap; gap: 10px; }
.card {
  position: relative; background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: var(--s5) var(--s5) var(--s6);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 2px 0 var(--paper-2);
}
.card::before {
  content: ""; position: absolute; left: var(--s5); right: var(--s5); top: 0; height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M7 1l6 6-6 6-6-6z' fill='none' stroke='%23c25f1c' stroke-width='1.1'/%3E%3Cpath d='M21 4l3 3-3 3-3-3z' fill='%23c25f1c'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center; opacity: 0.55; transform: translateY(6px);
}
.card-head { display: flex; justify-content: space-between; gap: var(--s4); align-items: baseline; padding-top: var(--s4); margin-bottom: var(--s5); border-bottom: 1px solid rgba(28,21,16,0.18); padding-bottom: var(--s3); }
.card-head .brand-name { font-size: var(--t1); color: var(--ink); }
.card-head span:last-child { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.reserve-form { display: grid; gap: var(--s4); }
.field { display: grid; gap: 4px; }
.field-row { display: grid; gap: var(--s4); grid-template-columns: 1fr 1fr; }
.field-row .field:last-child { grid-column: span 2; }
.card label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.card input, .card select, .card textarea {
  width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid rgba(28,21,16,0.35); border-radius: 0;
  padding: 10px 0; font: inherit; font-size: 17px; min-height: 44px; color-scheme: light; font-family: var(--display); font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.card select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a3a2b' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; padding-right: 22px; cursor: pointer; }
.card textarea { resize: vertical; min-height: 72px; font-family: var(--body); font-size: 15px; font-weight: 400; }
.card input::placeholder, .card textarea::placeholder { color: rgba(74,58,43,0.55); opacity: 1; font-family: var(--body); font-size: 14px; font-weight: 400; }
.card input:focus, .card select:focus, .card textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 1px 0 var(--ember); }
.field.invalid input, .field.invalid select { border-color: #b8321f; }
.err { margin: 0; font-size: 12.5px; color: #b8321f; font-weight: 500; }
.privacy { margin: 0; font-size: 12px; color: var(--ink-3); }
.reserve-form.sending .btn-primary { opacity: 0.6; pointer-events: none; }
.reserve-form .btn-primary { margin-top: var(--s2); }
/* success: the same card, stamped */
.reserve-success { display: grid; gap: var(--s3); justify-items: start; text-align: left; }
.reserve-success .h3 { font-size: var(--t3); color: var(--ink); margin-top: var(--s4); }
.reserve-success p { color: var(--ink-2); max-width: 40ch; font-size: 15px; }
.stamp {
  display: inline-block; padding: 7px 16px; border: 2px solid #a8281a; border-radius: 4px; color: #a8281a;
  font-family: var(--body); font-weight: 700; font-size: 15px; letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px #a8281a;
  transform: rotate(-6deg); margin: var(--s3) 0 0 var(--s2);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.2 0.1'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.2 0.1'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
html.js .stamp { animation: stampIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; animation-delay: 0.25s; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-14deg) scale(1.6); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.reserve-success .btn-ghost { color: var(--ink); border-color: rgba(28,21,16,0.35); margin-top: var(--s3); }
.reserve-success .btn-ghost::before { background: rgba(28,21,16,0.08); }
.reserve-success .btn-ghost:hover { border-color: var(--ink); }
.reserve-success .summary { font-family: var(--display); font-size: var(--t1); color: var(--ink); margin: 0; }
.reserve-success .summary span { display: block; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: var(--s5); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 44px 18px 0; font-family: var(--display); font-size: var(--t2); font-weight: 500;
  position: relative; transition: color var(--dur); min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--body); font-size: 26px; font-weight: 400; color: var(--ember); transition: transform 0.3s var(--ease);
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:hover { color: var(--ember); }
.faq-list details p { margin: 0 0 var(--s5); color: var(--cream-2); max-width: 62ch; font-size: 15.5px; }

/* ---------- Contacts: three columns on rules ---------- */
.contact-grid { display: grid; gap: var(--s5); }
.contact-col { border-top: 1px solid var(--line-strong); padding-top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.contact-col .h3 { font-size: 11px; font-family: var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: var(--s2); }
.contact-col .big { font-family: var(--display); font-size: var(--t2); line-height: 1.2; margin: 0 0 4px; color: var(--cream); text-decoration: none; transition: color var(--dur); font-variant-numeric: lining-nums tabular-nums; }
.contact-col .link:hover { color: var(--ember); }
.contact-col .muted { font-size: 14px; max-width: 34ch; }
.map-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: var(--s3); }
.hours { margin: 0; display: grid; gap: 8px; }
.hours div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.hours div:last-child { border-bottom: 0; }
.hours dt { color: var(--cream-2); font-size: 15px; }
.hours dd { margin: 0; font-family: var(--display); font-size: var(--t1); color: var(--cream); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.ig { margin-top: var(--s2); color: var(--gold); text-decoration: none; font-weight: 600; font-size: 15px; transition: color var(--dur); }
.ig:hover { color: var(--ember); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s7) 0 calc(var(--s10) - var(--s4)); background: var(--bg); }
.footer-inner { display: grid; gap: var(--s5); }
.footer-brand .brand-name { font-size: var(--t2); display: block; margin-bottom: 6px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.footer-nav a { color: var(--cream-2); text-decoration: none; transition: color var(--dur); }
.footer-nav a:hover { color: var(--ember); }
.footer-legal { font-size: var(--t-1); color: var(--cream-2); margin: 0; line-height: 1.7; }

/* ---------- Floating messengers (desktop only; on mobile they live in the bottom bar) ---------- */
.float-msgr { display: none; position: fixed; right: 24px; bottom: 24px; z-index: 47; flex-direction: column; gap: 10px; }
.float-msgr { transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
/* yields while a CTA row sits under it (see initFloatYield) */
.float-msgr.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,0.45); transition: filter var(--dur), box-shadow var(--dur);
}
.float-btn:hover { filter: brightness(1.08); box-shadow: 0 14px 30px rgba(0,0,0,0.55); }
.float-btn svg { width: 26px; height: 26px; }
.float-wa { background: var(--wa); }
.float-tg { background: var(--tg); }

/* =====================================================================
   Breakpoints
   ===================================================================== */
@media (min-width: 640px) {
  :root { --pad: 28px; }
  .section { padding-block: var(--s9); }
  .facts-inner { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s5) var(--s7); }
  .review-grid { grid-template-columns: 1fr 1fr; column-gap: var(--s7); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; }
  .field-row { grid-template-columns: 1fr 1fr 1fr; }
  .field-row .field:last-child { grid-column: auto; }
  .menu-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .card { padding: var(--s6) var(--s7) var(--s7); }
  .card::before { left: var(--s7); right: var(--s7); }
  .reserve-success .summary span { display: inline; }
  .reserve-success .summary span + span::before { content: " · "; color: var(--ink-3); }
}

@media (min-width: 900px) {
  :root { --header-h: 72px; }
  .site-header.condensed { --header-h: 60px; }
  .nav { display: flex; gap: 20px; }
  .nav a { font-size: 14px; }
  .phone-link { display: flex; }
  /* 900–1199: brand + 6 links + lang + phone + CTA do not fit — phone becomes an icon,
     the tagline goes; both return at 1200 */
  .phone-link .num { display: none; }
  .phone-link { width: 40px; height: 40px; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--radius); }
  .brand-tag { display: none; }
  .header-actions .btn-primary { display: inline-flex; }
  .burger { display: none; }
  .mobile-cta { display: none; }
  .float-msgr { display: flex; }

  /* hero: image bleeds in from the right, the title runs over it */
  .hero { min-height: clamp(600px, calc(100svh - var(--header-h)), 880px); display: flex; align-items: center; }
  .hero-media { position: absolute; top: 0; bottom: 0; right: 0; width: 54%; height: auto; max-height: none; min-height: 0; }
  .hero-media::after {
    background:
      linear-gradient(90deg, var(--bg) 0%, rgba(20,15,11,0.72) 18%, rgba(20,15,11,0.1) 48%, rgba(20,15,11,0) 70%),
      linear-gradient(180deg, rgba(20,15,11,0.35) 0%, rgba(20,15,11,0) 30%, rgba(20,15,11,0) 70%, var(--bg) 100%);
  }
  .hero-inner { margin-top: 0; padding: var(--s9) 0 var(--s8); width: min(100% - 2 * var(--pad), var(--wrap)); }
  .hero-title { max-width: 13ch; }
  /* KG: «Тоолордун тамагы, / жалын жана узак / кечки тамактар» — three lines like RU */
  html[lang="ky"] .hero-title { max-width: 16ch; }
  .hero-sub, .hero-cta, .hero .eyebrow { max-width: 52%; }
  .hero-facts { max-width: 60%; }

  .about-grid { grid-template-columns: 1.05fr 1fr; gap: var(--s9); }
  .reserve-grid { grid-template-columns: 1fr 1.2fr; gap: var(--s8); align-items: start; }
  .reserve-intro { position: sticky; top: calc(var(--header-h) + 24px); }
  .faq-grid { grid-template-columns: 1fr 1.6fr; gap: var(--s8); align-items: start; }
  .contact-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s7); }
  .footer-inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
  .site-footer { padding-bottom: var(--s7); }
  /* hours column sized for the KG/EN strings (≈ 490 px), not just RU */
  .facts-inner { grid-template-columns: 1.65fr 1.35fr 0.7fr; }
  .fact-value .seg { display: inline; }
  .fact-value .seg + .seg::before { content: " · "; color: var(--muted); white-space: normal; }
  .gallery-grid { grid-auto-rows: 230px; gap: 10px; }
}

@media (min-width: 1040px) {
}

@media (min-width: 1200px) {
  .hero-title { font-size: 5.5rem; }
  .nav { gap: 26px; }
  .nav a { font-size: 14.5px; }
  .phone-link .num { display: inline; }
  .phone-link { width: auto; height: auto; border: 0; justify-content: flex-start; }
  .brand-tag { display: block; }
}

/* ---------- Reduced motion: everything static ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal-load { opacity: 1; transform: none; }
  .hero-img { transform: none; }
}

/* ---------- Menu book: one page on phones, a two-page spread from 900 px ---------- */
.book {
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23p)'/%3E%3C/svg%3E");
  --leather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='l'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .86 0 0 0 0 .7 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23l)'/%3E%3C/svg%3E");
  --orn-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M7 1l6 6-6 6-6-6z' fill='none' stroke='%23c9a35a' stroke-width='1.1'/%3E%3Cpath d='M21 4l3 3-3 3-3-3z' fill='%23e2782e'/%3E%3C/svg%3E");
  --orn-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M7 1l6 6-6 6-6-6z' fill='none' stroke='%236b5a45' stroke-width='1.1'/%3E%3Cpath d='M21 4l3 3-3 3-3-3z' fill='%23b8581e'/%3E%3C/svg%3E");
  position: relative; max-width: 440px; margin: 0 auto;
}
/* bookmark ribbons hang over the top edge */
.book-ribbons { display: none; }
.book.is-ready .book-ribbons {
  position: relative; z-index: 6; display: flex; gap: 6px; padding: 0 12px; margin-bottom: -8px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.book.is-ready .book-ribbons.is-overflow { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 32px), transparent); }
.book-ribbons::-webkit-scrollbar { display: none; }
.book-ribbons button {
  flex: none; min-height: 44px; padding: 8px 12px 16px; border: 0; cursor: pointer; white-space: nowrap;
  background: #6b2e1c; color: var(--paper); font: 600 12.5px/1.2 var(--body); letter-spacing: 0.02em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%);
  transform: translateY(-4px); transition: transform var(--dur) var(--ease), background var(--dur), color var(--dur);
}
.book-ribbons button:hover { transform: translateY(-1px); }
.book-ribbons button[aria-current="true"] { background: var(--ember); color: #1a0f05; transform: translateY(2px); }
.book-ribbons button:focus-visible { outline-offset: -3px; }

/* the stage: pages sit in slots at rest; a turning page is a 3D leaf */
.book-stage { position: relative; }
.book.is-ready .book-stage {
  height: var(--page-h, 640px); perspective: 2200px; touch-action: pan-y; outline: none; cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform 0.6s var(--ease);
}
.book.is-dragging .book-stage { cursor: grabbing; }
.book-page {
  position: relative; z-index: 1; margin: 0 0 var(--s5); padding: 18px 18px 44px; color: var(--ink);
  background-color: var(--paper); background-image: linear-gradient(90deg, rgba(70,45,20,0.2), rgba(70,45,20,0) 26px), var(--tex);
  border-radius: 2px 8px 8px 2px; box-shadow: 0 30px 60px rgba(0,0,0,0.45), 0 1px 0 var(--paper-2);
}
.book.is-ready .book-page { position: absolute; top: 0; left: 0; width: 100%; height: var(--page-h); margin: 0; overflow: hidden; visibility: hidden; }
.book.is-ready .book-page.is-shown { visibility: visible; }
.book.is-ready .book-stage.is-measuring .book-page { height: auto; }
.book-page img { -webkit-user-drag: none; }
/* shadow a turning leaf casts on the pages under it */
.book-page::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(90deg, rgba(20,12,6,0.6), rgba(20,12,6,0) 70%); opacity: var(--cast-r, 0); }
.book-page.slot-left::after { background: linear-gradient(270deg, rgba(20,12,6,0.6), rgba(20,12,6,0) 70%); opacity: var(--cast-l, 0); }
/* the thickness of the pages still to turn / already turned */
.book.is-ready .book-stage::before, .book.is-ready .book-stage::after {
  content: ""; position: absolute; top: 5px; bottom: 5px; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, #cbbd9f 0 1px, #efe4ce 1px 2px);
  transition: width 0.3s var(--ease), left 0.3s var(--ease), right 0.3s var(--ease);
}
.book.is-ready .book-stage::after { right: calc(-1 * var(--stack-r, 0px)); width: var(--stack-r, 0px); border-radius: 0 3px 3px 0; }
.book.is-ready .book-stage::before { left: calc(-1 * var(--stack-l, 0px)); width: var(--stack-l, 0px); border-radius: 3px 0 0 3px; }

/* page furniture */
.pg-run { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid rgba(28,21,16,0.16); font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.pg-title { margin: 8px 0 4px; font-size: clamp(1.8rem, 7vw, 2.3rem); font-weight: 600; color: var(--ink); }
.pg-photo { position: relative; margin: 0 0 var(--s2); padding: 5px 5px 0; background: #fbf6ec; box-shadow: 0 1px 2px rgba(28,21,16,0.28), 0 10px 20px -8px rgba(28,21,16,0.3); transform: rotate(-0.7deg); }
.pg-photo img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; filter: var(--grade); }
.pg-photo.is-tall img { aspect-ratio: 16 / 10; }
.pg-photo.is-band img, .pg-photo.is-short img { aspect-ratio: 5 / 2; }
.pg-photo figcaption { padding: 5px 2px 6px; font-family: var(--display); font-style: italic; font-size: 15px; line-height: 1.25; color: var(--ink-2); }
.pg-photo::before, .pg-photo::after { content: ""; position: absolute; width: 16px; height: 16px; background: rgba(40,28,18,0.72); }
.pg-photo::before { top: -2px; left: -2px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.pg-photo::after { bottom: -2px; right: -2px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.book .menu-list { list-style: none; margin: 0; padding: 0; }
.book .item { padding: 7px 0 8px; border-bottom: 1px dashed rgba(28,21,16,0.16); }
.book .item:last-child { border-bottom: 0; }
.item-head { display: flex; align-items: baseline; gap: 8px; }
.item h4 { flex: 0 1 auto; margin: 0; font-family: var(--display); font-size: 1.18rem; font-weight: 600; line-height: 1.15; color: var(--ink); text-wrap: pretty; }
.leader { flex: 1 1 16px; min-width: 16px; border-bottom: 1px dotted rgba(28,21,16,0.42); transform: translateY(-5px); }
.price { flex: none; font-family: var(--display); font-size: 1.18rem; font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.price small { margin-left: 2px; font-family: var(--body); font-size: 11px; font-weight: 600; color: var(--ink-3); }
.book .item p { margin: 2px 0 0; max-width: 52ch; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.toc { list-style: none; margin: var(--s3) 0 var(--s4); padding: 0; }
.toc li + li { border-top: 1px dashed rgba(28,21,16,0.16); }
.toc button { display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 52px; padding: 12px 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); font-family: var(--display); font-size: 1.5rem; font-weight: 500; line-height: 1.1; }
.toc button b { font-weight: 600; font-size: 1.25rem; color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
.toc button:hover span, .toc button:focus-visible span { color: #a8481a; }
.toc .leader { transform: translateY(-6px); }
.book.is-ready .page-toc { display: flex; flex-direction: column; }
.book.is-ready .page-toc .pg-orn { margin-top: auto; }
.pg-cont { margin-left: 4px; font-style: italic; font-weight: 500; font-size: 0.55em; color: var(--ink-3); white-space: nowrap; }
.pg-note { margin: 0; padding: 0; text-align: center; }
.pg-note p { margin: 0 auto; max-width: 30ch; font-family: var(--display); font-style: italic; font-size: 1.2rem; line-height: 1.35; color: var(--ink-2); }
.pg-note footer { margin-top: var(--s2); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.pg-orn { display: block; width: 62%; height: 14px; margin: var(--s5) auto var(--s3); background: var(--orn-ink) repeat-x center; opacity: 0.75; }
.pg-legend { margin: 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.pg-num { position: absolute; left: 0; right: 0; bottom: 13px; margin: 0; text-align: center; font-family: var(--display); font-style: italic; font-size: 15px; color: var(--ink-3); }
.book:not(.is-ready) .pg-num { position: static; margin-top: var(--s4); }

/* covers: dark leather, gold foil */
.page-cover, .page-back {
  display: flex; padding: 16px; color: var(--cream); background-color: #2b1d13;
  background-image: radial-gradient(130% 90% at 25% 8%, rgba(255,214,160,0.13), rgba(0,0,0,0) 55%), linear-gradient(90deg, rgba(0,0,0,0.5), rgba(0,0,0,0) 28px), var(--leather);
  box-shadow: 0 34px 70px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,220,170,0.07);
}
.page-back { background-image: radial-gradient(130% 90% at 75% 92%, rgba(255,214,160,0.12), rgba(0,0,0,0) 55%), linear-gradient(90deg, rgba(0,0,0,0.5), rgba(0,0,0,0) 28px), var(--leather); }
.cover-frame { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3); padding: var(--s7) var(--s5); text-align: center; border: 1px solid rgba(201,163,90,0.5); outline: 1px solid rgba(201,163,90,0.22); outline-offset: -8px; border-radius: 2px 5px 5px 2px; }
.cover-mark { width: 56px; height: 56px; color: var(--gold); }
.cover-kicker { margin: var(--s3) 0 0; padding-left: 0.5em; font-size: 11px; font-weight: 600; letter-spacing: 0.5em; text-transform: uppercase; color: var(--gold); }
.cover-title { margin: 0; font-size: clamp(2.6rem, 12vw, 3.5rem); font-weight: 600; line-height: 1; letter-spacing: 0.01em; background: linear-gradient(180deg, #f6e1ae 0%, #d2ad63 50%, #9d7a3b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.cover-sub { margin: 0; font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--cream-2); }
.cover-orn { display: block; width: 72%; height: 14px; margin: var(--s3) 0; background: var(--orn-gold) repeat-x center; opacity: 0.8; }
.cover-hint { display: inline-flex; align-items: center; gap: 8px; margin: var(--s5) 0 0; font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cover-hint svg { width: 16px; height: 16px; color: var(--ember); }
.book:not(.is-ready) .cover-hint { display: none; }
.back-title { margin: 0; font-size: clamp(2.2rem, 9vw, 2.8rem); font-weight: 500; color: var(--cream); }
.back-sub { margin: 0; max-width: 30ch; font-size: 15px; color: var(--cream-2); }
.page-back .btn { margin-top: var(--s4); }
.back-restart { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; margin-top: var(--s2); border: 0; background: none; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--gold); }
.back-restart svg { width: 16px; height: 16px; }

/* the turning leaf */
.leaf { position: absolute; top: 0; left: 0; z-index: 5; width: 100%; height: var(--page-h); pointer-events: none; transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform; }
.leaf-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 2px 8px 8px 2px; box-shadow: 0 0 calc(var(--lift, 0) * 40px) rgba(0,0,0,calc(var(--lift, 0) * 0.45)); }
.leaf-back { transform: rotateY(180deg); border-radius: 8px 2px 2px 8px; }
.leaf .book-page::after { display: none; }
.leaf-blank { background: var(--paper-2) var(--tex); }
.leaf-endpaper { background-color: #2e2118; background-image: var(--orn-gold), var(--leather); background-size: 28px 14px, auto; opacity: 1; }
.leaf-shade { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: var(--shade, 0); background: linear-gradient(90deg, rgba(30,18,8,0.7), rgba(30,18,8,0.05) 80%); }
.leaf-back .leaf-shade { background: linear-gradient(270deg, rgba(30,18,8,0.7), rgba(30,18,8,0.05) 80%); }

/* controls under the book */
.book-controls { display: none; }
.book.is-ready .book-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s5); }
.book-btn { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--cream); cursor: pointer; transition: border-color var(--dur), background var(--dur), opacity var(--dur); }
.book-btn svg { width: 20px; height: 20px; }
.book-btn:hover:not(:disabled) { border-color: var(--ember); background: rgba(226,120,46,0.12); }
.book-btn:disabled { opacity: 0.28; cursor: default; }
.book-status { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; margin: 0; text-align: center; }
.book-status-label { font-family: var(--display); font-style: italic; font-size: var(--t1); line-height: 1.2; color: var(--cream); }
.book-status-num { font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }
.book-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (min-width: 900px) {
  .book { max-width: 1000px; }
  .book.is-ready .book-ribbons { -webkit-mask-image: none; mask-image: none; }
  .pg-photo img { aspect-ratio: 16 / 9; }
  .pg-photo.is-tall img { aspect-ratio: 4 / 3; }
  .pg-photo.is-band img { aspect-ratio: 2 / 1; }
  .pg-photo.is-short img { aspect-ratio: 16 / 9; }
  .book .item { padding: 9px 0 10px; }
  .book .item p { line-height: 1.45; }
  .pg-run { margin-bottom: var(--s4); }
  .pg-title { margin: var(--s3) 0 var(--s2); }
  .item h4, .price { font-size: 1.3rem; }
  .book .item p { font-size: 13.5px; }
  .book.is-ready .book-ribbons { justify-content: center; }
  .book-page { padding: 30px 40px 60px; }
  .page-cover, .page-back { padding: 22px; }
  .book.is-ready .book-page { width: 50%; }
  .book.is-ready .book-page.slot-right, .book.is-ready .leaf { left: 50%; width: 50%; }
  .book.is-ready .book-page.slot-left { left: 0; border-radius: 8px 2px 2px 8px; background-image: linear-gradient(270deg, rgba(70,45,20,0.22), rgba(70,45,20,0) 30px), var(--tex); }
  .book.is-ready .page-back.slot-left { background-image: radial-gradient(130% 90% at 75% 92%, rgba(255,214,160,0.12), rgba(0,0,0,0) 55%), linear-gradient(270deg, rgba(0,0,0,0.5), rgba(0,0,0,0) 28px), var(--leather); }
  /* closed book sits centred; it slides over as it opens */
  .book.at-cover .book-stage { transform: translateX(-25%); }
  .book.at-back .book-stage { transform: translateX(25%); }
  @media (hover: hover) {
    .book.is-ready:not(.is-flipping) .book-page.slot-right.is-shown { transform-origin: 0 50%; transition: transform 0.35s var(--ease); }
    .book.is-ready:not(.is-flipping) .book-page.slot-right.is-shown:hover { transform: rotateY(-3deg); }
  }
}
/* clones inside the leaf always fill their face (beats the slot rules above) */
.book.is-ready .leaf .leaf-face > .book-page { left: 0; width: 100%; height: 100%; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .book.is-ready .book-stage, .book-ribbons button, .book-btn { transition: none; }
}
