/* ========================================
   Apartamenty Szmulson — Style
   Palette: warm terracotta, charcoal, cream
   ======================================== */

:root {
  --color-primary: #c8734a;
  --color-primary-dark: #a85d3a;
  --color-primary-light: rgba(206, 131, 86, 0.15);
  --color-dark: #2d2d2d;
  --color-darker: #1a1a1a;
  --color-text: #4a4a4a;
  --color-text-light: #777;
  --color-cream: #f7f5f2;
  --color-white: #fff;
  --color-border: #e8e4e0;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --gap: 2rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  line-height: 1.7;
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0) 100%);
  padding-bottom: 1rem;
  backdrop-filter: blur(0);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

.nav--scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
  padding-bottom: 0;
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
  transition: color 0.3s, text-shadow 0.3s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.nav--scrolled .nav__logo { color: var(--color-dark); text-shadow: none; }

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s, text-shadow 0.3s;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  padding: 0.85rem 0.5rem;
}

.nav--scrolled .nav__links a { color: var(--color-text); text-shadow: none; }
.nav__links a:hover { color: var(--color-primary); }

.nav__cta {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  transition: background 0.2s !important;
}

.nav__cta:hover { background: var(--color-primary-dark) !important; }

.nav__highlight {
  color: var(--color-primary) !important;
  font-weight: 600 !important;
}

.nav__close { display: none; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: background 0.3s, transform 0.3s;
}

.nav--scrolled .nav__toggle span { background: var(--color-dark); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: heroZoom 20s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(26, 26, 26, 0.92) 0%, rgba(26, 26, 26, 0.7) 40%, rgba(26, 26, 26, 0.15) 75%, transparent 100%),
    linear-gradient(to top, rgba(26, 26, 26, 0.5) 0%, transparent 30%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 6rem 4rem 6rem 6rem;
  max-width: 620px;
  color: var(--color-white);
}

.hero__label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.hero__title-light {
  font-weight: 400;
  font-style: italic;
  opacity: 0.85;
}

.hero__divider {
  width: 60px;
  height: 2px;
  background: var(--color-primary);
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
}

.hero__features {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero__dot {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

/* ── Hero entrance animations ── */
.anim-in {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeIn 0.8s ease-out forwards;
}

.hero__label.anim-in { animation-delay: 0.3s; }
.hero__title.anim-in { animation-delay: 0.5s; transform: translateY(28px); }
.hero__divider.anim-in { animation-delay: 0.7s; }
.hero__subtitle.anim-in { animation-delay: 0.85s; }
.hero__features.anim-in { animation-delay: 1s; }
.btn.anim-in { animation-delay: 1.1s; }

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  animation: bounce 2s infinite;
  animation-delay: 2s;
  opacity: 0;
  z-index: 5;
}

@keyframes bounce {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 115, 74, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* ── Intro ── */
.intro {
  padding: 5rem 0;
  text-align: center;
  background: var(--color-cream);
}

.intro__text {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--color-text-light);
}

/* ── Section titles ── */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--color-dark);
  text-align: center;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.section-title--light { color: var(--color-white); }

.section-subtitle {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1rem;
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.section-subtitle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--color-primary);
  opacity: 0.4;
}

/* ── Apartments ── */
.apartments {
  padding: 6rem 0;
}

.apt {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--color-border);
}

.apt:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.apt--reverse { direction: rtl; }
.apt--reverse > * { direction: ltr; }

.apt__gallery { position: relative; }

.apt__main-img {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.apt__main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.apt__main-img:hover img { transform: scale(1.03); }

.apt__photo-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
}

.apt__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.apt__thumbs img {
  border-radius: 8px;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
}

.apt__thumbs img:hover { opacity: 0.8; }

.apt__hidden-imgs { display: none; }

.apt__info {
  padding-top: 1rem;
}

.apt__name {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.apt__desc {
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.apt__details {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.apt__guests,
.apt__feature {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  background: var(--color-cream);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
}

.apt__guests svg { stroke: var(--color-primary); }

.apt__price {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
}

.apt__price small {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-light);
}

/* ── Eventy Banner ── */
.eventy-banner {
  padding: 4rem 0;
  background: var(--color-darker);
  text-align: center;
  color: var(--color-white);
}

.eventy-banner__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-darker);
  background: var(--color-primary);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

.eventy-banner__title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.eventy-banner__desc {
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ── Neighborhood ── */
.neighborhood {
  padding: 6rem 0;
  background: var(--color-cream);
}

.neighborhood .section-title { margin-bottom: 3rem; }

.neighborhood__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.neighborhood__text p {
  margin-bottom: 1.25rem;
  line-height: 1.9;
}

.neighborhood__text strong {
  color: var(--color-dark);
}

/* ── Contact ── */
.contact {
  padding: 6rem 0;
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.85);
}

.contact .section-title { margin-bottom: 3rem; }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact__item svg {
  flex-shrink: 0;
  stroke: var(--color-primary);
  margin-top: 2px;
}

.contact__item strong {
  display: block;
  color: var(--color-white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.contact__item a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.contact__item a:hover { color: var(--color-primary); }

.contact__item small {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

.contact__cta { text-align: center; }

/* ── Footer ── */
.footer {
  padding: 1.5rem 0;
  background: var(--color-darker);
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  z-index: 10;
}

.lightbox__prev:hover,
.lightbox__next:hover { opacity: 1; }

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero__content {
    padding: 7rem 2rem 4rem;
  }

  .hero__subtitle br { display: none; }

  .hero__bg-img {
    object-position: 60% center;
  }

  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.5) 50%, rgba(26, 26, 26, 0.7) 100%);
  }

  .hero__scroll { display: none; }

  .apt {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .apt--reverse { direction: ltr; }

  .neighborhood__content {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  }

  .nav__links.open { right: 0; }

  .nav__links a {
    color: var(--color-text) !important;
    font-size: 1.1rem;
    padding: 0.4rem 0 !important;
    text-shadow: none !important;
  }

  .nav__links .nav__cta {
    padding: 0.65rem 1.25rem !important;
    color: var(--color-white) !important;
    margin-top: 0.5rem;
  }

  .nav__close {
    display: block;
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
  }

  .nav__toggle { display: flex; }

  .hero__features { gap: 0.5rem; }
  .hero__dot { display: none; }
  .hero__features span { font-size: 0.8rem; }

  .apt__thumbs { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }

  .section-title { margin-bottom: 0.5rem; }
  .section-subtitle { margin-bottom: 2rem; }

  .apartments { padding: 4rem 0; }
  .apt { margin-bottom: 3rem; padding-bottom: 3rem; }
}

/* Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__scroll { animation: none; }
  .apt__main-img img { transition: none; }
}
