/* Quin's Castelo, Barro do Pojuca, Bahia */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader-italic.woff2") format("woff2-variations");
}

:root {
  --white: #ffffff;
  --ink: #16332a;        /* diepgroen, de kleur van de luiken */
  --green: #1f5240;      /* vlakken */
  --green-soft: #e9efe9; /* lichte achtergrond */
  --red: #b4392b;        /* de rode panelen in de luiken */
  --pink: #b8285c;       /* bougainvillea */
  --blue: #2a65a8;       /* het zwembad */
  --blue-deep: #16497f;  /* het zwembad in de schaduw */
  --sand: #f2e6d0;       /* zon op de tegels van het terras */
  --muted: #5d6f66;

  --sans: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(20px, 3vw, 40px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.5;
  font-optical-sizing: auto;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Taal: elementen met lang="en" verbergen in NL-stand, en andersom */
html[data-lang="nl"] [lang="en"] { display: none !important; }
html[data-lang="en"] [lang="nl"] { display: none !important; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; }
.brand small { font-weight: 400; color: var(--muted); margin-left: .6em; }
.topnav { display: flex; align-items: center; gap: 20px; }
.topnav a { font-weight: 600; font-size: 1.05rem; text-decoration: none; color: var(--ink); }
.topnav a:hover { color: var(--pink); }
@media (max-width: 600px) { .brand small { display: none; } }

.lang {
  display: inline-flex; border: 1.5px solid var(--green); border-radius: 999px; padding: 2px; gap: 2px;
}
.lang button {
  font: inherit; font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  border: 0; background: transparent; color: var(--green);
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--pink); color: var(--white); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100svh - 60px); min-height: calc(100vh - 60px); display: flex; align-items: flex-end; background: var(--ink); isolation: isolate; }
.hero .imgbtn, .hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero img { object-fit: cover; object-position: 55% 50%; }
.imgbtn { all: unset; display: block; cursor: zoom-in; }
.imgbtn:focus-visible { outline: 3px solid var(--white); outline-offset: -6px; }
.hero-text, .band .wrap { position: relative; pointer-events: none; }
.hero-text a, .hero-text p, .hero-text h1, .band p { pointer-events: auto; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(10,30,22,.8) 0%, rgba(10,30,22,.45) 40%, rgba(10,30,22,.12) 75%, rgba(10,30,22,0) 100%);
}
.hero-text { color: var(--white); text-shadow: 0 1px 2px rgba(0,0,0,.25), 0 2px 24px rgba(0,0,0,.25); padding: clamp(40px, 8vw, 120px) 0 clamp(28px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px clamp(24px, 4vw, 64px); width: min(100% - 2 * var(--gutter), var(--max)); }
.hero h1 {
  grid-column: 1; font-weight: 500; font-size: clamp(2.7rem, 6.4vw, 6rem);
  line-height: .96; letter-spacing: -0.03em; margin: 0 0 .45em; max-width: 13ch; text-wrap: balance;
}
.hero .where { grid-column: 1; font-size: clamp(1.15rem, 1.5vw, 1.4rem); margin: 0; max-width: 44ch; opacity: .92; }
.hero .where b { font-weight: 600; }
.hero .hero-cap { grid-column: 2; margin: 0; font-size: .95rem; opacity: .8; text-align: right; }
@media (max-width: 900px) {
  .hero { min-height: 88svh; }
  .hero img { object-position: 60% 50%; }
  .hero-text { grid-template-columns: 1fr; }
  .hero .hero-cap { grid-column: 1; text-align: left; }
}

/* ---------- Feitenregel ---------- */
.facts { background: var(--green); color: var(--white); }
.facts ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.facts li { padding: 24px 20px 24px 0; font-size: 1.08rem; line-height: 1.3; opacity: .95; }
.facts li + li { border-left: 1px solid rgba(255,255,255,.25); padding-left: 20px; }
.facts li strong { display: block; font-weight: 600; font-size: 1.65rem; letter-spacing: -0.02em; white-space: nowrap; }
@media (max-width: 760px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 16px 12px 16px 0; }
  .facts li + li { padding-left: 12px; }
  .facts li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.25); }
}

/* ---------- De brief ---------- */
.letter { padding: clamp(56px, 8vw, 120px) 0; background: var(--sand); }
.letter .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.letter .lead {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  line-height: 1.2; letter-spacing: -0.01em; margin: 0; position: sticky; top: 92px;
  text-wrap: balance;
}
.letter .body { font-family: var(--serif); font-size: 1.5rem; line-height: 1.5; max-width: 58ch; }
.letter .body p { margin: 0 0 1.1em; }
.letter .body p.q { font-style: italic; font-size: 1.5em; line-height: 1.25; margin: 1.2em 0 .5em; }
.letter .body p.a { font-weight: 500; }
.letter .body .sign { font-family: var(--sans); font-size: 1.05rem; color: var(--muted); margin-top: 2em; }
@media (max-width: 900px) {
  .letter .wrap { grid-template-columns: 1fr; }
  .letter .lead { position: static; }
  .letter .body { font-size: 1.3rem; }
}

/* ---------- Hoofdstukken met foto's ---------- */
.chapter { padding: clamp(40px, 6vw, 88px) 0; }
.chapter.tint { background: var(--green-soft); }
.chapter.pool { background: var(--blue-deep); color: var(--white); }
.chapter.pool .grid figcaption { color: rgba(255,255,255,.78); }
.chapter.pool .grid figure button { background: rgba(255,255,255,.08); }
.chapter.pool .grid figure button:focus-visible { outline-color: var(--white); }
.chapter-head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); margin-bottom: clamp(24px, 3vw, 40px); align-items: end; }
.chapter h2 {
  font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -0.03em; margin: 0;
}
.chapter-head p { margin: 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.45; max-width: 46ch; }
@media (max-width: 900px) { .chapter-head { grid-template-columns: 1fr; } }

/* Elke rij: foto's krijgen dezelfde hoogte, de breedte volgt uit de verhouding (--r) */
.grid { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 32px); }
.row { display: flex; gap: clamp(12px, 1.8vw, 28px); align-items: flex-start; }
.row figure { margin: 0; flex: var(--r, 1) 1 0; min-width: 0; }

.grid figure button {
  all: unset; display: block; width: 100%; cursor: zoom-in; background: var(--green-soft);
}
.grid figure button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.grid figure img { width: 100%; height: auto; }
.grid figure img.land { aspect-ratio: 4 / 3; object-fit: cover; }
.grid figure img.port { aspect-ratio: 3 / 4; object-fit: cover; }
.grid figure img.tall { aspect-ratio: 9 / 16; object-fit: cover; }
.grid figure img.wide { aspect-ratio: 16 / 10; object-fit: cover; }
.grid figcaption { font-size: 1.02rem; color: var(--muted); margin-top: 10px; line-height: 1.35; }

@media (max-width: 700px) {
  /* Op een telefoon: eerste foto van een rij van drie op volle breedte, de rest in tweeën */
  .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .row figure { grid-column: span 2; }
  .row figure:nth-child(2):nth-last-child(2),
  .row figure:nth-child(3):last-child { grid-column: span 1; }
  .grid figcaption { font-size: .95rem; }
}

/* Plattegronden: geen bijsnijden */
.plans .grid figure img { aspect-ratio: auto; object-fit: contain; }
.plans .grid figure button { background: var(--white); border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }

/* ---------- Fotoband ---------- */
.band { position: relative; min-height: clamp(360px, 70vh, 720px); display: flex; align-items: flex-end; isolation: isolate; background: var(--ink); }
.band .imgbtn, .band img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.band img { object-fit: cover; object-position: 50% 42%; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(10,30,22,.7), rgba(10,30,22,0) 60%); }
.band p {
  margin: 0; padding: 0 0 clamp(32px, 5vw, 64px); color: var(--white);
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.1; letter-spacing: -0.01em; max-width: 18ch; text-wrap: balance;
  text-shadow: 0 1px 2px rgba(0,0,0,.25), 0 2px 24px rgba(0,0,0,.3);
}

/* ---------- Groene vlakken ---------- */
.block { background: var(--green); color: var(--white); padding: clamp(48px, 7vw, 104px) 0; }
.block .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); }
.block h2 { font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -0.03em; margin: 0 0 .4em; }
.block .intro { font-family: var(--serif); font-size: 1.4rem; line-height: 1.45; margin: 0; max-width: 34ch; opacity: .92; }
.block ul { list-style: none; margin: 0; padding: 0; font-family: var(--serif); font-size: 1.45rem; line-height: 1.4; }
.block li { padding: .7em 0; border-top: 1px solid rgba(255,255,255,.22); }
.block li:last-child { border-bottom: 1px solid rgba(255,255,255,.22); }
.block p.body { font-family: var(--serif); font-size: 1.5rem; line-height: 1.5; margin: 0 0 1em; }
@media (max-width: 900px) { .block .wrap { grid-template-columns: 1fr; } }

.block.soft { background: var(--green-soft); color: var(--ink); }
.block.soft li { border-color: color-mix(in srgb, var(--ink) 18%, transparent); }

/* ---------- Contact ---------- */
.contact { padding: clamp(56px, 8vw, 120px) 0; background: var(--pink); color: var(--white); }
.contact .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.contact h2 { font-weight: 500; font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: .98; letter-spacing: -0.03em; margin: 0; }
.contact p { font-family: var(--serif); font-size: 1.5rem; line-height: 1.5; margin: 0 0 1.2em; max-width: 50ch; }
.contact .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1.1rem;
  padding: 15px 26px; border-radius: 999px; text-decoration: none;
  background: var(--white); color: var(--pink); border: 1.5px solid var(--white);
}
.btn.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.contact .btn:focus-visible { outline-color: var(--white); }
.contact .contact-detail { font-family: var(--sans); font-size: 1.05rem; margin: 1.4em 0 0; opacity: .9; }
.contact .contact-detail a { text-decoration-color: rgba(255,255,255,.6); }
.btn:hover { filter: brightness(1.08); }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } }

footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 28px 0 44px; font-size: 1rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
footer p { margin: 0; }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 50; background: #0f2a20; color: var(--white);
  display: none; flex-direction: column;
}
.lb[open] { display: flex; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 56px 64px 8px; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px); width: auto; height: auto; object-fit: contain; }
@media (max-width: 700px) { .lb-stage { padding: 56px 12px 8px; } .lb-stage img { max-height: calc(100dvh - 170px); } }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px 22px; }
.lb-cap { font-size: 1.05rem; opacity: .9; margin: 0; }
.lb-count { font-size: .85rem; opacity: .6; white-space: nowrap; }
.lb button {
  all: unset; cursor: pointer; color: var(--white); font: inherit; font-weight: 600;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px;
  background: rgba(255,255,255,.1);
}
.lb button:hover { background: rgba(255,255,255,.22); }
.lb button:focus-visible { outline: 2px solid var(--white); }
.lb .lb-close { position: absolute; top: 12px; right: 16px; }
.lb .lb-prev, .lb .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb .lb-prev { left: 12px; }
.lb .lb-next { right: 12px; }
@media (max-width: 700px) {
  .lb .lb-prev, .lb .lb-next { top: auto; bottom: 64px; transform: none; }
}
body.lb-open { overflow: hidden; }
