:root {
  --bg: #faf6ef;
  --bg-card: #ffffff;
  --bg-section: #f3ede2;
  --text: #2a2422;
  --text-soft: #6b6358;
  --accent: #8b2a2a;
  --accent-soft: #a85050;
  --border: #e6ddcc;
  --shadow: 0 6px 24px rgba(60, 40, 20, 0.08);
  --shadow-strong: 0 12px 40px rgba(60, 40, 20, 0.16);
  --radius: 4px;
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-soft); text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: var(--maxw-narrow); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.brand-place {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 2px;
}
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.3px;
  position: relative;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s;
}
.site-nav a:hover::after { transform: scaleX(1); }

/* ── Hero ── */
.hero {
  position: relative;
  height: 78vh;
  min-height: 540px;
  overflow: hidden;
  background: #2a2422;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.65);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(20, 16, 12, 0.78) 0%,
    rgba(20, 16, 12, 0.55) 35%,
    rgba(20, 16, 12, 0.15) 65%,
    rgba(20, 16, 12, 0) 100%
  );
  pointer-events: none;
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 8% 0 8%;
  color: #fff;
  max-width: 720px;
  z-index: 2;
}
.hero-eyebrow {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 18px;
  margin: 0 0 18px;
  opacity: .95;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  margin: 0 0 24px;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6), 0 1px 4px rgba(0, 0, 0, 0.4);
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #f5cfa6;
}
.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

/* ── Sections base ── */
.intro,
.apartments,
.surroundings,
.gallery,
.contact {
  padding: 100px 0;
}
.surroundings { background: var(--bg-section); }
.contact { background: var(--bg-section); }

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.6em;
}
.section-title.centered { text-align: center; margin-bottom: 1.5em; }

.intro p {
  font-size: 18px;
  margin: 0 0 1em;
  color: var(--text-soft);
}

/* ── Apartments ── */
.apartment {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 80px;
}
.apartment.reverse { grid-template-columns: 1fr 1.2fr; }
.apartment.reverse .apartment-image { order: 2; }
.apartment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.apartment-info h3 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--accent);
  margin-bottom: 6px;
}
.apartment-meta {
  font-size: 15px;
  color: var(--text-soft);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.apartment-info > p:not(.apartment-meta):not(.note) {
  margin-bottom: 22px;
}
.prices {
  margin: 0 0 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.prices > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  gap: 16px;
}
.prices dt {
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
}
.prices dd {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
}
.note {
  font-style: italic;
  color: var(--text-soft);
  font-size: 15px;
  margin: 0;
}

.house-rules {
  text-align: center;
  font-style: italic;
  color: var(--text-soft);
  font-size: 16px;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}

/* ── Surroundings (Tabs) ── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.tab {
  background: none;
  border: 0;
  padding: 14px 4px;
  margin-right: 32px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.4px;
  color: var(--text-soft);
  cursor: pointer;
  position: relative;
  transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); }
.tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.tab-panel {
  animation: fadeIn .25s ease-out;
}
.tab-panel p { margin: 0 0 1em; color: var(--text-soft); font-size: 17px; }
.tab-panel p:last-child { margin-bottom: 0; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  background: none;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ── Contact ── */
.contact-intro {
  text-align: center;
  color: var(--text-soft);
  font-size: 17px;
  margin: 0 0 36px;
}
.contact-card {
  background: var(--bg-card);
  padding: 40px 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.contact-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-style: italic;
  color: var(--accent);
  margin: 0 0 12px;
}
.contact-address {
  color: var(--text-soft);
  margin: 0 0 24px;
  line-height: 1.5;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.contact-list li {
  padding: 8px 0;
  font-size: 17px;
}
.contact-list li span {
  display: inline-block;
  width: 70px;
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: right;
  margin-right: 14px;
}
.contact-list li a { color: var(--text); font-weight: 500; }
.contact-list li a:hover { color: var(--accent); }
.contact-map { margin: 0; }
.contact-map a { font-size: 15px; }

/* ── Footer ── */
.site-footer {
  padding: 36px 0;
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 14px;
}
.site-footer p { margin: 4px 0; }
.footer-note { color: rgba(255, 255, 255, 0.45); font-style: italic; }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
  animation: fadeIn .2s ease-out;
}
.lightbox[hidden] { display: none; }
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: var(--shadow-strong);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: color .15s, background .15s;
  font-family: var(--font-body);
}
.lightbox-close {
  top: 16px;
  right: 20px;
  font-size: 40px;
  line-height: 1;
  padding: 6px 14px;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  line-height: 1;
  width: 64px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  letter-spacing: 0.5px;
}
@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { font-size: 44px; width: 48px; height: 64px; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .site-header { padding: 12px 20px; flex-wrap: wrap; gap: 12px; }
  .site-nav { gap: 18px; font-size: 14px; width: 100%; justify-content: flex-start; overflow-x: auto; }

  .hero { height: 70vh; min-height: 480px; }
  .hero-content { padding: 0 28px; }

  .intro, .apartments, .surroundings, .gallery, .contact { padding: 64px 0; }

  .apartment,
  .apartment.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }
  .apartment.reverse .apartment-image { order: 0; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .tabs { margin-bottom: 24px; overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; margin-right: 24px; }

  .contact-card { padding: 32px 24px; }
  .contact-list li span { width: 60px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .prices > div { flex-wrap: wrap; }
}
