:root {
  --milk: #F6F0E8;
  --sand: #E6D2B4;
  --wood: #B87932;
  --forest: #1F3329;
  --grass: #667A35;
  --stone: #8E927F;
  --sky: #9FB7C9;
  --ink: #252C28;
  --white: #FFFDF8;
  --shadow: 0 24px 70px rgba(31, 51, 41, 0.16);
  --soft-shadow: 0 14px 34px rgba(31, 51, 41, 0.1);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--milk);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(159, 183, 201, 0.95);
  outline-offset: 4px;
}

.sprite {
  display: none;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 76px 0;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: var(--white);
  transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--forest);
  background: rgba(246, 240, 232, 0.88);
  box-shadow: 0 12px 28px rgba(31, 51, 41, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 0;
  font-weight: 700;
  letter-spacing: 0;
}

.brand span {
  font-family: Lora, Georgia, serif;
  font-size: 20px;
  line-height: 1.1;
}

.brand small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.76;
}

.site-nav {
  position: fixed;
  z-index: 49;
  inset: 70px 16px auto 16px;
  display: grid;
  gap: 6px;
  padding: 18px;
  color: var(--forest);
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(31, 51, 41, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.site-nav a:hover {
  background: rgba(230, 210, 180, 0.42);
}

.header-booking {
  display: none;
}

.menu-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  gap: 7px;
  color: inherit;
  background: rgba(255, 253, 248, 0.14);
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease;
}

.menu-toggle.is-open span:first-child {
  transform: translateY(4.5px) rotate(42deg);
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-4.5px) rotate(-42deg);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--white);
  background: var(--forest);
  box-shadow: 0 16px 30px rgba(31, 51, 41, 0.22);
}

.button--primary:hover {
  background: #15251d;
}

.button--secondary {
  color: var(--forest);
  background: var(--sand);
}

.button--light {
  color: var(--forest);
  background: rgba(255, 253, 248, 0.92);
  border-color: rgba(31, 51, 41, 0.12);
}

.button--ghost {
  color: var(--white);
  background: rgba(255, 253, 248, 0.12);
  border-color: rgba(255, 253, 248, 0.48);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--wood);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--forest);
  font-family: Lora, Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 900px;
  color: var(--white);
  font-size: clamp(42px, 13vw, 76px);
}

h2 {
  font-size: clamp(34px, 9vw, 58px);
}

h3 {
  font-size: 24px;
}

p {
  margin: 0;
}

.hero {
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  align-items: end;
  padding: 112px 0 88px;
  color: var(--white);
  overflow: hidden;
}

.hero__media,
.hero__shade,
.contacts__media,
.contacts__shade {
  position: absolute;
  inset: 0;
}

.hero__media img,
.contacts__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__image {
  transform: scale(1.04);
  will-change: transform;
}

.hero__shade {
  background:
    linear-gradient(180deg, rgba(31, 51, 41, 0.35), rgba(31, 51, 41, 0.1) 34%, rgba(31, 51, 41, 0.84)),
    linear-gradient(90deg, rgba(31, 51, 41, 0.72), rgba(31, 51, 41, 0.1));
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero .eyebrow,
.contacts .eyebrow {
  color: var(--sand);
}

.hero__lead {
  max-width: 560px;
  margin-top: 22px;
  font-size: clamp(18px, 4.2vw, 23px);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

.hero__location {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 18px;
  color: rgba(255, 253, 248, 0.74);
  font-size: 13px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-head p:last-child {
  margin-top: 14px;
  color: rgba(37, 44, 40, 0.72);
  font-size: 18px;
}

.about__grid,
.family__grid,
.contacts__grid {
  display: grid;
  gap: 34px;
}

.about__copy {
  display: grid;
  gap: 18px;
}

blockquote {
  margin: 8px 0 0;
  padding: 22px;
  color: var(--forest);
  background: var(--white);
  border-left: 4px solid var(--wood);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  font-family: Lora, Georgia, serif;
  font-size: 23px;
  line-height: 1.35;
}

.photo-collage {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 12px;
  align-items: end;
}

.photo-collage img,
.cabins__side img,
.territory__photo img,
.family__image img,
.nearby__hero img,
.gallery__item img {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.photo-collage img:first-child {
  height: 280px;
}

.photo-collage img:last-child {
  height: 380px;
  object-position: center bottom;
}

.benefits,
.territory,
.reviews {
  background: rgba(255, 253, 248, 0.55);
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.benefit-card,
.review-card,
.contact-panel,
.cabin-card__body,
.cabins__side,
.territory__items,
.territory__note {
  background: var(--white);
  border: 1px solid rgba(31, 51, 41, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.benefit-card {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.benefit-card svg {
  width: 30px;
  height: 30px;
  color: var(--grass);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benefit-card h3 {
  font-size: 21px;
}

.benefit-card p,
.review-card p,
.cabin-card__body p,
.cabins__side p,
.territory__note,
.family__copy p,
.nearby__hero p,
.contact-panel p {
  color: rgba(37, 44, 40, 0.74);
}

.cabins__layout {
  display: grid;
  gap: 20px;
}

.cabin-card {
  display: grid;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cabin-card__image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.cabin-card__body {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 0;
  box-shadow: none;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  background: var(--wood);
  border-radius: 50%;
}

.note {
  padding: 13px 16px;
  background: rgba(230, 210, 180, 0.34);
  border-radius: 6px;
  font-weight: 700;
}

.cabins__side {
  display: grid;
  gap: 16px;
  padding: 12px;
}

.cabins__side img {
  height: 420px;
  object-position: center bottom;
}

.cabins__side p {
  padding: 0 8px 10px;
}

.territory__grid {
  display: grid;
  gap: 18px;
}

.territory__photo img {
  height: 340px;
}

.territory__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  align-content: start;
}

.territory__items span,
.nearby__cards span {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  color: var(--forest);
  background: rgba(230, 210, 180, 0.32);
  border-radius: 6px;
  font-weight: 700;
}

.territory__note {
  margin-top: 18px;
  padding: 20px;
}

.family__image img {
  height: 430px;
  object-position: center;
}

.family__copy {
  display: grid;
  gap: 18px;
  align-content: center;
}

.family__copy .button {
  justify-self: start;
}

.nearby__hero {
  position: relative;
  display: grid;
  min-height: 500px;
  align-items: end;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nearby__hero img {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 0;
}

.nearby__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31, 51, 41, 0.04), rgba(31, 51, 41, 0.84));
}

.nearby__hero div {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 24px;
  color: var(--white);
}

.nearby__hero h2,
.nearby__hero p {
  color: var(--white);
}

.nearby__cards {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.review-grid {
  display: grid;
  gap: 16px;
}

.review-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
}

.review-card p {
  font-size: 16px;
  line-height: 1.58;
}

.review-card__top {
  display: grid;
  gap: 4px;
}

.review-card__top strong {
  color: var(--forest);
  font-size: 18px;
}

.review-card__top span {
  color: var(--wood);
  font-size: 18px;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.review-card small {
  color: var(--stone);
  font-weight: 700;
}

.reviews__link {
  margin-top: 22px;
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.gallery__item {
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.gallery__item img {
  height: 260px;
  transition: transform 420ms ease;
}

.gallery__item:hover img {
  transform: scale(1.045);
}

.contacts {
  min-height: 92dvh;
  display: grid;
  align-items: center;
  padding: 94px 0;
  color: var(--white);
  overflow: hidden;
}

.contacts__media img {
  object-position: 72% center;
}

.contacts__shade {
  background:
    linear-gradient(90deg, rgba(31, 51, 41, 0.86), rgba(31, 51, 41, 0.34)),
    linear-gradient(180deg, rgba(31, 51, 41, 0.1), rgba(31, 51, 41, 0.84));
}

.contacts__grid {
  position: relative;
  z-index: 1;
}

.contacts h2 {
  color: var(--white);
}

.contacts__copy {
  display: grid;
  gap: 18px;
}

.contacts__copy p {
  max-width: 600px;
  font-size: 19px;
}

.contacts__copy .button {
  justify-self: start;
}

.contacts__copy .button--primary {
  color: var(--forest);
  background: var(--sand);
  border-color: rgba(255, 253, 248, 0.72);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.contacts__copy .button--primary:hover {
  background: var(--white);
}

.contact-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  color: var(--ink);
}

.map-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31, 51, 41, 0.1);
  border-radius: var(--radius);
}

.map-card--image {
  display: block;
  background: var(--milk);
}

.map-card--image img {
  width: 100%;
  aspect-ratio: 1133 / 617;
  object-fit: cover;
  transition: transform 320ms ease;
}

.map-card--image:hover img {
  transform: scale(1.025);
}

.contact-panel__actions,
.modal__actions {
  display: grid;
  gap: 10px;
}

.footer {
  padding: 28px 0;
  color: rgba(255, 253, 248, 0.82);
  background: var(--forest);
}

.legal-links {
  padding: 22px 0;
  color: rgba(37, 44, 40, 0.68);
  background: #efe7dc;
  font-size: 14px;
}

.legal-links .container {
  display: grid;
  gap: 6px;
}

.footer__grid {
  display: grid;
  gap: 18px;
}

.footer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--white);
  font-family: Lora, Georgia, serif;
  font-size: 22px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer a {
  min-height: 32px;
}

.modal,
.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal.is-open,
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay,
.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 22, 17, 0.64);
  backdrop-filter: blur(10px);
}

.modal__panel,
.lightbox__figure {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 0;
  transform: translateY(12px) scale(0.98);
  transition: transform 180ms ease;
}

.modal.is-open .modal__panel,
.lightbox.is-open .lightbox__figure {
  transform: translateY(0) scale(1);
}

.modal__panel {
  display: grid;
  gap: 14px;
  padding: 26px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal__panel h2 {
  font-size: 34px;
}

.modal__panel p:not(.eyebrow) {
  color: rgba(37, 44, 40, 0.72);
}

.modal__actions a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  color: var(--forest);
  background: rgba(230, 210, 180, 0.34);
  border-radius: 999px;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.modal__actions a:hover {
  background: var(--sand);
  transform: translateY(-1px);
}

.modal__close,
.lightbox__close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 253, 248, 0.92);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.modal__close::before,
.modal__close::after,
.lightbox__close::before,
.lightbox__close::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 21px;
  width: 18px;
  height: 2px;
  background: var(--forest);
}

.modal__close::before,
.lightbox__close::before {
  transform: rotate(45deg);
}

.modal__close::after,
.lightbox__close::after {
  transform: rotate(-45deg);
}

.lightbox__figure {
  width: min(100%, 980px);
}

.lightbox__figure img {
  width: 100%;
  max-height: 78dvh;
  object-fit: contain;
  background: #111;
  border-radius: var(--radius);
}

.lightbox__figure figcaption {
  margin-top: 10px;
  color: var(--white);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 560px) {
  .hero__actions,
  .contact-panel__actions {
    grid-template-columns: repeat(2, max-content);
    display: grid;
    align-items: center;
  }

  .benefit-grid,
  .review-grid,
  .nearby__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .container {
    width: min(100% - 56px, var(--max));
  }

  .section {
    padding: 100px 0;
  }

  .hero {
    padding-bottom: 108px;
  }

  .about__grid,
  .family__grid,
  .contacts__grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cabins__layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  }

  .territory__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  }

  .territory__photo img,
  .territory__items {
    height: 460px;
  }

  .nearby__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
  }

  .gallery__item--wide {
    grid-column: span 2;
  }

  .gallery__item--tall {
    grid-row: span 2;
  }

  .gallery__item--tall img {
    height: 532px;
  }

  .footer__grid {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    padding: 18px 38px;
  }

  .site-nav {
    position: static;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 8px 12px;
  }

  .site-nav a:hover {
    background: rgba(255, 253, 248, 0.16);
  }

  .site-header.is-scrolled .site-nav a:hover {
    background: rgba(230, 210, 180, 0.38);
  }

  .menu-toggle {
    display: none;
  }

  .header-booking {
    display: inline-flex;
  }

  .hero__actions {
    display: flex;
    flex-direction: row;
  }

  .cabin-card {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .cabin-card__image img {
    height: 100%;
    min-height: 560px;
  }

  .cabin-card__body {
    padding: 38px;
  }

  .review-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  :root {
    --max: 1280px;
  }

  .site-header {
    padding-inline: 54px;
  }

  .section {
    padding: 122px 0;
  }

  h1 {
    font-size: 86px;
  }

  .hero__lead {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__image {
    transform: none !important;
  }
}
