/* =====================================================================
   VILLA CASA BLANCA — Pag, Croatia
   Elegant Mediterranean · cinematic scroll · 4 languages
   ===================================================================== */

:root {
  --bg:        #F6F2EB;   /* limestone */
  --bg-2:      #EFE8DC;   /* warm sand */
  --bg-3:      #ECE3D4;
  --cream:     #FBF8F2;
  --ink:       #1C1E1F;
  --ink-2:     #46423B;
  --ink-3:     #6E6A61;
  --line:      rgba(28,30,31,.12);
  --line-2:    rgba(28,30,31,.07);

  --sea:       #15596B;
  --sea-deep:  #0E3D4A;
  --gold:      #A9803F;
  --gold-2:    #C2A06A;
  --dark:      #101619;
  --dark-2:    #16201F;

  --a1:        #A94E68;   /* rose — Pink Diamond (lower apt) */
  --a1-soft:   #F6E9EE;
  --a2:        #2E5C8A;   /* sapphire — Blue Diamond (upper apt) */
  --a2-soft:   #E8EEF6;

  --accent:    var(--sea);

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1240px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Lenis ---- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

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

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---- Typography helpers ---- */
.section-label, .section-eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--ink);
}
.section-lead {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink-2);
  max-width: 60ch;
  margin-top: 1.1rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--sans);
  font-size: .82rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 1.02em 1.9em;
  border-radius: 2px;
  transition: all .4s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: .7em 1.2em; font-size: .74rem; }
.btn-solid { background: var(--sea); color: var(--cream); }
.btn-solid:hover { background: var(--sea-deep); transform: translateY(-2px); }
.btn-ghost { border: 1px solid currentColor; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn-whatsapp { background: #1FA855; color: #fff; }
.btn-whatsapp:hover { background: #18843f; transform: translateY(-2px); }
[data-accent="a1"] .btn-solid { background: var(--a1); }
[data-accent="a2"] .btn-solid { background: var(--a2); }

/* =====================================================================
   LOADER
   ===================================================================== */
#loader {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--dark); color: var(--cream);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; width: min(320px, 76vw); }
.loader-mark { width: 56px; height: 56px; color: var(--cream); margin-bottom: 1.4rem; }
.loader-brand {
  font-family: var(--display); font-size: 1.9rem; letter-spacing: .04em;
  margin-bottom: 1.6rem;
}
.loader-track { height: 1px; background: rgba(255,255,255,.18); overflow: hidden; }
#loader-bar { height: 100%; width: 0%; background: var(--gold-2); transition: width .25s linear; }
#loader-percent {
  margin-top: .9rem; font-size: .7rem; letter-spacing: .3em; color: rgba(255,255,255,.55);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .5s var(--ease), box-shadow .5s var(--ease), padding .5s var(--ease);
  padding: .65rem 0;
}
.site-header.scrolled {
  background: rgba(246,242,235,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
/* default = transparent header over the photo hero → light text */
.logo { display: inline-flex; align-items: center; gap: .65rem; color: var(--cream); transition: color .4s; }
.logo-mark { width: 38px; height: 38px; flex: none; color: var(--cream); transition: color .4s; }
.logo-words { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: var(--display); font-size: 1.42rem; font-weight: 600; letter-spacing: .02em; }
.logo-sub { font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-2); margin-top: .18rem; transition: color .4s; }

.main-nav { display: flex; gap: 2rem; }
.main-nav a {
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(251,248,242,.86);
  position: relative; padding: .3rem 0; transition: color .3s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--gold-2); transition: width .35s var(--ease);
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }

/* scrolled = solid light header → dark text */
.site-header.scrolled .logo { color: var(--ink); }
.site-header.scrolled .logo-mark { color: var(--sea); }
.site-header.scrolled .logo-sub { color: var(--gold); }
.site-header.scrolled .main-nav a { color: var(--ink-2); }
.site-header.scrolled .main-nav a::after { background: var(--gold); }
.site-header.scrolled .main-nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

/* language switch */
.lang-switch { position: relative; }
.lang-current {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; letter-spacing: .12em; font-weight: 500;
  padding: .5rem .7rem; border: 1px solid rgba(251,248,242,.4); border-radius: 2px;
  color: var(--cream); transition: border-color .3s, color .3s;
}
.lang-current:hover { border-color: var(--gold-2); color: #fff; }
.site-header.scrolled .lang-current { border-color: var(--line); color: var(--ink-2); }
.site-header.scrolled .lang-current:hover { border-color: var(--gold); color: var(--ink); }
.lang-current svg { transition: transform .3s; }
.lang-switch.open .lang-current svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + .5rem); right: 0; min-width: 140px;
  background: var(--cream); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .3s var(--ease); overflow: hidden; padding: .35rem;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  padding: .6rem .8rem; font-size: .82rem; letter-spacing: .06em; border-radius: 2px;
  display: flex; align-items: center; gap: .6rem; transition: background .2s; color: var(--ink-2);
}
.lang-menu li:hover { background: var(--bg-2); color: var(--ink); }
.lang-menu li.active { color: var(--sea); font-weight: 500; }
.lang-menu li .lc { font-size: .66rem; letter-spacing: .14em; color: var(--gold); width: 1.6rem; }

.btn-book {
  background: var(--sea); color: var(--cream);
  padding: .78em 1.4em; font-size: .76rem; border-radius: 2px;
}
.btn-book:hover { background: var(--sea-deep); }

.nav-toggle { display: none; width: 38px; height: 38px; flex-direction: column; justify-content: center; gap: 5px; }
/* integer height — 1.5px rounded differently per bar on mobile, making the middle one look thinner */
.nav-toggle span { display: block; height: 2px; width: 22px; background: var(--cream); transition: all .35s var(--ease); margin: 0 auto; }
.site-header.scrolled .nav-toggle span { background: var(--ink); }
.nav-toggle.active span { background: var(--ink); }
/* when the full-screen mobile menu (light bg) is open, force header marks dark */
body.nav-open .logo, body.nav-open .logo-mark { color: var(--ink); }
body.nav-open .logo-sub { color: var(--gold); }
body.nav-open .lang-current { color: var(--ink-2); border-color: var(--line); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 900; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition: clip-path .6s var(--ease);
}
.mobile-menu.open { clip-path: circle(150% at calc(100% - 40px) 40px); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 1.4rem; text-align: center; }
.mobile-menu nav a {
  font-family: var(--display); font-size: 2rem; color: var(--ink);
  opacity: 0; transform: translateY(14px); transition: all .4s var(--ease);
}
.mobile-menu.open nav a { opacity: 1; transform: translateY(0); }
.mobile-menu nav a:nth-child(1) { transition-delay: .12s; }
.mobile-menu nav a:nth-child(2) { transition-delay: .17s; }
.mobile-menu nav a:nth-child(3) { transition-delay: .22s; }
.mobile-menu nav a:nth-child(4) { transition-delay: .27s; }
.mobile-menu nav a:nth-child(5) { transition-delay: .32s; }
.mobile-menu nav a:nth-child(6) { transition-delay: .37s; }
.mobile-menu .mobile-book { color: var(--sea); }

/* =====================================================================
   HERO (standalone 100vh)
   ===================================================================== */
.hero-standalone {
  position: relative; height: 100svh; min-height: 600px;
  background: var(--sea-deep) url("../images/villa/exterior.jpg") 50% 38% / cover no-repeat;
  display: flex; align-items: center;
  z-index: 30; overflow: hidden;
}
/* dark legibility overlay over the villa photo */
.hero-bg-grain {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5,22,29,.5) 0%, rgba(5,22,29,.12) 12%, transparent 22%),
    linear-gradient(100deg, rgba(5,22,29,.8) 0%, rgba(5,22,29,.52) 40%, rgba(5,22,29,.2) 70%, rgba(5,22,29,.4) 100%),
    linear-gradient(to top, rgba(5,22,29,.62) 0%, rgba(5,22,29,.1) 32%, transparent 55%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  padding: 0 clamp(1.4rem, 6vw, 4rem);
}
.hero-label { display: block; margin-bottom: 1.6rem; opacity: 0; }
.hero-heading {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(3.4rem, 12vw, 11rem);
  line-height: .92; letter-spacing: -.02em; color: var(--cream);
  text-shadow: 0 2px 8px rgba(0,0,0,.45), 0 8px 50px rgba(0,0,0,.45);
}
.hero-heading .hl-line { display: block; overflow: hidden; }
.hero-heading .word { display: inline-block; transform: translateY(110%); }
.hl-italic { font-style: italic; color: var(--gold-2); }
.hero-tagline {
  margin-top: 1.8rem; max-width: 42ch;
  font-size: clamp(1rem, 1.5vw, 1.28rem); color: rgba(251,248,242,.92); opacity: 0;
  text-shadow: 0 1px 20px rgba(0,0,0,.4);
}
.hero-cta { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0; }
.hero-cta .btn-ghost { color: var(--cream); border-color: rgba(251,248,242,.5); }
.hero-cta .btn-ghost:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.scroll-indicator {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .8rem; z-index: 2; opacity: 0;
}
.scroll-text { font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(251,248,242,.75); }
.scroll-arrow { width: 1px; height: 46px; background: linear-gradient(var(--gold-2), transparent); position: relative; overflow: hidden; }
.scroll-arrow::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: var(--gold); animation: scrolldot 2s var(--ease) infinite;
}
@keyframes scrolldot { 0% { top: -50%; } 100% { top: 110%; } }

/* =====================================================================
   CANVAS / OVERLAY  (fixed cinematic layer)
   ===================================================================== */
.canvas-wrap {
  position: fixed; inset: 0; z-index: 10;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path; background: var(--sea-deep);
}
#canvas { width: 100%; height: 100%; display: block; }
.canvas-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(125% 105% at 50% 50%, transparent 65%, rgba(8,30,38,.16) 100%);
}
#dark-overlay {
  position: fixed; inset: 0; z-index: 11; background: var(--dark);
  opacity: 0; pointer-events: none;
}
/* =====================================================================
   SCROLL CONTAINER + cinematic sections
   ===================================================================== */
#scroll-container { position: relative; height: 860vh; z-index: 20; pointer-events: none; }
.scroll-section {
  position: fixed; top: 0; left: 0; width: 100%; height: 100svh;
  display: flex; align-items: center; pointer-events: none;
  will-change: transform, opacity;
  opacity: 0; transition: opacity .5s var(--ease);  /* hidden (incl. its scrim) until active */
}
.scroll-section.is-active { opacity: 1; }
.align-left  { padding-left: 6vw;  padding-right: 50vw; }
.align-right { padding-left: 50vw; padding-right: 6vw; }
.align-left .section-inner, .align-right .section-inner { max-width: 44vw; }

.section-content .section-inner { position: relative; }
.scroll-section .section-label { display: block; margin-bottom: 1.1rem; color: var(--gold-2); }
.scroll-section .section-heading {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: 1.02; color: var(--cream);
  letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0,0,0,.6), 0 1px 3px rgba(0,0,0,.45);
}
.scroll-section .section-body {
  margin-top: 1.3rem; font-size: clamp(1rem, 1.4vw, 1.2rem); max-width: 42ch;
  color: rgba(251,248,242,.95); text-shadow: 0 1px 14px rgba(0,0,0,.7), 0 1px 2px rgba(0,0,0,.5);
}
/* readability scrim over the bright video — sits ABOVE the canvas, below the text */
.align-left::before, .align-right::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.align-left::before  { background: linear-gradient(90deg,  rgba(4,19,25,.6) 0%, rgba(4,19,25,.32) 22%, rgba(4,19,25,.08) 40%, transparent 55%); }
.align-right::before { background: linear-gradient(270deg, rgba(4,19,25,.6) 0%, rgba(4,19,25,.32) 22%, rgba(4,19,25,.08) 40%, transparent 55%); }
.scroll-section .section-inner { position: relative; z-index: 1; }

/* stats (over dark overlay, centered) */
.section-stats { text-align: center; padding: 0 6vw; }
.stats-wrap { max-width: 1000px; margin: 0 auto; }
.stats-label { display: block; color: var(--gold-2); margin-bottom: 2.6rem; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-number {
  font-family: var(--display); font-weight: 500; font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 1; color: var(--cream); text-shadow: 0 2px 22px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.45);
}
.stat-label { margin-top: .6rem; font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(251,248,242,.85); text-shadow: 0 1px 10px rgba(0,0,0,.6); }

/* cinematic CTA */
.section-cta .section-inner { max-width: 46vw; }
.section-cta .section-label { color: var(--gold-2); }
.cta-heading { margin-top: .8rem; }
.cta-button { margin-top: 2rem; }

/* =====================================================================
   MAIN CONTENT
   ===================================================================== */
#main-content {
  position: relative; z-index: 40; background: var(--bg);
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 2.4rem); }
.section { padding: clamp(4.5rem, 10vw, 9rem) 0; }
.section-head { margin-bottom: clamp(2.4rem, 5vw, 4rem); max-width: 820px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .section-lead { margin-left: auto; margin-right: auto; }
.section-eyebrow { display: block; margin-bottom: 1rem; }

/* ---- APARTMENTS ---- */
.apartments { background: var(--bg); }
.apt-row {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; margin-bottom: clamp(4rem, 8vw, 7rem);
}
.apt-row.reverse .apt-media { order: 2; }
.apt-media { display: flex; flex-direction: column; gap: .7rem; }
.apt-cover {
  position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; cursor: pointer;
  box-shadow: 0 30px 60px -32px rgba(20,40,50,.5);
}
.apt-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.apt-cover:hover img { transform: scale(1.05); }
.apt-badge {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--cream); color: var(--ink);
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  padding: .5rem .9rem; border-radius: 2px;
}
[data-accent="a1"] .apt-badge { color: var(--a1); }
[data-accent="a2"] .apt-badge { color: var(--a2); }
.apt-badge.dark { background: var(--sea); color: var(--cream); }
.apt-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.apt-thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 3px; cursor: pointer; transition: opacity .3s, transform .4s; }
.apt-thumbs img:hover { opacity: .82; transform: scale(1.03); }
.apt-thumbs .more {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 3px; cursor: pointer;
  background: var(--bg-3); color: var(--ink-2); font-size: .8rem; letter-spacing: .04em;
  font-weight: 500; transition: background .3s;
}
.apt-thumbs .more:hover { background: var(--bg-2); }

.apt-num { font-family: var(--display); font-size: 1rem; color: var(--gold); letter-spacing: .2em; }
.apt-name { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.05; margin: .3rem 0 .7rem; }
.apt-capacity { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.2rem; }
.apt-capacity .cap-num { font-family: var(--display); font-size: 1.3rem; color: var(--ink); font-weight: 600; }
.apt-desc { color: var(--ink-2); margin-bottom: 1.5rem; max-width: 52ch; }
.apt-features { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.4rem; margin-bottom: 1.9rem; }
.apt-features.two-col { grid-template-columns: 1fr 1fr; }
.apt-features li { position: relative; padding-left: 1.5rem; font-size: .92rem; color: var(--ink-2); }
.apt-features li::before {
  content: ""; position: absolute; left: 0; top: .58em; width: 8px; height: 8px;
  border: 1px solid var(--gold); border-radius: 50%;
}
[data-accent="a1"] .apt-features li::before { border-color: var(--a1); }
[data-accent="a2"] .apt-features li::before { border-color: var(--a2); }
.apt-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* whole villa card */
.villa-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--dark); color: var(--cream); border-radius: 5px; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(16,22,25,.7);
}
.villa-card-media { position: relative; min-height: 360px; cursor: pointer; overflow: hidden; }
.villa-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.villa-card:hover .villa-card-media img { transform: scale(1.05); }
.villa-card-info { padding: clamp(2rem, 4vw, 3.4rem); }
.villa-card-info .apt-name { color: var(--cream); }
.villa-card-info .apt-desc { color: rgba(251,248,242,.78); }
.villa-card-info .apt-capacity { color: var(--gold-2); }
.villa-card-info .apt-capacity .cap-num { color: var(--cream); }
.villa-card-info .apt-features li { color: rgba(251,248,242,.85); }
.villa-card-info .apt-features li::before { border-color: var(--gold-2); }
.villa-card-info .btn-solid { background: var(--cream); color: var(--dark); margin-top: .4rem; }
.villa-card-info .btn-solid:hover { background: var(--gold-2); }

/* ---- AMENITIES ---- */
.amenities { background: var(--bg-2); }
.amen-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.amen-item { background: var(--bg); padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; transition: background .4s; }
.amen-item:hover { background: var(--cream); }
.amen-item svg { width: 30px; height: 30px; color: var(--sea); stroke-width: 1.4; }
.amen-item span { font-size: .95rem; color: var(--ink-2); letter-spacing: .01em; }

/* ---- GALLERY ---- */
.gallery { background: var(--bg); }
.gallery-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 2.6rem; }
.gf-btn {
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding: .6rem 1.2rem; border: 1px solid var(--line); border-radius: 40px; transition: all .3s;
}
.gf-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.gf-btn.active { background: var(--sea); color: var(--cream); border-color: var(--sea); }
.gallery-grid { columns: 4; column-gap: .9rem; }
.gallery-grid figure { break-inside: avoid; margin-bottom: .9rem; overflow: hidden; border-radius: 4px; cursor: pointer; position: relative; }
.gallery-grid img { width: 100%; transition: transform .9s var(--ease); }
.gallery-grid figure:hover img { transform: scale(1.06); }
.gallery-grid figure::after {
  content: ""; position: absolute; inset: 0; background: rgba(16,22,25,0); transition: background .4s;
}
.gallery-grid figure:hover::after { background: rgba(16,22,25,.12); }
.gallery-grid figure.hide { display: none; }

/* ---- PRICING ---- */
.pricing { background: var(--bg-2); }
.price-table { display: grid; grid-template-columns: 1.35fr 1fr 1fr; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--bg); }
.price-cell { padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.price-cell:nth-child(3n) { border-right: none; }
.price-cell.head { background: var(--sea); color: var(--cream); border-color: rgba(255,255,255,.12); }
.price-cell.head.corner { background: var(--sea-deep); }
.price-cell.unit { background: var(--bg-3); }
.price-head-season { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.price-head-note { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-top: .25rem; }
.price-unit-name { font-family: var(--display); font-size: 1.3rem; color: var(--ink); }
.price-unit-cap { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: .2rem; }
.price-amount { font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--sea); }
.price-amount small { font-size: .72rem; font-weight: 400; color: var(--ink-3); letter-spacing: .06em; }
.price-table > .price-cell:nth-last-child(-n+3) { border-bottom: none; }

.price-foot { margin-top: 2.6rem; display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.deposit-box { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; padding: 1.6rem 1.8rem; }
.deposit-box h3 { font-family: var(--display); font-size: 1.4rem; font-weight: 500; margin-bottom: .5rem; }
.deposit-box p { color: var(--ink-2); font-size: .95rem; }
.price-note { font-size: .82rem; color: var(--ink-3); font-style: italic; }
.price-note.center { text-align: center; margin-top: 2rem; }
.price-foot .btn { justify-self: start; }

/* ---- LOCATION ---- */
.location { background: var(--bg); }
.location-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.location-attractions h3 { font-family: var(--display); font-size: 1.7rem; font-weight: 500; margin-bottom: 1.4rem; }
#attractions-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
#attractions-list li:first-child { border-top: 1px solid var(--line); }
.attr-t { font-weight: 500; color: var(--ink); display: block; font-size: 1.02rem; }
.attr-d { font-size: .88rem; color: var(--ink-3); }
.map-note { margin-top: 1.4rem; font-size: .84rem; color: var(--ink-3); font-style: italic; }
.location-map { border-radius: 5px; overflow: hidden; min-height: 420px; border: 1px solid var(--line); box-shadow: 0 30px 60px -36px rgba(20,40,50,.5); }
.location-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: saturate(.95); }

/* ---- BOOKING ---- */
.booking { background: var(--bg-2); }
.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.booking-calendar, .booking-form { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: clamp(1.4rem, 3vw, 2rem); }
.cal-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.2rem; font-size: .76rem; color: var(--ink-3); }
.cal-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-free { background: var(--bg-3); border: 1px solid var(--line); }
.dot-sel { background: var(--sea); }
.dot-blocked { background: repeating-linear-gradient(45deg, #d9cfc2, #d9cfc2 2px, #efe8dc 2px, #efe8dc 4px); border: 1px solid var(--line); }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cal-nav { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; transition: all .3s; color: var(--ink-2); }
.cal-nav:hover:not(:disabled) { border-color: var(--sea); color: var(--sea); }
.cal-nav:disabled { opacity: .3; cursor: not-allowed; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.cal-month-title { text-align: center; font-family: var(--display); font-size: 1.25rem; margin-bottom: .7rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: .6rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding: .3rem 0; }
.cal-day {
  aspect-ratio: 1; display: grid; place-items: center; font-size: .82rem; color: var(--ink);
  border-radius: 3px; cursor: pointer; position: relative; transition: background .2s, color .2s;
}
.cal-day.empty { cursor: default; }
.cal-day.past, .cal-day.blocked { color: var(--ink-3); cursor: not-allowed; }
.cal-day.blocked { background: repeating-linear-gradient(45deg, #e4dccf, #e4dccf 3px, #efe8dc 3px, #efe8dc 6px); text-decoration: line-through; opacity: .7; }
.cal-day.selectable:hover { background: var(--bg-3); }
.cal-day.in-range { background: var(--a2-soft); color: var(--sea-deep); border-radius: 0; }
.cal-day.range-start, .cal-day.range-end { background: var(--sea); color: var(--cream); font-weight: 500; }
.cal-day.range-start { border-radius: 3px 0 0 3px; }
.cal-day.range-end { border-radius: 0 3px 3px 0; }
.cal-day.range-start.range-end { border-radius: 3px; }

.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: .95rem; color: var(--ink);
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 3px; background: var(--cream);
  transition: border-color .3s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sea); }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.date-display { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-3); font-size: .95rem; min-height: 3rem; display: flex; align-items: center; color: var(--ink); }
.date-display[data-empty="true"]::before { content: attr(data-ph); color: var(--ink-3); }

.estimate-box { background: var(--sea); color: var(--cream); border-radius: 4px; padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; }
.est-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.est-row #est-nights { font-size: .88rem; letter-spacing: .04em; opacity: .9; }
.est-total { font-family: var(--display); font-size: 1.9rem; font-weight: 600; }
.est-note { font-size: .72rem; opacity: .75; display: block; margin-top: .3rem; }

.form-error { color: #a4313a; font-size: .85rem; margin-bottom: 1rem; }
.form-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
/* min-width: max-content — a button never gets narrower than its label; it wraps to its own full row instead */
.form-actions .btn { flex: 1 1 auto; min-width: max-content; }
.deposit-info { margin-top: 1.2rem; font-size: .82rem; color: var(--ink-3); line-height: 1.5; }

/* ---- REVIEWS ---- */
.reviews { background: var(--bg); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review-card { background: var(--bg-2); border-radius: 5px; padding: 2.2rem 2rem; position: relative; }
.review-card .quote { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--gold-2); position: absolute; top: 1rem; left: 1.4rem; opacity: .5; }
.review-stars { color: var(--gold); letter-spacing: .15em; margin-bottom: .9rem; font-size: .9rem; }
.review-text { font-family: var(--display); font-size: 1.28rem; line-height: 1.4; color: var(--ink); font-style: italic; margin-bottom: 1.2rem; }
.review-author { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ---- CONTACT ---- */
.contact { background: var(--dark); color: var(--cream); }
.contact .section-title { color: var(--cream); }
.contact .section-lead { color: rgba(251,248,242,.78); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.contact-list { margin: 2.2rem 0; }
.contact-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.contact-list dt { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.contact-list dd { font-family: var(--display); font-size: 1.3rem; text-align: right; }
.contact-list dd a:hover { color: var(--gold-2); }
.contact-buttons { display: flex; gap: .9rem; flex-wrap: wrap; }
.contact .btn-ghost { color: var(--cream); border-color: rgba(255,255,255,.4); }
.contact .btn-ghost:hover { background: var(--cream); color: var(--dark); }
.contact-photo { aspect-ratio: 4/5; border-radius: 5px; overflow: hidden; }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---- FOOTER ---- */
.site-footer { background: var(--dark-2); color: rgba(251,248,242,.7); padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.logo.light { color: var(--cream); }
.logo.light .logo-mark { color: var(--cream); }
.footer-col h4 { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 1.2rem; }
.footer-col a, .footer-col .link-btn { display: block; padding: .4rem 0; font-size: .92rem; color: rgba(251,248,242,.7); transition: color .3s; text-align: left; }
.footer-col a:hover, .footer-col .link-btn:hover { color: var(--cream); }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; font-size: .78rem; color: rgba(251,248,242,.5); }
.footer-made { display: flex; flex-direction: column; gap: .5rem; text-align: right; }
.footer-credit { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-end; color: rgba(251,248,242,.55); letter-spacing: .01em; transition: color .3s; }
.footer-credit:hover { color: var(--cream); }
.footer-credit-logo { height: .95em; width: auto; fill: currentColor; opacity: .8; transition: opacity .3s; }
.footer-credit:hover .footer-credit-logo { opacity: 1; }
.footer-credit-name { font-weight: 500; letter-spacing: .02em; }
@media (max-width: 640px) {
  .footer-made { text-align: left; align-items: flex-start; }
  .footer-credit { align-self: flex-start; }
}

/* =====================================================================
   LIGHTBOX
   ===================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 3000; background: rgba(12,18,21,.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-figure { max-width: 90vw; max-height: 84vh; }
.lb-figure img { max-width: 90vw; max-height: 84vh; object-fit: contain; border-radius: 3px; }
.lb-close { position: absolute; top: 1.4rem; right: 1.8rem; font-size: 2.4rem; color: rgba(255,255,255,.8); line-height: 1; transition: color .3s; }
.lb-close:hover { color: #fff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.6rem; color: rgba(255,255,255,.65); width: 60px; height: 60px; transition: color .3s; }
.lb-nav:hover { color: #fff; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-counter { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: .82rem; letter-spacing: .15em; }

/* =====================================================================
   LEGAL MODAL
   ===================================================================== */
.legal-modal {
  position: fixed; inset: 0; z-index: 3100; background: rgba(12,18,21,.7);
  display: flex; align-items: center; justify-content: center; padding: 1.4rem;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.legal-modal.open { opacity: 1; visibility: visible; }
.legal-card { background: var(--bg); border-radius: 6px; max-width: 660px; width: 100%; max-height: 84vh; overflow-y: auto; padding: clamp(1.8rem, 4vw, 3rem); position: relative; }
.legal-close { position: absolute; top: 1.2rem; right: 1.4rem; font-size: 2rem; color: var(--ink-3); line-height: 1; }
.legal-close:hover { color: var(--ink); }
.legal-card h2 { font-family: var(--display); font-weight: 500; font-size: 2rem; margin-bottom: 1.4rem; padding-right: 2rem; }
.legal-card p, .legal-card li { color: var(--ink-2); margin-bottom: 1rem; font-size: .95rem; line-height: 1.7; }
.legal-card ol { padding-left: 1.3rem; }
.legal-card ol li { margin-bottom: .8rem; }

/* =====================================================================
   REVEAL ANIMATION (main content)
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
  .main-nav { gap: 1.3rem; }
  .main-nav a { font-size: .76rem; }
  .price-table { grid-template-columns: 1.2fr 1fr 1fr; }
  .gallery-grid { columns: 3; }
}

@media (max-width: 860px) {
  .main-nav, .btn-book { display: none; }
  .nav-toggle { display: flex; }
  .apt-row, .apt-row.reverse { grid-template-columns: 1fr; gap: 1.6rem; }
  .apt-row.reverse .apt-media { order: 0; }
  .villa-card { grid-template-columns: 1fr; }
  .villa-card-media { min-height: 280px; }
  .amen-grid { grid-template-columns: repeat(2, 1fr); }
  .booking-grid, .contact-grid, .location-grid, .price-foot { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .gallery-grid { columns: 2; }
  .contact-photo { aspect-ratio: 16/10; }

  /* cinematic: collapse side text to a centered column over a full backdrop */
  #scroll-container { height: 640vh; }
  .align-left, .align-right { padding: 0 8vw; }
  .align-left .section-inner, .align-right .section-inner { max-width: 100%; }
  .align-left::before, .align-right::before {
    background: radial-gradient(130% 62% at 50% 50%, rgba(4,19,25,.6) 0%, rgba(4,19,25,.34) 52%, rgba(4,19,25,.08) 78%, transparent 92%);
  }
  .scroll-section .section-heading { font-size: clamp(2.1rem, 8vw, 3rem); }
  .scroll-section .section-body { max-width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 2.4rem 1rem; }
  .price-table { grid-template-columns: 1fr; }
  .price-cell { border-right: none; }
  .price-cell.head { display: none; }
  .price-cell.unit { border-top: 2px solid var(--gold); margin-top: -1px; }
  .price-table > .price-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .amount-cell[data-label]::before { content: attr(data-label); display: block; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .2rem; }
  .cal-months { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 600px) {
  /* booking form: stack fields so inputs aren't cramped on phones */
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field { margin-bottom: 1.1rem; }
  .booking-calendar, .booking-form { padding: 1.2rem; }
  .form-actions .btn { flex: 1 1 100%; }
  .est-total { font-size: 1.6rem; }
  .section-head .section-title { font-size: clamp(2rem, 8vw, 2.6rem); }
}

@media (max-width: 480px) {
  .amen-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-content { padding: 0 7vw; }
  .hero-heading { font-size: clamp(2.8rem, 14vw, 3.6rem); }
  .hero-tagline { font-size: 1.02rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .contact-list dd { font-size: 1.1rem; }
  .contact-list > div { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .contact-list dd { text-align: left; }
  .lb-nav { font-size: 2rem; width: 44px; }
  .lb-prev { left: .2rem; } .lb-next { right: .2rem; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-heading .word { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   WordPress build additions (theme willacasablanca)
   — enquiry submission states, honeypot, admin-bar offset
   ===================================================================== */
.form-success {
  color: #2f6b46;
  background: #ecf4ee;
  border: 1px solid rgba(47, 107, 70, .25);
  border-radius: 6px;
  padding: .8rem 1rem;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.booking-form .btn[disabled] { opacity: .55; cursor: wait; pointer-events: none; }
.vcb-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* First day of a blocked run: still selectable as the departure day.
   Left half looks free, right half keeps the "booked" hatching. */
.cal-day.blocked.checkout-only {
  cursor: pointer;
  opacity: 1;
  text-decoration: none;
  color: var(--ink-2);
  background:
    linear-gradient(135deg, var(--bg) 0 47%, rgba(0, 0, 0, 0) 47%),
    repeating-linear-gradient(45deg, #e4dccf, #e4dccf 3px, #efe8dc 3px, #efe8dc 6px);
}
.cal-day.blocked.checkout-only:hover {
  background:
    linear-gradient(135deg, var(--bg-3) 0 47%, rgba(0, 0, 0, 0) 47%),
    repeating-linear-gradient(45deg, #e4dccf, #e4dccf 3px, #efe8dc 3px, #efe8dc 6px);
}
.cal-day.blocked.checkout-only.range-end {
  background: var(--sea);
  color: var(--cream);
  font-weight: 500;
}
