/* ==========================================================================
   Уютные апартаменты · Петрозаводск
   Palette follows the interiors: emerald textiles, oak, concrete, warm paper.
   ========================================================================== */

:root {
  --paper: #f7f4ed;
  --paper-2: #efeae0;
  --paper-3: #e5dfd2;
  --ink: #191e1b;
  --ink-soft: #4c554e;
  --ink-mute: #79817a;
  --forest: #22372c;
  --forest-2: #2e4a3a;
  --emerald: #2f6b52;
  --emerald-soft: #d9e6dd;
  --gold: #a87c43;
  --line: rgba(25, 30, 27, 0.12);
  --line-strong: rgba(25, 30, 27, 0.22);
  --white: #fffefb;

  --shadow-sm: 0 1px 2px rgba(25, 30, 27, 0.06), 0 4px 12px rgba(25, 30, 27, 0.05);
  --shadow-md: 0 2px 6px rgba(25, 30, 27, 0.07), 0 16px 40px rgba(25, 30, 27, 0.09);
  --shadow-lg: 0 4px 12px rgba(25, 30, 27, 0.08), 0 32px 70px rgba(25, 30, 27, 0.14);

  --radius-sm: 6px;
  --radius: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --font-display: "Prata", "Georgia", "Times New Roman", serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
  --section-y: clamp(56px, 8vw, 112px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(15px, 0.4vw + 14px, 17px);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0;
}

h1 { font-size: clamp(32px, 4.4vw, 58px); }
h2 { font-size: clamp(26px, 3vw, 40px); }
h3 { font-size: clamp(20px, 1.6vw, 25px); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

em { font-style: italic; }

::selection { background: var(--emerald); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: var(--white);
  padding: 12px 20px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- header -- */

/* Anchor targets must clear the sticky header. */
section[id],
div[id],
aside[id] {
  scroll-margin-top: 90px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(25, 30, 27, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--forest-2), var(--emerald));
  color: var(--white);
  font-family: var(--font-display);
  font-size: 15px;
  display: grid;
  place-items: center;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.brand-text em {
  font-style: normal;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  position: relative;
  padding-block: 6px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.header-phone {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 50%;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform 0.25s ease, opacity 0.2s ease;
  content: "";
}
.nav-toggle span { top: 50%; margin-top: -0.75px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(34px, 5vw, 74px) clamp(40px, 6vw, 88px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: min(720px, 62vw);
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, rgba(47, 107, 82, 0.12), transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(28px, 5vw, 68px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero h1 {
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--emerald);
}

.lede {
  font-size: clamp(15px, 0.6vw + 14px, 18px);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trust li svg { flex: 0 0 auto; color: var(--emerald); }
.trust strong { font-weight: 700; color: var(--ink); }

.hero-media {
  position: relative;
}

.hero-frame {
  margin: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.35;
  background: var(--paper-3);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.02);
  transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero:hover .hero-frame img { transform: scale(1.05); }

.hero-card {
  position: absolute;
  left: clamp(-44px, -3vw, -18px);
  bottom: -38px;
  width: min(304px, 80%);
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.hero-card .eyebrow {
  margin-bottom: 8px;
  font-size: 10px;
}
.hero-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.hero-card .mini-dates {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.mini-dates span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--ink-soft);
}
.mini-dates span.is-free { background: var(--emerald-soft); color: var(--emerald); }
.mini-dates span.is-busy {
  background: var(--paper-3);
  color: var(--ink-mute);
  text-decoration: line-through;
}

/* ---------------------------------------------------------------- button -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(34, 55, 44, 0.24);
}
.btn-primary:hover {
  background: var(--emerald);
  box-shadow: 0 12px 28px rgba(47, 107, 82, 0.3);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(25, 30, 27, 0.04);
}

.btn-ghost {
  padding: 10px 18px;
  border-color: var(--line-strong);
  font-size: 13.5px;
}
.btn-ghost:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--forest);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover { background: var(--emerald-soft); }

.btn-block { width: 100%; }

/* --------------------------------------------------------------- section -- */

.section {
  padding-block: var(--section-y);
}
.section--tight { padding-block: clamp(40px, 6vw, 76px); }

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.section-head h2 { margin-bottom: 14px; text-wrap: balance; }
.section-head p { color: var(--ink-soft); margin: 0; }

.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head--center .eyebrow { justify-content: center; }

/* ----------------------------------------------------------------- stays -- */

.stays {
  display: grid;
  gap: clamp(20px, 2.4vw, 32px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stay-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.stay-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.stay-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 2.7;
  overflow: hidden;
  background: var(--paper-3);
}
.stay-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stay-card:hover .stay-media img { transform: scale(1.045); }

.stay-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--white) 92%, transparent);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
}

.stay-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(20px, 2vw, 28px);
}

.stay-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}

.stay-body h3 { margin-bottom: 12px; }
.stay-body h3 a:hover { color: var(--emerald); }

.stay-text {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-bottom: 18px;
}

.stay-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: -4px 0 18px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stay-price span {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

.booking-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--emerald-soft);
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}
.booking-price span {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald);
  letter-spacing: 0.02em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.chips li {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--paper-2);
  color: var(--ink-soft);
}

.stay-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}
.stay-actions .btn { flex: 1; }

/* -------------------------------------------------------------- features -- */

.features-band {
  background: var(--forest);
  color: var(--white);
}
.features-band .eyebrow { color: #9fc4ae; }
.features-band .section-head p { color: rgba(255, 254, 251, 0.72); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 34px);
}

.feature {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 254, 251, 0.16);
}
.feature svg {
  color: #9fc4ae;
  margin-bottom: 14px;
}
.feature h3 {
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.feature p {
  font-size: 14px;
  color: rgba(255, 254, 251, 0.7);
  margin: 0;
}

/* ------------------------------------------------------------- location --- */

.location-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 64px);
  align-items: start;
}

.place-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.place-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.place-list li span:first-child { flex: 1; }
.place-list li span:last-child {
  font-weight: 600;
  color: var(--emerald);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.addr-cards {
  display: grid;
  gap: 14px;
}

.addr-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.addr-card .pin {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--emerald-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
}
.addr-card h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.addr-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.addr-card a {
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ---------------------------------------------------------------- steps --- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 26px 24px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--emerald);
  margin-bottom: 14px;
}
.steps h3 {
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.steps p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ------------------------------------------------------------------ faq --- */

.faq-list {
  max-width: 86ch;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--emerald); }
.faq-item summary::after {
  content: "";
  margin-left: auto;
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s ease;
  opacity: 0.55;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-answer {
  padding: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 72ch;
}

/* --------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--forest);
  color: rgba(255, 254, 251, 0.72);
  padding-block: clamp(48px, 6vw, 76px) 28px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 254, 251, 0.14);
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 254, 251, 0.5);
  margin-bottom: 16px;
  font-weight: 700;
}
.site-footer a:hover { color: var(--white); }
.footer-about .brand-text strong,
.footer-about .brand-text em { color: var(--white); }
.footer-about p {
  margin: 16px 0 0;
  font-size: 13.5px;
  max-width: 34ch;
  color: rgba(255, 254, 251, 0.62);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12.5px;
  color: rgba(255, 254, 251, 0.46);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-legal a {
  color: rgba(255, 254, 251, 0.66);
  border-bottom: 1px solid rgba(255, 254, 251, 0.28);
}
.footer-legal a:hover { color: var(--white); border-bottom-color: var(--white); }

/* ================================================== apartment detail page = */

.page-head {
  padding-block: clamp(26px, 4vw, 48px) clamp(22px, 3vw, 36px);
}
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-mute);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--emerald); }

.page-head h1 { margin-bottom: 16px; text-wrap: balance; }
.page-head .lede { max-width: 58ch; margin-bottom: 0; }

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.meta-strip li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--white);
}
.meta-strip svg { color: var(--emerald); flex: 0 0 auto; }

/* gallery */

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "big s1 s2"
    "big s3 s4";
  gap: 10px;
  height: clamp(300px, 40vw, 520px);
  margin-bottom: 10px;
}
.gallery button {
  position: relative;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--paper-3);
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  min-height: 0;
  min-width: 0;
}
.gallery button:nth-child(1) { grid-area: big; }
.gallery button:nth-child(2) { grid-area: s1; }
.gallery button:nth-child(3) { grid-area: s2; }
.gallery button:nth-child(4) { grid-area: s3; }
.gallery button:nth-child(5) { grid-area: s4; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}
.gallery button:hover img { transform: scale(1.05); filter: brightness(1.03); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.gallery-grid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--paper-3);
  cursor: zoom-in;
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, filter 0.4s ease;
}
.gallery-grid button:hover img { transform: scale(1.04); filter: brightness(1.03); }

/* two column body */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 62px);
  align-items: start;
}

.prose h2 { margin-bottom: 18px; }
.prose p { color: var(--ink-soft); }
.prose > * + * { margin-top: 1em; }

.amenities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 24px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.amenities li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}
.amenities svg { color: var(--emerald); flex: 0 0 auto; }

.rules {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}
.rules th,
.rules td {
  text-align: left;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.rules th {
  font-weight: 500;
  color: var(--ink-mute);
  width: 46%;
}
.rules td { color: var(--ink); font-weight: 600; }
.rules tr:last-child th,
.rules tr:last-child td { border-bottom: 0; }

/* booking panel */

.booking-panel {
  position: sticky;
  top: 92px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2vw, 26px);
  box-shadow: var(--shadow-sm);
}
.booking-panel h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.booking-panel > p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.booking-slot {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  background: var(--paper);
  margin-bottom: 16px;
}
.booking-slot.is-live {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  /* Модуль Агаста свёрстан под мобильную ширину — держим его в узкой карточке. */
  max-width: 420px;
  margin-inline: auto;
}

.booking-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}
.booking-hint a {
  color: var(--emerald);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* Phone must not break across lines in the contact line. */
#booking .section-head a[href^="tel:"] { white-space: nowrap; }

/* Module section: text on the left, booking card on the right. */
@media (min-width: 901px) {
  #booking .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-areas:
      "head module"
      "head hint";
    gap: 0 clamp(28px, 4vw, 64px);
    align-items: start;
  }
  #booking .section-head { grid-area: head; margin-bottom: 0; }
  /* margin-inline: auto превращал карточку в shrink-to-fit, и iframe получал
     свою дефолтную ширину 300px. Поэтому здесь растягиваем явно. */
  #booking .booking-slot {
    grid-area: module;
    max-width: none;
    width: 100%;
    margin-inline: 0;
    justify-self: stretch;
  }
  #booking .booking-hint { grid-area: hint; }
}
.booking-slot .slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.booking-slot p {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.55;
}
.booking-slot iframe {
  width: 100%;
  min-height: 1010px;
  border: 0;
  border-radius: var(--radius);
  display: block;
}

.booking-fallback {
  display: grid;
  gap: 9px;
}
.booking-fallback .btn { width: 100%; }
.booking-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.55;
}
.booking-note strong { color: var(--ink-soft); }

/* lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(16, 20, 18, 0.93);
  backdrop-filter: blur(6px);
  padding: clamp(14px, 3vw, 44px);
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: clamp(14px, 3vw, 30px); right: clamp(14px, 3vw, 30px); }
.lightbox-prev { left: clamp(10px, 2vw, 26px); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: clamp(10px, 2vw, 26px); top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: clamp(14px, 3vw, 30px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.66);
  font-size: 12.5px;
  letter-spacing: 0.1em;
}

/* ------------------------------------------------ quick request form --- */

.request-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.request-form .field { display: grid; gap: 5px; }
.request-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.request-form label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.request-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.request-form input:focus {
  outline: 2px solid var(--emerald);
  outline-offset: 1px;
  border-color: transparent;
}
.request-form .nights {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 2px 0 4px;
}
.request-form .nights strong { color: var(--ink); font-weight: 700; }
.request-form .status {
  font-size: 12.5px;
  color: var(--emerald);
  min-height: 1.1em;
  line-height: 1.4;
}

/* --------------------------------------------------------- review cards -- */

.rating-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.rating-chip {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.rating-chip strong {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}
.rating-chip .stars { color: var(--gold); letter-spacing: 1px; font-size: 12px; }

.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 20px);
}
.review {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2vw, 24px);
}
.review .stars {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.review blockquote {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}
.review .review-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.review .review-meta strong { color: var(--ink-soft); font-weight: 600; }

/* -------------------------------------------------- mobile action bar ---- */

.action-bar { display: none; }

@media (max-width: 900px) {
  .reviews { grid-template-columns: 1fr; }
  body { padding-bottom: 78px; }
  .action-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(25, 30, 27, 0.07);
  }
  .action-bar .btn {
    padding: 12px 14px;
    font-size: 13.5px;
    border-radius: 12px;
  }
  .action-bar .btn-primary { grid-column: span 2; }
  .lightbox { padding-bottom: 78px; }
}

/* -------------------------------------------------------- compare table -- */

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare thead th {
  text-align: left;
  padding: 0 16px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line-strong);
}
.compare tbody th,
.compare tbody td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare tbody th {
  font-weight: 500;
  color: var(--ink-mute);
  width: 32%;
}
.compare tbody td { color: var(--ink); font-weight: 500; }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody tr:hover { background: rgba(47, 107, 82, 0.04); }
.compare .compare-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--forest);
  white-space: nowrap;
}

/* -------------------------------------------------------------- platforms -- */

.platforms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 700px) {
  .compare { font-size: 13px; }
  .compare thead th,
  .compare tbody th,
  .compare tbody td { padding: 11px 8px; }
  .compare tbody th { width: 38%; }
  .compare .compare-price { font-size: 15px; }
  .platforms { grid-template-columns: 1fr 1fr; }
}
.platform {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.platform strong {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.platform span {
  font-size: 12.5px;
  color: var(--ink-mute);
  line-height: 1.45;
}
.platform:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.platform:hover strong { color: var(--emerald); }

/* ------------------------------------------------------------- trip cards -- */

.trips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  align-items: start;
}
.trip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 2.2vw, 26px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.trip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: transparent;
}
.trip h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

/* Photo bleeds to the card edges. */
.trip-media {
  margin: calc(-1 * clamp(20px, 2.2vw, 26px)) calc(-1 * clamp(20px, 2.2vw, 26px)) 6px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-3);
}
.trip-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.trip:hover .trip-media img { transform: scale(1.04); }

.figure-wide {
  margin: 0 0 clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.figure-wide img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-credit {
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-mute);
  max-width: 92ch;
}
.photo-credit a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
}
.photo-credit a:hover { color: var(--emerald); border-bottom-color: var(--emerald); }
.trip p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}
/* Точнее, чем «.trip p»: прижимает строку с расстоянием к низу карточки. */
.trip p.trip-meta {
  margin-top: auto;
}
.trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-mute);
}
.trip-meta a {
  color: var(--emerald);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .trips { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- reveal on in -- */

/* Reveal-on-scroll is progressive enhancement: content stays visible when JS is off. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --------------------------------------------------------------- mobile --- */

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .booking-panel { position: static; }
}

/* Below 1180 the floating card would crowd the copy column — let it flow under the photo. */
@media (max-width: 1180px) {
  .hero-card {
    position: static;
    width: 100%;
    margin-top: 14px;
    box-shadow: var(--shadow-sm);
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .nav a::after { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-phone { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-card { display: none; }
  .hero-frame { aspect-ratio: 4 / 3; }

  .stays { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery {
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "big big"
      "s1 s2";
  }
  .gallery button { aspect-ratio: 4 / 3; }
  .gallery button:nth-child(1) { aspect-ratio: 16 / 10; }
  .gallery button:nth-child(4),
  .gallery button:nth-child(5) { display: none; }
}

@media (max-width: 620px) {
  .header-inner { min-height: 64px; }
  .nav { inset-block-start: 64px; }
  .brand-text em { display: none; }
  .amenities { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stay-actions { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 auto; }
  .rules th { width: 52%; }
  .place-list li { flex-wrap: wrap; gap: 2px 12px; }
  .place-list li span:last-child { white-space: normal; }
  .lightbox-prev,
  .lightbox-next {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: 14px;
    transform: none;
  }
  .lightbox-prev { left: 14px; }
  .lightbox-next { right: 14px; }
  .lightbox-counter { bottom: 22px; }
}

@media (print) {
  .site-header, .booking-panel, .lightbox, .site-footer { display: none; }
  body { background: #fff; }
}
