:root {
  --bg: #efece6;          /* warm light background */
  --bg-hero: #d9d2c7;     /* hero placeholder tone */
  --ink: #2b2825;         /* dark text */
  --muted: #6f6a63;       /* graphite secondary text */
  --line: #cbc4b9;
  --black: #1c1a18;
  --white: #fbf9f6;
  --radius: 18px;
  --maxw: 1480px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Jost", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- buttons & links ------------------------------------------------ */
.btn--pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
  padding: 14px 30px;
  font-size: 13px;
  letter-spacing: 0.14em;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn--pill:hover { transform: translateY(-1px); opacity: 0.9; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-top: 8px;
}
.link-arrow svg { transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- header --------------------------------------------------------- */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 30px max(32px, 4vw);
  background: linear-gradient(180deg, rgba(20, 24, 18, 0.42) 0%, rgba(20, 24, 18, 0.12) 55%, rgba(20, 24, 18, 0) 100%);
}
.logo {
  font-size: 22px;
  letter-spacing: 0.42em;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.nav {
  margin-left: auto;
  display: flex;
  gap: 40px;
}
.nav__link {
  font-size: 14px;
  letter-spacing: 0.16em;
  color: #fff;
  padding-bottom: 4px;
  position: relative;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.nav__link--active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: #fff;
}
.header__cta { padding: 13px 26px; }

/* hamburger + mobile-only nav CTA hidden on desktop */
.nav-toggle { display: none; }
.nav__cta { display: none; }

/* ---------- hero ----------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--bg-hero) center/cover no-repeat;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.15) 38%, rgba(255,255,255,0) 65%),
    url("images/hero.jpg");
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 max(32px, 4vw);
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero__title {
  font-family: "Jost", sans-serif;
  font-weight: 300;
  font-size: clamp(64px, 12vw, 168px);
  letter-spacing: 0.12em;
  margin: 0;
  line-height: 1;
  color: #20201e;
}
.hero__date {
  font-size: clamp(22px, 2.6vw, 38px);
  font-weight: 500;
  color: #2b2825;
  margin: 26px 0 38px;
  letter-spacing: 0.04em;
}
.hero__scroll {
  display: inline-flex;
  margin-left: 18px;
  margin-top: 26px;
  color: #2b2825;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(6px);} }

/* ---------- content / sections -------------------------------------------- */
.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 140px) max(32px, 4vw);
}
.section {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding: clamp(40px, 6vw, 80px) 0;
}
.section__title {
  font-family: "Cormorant", serif;
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 62px);
  margin: 0 0 22px;
  color: var(--ink);
}
.section__desc {
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 380px;
}

/* ---------- gallery -------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery__card {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #d7cfc3, #b5a892);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease;
}
.gallery__card:hover { transform: translateY(-2px); }
.gallery__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery__card:hover img { transform: scale(1.04); }
.gallery__card--more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 18, 16, 0.45);
  color: #fff;
  font-size: 20px;
  letter-spacing: 0.04em;
}

/* ---------- map ------------------------------------------------------------ */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(40, 35, 28, 0.12);
}
.map {
  width: 100%;
  height: clamp(440px, 50vw, 680px);
  background: #dfe5d8;
}

/* place list with like/dislike */
.section--map { display: block; }
.section--map .map-wrap { margin-top: clamp(36px, 5vw, 64px); }
.places {
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 0;
  column-count: 2;
  column-gap: clamp(32px, 5vw, 72px);
}
.place-group {
  break-inside: avoid;
  margin-bottom: 30px;
}
.place-group__title {
  font-family: "Cormorant", serif;
  font-size: clamp(22px, 2vw, 28px);
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.place {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 4px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.place-group .place:last-child { border-bottom: 1px solid var(--line); }
.place__icon {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #e3ddd2;
  color: var(--ink);
}
.place__icon--house { background: var(--black); color: var(--white); }
.place__name {
  flex: 1;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.place__votes { display: flex; gap: 6px; }
.vote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.vote:hover { border-color: var(--ink); color: var(--ink); }
.vote svg { width: 14px; height: 14px; }
.vote--active.vote--like { background: var(--black); color: var(--white); border-color: var(--black); }
.vote--active.vote--dislike { background: #8a3b32; color: #fff; border-color: #8a3b32; }

/* ---------- footer --------------------------------------------------------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 50px max(32px, 4vw) 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}
.logo--small { font-size: 16px; color: var(--ink); text-shadow: none; }
.footer__note { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }

/* ---------- key facts ------------------------------------------------------ */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(32px, 4vw, 52px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact__num {
  font-family: "Cormorant", serif;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  color: var(--ink);
}
.fact__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- stacked sections ----------------------------------------------- */
.section--stack { display: block; }
.section__desc--wide { max-width: 620px; }

/* ---------- amenities chips ------------------------------------------------ */
.amenities {
  list-style: none;
  margin: clamp(24px, 3vw, 40px) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.amenities li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.amenities li:hover { border-color: var(--ink); transform: translateY(-1px); }
.amenities__hero {
  background: var(--black) !important;
  color: var(--white) !important;
  border-color: var(--black) !important;
  font-weight: 500;
  padding-left: 38px !important;
  position: relative;
}
.amenities__hero::before {
  content: "★";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  line-height: 1;
}
.amenities__hero:hover { transform: translateY(-2px); }

/* ---------- info grid (что есть в доме) ------------------------------------ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(20px, 2.4vw, 30px);
  margin-top: clamp(28px, 3.5vw, 48px);
}
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px 28px;
  background: rgba(255, 255, 255, 0.45);
}
.info-card__title {
  font-family: "Cormorant", serif;
  font-weight: 400;
  font-size: clamp(22px, 2vw, 27px);
  margin: 0 0 14px;
  color: var(--ink);
}
.info-card ul { list-style: none; margin: 0; padding: 0; }
.info-card li {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.info-card li:first-child { border-top: none; padding-top: 0; }
.info-card__note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  padding: 12px 14px;
  background: #e7e1d6;
  border-radius: 12px;
}

/* ---------- place modal ---------------------------------------------------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.5);
  backdrop-filter: blur(2px);
}
.modal__card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 22px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #1c1a18;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.modal__close:hover { background: #fff; }
.modal__photo {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  border-radius: 22px 22px 0 0;
}
.modal__content { padding: 24px 28px 28px; }
.modal__cat {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.modal__title {
  font-family: "Cormorant", serif;
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  margin: 0 0 12px;
  color: var(--ink);
}
.modal__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 14px;
}
.modal__meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal__links { display: flex; flex-wrap: wrap; gap: 18px; margin: 6px 0 22px; }
.modal__links a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.modal__links a:hover { border-color: var(--ink); }
.modal__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.modal__votes { display: flex; gap: 8px; }

/* ---------- lightbox ------------------------------------------------------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 11, 10, 0.9);
}
.lightbox__img {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute;
  top: 24px; right: 24px;
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }

/* ---------- responsive ----------------------------------------------------- */
@media (max-width: 860px) {
  .header {
    position: fixed;
    padding: 16px max(20px, 4vw);
    background: rgba(18, 21, 16, 0.92);
    z-index: 30;
  }
  body.nav-open { overflow: hidden; }
  html { scroll-padding-top: 70px; }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 40px;
    height: 40px;
    padding: 0 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 40;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .header__cta { display: none; }

  .nav {
    display: flex;
    position: fixed;
    inset: 0;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 34px;
    background: rgba(16, 19, 14, 0.97);
    z-index: 25;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  .nav.nav--open { opacity: 1; visibility: visible; }
  .nav__link {
    font-size: 22px;
    letter-spacing: 0.18em;
    text-shadow: none;
  }
  .nav__cta {
    display: inline-flex;
    font-size: 22px;
    letter-spacing: 0.18em;
    color: #fff;
    background: none;
    padding: 0;
    text-shadow: none;
  }

  .section { grid-template-columns: 1fr; gap: 28px; }
  .section__desc { max-width: none; }
  .places { column-count: 1; }
  .modal__photo { height: 220px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
