/* House in Dafundo — long-term rental listing
   Palette is pulled from the house itself: warm oak floors, off-white walls,
   and the coral bookcase in the living room as the accent. */

:root {
  --paper:      #fbf9f6;
  --paper-2:    #f3efe8;
  --ink:        #211e1b;
  --ink-soft:   #5f5850;
  --ink-faint:  #918a80;
  --line:       #e4ddd2;
  --accent:     #c0644c;
  --accent-dk:  #a2503b;
  --dark:       #2c2723;

  --wrap: 1120px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(33, 30, 27, .05), 0 8px 24px rgba(33, 30, 27, .06);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }

p { margin: 0 0 1em; }
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 56ch; }
.note { color: var(--ink-soft); font-size: .95rem; max-width: 56ch; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 246, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.18rem;
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}
.nav { display: flex; gap: 22px; }
.nav a {
  text-decoration: none;
  font-size: .93rem;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }

.lang-toggle {
  font: inherit;
  font-size: .82rem;
  letter-spacing: .06em;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--ink-faint);
  white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--ink-faint); }
.lang-on { color: var(--ink); font-weight: 600; }
.lang-sep { margin: 0 3px; opacity: .5; }

@media (max-width: 720px) {
  .nav { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(78vh, 660px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.hero-img { position: absolute; inset: 0; }
.hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* The source photo is portrait; this keeps the pool in the wide crop. */
  object-position: 50% 34%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(24, 21, 18, .86) 0%,
    rgba(24, 21, 18, .58) 34%,
    rgba(24, 21, 18, .12) 72%,
    rgba(24, 21, 18, .30) 100%);
}
.hero-body {
  position: relative;
  padding-block: 64px 56px;
  color: #fff;
  max-width: 760px;
  margin-inline: auto;
  width: 100%;
}
.hero-body h1 { color: #fff; max-width: 21ch; text-wrap: balance; }
.hero-body .lede { color: rgba(255,255,255,.84); max-width: 52ch; }

.kicker {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 14px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: .95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.13); border-color: #fff; }

/* ---------- facts ---------- */

.facts { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}
.fact {
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.fact:last-child { border-right: 0; }
.fact dt {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.fact dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.2;
}
.fact dd.empty { color: var(--ink-faint); }

@media (max-width: 640px) {
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:nth-child(2n) { border-right: 0; }
}

/* ---------- sections ---------- */

.section { padding-block: clamp(52px, 8vw, 92px); }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--dark); color: #f2ede6; }
.section-dark h2 { color: #fff; }
.section-dark .lede { color: rgba(242,237,230,.72); }

.section-head { margin-bottom: 28px; max-width: 60ch; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- gallery ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter {
  font: inherit;
  font-size: .88rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background-color .15s, border-color .15s, color .15s;
}
.filter:hover { border-color: var(--ink-faint); color: var(--ink); }
.filter[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.filter .count { opacity: .55; margin-left: 6px; font-size: .85em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.tile {
  position: relative;
  padding: 0;
  border: 0;
  background: var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
  display: block;
  width: 100%;
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.045); }
.tile figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  font-size: .82rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(20,17,15,.78), rgba(20,17,15,0));
  opacity: 0;
  transition: opacity .2s;
}
.tile:hover figcaption, .tile:focus-visible figcaption { opacity: 1; }
@media (hover: none) {
  .tile figcaption { opacity: 1; }
}

/* ---------- video ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video iframe { width: 100%; height: 100%; border: 0; }
.video-facade {
  position: absolute; inset: 0;
  display: block;
  padding: 0; border: 0;
  cursor: pointer;
  background: var(--dark);
}
/* Absolute rather than height:100% — percentage heights inside a <button>
   are not reliable across engines. */
.video-facade picture { position: absolute; inset: 0; display: block; }
.video-facade img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Poster is a portrait photo in a 16:9 frame — hold the interesting band. */
  object-position: 50% 30%;
}
.video-facade::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(20,17,15,.28);
  transition: background-color .2s;
}
.video-facade:hover::after { background: rgba(20,17,15,.14); }
.play {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 30px rgba(0,0,0,.35);
  transition: transform .2s, background-color .2s;
}
.video-facade:hover .play { transform: scale(1.07); background: var(--accent-dk); }
.play svg { width: 26px; height: 26px; fill: #fff; margin-left: 4px; }
.video-label {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  z-index: 2;
  text-align: center;
  color: #fff;
  font-size: .9rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* ---------- details ---------- */

.details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 820px) { .details-layout { grid-template-columns: 1fr; } }

.features { list-style: none; margin: 0; padding: 0; }
.features li {
  position: relative;
  padding: 12px 0 12px 30px;
  border-bottom: 1px solid var(--line);
  font-size: .98rem;
}
.features li:first-child { padding-top: 0; }
.features li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 21px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.features li:first-child::before { top: 9px; }

/* ---------- contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  padding: 15px 20px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius);
  transition: background-color .15s, border-color .15s;
}
.contact-list a:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.34); }
.contact-list .ico {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: rgba(242,237,230,.65);
}
/* WhatsApp's own green, so the mark reads as the real thing. */
.contact-list .ico-whatsapp { fill: #25d366; }
.contact-list .label {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(242,237,230,.6);
  min-width: 74px;
}
.contact-list .value { font-size: 1.02rem; }
.contact-list a:hover .ico { fill: #fff; }
.contact-list a:hover .ico-whatsapp { fill: #25d366; }

@media (max-width: 460px) {
  .contact-list a { flex-wrap: wrap; }
  .contact-list .label { min-width: 0; }
  .contact-list .value { flex-basis: 100%; margin-left: 36px; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 26px;
  font-size: .88rem;
  color: var(--ink-faint);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.site-footer p { margin: 0; }
.linklike {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linklike:hover { color: var(--ink); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(18, 16, 14, .94);
  display: grid;
  place-items: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: 100%;
}
.lb-figure img {
  max-height: calc(100vh - 130px);
  max-width: 100%;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius);
  background: #1a1715;
}
.lb-figure figcaption {
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  text-align: center;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.lb-count { color: rgba(255,255,255,.45); font-variant-numeric: tabular-nums; }

.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color .15s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.2); }
.lb-close {
  top: 16px; right: 16px;
  width: 42px; height: 42px;
  font-size: 1.7rem;
  line-height: 1;
  padding-bottom: 4px;
}
.lb-nav {
  top: 50%;
  translate: 0 -50%;
  width: 50px; height: 50px;
  font-size: 2rem;
  line-height: 1;
  padding-bottom: 5px;
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

@media (max-width: 620px) {
  .lb-nav { top: auto; bottom: 16px; translate: 0; }
  .lb-figure img { max-height: calc(100vh - 190px); }
}

body.lb-open { overflow: hidden; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
