/* Royal Groom 20261018b — тема, версия, герой, мастера, коллаж, собака */
:root { --rg: #1c1919; --rg2: #262223; --rg3: #302c2d; }

html[data-theme="dark"] {
  --bg: #1c1919;
  --bg2: #262223;
  --bg3: #302c2d;
  --line: #3f3b3c;
  --txt: #f5f1ea;
  --mut: #a39d96;
  --gold: #d9ad62;
  --gold2: #f1d49a;
  --gold3: #a87e3a;
  background: #1c1919;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .section,
html[data-theme="dark"] .section--alt,
html[data-theme="dark"] .features,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .header,
html[data-theme="dark"] .topbar {
  background-color: #1c1919;
  color: #f5f1ea;
}
html[data-theme="light"] {
  --bg: #f7f0e6;
  --bg2: #fffaf4;
  --bg3: #f3e6d6;
  --line: #e3d2c0;
  --txt: #3d1c22;
  --mut: #6b4c45;
  --gold: #8a5a14;
  --gold2: #6a3018;
  --gold3: #b08948;
}

.header, .topbar { background: var(--rg) !important; color: #f6efe4 !important; }
.topbar a, .header .nav a, .header__phone, .header__brand { color: #f6efe4 !important; }
.header__phone small { color: #f1d49a !important; }
.header { position: sticky; top: 0; z-index: 40; }
.header__logo { display: flex; align-items: center; gap: 10px; }
.header__logo img { width: auto !important; height: 86px !important; object-fit: contain; background: transparent !important; }
.header__brand { font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: .02em; color: #f1d49a !important; }
.header__in { display: flex; align-items: center; gap: 12px; height: auto !important; min-height: 86px; flex-wrap: wrap; padding: 6px 0; }

.rg-switches { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.rg-switch { display: flex; border: 1px solid rgba(241, 212, 154, .55); border-radius: 999px; overflow: hidden; }
.rg-switch button {
  appearance: none; border: 0; background: transparent; color: #f6efe4;
  font: 600 11px/1.2 var(--sans); padding: 6px 8px; cursor: pointer;
}
.rg-switch button[aria-pressed="true"] { background: linear-gradient(135deg, #f1d49a, #d9ad62 50%, #a87e3a); color: #3a140c; }
.rg-switch button:focus-visible, .ba-curtain-btn:focus-visible { outline: 2px solid #f1d49a; outline-offset: 2px; }

html[data-theme="dark"][data-layout="phone"] { background: #141211; }
html[data-layout="phone"] { background: #141211; }
html[data-layout="phone"] body {
  max-width: 420px; margin: 16px auto; min-height: calc(100vh - 32px);
  border: 12px solid #2a1214; border-radius: 32px; overflow-x: hidden;
  box-shadow: 0 24px 70px #000a, inset 0 0 0 2px #d9ad62; position: relative;
}
html[data-layout="phone"] .header__brand {
  display: inline; font-size: 18px; white-space: nowrap; color: #f1d49a !important;
}
html[data-layout="phone"] .header__logo { min-width: 0; flex: 1 1 auto; }
html[data-layout="phone"] .header__logo img { height: 52px !important; }
html[data-layout="phone"] .header,
html[data-layout="phone"] .header__in { overflow: visible; }
html[data-layout="phone"] .rg-switches { order: 5; width: 100%; margin-left: 0; justify-content: center; }
html[data-layout="phone"] .burger { display: flex !important; }
html[data-layout="phone"] .header__phone { display: none !important; }
.rg-ask { display: none; }
html[data-ask="1"] .rg-ask {
  display: flex; position: fixed; inset: 0; z-index: 200;
  background: rgba(28, 6, 10, .78); align-items: center; justify-content: center; padding: 24px;
}
html[data-ask="1"] body { overflow: hidden; }
.rg-ask__card {
  width: min(360px, 100%); background: #490b0e; color: #f6efe6;
  border: 1px solid #d9ad62; border-radius: 22px; padding: 28px 22px; text-align: center;
}
.rg-ask__card p { font-family: var(--serif); font-size: 34px; margin-bottom: 8px; }
.rg-ask__card button {
  display: block; width: 100%; margin-top: 12px; padding: 14px 16px; cursor: pointer;
  border-radius: 999px; border: 1px solid #d9ad62; background: transparent;
  color: #f6efe6; font: 600 18px/1.2 var(--sans);
}
.rg-ask__card button:hover, .rg-ask__card button:focus-visible {
  background: linear-gradient(135deg, #f1d49a, #d9ad62 50%, #a87e3a); color: #3a140c;
}
.rg-tabbar { display: none; }
html[data-layout="phone"] .rg-tabbar {
  display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: 14px;
  background: rgba(28, 25, 25, .94); border: 1px solid rgba(217, 173, 98, .45);
  border-radius: 18px; padding: 6px 4px 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
html[data-layout="phone"] .rg-tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #f5f1ea !important; font-size: 11px; font-weight: 650; line-height: 1.1;
  text-decoration: none; padding: 6px 2px; min-height: 48px;
}
html[data-layout="phone"] .rg-tabbar svg { width: 22px; height: 22px; stroke: #f1d49a; fill: none; stroke-width: 1.7; }
html[data-layout="phone"] .footer { padding-bottom: 108px !important; }
html[data-layout="phone"] .fab,
html[data-layout="phone"] .cookie { bottom: 92px !important; }
html[data-layout="phone"] .hide-sm { display: none !important; }
html[data-layout="phone"] .nav {
  position: absolute !important; inset: 0; flex-direction: column !important;
  justify-content: center; gap: 18px; background: var(--rg) !important;
  opacity: 0; visibility: hidden; margin: 0; z-index: 5;
}
html[data-layout="phone"] .nav a { font-size: 22px !important; font-family: var(--serif) !important; }
html[data-layout="phone"] body.menu-open .nav { opacity: 1; visibility: visible; }
html[data-layout="phone"] .hero__in,
html[data-layout="phone"] .split,
html[data-layout="phone"] .faq-wrap,
html[data-layout="phone"] .booking__in,
html[data-layout="phone"] .contacts,
html[data-layout="phone"] .footer__in,
html[data-layout="phone"] .grid3,
html[data-layout="phone"] .grid4,
html[data-layout="phone"] .gallery { grid-template-columns: 1fr !important; max-width: none !important; }
html[data-layout="phone"] .form__row { grid-template-columns: 1fr !important; }
html[data-layout="phone"] .pricelist--cols { columns: 1 !important; }

@media (max-width: 1180px) {
  html[data-layout="desktop"] .burger { display: none !important; }
  html[data-layout="desktop"] .header__phone { display: flex !important; }
  html[data-layout="desktop"] .nav {
    position: static !important; inset: auto !important; flex-direction: row !important;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    background: transparent !important; gap: 14px;
  }
  html[data-layout="desktop"] .nav a { font-size: 14px !important; font-family: var(--sans) !important; }
  html[data-layout="desktop"] .hero__in,
  html[data-layout="desktop"] .split,
  html[data-layout="desktop"] .faq-wrap,
  html[data-layout="desktop"] .booking__in,
  html[data-layout="desktop"] .contacts { grid-template-columns: 1.05fr .95fr !important; }
  html[data-layout="desktop"] .grid4 { grid-template-columns: repeat(4, 1fr) !important; }
  html[data-layout="desktop"] .grid3 { grid-template-columns: repeat(3, 1fr) !important; max-width: none !important; }
  html[data-layout="desktop"] .gallery { grid-template-columns: repeat(3, 1fr) !important; }
  html[data-layout="desktop"] .footer__in { grid-template-columns: 1.4fr .8fr .8fr !important; }
  html[data-layout="desktop"] body { min-width: 1100px; }
}

.hero__photo { max-width: 480px; }
.hero__frame { height: min(88vh, 920px); overflow: hidden; }
.hero__frame img { width: 100%; height: 100% !important; max-height: none !important; object-fit: cover; object-position: center 18%; }

.feature__ico { display: grid; place-items: center; }
.feature__ico img, .sec-ico {
  width: 46px; height: 46px; object-fit: cover; border-radius: 14px;
  border: 2px solid var(--gold); background: var(--rg);
}
.sec-ico { width: 40px; height: 40px; border-radius: 50%; display: inline-block; vertical-align: middle; margin: 0 8px 4px 0; }

html[data-layout="desktop"] #masters.section {
  height: 100vh; max-height: 100vh; box-sizing: border-box;
  padding: 14px 0 12px !important; overflow: hidden;
  display: flex; flex-direction: column;
}
html[data-layout="desktop"] #masters .wrap {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
}
html[data-layout="desktop"] #masters .head { margin-bottom: 8px; }
html[data-layout="desktop"] #masters .head h2 { font-size: clamp(28px, 3vw, 42px); margin-bottom: 0; }
html[data-layout="desktop"] #masters .grid3 {
  flex: 1; min-height: 0; align-items: stretch;
  grid-template-columns: repeat(3, 1fr) !important; gap: 14px; max-width: none !important; margin: 0 !important;
}
html[data-layout="desktop"] #masters .master {
  display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden;
  max-height: calc(100vh - 180px);
}
html[data-layout="desktop"] #masters .master__img {
  height: 50vh; max-height: calc(100vh - 230px); flex: 0 0 auto; overflow: hidden;
}
html[data-layout="desktop"] #masters .master__img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
html[data-layout="desktop"] #masters .master__body { padding: 8px 10px 10px; }
html[data-layout="desktop"] #masters .master__body p {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 13px; line-height: 1.35; margin: 4px 0;
}

html[data-layout="phone"] #masters.section { height: auto; max-height: none; overflow: visible; }
html[data-layout="phone"] #masters .grid3 { grid-template-columns: 1fr !important; }
html[data-layout="phone"] #masters .master { max-height: calc(100vh - 28px); overflow: hidden; }
html[data-layout="phone"] #masters .master__img { height: 46vh; max-height: 50vh; overflow: hidden; }
html[data-layout="phone"] #masters .master__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

.ba-collage { margin-top: 28px; }
.ba-collage__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
html[data-layout="phone"] .ba-collage__grid { grid-template-columns: 1fr; }
html[data-layout="phone"] .ba-curtain-btn { font-size: 16px; padding: 12px 20px; }
.ba-collage__window {
  position: relative; overflow: hidden;
  max-height: var(--ba-closed, 460px);
  transition: max-height .7s cubic-bezier(.2, .7, .2, 1);
}
.ba-collage__window.is-open { max-height: var(--ba-open, 2400px); }
.ba-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ba-card__split { display: grid; grid-template-columns: 1fr 1fr; }
html[data-layout="phone"] .ba-card__split { grid-template-columns: 1fr; }
.ba-card figure { position: relative; margin: 0; min-height: 0; }
.ba-card img { width: 100%; height: 168px; object-fit: cover; display: block; }
.ba-card figcaption {
  position: absolute; left: 8px; bottom: 8px; z-index: 1;
  background: rgba(74, 12, 24, .88); color: #f6efe4; border: 1px solid #d9ad62;
  border-radius: 999px; font-size: 12px; font-weight: 600; padding: 2px 8px;
}
.ba-card figure + figure { box-shadow: inset 1px 0 0 #d9ad62; }
html[data-layout="phone"] .ba-card figure + figure { box-shadow: inset 0 1px 0 #d9ad62; }
.ba-collage__curtain {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--rg) 55%);
  border-top: 0; transform: translateY(0);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.ba-collage__curtain::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 8px; height: 8px;
  border-radius: 0 0 10px 10px; background: linear-gradient(90deg, #a87e3a, #f1d49a, #a87e3a);
}
.ba-collage__window.is-open .ba-collage__curtain { transform: translateY(110%); }
.ba-curtain-btn {
  display: block; margin: 14px auto 0; cursor: pointer;
  background: transparent; color: var(--gold2); border: 1px solid var(--gold3);
  border-radius: 999px; padding: 8px 18px; font: 600 14px/1.2 var(--sans);
}
#main > section.rg-here { box-shadow: inset 0 0 0 3px rgba(217, 173, 98, .95); }

.rg-dog {
  position: fixed; width: 84px; height: 64px; z-index: 45; pointer-events: none;
  left: 0; top: 0; opacity: 0; background: none; border: 0;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .3));
  transition: left .55s cubic-bezier(.2, .75, .2, 1), top .55s cubic-bezier(.2, .9, .25, 1), opacity .2s;
}
.rg-dog.is-ready { opacity: 1; }
.rg-dog__flip, .rg-dog__hop { width: 84px; height: 64px; background: none; }
.rg-dog svg { display: block; background: none; overflow: visible; }
.rg-dog .as-sleep { display: none; }
.rg-dog.pose-sleep .as-stand { display: none; }
.rg-dog.pose-sleep .as-sleep { display: block; }
.rg-dog.pose-jump { transition-duration: .42s; }
.rg-dog.pose-jump .rg-dog__hop { animation: rg-jump .42s ease; }
.rg-dog.pose-jump .leg-front { transform: rotate(-62deg); transform-origin: 50% 0; }
.rg-dog.pose-stand .tail { transform-origin: 36px 70px; animation: rg-wag .5s ease-in-out infinite; }
.rg-dog.pose-leap { transition-duration: .72s; }
.rg-dog.pose-leap .rg-dog__hop { animation: rg-leap .72s ease; }
.rg-dog.pose-sit .leg-front { transform: translateY(5px) scaleY(.7); }
body.menu-open .rg-dog { opacity: 0; }
@keyframes rg-jump { 0% { transform: translateY(0); } 45% { transform: translateY(-18px) rotate(-8deg); } 100% { transform: translateY(0); } }
@keyframes rg-leap { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-26px) scale(1.05) rotate(-10deg); } 100% { transform: translateY(0) scale(1); } }
@keyframes rg-wag { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(16deg); } }
@media (prefers-reduced-motion: reduce) {
  .rg-dog, .rg-dog * { animation: none !important; transition: none !important; }
  .ba-collage__window, .ba-collage__curtain { transition: none !important; }
}
