:root {
  --ivory: #fbf7ef;
  --sand: #e6d6bf;
  --warm: #c9ad8d;
  --taupe: #857463;
  --ink: #2d2923;
  --muted: #72685d;
  --pool: #7fb9bd;
  --pool-deep: #396f74;
  --paper: rgba(255, 252, 246, 0.82);
  --line: rgba(73, 61, 49, 0.16);
  --shadow: 0 24px 70px rgba(57, 45, 35, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(127, 185, 189, 0.13), transparent 28rem),
    linear-gradient(180deg, #fffaf1 0%, var(--ivory) 48%, #f1e6d7 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.05rem clamp(1rem, 4vw, 3.5rem);
  color: #fffaf1;
  transition: background 300ms ease, box-shadow 300ms ease, color 300ms ease, padding 300ms ease;
}
.site-header.is-scrolled {
  padding-block: 0.72rem;
  color: var(--ink);
  background: rgba(251, 247, 239, 0.88);
  box-shadow: 0 10px 30px rgba(56, 43, 31, 0.08);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--serif); font-size: 1.35rem; letter-spacing: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.72); }
.site-nav { justify-self: center; display: flex; gap: clamp(1rem, 3vw, 2.6rem); font-size: 0.78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.site-nav a { opacity: .84; transition: opacity 200ms ease, color 200ms ease; }
.site-nav a:hover { opacity: 1; color: var(--pool); }
.nav-toggle { display: none; background: transparent; border: 0; width: 42px; height: 42px; }
.nav-toggle span { display: block; height: 1px; margin: 7px; background: currentColor; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.82rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: #fffaf1;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}
.button:hover { transform: translateY(-2px); background: #fff; }
.button-small { min-height: 40px; padding-inline: 1rem; }
.button-ghost { background: transparent; color: #fffaf1; }
.button-ghost.dark { color: var(--ink); border-color: var(--line); }

.hero { min-height: 100svh; position: relative; display: grid; align-items: center; padding: 9rem clamp(1.2rem, 7vw, 7rem) 5rem; overflow: hidden; }
.hero-media, .hero-overlay { position: absolute; inset: 0; }
.hero-media {
  background-image: url("public/villa-mia/pool-main.jpeg");
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroDrift 18s ease-in-out infinite alternate;
}
.hero-overlay { background: linear-gradient(90deg, rgba(36,31,26,.74), rgba(36,31,26,.25) 52%, rgba(36,31,26,.42)), linear-gradient(180deg, rgba(36,31,26,.18), rgba(36,31,26,.64)); }
.hero-content { position: relative; z-index: 1; max-width: 760px; color: #fffaf1; }
.hero-logo { width: 92px; height: 92px; border-radius: 50%; margin-bottom: 1.5rem; background: rgba(255,255,255,.72); }
.eyebrow, .section-kicker { margin: 0 0 1rem; color: var(--pool); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; margin: 0; line-height: .95; }
h1 { font-size: clamp(5rem, 16vw, 12rem); }
h2 { font-size: clamp(3rem, 7vw, 6.5rem); }
h3 { font-size: clamp(2rem, 4vw, 3.8rem); }
.hero-lead { max-width: 690px; margin: 1rem 0 0; font-family: var(--serif); font-size: clamp(1.65rem, 3vw, 3.05rem); line-height: 1.08; }
.hero-sub, .large-text, .location p, .soft-block p, .cta-inner p { color: inherit; font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.9; }
.hero-sub { max-width: 570px; color: rgba(255,250,241,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.scroll-indicator { position: absolute; z-index: 2; left: 50%; bottom: 2rem; transform: translateX(-50%); }
.mouse { display: grid; justify-items: center; width: 30px; height: 48px; border: 1px solid rgba(255,250,241,.72); border-radius: 999px; padding-top: 8px; }
.mouse span { width: 4px; height: 9px; border-radius: 999px; background: #fffaf1; transform: translateY(var(--mouse-shift, 0)); transition: transform 80ms linear; }

.section { padding: clamp(5rem, 11vw, 10rem) clamp(1.2rem, 6vw, 6.5rem); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 540px); gap: clamp(2rem, 8vw, 7rem); align-items: end; }
.large-text { color: var(--muted); margin: 0; }
.highlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.highlight { min-height: 190px; padding: 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.28); }
.highlight span { color: var(--pool-deep); font-family: var(--serif); font-size: 2.7rem; }
.highlight p { margin: 3rem 0 0; font-weight: 700; }
.section-heading { max-width: 820px; margin-bottom: 4rem; }
.gallery-section { margin-top: clamp(4rem, 8vw, 7rem); }
.gallery-section h3 { margin-bottom: 1.4rem; }
.floor-plan { display: grid; gap: 1rem; }
.masonry { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; gap: 1rem; }
.masonry.compact { grid-auto-rows: 270px; }
.photo { appearance: none; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--sand); cursor: zoom-in; box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.08) saturate(.95) brightness(1.03); transition: transform 700ms ease, filter 500ms ease; }
.photo:hover img { transform: scale(1.055); filter: sepia(.03) saturate(1.02) brightness(1.05); }
.photo.tall { grid-row: span 2; }
.photo.wide { grid-column: span 2; }
.plan-card { width: min(100%, 900px); height: auto; padding: 1rem; background: rgba(255,255,255,.72); cursor: zoom-in; }
.plan-card img { aspect-ratio: 16 / 10; object-fit: contain; background: #fff; border-radius: 10px; }

.location-panel, .cta-inner {
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 4.5rem);
  background: rgba(255, 252, 246, 0.72);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.72);
}
.location-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 430px); gap: 3rem; align-items: center; }
.location-list { list-style: none; margin: 0; padding: 0; }
.location-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.location-list strong { color: var(--ink); text-align: right; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.soft-block { min-height: 390px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 24px; padding: clamp(2rem, 4vw, 4rem); background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(230,214,191,.52)); border: 1px solid rgba(255,255,255,.76); }
.final-cta { text-align: center; }
.cta-inner { max-width: 980px; margin: 0 auto; }
.cta-inner .hero-actions { justify-content: center; }

.offer {
  position: fixed;
  right: 1rem;
  top: 42%;
  z-index: 18;
  width: 230px;
  padding: 1rem 2.2rem 1rem 1rem;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 16px;
  background: rgba(255,252,246,.88);
  box-shadow: 0 18px 45px rgba(47,39,30,.14);
  backdrop-filter: blur(14px);
  transition: opacity 240ms ease, transform 240ms ease;
}
.offer.is-hidden { opacity: 0; transform: translateX(110%); pointer-events: none; }
.offer p { margin: 0; font-size: .86rem; line-height: 1.55; font-weight: 700; }
.offer button { position: absolute; right: .55rem; top: .45rem; width: 24px; height: 24px; border: 0; background: transparent; color: var(--taupe); cursor: pointer; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 2rem; background: rgba(35,30,25,.84); opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(1120px, 94vw); max-height: 86vh; border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.lightbox-close { position: fixed; top: 1rem; right: 1rem; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.7rem; cursor: pointer; }

.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.2rem, 6vw, 6.5rem); border-top: 1px solid var(--line); color: var(--muted); }
.site-footer strong { color: var(--ink); font-family: var(--serif); font-size: 1.6rem; }
.site-footer p { margin: .35rem 0 0; }
.site-footer div:last-child { display: grid; gap: .35rem; text-align: right; }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity 800ms ease, transform 800ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(1.4rem, -1rem, 0); }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: auto auto; }
  .site-header > .button { display: none; }
  .nav-toggle { display: block; justify-self: end; }
  .site-nav {
    position: fixed;
    inset: 70px 1rem auto;
    display: grid;
    gap: 0;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(251,247,239,.96);
    color: var(--ink);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: .9rem; }
  .intro-grid, .location-panel, .split { grid-template-columns: 1fr; }
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
  .masonry, .masonry.compact { grid-template-columns: 1fr 1fr; grid-auto-rows: 210px; }
  .photo.wide { grid-column: span 2; }
  .offer { top: auto; left: 1rem; right: 1rem; bottom: 1rem; width: auto; }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(4rem, 24vw, 6rem); }
  h2 { font-size: clamp(2.7rem, 15vw, 4.2rem); }
  .hero { padding-top: 8rem; }
  .hero-logo { width: 76px; height: 76px; }
  .highlight-grid, .masonry, .masonry.compact { grid-template-columns: 1fr; }
  .photo, .photo.wide, .photo.tall { grid-column: auto; grid-row: auto; min-height: 240px; }
  .site-footer { display: grid; }
  .site-footer div:last-child { text-align: left; }
}
