:root {
  --bg: #f7f4ef;
  --white: #ffffff;
  --text: #1e1e1e;
  --muted: #666666;
  --line-dark: rgba(0, 0, 0, 0.08);
  --accent: #b89b72;
  --accent-dark: #9a7d57;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --container: 1200px;
  --header-h: 88px;
  --card-radius: 18px;
}

.hero-apartment {
  position: relative;
  min-height: 100vh;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.55)),
    linear-gradient(to right, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.08)),
    var(--image-foto45) center center / cover no-repeat;
}

.hero-apartment-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 60px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.92;
}

.hero-apartment h1 {
  margin: 0 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-apartment p {
  max-width: 620px;
  margin: 0 0 30px;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.section-intro {
  padding: 76px 0 30px;
  background: var(--white);
}

.intro-mini {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.intro-mini span {
  display: inline-block;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.intro-mini h2 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4.2vw, 3.8rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.intro-mini p {
  margin: 0 auto;
  max-width: 660px;
  color: var(--muted);
  font-size: 1rem;
}

.photo-section {
  padding: 44px 0 48px;
  background: var(--white);
}

.photo-section.beige {
  background: #f3ede4;
}

.photo-section-head {
  margin-bottom: 22px;
}

.photo-section-title h3 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  font-weight: 600;
}

.photo-section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 700px;
}

.gallery-controls {
  display: none;
}

.gallery-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: #ddd;
  box-shadow: var(--shadow);
  min-height: 380px;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.photo-card:hover img {
  transform: scale(1.04);
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.04));
  z-index: 1;
}

.photo-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: var(--white);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.photo-caption strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.photo-caption span {
  display: block;
  font-size: 0.92rem;
  opacity: 0.95;
}

.closing-section {
  padding: 90px 0;
  background: #f3ede4;
}

.closing-box {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.closing-box span {
  display: inline-block;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.closing-box h2 {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
  font-weight: 600;
}

.closing-box p {
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 640px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-link {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.contact-link:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

@media (max-width: 920px) {
  .nav-wrap {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .nav-wrap.open {
    display: flex;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }

  .nav a,
  .header-phone,
  .menu-toggle,
  .site-header:not(.scrolled) .nav a,
  .site-header:not(.scrolled) .header-phone {
    color: var(--text);
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-cta {
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .menu-toggle {
    display: inline-flex;
    color: var(--white);
  }

  .site-header.scrolled .menu-toggle {
    color: var(--text);
  }

  .header-phone {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 78px;
  }

  .container {
    width: min(var(--container), calc(100% - 28px));
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .brand-subtitle {
    font-size: 0.68rem;
  }

  .hero-apartment h1 {
    font-size: clamp(2.9rem, 13vw, 4.4rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
  }

  .btn {
    width: 100%;
  }

  .gallery-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    grid-template-columns: unset;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  }

  .gallery-track::-webkit-scrollbar {
    height: 8px;
  }

  .gallery-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
  }

  .photo-card {
    min-height: 400px;
    scroll-snap-align: start;
  }

  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-link {
    width: 100%;
  }
}
