/* ============================================================
   Quinta do Cântaro - design tokens
   ============================================================ */
:root{
  --stone:      #F1EBDC;
  --stone-deep: #E7DFC9;
  --ink:        #262A1C;
  --ink-soft:   #4B4E3C;
  --olive:      #5B6A32;
  --olive-deep: #414C24;
  --sage:       #DEE2C6;
  --clay:       #B15A2C;
  --clay-deep:  #8F4620;
  --cream:      #FBF8F0;
  --night:      #1B2016;

  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max: 1180px;
  --gutter: clamp(24px, 5vw, 64px);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--stone);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3{ font-family:var(--font-display); font-weight:600; margin:0; color:var(--ink); }
p{ margin:0 0 1em; }
ul{ margin:0; padding:0; list-style:none; }
svg{ fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }

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

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

.section{
  max-width:var(--max);
  margin:0 auto;
  padding:min(7vw,64px) var(--gutter) 0;
}
.kicker{
  font-family:var(--font-body);
  font-weight:700;
  font-size:0.82rem;
  letter-spacing:.02em;
  color:var(--clay-deep);
  margin:0 0 .6em;
}
.kicker-light{ color:#D9A374; }
.section-title{
  font-size:clamp(1.9rem, 3.4vw, 2.7rem);
  line-height:1.12;
  margin-bottom:.6em;
}
.title-light{ color:var(--cream); }

/* reveal-on-scroll (single, restrained effect) */
.reveal{ opacity:0; transform:translateY(22px); transition:opacity .8s ease, transform .8s ease; }
.reveal.is-visible{ opacity:1; transform:translateY(0); }

.btn{
  display:inline-block;
  font-family:var(--font-body);
  font-weight:700;
  font-size:0.95rem;
  padding:.95em 1.7em;
  border-radius:2px;
  text-decoration:none;
  border:1.5px solid transparent;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-light{ background:var(--cream); color:var(--ink); }
.btn-light:hover{ background:transparent; color:var(--cream); border-color:var(--cream); }
.btn-outline-light{ background:transparent; color:var(--cream); border-color:rgba(251,248,240,.75); }
.btn-outline-light:hover{ background:var(--cream); color:var(--ink); border-color:var(--cream); }
.hero-actions{ display:flex; flex-wrap:wrap; gap:14px; }
.btn-outline{
  margin-top:1.8em;
  background:transparent; color:var(--clay-deep); border-color:var(--clay-deep);
}
.btn-outline:hover{ background:var(--clay-deep); color:var(--cream); }

.text-link{
  display:inline-block;
  margin-top:.4em;
  font-weight:700;
  color:var(--clay-deep);
  text-decoration:none;
  border-bottom:1.5px solid transparent;
  transition:border-color .2s ease;
}
.text-link:hover{ border-color:var(--clay-deep); }

/* progress bar */
#top-progress{
  position:fixed; top:0; left:0; height:3px; width:0%;
  background:var(--clay); z-index:9999;
  transition:width .1s linear;
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:500;
  padding:18px var(--gutter);
  transition:background .35s ease, padding .35s ease, box-shadow .35s ease;
}
.site-header.solid{
  background:rgba(241,235,220,.92);
  backdrop-filter:blur(8px);
  padding:12px var(--gutter);
  box-shadow:0 1px 0 rgba(38,42,28,.08);
}
.header-inner{
  max-width:var(--max); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand-mark{
  width:40px; height:40px; border-radius:50%;
  opacity:0; transform:scale(.6);
  transition:opacity .3s ease, transform .3s ease;
  pointer-events:none;
}
.site-header.solid .brand-mark{ opacity:1; transform:scale(1); }
.brand-word{
  font-family:var(--font-display); font-weight:600; font-size:1.05rem;
  color:var(--cream); transition:color .35s ease;
  letter-spacing:.01em;
}
.site-header.solid .brand-word{ color:var(--ink); }

.main-nav{ display:flex; align-items:center; gap:30px; }
.nav-link{
  font-size:.92rem; font-weight:500; text-decoration:none;
  color:var(--cream); opacity:.92;
  transition:color .35s ease, opacity .2s ease;
  padding-bottom:2px;
  border-bottom:1.5px solid transparent;
}
.site-header.solid .nav-link{ color:var(--ink-soft); }
.nav-link:hover{ opacity:1; border-color:currentColor; }
.nav-cta{
  border:1.5px solid currentColor; padding:.5em 1.1em; border-radius:2px;
}
.nav-link.active{ border-color:currentColor; opacity:1; }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:34px; height:34px; background:none; border:none; cursor:pointer; padding:0;
}
.nav-toggle span{
  width:100%; height:2px; background:var(--cream); transition:background .3s ease, transform .3s ease, opacity .3s ease;
}
.site-header.solid .nav-toggle span{ background:var(--ink); }

/* ============================================================
   Hero
   ============================================================ */
.hero{
  position:relative; height:100svh; min-height:520px;
  display:flex; align-items:flex-end;
  overflow:hidden; background:var(--night);
}
.hero-video{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}
.hero-scrim{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,22,12,.35) 0%, rgba(20,22,12,.15) 38%, rgba(18,20,10,.78) 100%);
}
.hero-content{
  position:relative; z-index:2; color:var(--cream);
  padding:0 var(--gutter) 96px;
  max-width:760px;
}
.hero-brand{
  display:flex; align-items:center; gap:16px;
  margin-bottom:1.6em;
}
.hero-brand-mark{
  width:56px; height:56px; border-radius:50%;
  box-shadow:0 4px 18px rgba(0,0,0,.35);
}
.hero-brand-name{
  font-family:var(--font-display); font-weight:600;
  font-size:clamp(1.35rem, 2.4vw, 1.7rem);
  color:var(--cream); letter-spacing:.01em;
}
.hero-eyebrow{
  font-weight:700; letter-spacing:.03em; font-size:.85rem;
  color:#E7C9A9; margin-bottom:.9em;
}
.hero-title{
  font-size:clamp(2.8rem, 8vw, 5.4rem);
  line-height:.98;
  margin-bottom:.32em;
  color:var(--cream);
}
.hero-sub{
  font-size:clamp(1rem, 1.6vw, 1.2rem);
  max-width:34em; color:#EDE7D6;
  margin-bottom:1.3em;
}
.scroll-cue{
  position:absolute; bottom:28px; left:50%; transform:translateX(-50%);
  z-index:2; width:26px; height:42px; border:1.5px solid rgba(251,248,240,.7);
  border-radius:20px;
}
.scroll-cue span{
  position:absolute; top:8px; left:50%; width:4px; height:4px;
  background:var(--cream); border-radius:50%; transform:translateX(-50%);
  animation:cue 1.8s ease infinite;
}
@keyframes cue{
  0%{ opacity:1; top:8px; }
  70%{ opacity:0; top:24px; }
  100%{ opacity:0; top:24px; }
}

/* ============================================================
   About
   ============================================================ */
.about-grid{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  grid-template-areas:
    "lede figure"
    "body figure";
  column-gap:56px; row-gap:28px;
  padding-bottom:min(7vw,56px);
  border-bottom:1px solid rgba(38,42,28,.12);
}
.about-lede{ grid-area:lede; }
.about-body{ grid-area:body; }
.about-figure{ grid-area:figure; margin:0; align-self:start; }
.about-figure img{ border-radius:2px; }
.lede{
  font-family:var(--font-display); font-weight:500; font-size:clamp(1.5rem,2.6vw,2.05rem);
  line-height:1.28; color:var(--olive-deep); margin:0;
}
.about-body p{ color:var(--ink-soft); max-width:46ch; }

/* ============================================================
   Houses ("Casas")
   ============================================================ */
.houses{ padding-bottom:min(7vw,56px); border-bottom:1px solid rgba(38,42,28,.12); }
.houses-intro{ color:var(--ink-soft); max-width:56ch; margin-bottom:40px; }
.houses-map{
  margin:0 0 40px; border-radius:2px; overflow:hidden;
  border:1px solid rgba(38,42,28,.14);
}
.houses-map img{ width:100%; display:block; }

.house-cards{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:22px;
}
.house-card{ display:flex; flex-direction:column; gap:14px; }
.house-photo{
  position:relative; aspect-ratio:4/3; border-radius:2px; overflow:hidden; background:var(--sage);
}
.house-photo img{ width:100%; height:100%; object-fit:cover; }
.house-number{
  position:absolute; top:12px; left:12px;
  width:32px; height:32px; border-radius:50%;
  background:var(--clay); color:var(--cream);
  font-family:var(--font-display); font-weight:600; font-size:.95rem;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 10px rgba(0,0,0,.25);
}
.house-name{ font-size:1.12rem; margin:0; }

/* ============================================================
   Amenities - editorial list, not cards
   ============================================================ */
.amenities{ padding-bottom:min(7vw,56px); border-bottom:1px solid rgba(38,42,28,.12); }
.amenity-list{ border-top:1px solid rgba(38,42,28,.16); }
.amenity-row{
  display:flex; align-items:center; gap:26px;
  padding:26px 0;
  border-bottom:1px solid rgba(38,42,28,.16);
}
.amenity-icon{
  flex:none; width:48px; height:48px; color:var(--clay);
}
.amenity-icon svg{ width:100%; height:100%; }
.amenity-text{ display:flex; flex-wrap:wrap; align-items:baseline; column-gap:14px; row-gap:2px; }
.amenity-name{ font-family:var(--font-display); font-weight:600; font-size:1.18rem; color:var(--ink); }
.amenity-detail{ color:var(--ink-soft); font-size:.96rem; }

/* ============================================================
   Video
   ============================================================ */
.video-section{ padding-bottom:min(7vw,56px); border-bottom:1px solid rgba(38,42,28,.12); }
.video-frame{
  background:var(--night); border-radius:2px; overflow:hidden;
  box-shadow:0 30px 60px -30px rgba(38,42,28,.45);
}
.video-frame video{ width:100%; display:block; max-height:70vh; }

/* ============================================================
   Gallery
   ============================================================ */
.gallery{ padding-bottom:min(7vw,56px); border-bottom:1px solid rgba(38,42,28,.12); }
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:14px;
}
.gallery-item{
  position:relative; border:none; padding:0; cursor:pointer;
  aspect-ratio:4/3; overflow:hidden; border-radius:2px; background:var(--sage);
}
.gallery-item.span-2{ grid-column:span 2; aspect-ratio:16/9; }
.gallery-item img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .6s ease;
}
.gallery-item:hover img{ transform:scale(1.045); }
.gallery-cap{
  position:absolute; left:14px; bottom:12px; z-index:2;
  color:var(--cream); font-weight:700; font-size:.88rem;
  text-shadow:0 1px 8px rgba(0,0,0,.5);
}
.gallery-item::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(15,17,10,.55) 100%);
}

.lightbox{
  position:fixed; inset:0; z-index:2000; background:rgba(18,20,12,.94);
  display:none; align-items:center; justify-content:center; padding:5vw;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width:100%; max-height:88vh; border-radius:2px; }
.lightbox-close{
  position:absolute; top:22px; right:28px; background:none; border:none;
  color:var(--cream); font-size:2.4rem; line-height:1; cursor:pointer;
}

/* ============================================================
   Surroundings / map
   ============================================================ */
.surroundings{ padding-bottom:min(7vw,56px); border-bottom:1px solid rgba(38,42,28,.12); }
.surroundings-grid{
  display:grid; grid-template-columns:.85fr 1.15fr; column-gap:56px; row-gap:28px;
  margin-bottom:44px;
}
.surroundings-intro{ color:var(--ink-soft); max-width:40ch; }
.distance-list{ border-top:1px solid rgba(38,42,28,.16); align-self:start; }
.distance-row{
  display:flex; align-items:baseline; gap:22px;
  padding:20px 0; border-bottom:1px solid rgba(38,42,28,.16);
}
.distance-marker{
  flex:none; align-self:center;
  width:24px; height:24px; border-radius:50%;
  background:var(--clay); color:var(--cream);
  font-family:var(--font-display); font-weight:600; font-size:.82rem;
  display:flex; align-items:center; justify-content:center;
}
.distance-value{
  flex:none; width:6.4ch;
  font-family:var(--font-display); font-weight:600; color:var(--clay-deep);
  font-size:1.25rem;
}
.distance-name{ display:block; font-weight:700; }
.distance-detail{ display:block; color:var(--ink-soft); font-size:.92rem; }
.map-frame{
  border-radius:2px; overflow:hidden; border:1px solid rgba(38,42,28,.16);
  height:420px; background:var(--sage);
}
.map-frame .leaflet-container{ font-family:var(--font-body); }
.map-frame .leaflet-popup-content-wrapper{ border-radius:2px; }

.map-pin{ background:transparent; border:none; }
.map-pin span{
  display:flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:50%;
  background:var(--clay); border:2.5px solid var(--cream);
  box-shadow:0 3px 10px rgba(0,0,0,.35);
  color:var(--cream); font-family:var(--font-display); font-weight:700; font-size:.9rem;
}
.map-pin-home span{
  width:22px; height:22px;
  background:var(--olive-deep); border:3px solid var(--cream);
  box-shadow:0 3px 10px rgba(0,0,0,.4);
}

/* ============================================================
   Contact
   ============================================================ */
.contact{
  background:var(--night); color:var(--cream);
  max-width:none; padding:min(7vw,64px) var(--gutter) 0;
}
.contact-inner{
  max-width:var(--max); margin:0 auto;
  display:grid; grid-template-columns:.9fr 1.1fr; column-gap:56px; row-gap:34px;
  padding-bottom:80px;
}
.contact-intro{ color:#C9CBB6; max-width:38ch; }
.contact-card{ align-self:start; border-top:1px solid rgba(251,248,240,.18); }
.contact-row{
  display:flex; align-items:center; gap:18px;
  padding:20px 0; border-bottom:1px solid rgba(251,248,240,.18);
  text-decoration:none; color:var(--cream); font-weight:500;
  transition:color .2s ease;
}
.contact-row:hover{ color:#E7C9A9; }
.contact-row svg{ flex:none; width:26px; height:26px; color:#D9A374; }
.contact-row span a{
  color:inherit; text-decoration:none;
  border-bottom:1.5px solid transparent;
  transition:color .2s ease, border-color .2s ease;
}
.contact-row span a:hover{ color:#E7C9A9; border-color:#E7C9A9; }
.tel-note{ font-size:.72rem; color:#9FA389; font-weight:400; }

.site-footer{
  max-width:var(--max); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px;
  padding:26px var(--gutter) 30px; border-top:1px solid rgba(251,248,240,.14);
  font-size:.82rem; color:#9FA389;
}
.footer-badge{ display:inline-flex; }
.footer-badge img{ height:56px; width:auto; display:block; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:920px){
  .about-grid{
    grid-template-columns:1fr;
    grid-template-areas:"lede" "figure" "body";
  }
  .surroundings-grid{ grid-template-columns:1fr; }
  .contact-inner{ grid-template-columns:1fr; }
  .gallery-grid{ grid-template-columns:repeat(2,1fr); }
  .gallery-item.span-2{ grid-column:span 2; }
  .house-cards{ grid-template-columns:repeat(2,1fr); }
}

@media (max-width:760px){
  .main-nav{
    position:fixed; inset:0 0 0 auto; width:min(78vw,320px);
    background:var(--night); flex-direction:column; align-items:flex-start;
    padding:110px 32px 40px; gap:22px;
    transform:translateX(100%); transition:transform .35s ease;
  }
  .main-nav.open{ transform:translateX(0); }
  .main-nav .nav-link{ color:var(--cream); font-size:1.05rem; }
  .nav-toggle{ display:flex; }
  body.nav-open{ overflow:hidden; }

  .hero-content{ padding-bottom:76px; }
  .section{ padding-top:88px; }
  .gallery-grid{ grid-template-columns:1fr 1fr; }

  /* logo isn't visible in the cropped mobile hero video, so show it
     in the navbar from the start instead of fading in on scroll */
  .brand-mark{ opacity:1; transform:scale(1); }
}

@media (max-width:520px){
  .amenity-row{ gap:18px; }
  .distance-row{ gap:14px; }
  .house-cards{ grid-template-columns:1fr 1fr; gap:16px; }
}
