/* =========================================================
   Mettes Housing — design tokens
   ========================================================= */
:root {
  --bg: #eeeeec;
  --white: #ffffff;
  --ink: #2b3446;
  --ink-soft: #5c6579;
  --line: #dcdcd7;
  --accent: #62748a;
  --accent-soft: #eef1f3;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow: 0 30px 60px -25px rgba(30, 38, 56, 0.35);
  --nav-h: 104px;
  --font-display: "Roboto", sans-serif;
  --font-head: "Roboto", sans-serif;
  --font-body: "Roboto", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

button { font-family: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* focus visibility, kept intentionally simple */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   Nav
   ========================================================= */
.site-nav {
  height: var(--nav-h);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 64px);
  position: relative;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
}

.brand-mark {
  display: flex;
  align-items: stretch;
  height: 40px;
  gap: 6px;
  font-weight: 500;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.brand-mark span { display: flex; align-items: center; }
.brand-mark .divider {
  width: 1px;
  background: var(--ink);
  opacity: 0.7;
}

.brand-name {
  font-weight: 300;
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}

.nav-links {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
}

.lang-toggle {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lang-toggle:hover { background: var(--accent-soft); border-color: var(--accent); }

.nav-links a {
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.nav-links a:hover { opacity: 0.6; }
.nav-links a.active { border-bottom-color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 260px; }
  .nav-links a { padding: 16px 28px; border-bottom: 1px solid var(--line); }
  .nav-links a.active { border-bottom-color: var(--line); background: var(--accent-soft); }
  .nav-toggle { display: block; }
}

/* =========================================================
   Hero (shared full-bleed photo band)
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Pages whose background photo is set by JS (from the Sheet or a
   fallback) start invisible and fade in once it's actually applied,
   instead of flashing a hardcoded placeholder first. */
[data-site-backdrop],
[data-detail],
[data-slideshow] {
  opacity: 0;
  transition: opacity 0.5s ease;
}
[data-site-backdrop].is-ready,
[data-detail].is-ready,
[data-slideshow].is-ready {
  opacity: 1;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.08) 0%, rgba(20, 26, 40, 0.28) 100%);
  pointer-events: none; /* decorative only — let clicks pass through to buttons/links underneath */
}

/* ---- Home hero / slideshow ---- */
.slideshow { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}
.slide.is-active { opacity: 1; pointer-events: auto; }

.slide-caption {
  position: absolute;
  right: clamp(24px, 8vw, 96px);
  bottom: 130px;
  text-align: right;
  font-family: var(--font-head);
}
.slide-caption-inner {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  color: var(--white);
  padding: 16px 22px;
  background: rgba(20, 26, 40, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.45);
}
.slide-title {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.slide-caption .go {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
a.slide-caption-inner:hover .go { transform: translateX(4px); background: var(--accent); color: var(--white); }

.slide-caption .go-static {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  cursor: default;
}

.slide-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}
.slide-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(43, 52, 70, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.slide-dots button.is-active { background: var(--ink); transform: scale(1.2); }

/* ---- Empty state: no listings to show on the home hero ---- */
.hero-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  color: var(--white);
}
.hero-empty .empty-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(24px, 3.4vw, 36px);
  margin: 0;
}
.hero-empty .empty-text {
  max-width: 46ch;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.9);
}

/* ---- Empty state: no listings to show in the Aanbod grid ---- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: clamp(40px, 8vw, 72px) 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-state .empty-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 21px;
  margin: 0;
}
.empty-state .empty-text {
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 8px;
}

/* =========================================================
   Floating card — the site's signature element.
   Every inner page rests a white card on the same quiet
   street photo, like a listing sheet set down on a table.
   ========================================================= */
.stage {
  padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 96px);
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
}

/* =========================================================
   Aanbod (listings) page
   ========================================================= */
.listing-card { padding: clamp(24px, 4vw, 48px); }

.listing-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.listing-intro h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0;
  font-weight: 900;
}
.listing-intro p { margin: 0; color: var(--ink-soft); max-width: 42ch; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-height: min(640px, 62vh);
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.listing-grid::-webkit-scrollbar { width: 8px; }
.listing-grid::-webkit-scrollbar-track { background: transparent; }
.listing-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.listing-grid::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 900px) {
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .listing-grid { grid-template-columns: 1fr; max-height: 70vh; }
}

.listing-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.listing-item:hover { transform: translateY(-4px); box-shadow: 0 20px 34px -22px rgba(30,38,56,0.4); }

.listing-photo { aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.listing-item:hover .listing-photo img { transform: scale(1.06); }

/* ---- Coming soon ---- */
.listing-item.is-coming-soon { cursor: default; }
.listing-item.is-coming-soon:hover { transform: none; box-shadow: none; }
.listing-item.is-coming-soon .listing-photo img { filter: grayscale(0.25) brightness(0.85); }
.listing-item.is-coming-soon:hover .listing-photo img { transform: none; }

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 52, 70, 0.5);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.coming-soon-panel {
  grid-column: 1 / -1;
  padding: clamp(48px, 8vw, 96px) clamp(28px, 6vw, 64px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.coming-soon-panel h1 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  margin: 0 0 4px;
}
.coming-soon-panel .coming-soon-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 4px 0 14px;
}
.coming-soon-panel .info-desc { max-width: 46ch; margin: 0 0 26px; }
.detail-card.is-coming-soon-detail { display: block; }

.listing-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.listing-body h2 { margin: 0; font-family: var(--font-head); font-size: 21px; font-weight: 700; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; color: var(--ink-soft); }
.listing-price { font-family: var(--font-head); font-weight: 900; font-size: 19px; margin-top: auto; }
.listing-price small { font-family: var(--font-body); font-weight: 500; font-size: 12.5px; color: var(--ink-soft); }

.listing-map-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  align-self: flex-start;
}
.listing-map-link:hover { color: var(--ink); text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent); transform: translateX(2px); }

/* =========================================================
   Keuze (detail) page
   ========================================================= */
.detail-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 640px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  padding: 4px;
}
.gallery button {
  border: none; padding: 0; margin: 0; cursor: zoom-in;
  background: none; overflow: hidden;
  border-radius: 4px;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery button:hover img { transform: scale(1.05); }
.gallery button:nth-child(1),
.gallery button:nth-child(2) { aspect-ratio: 4/3; }
.gallery button:nth-child(1) { border-top-left-radius: var(--radius-md); }
.gallery button:nth-child(2) { border-top-right-radius: var(--radius-md); }
.gallery button:nth-child(3) { border-bottom-left-radius: var(--radius-md); }
.gallery button:nth-child(3),
.gallery button:nth-child(4),
.gallery button:nth-child(5) { aspect-ratio: 3/4; }

.info-panel {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
}
.info-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.info-panel h1 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  margin: 0 0 4px;
}
.info-panel .sub { color: var(--ink-soft); margin: 0 0 22px; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
}
.info-table tr { border-bottom: 1px solid var(--line); }
.info-table tr:last-child { border-bottom: none; }
.info-table th, .info-table td {
  text-align: left;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 400;
}
.info-table th { color: var(--ink-soft); font-weight: 500; width: 40%; }
.info-table td { font-weight: 700; }
.info-table .price-row td { color: var(--ink); font-family: var(--font-head); font-size: 19px; font-weight: 900; }

.info-desc { color: var(--ink-soft); line-height: 1.65; margin-bottom: 24px; }

.info-actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost {
  background: none; color: var(--ink); border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--ink); transform: none; }

@media (max-width: 860px) {
  .detail-card { grid-template-columns: 1fr; }
  .gallery button:nth-child(1),
  .gallery button:nth-child(2),
  .gallery button:nth-child(3),
  .gallery button:nth-child(4),
  .gallery button:nth-child(5) { aspect-ratio: 4/3; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 24, 34, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 5vh 5vw;
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 26px; right: 30px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none; background: rgba(255,255,255,0.12);
  color: var(--white); font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.12); color: var(--white);
  font-size: 20px; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* =========================================================
   Contact page
   ========================================================= */
.contact-card {
  margin-left: auto;
  max-width: 460px;
  padding: clamp(28px, 4vw, 40px);
}
.contact-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 6px 16px -8px rgba(30, 38, 56, 0.45);
  background: var(--accent-soft);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.contact-photo.is-ready { opacity: 1; }

.contact-card .info-eyebrow { margin-bottom: 6px; }
.contact-card h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 26px;
  margin: 0 0 4px;
}
.contact-card .role { color: var(--ink-soft); margin: 0 0 20px; }

.contact-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.contact-list a { font-weight: 700; }
.contact-list a:hover { color: var(--accent); }
.contact-list .label { display: block; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; margin-bottom: 1px; }

.contact-form { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; }
.contact-form label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--accent-soft);
}
.contact-form textarea { resize: vertical; min-height: 90px; }
.contact-form .field { display: flex; flex-direction: column; gap: 5px; }
.form-note { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 22px 20px 30px;
}
