/* Villa Lux Luz - shared styles */
:root {
  --paper: #FAFAF8;
  --mist: #F1EFE9;
  --ink: #141414;
  --stone: #66625A;
  --line: #E4E1DA;
  --teal: #2299AD;
  --teal-dark: #126E80;
  --orange: #F7941D;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, 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-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }

.kicker {
  color: var(--teal-dark);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 1.1rem;
}
.on-dark .kicker { color: #8ED0DD; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.75rem 1.25rem;
}
.skip-link:focus { left: 0.75rem; top: 0.75rem; }

/* ===== Header ===== */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 40; }
.header-top {
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.header-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 4.5rem; gap: 1rem;
}
.brand { color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.45rem; letter-spacing: 0.02em; white-space: nowrap; display: inline-flex; align-items: center; background: var(--paper); padding: 0.35rem 0.7rem; }
.brand img { height: 2.5rem; width: auto; }
@media (max-width: 860px) { .brand img { height: 1.9rem; } }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.socials { display: flex; align-items: center; gap: 0.25rem; }
.socials a {
  color: rgba(255,255,255,0.85); display: inline-flex; padding: 0.6rem;
  transition: color 0.2s;
}
.socials a:hover { color: #fff; }
.socials svg { width: 1.15rem; height: 1.15rem; }

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-weight: 400; font-size: 0.875rem; letter-spacing: 0.04em;
  padding: 0.9rem 1.8rem; border: 1px solid transparent;
  transition: background-color 0.2s, color 0.2s;
}
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--mist); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--teal-dark); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }

.header-nav { border-bottom: 1px solid rgba(255,255,255,0.25); }
.header-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap; column-gap: 2rem;
}
.header-nav a {
  color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.875rem;
  display: inline-block; padding: 0.9rem 0; transition: color 0.2s;
}
.header-nav a:hover, .header-nav a[aria-current="page"] { color: #fff; }
.header-nav a[aria-current="page"] { border-bottom: 1px solid #fff; }

.menu-btn {
  display: none; background: none; border: none; color: #fff; padding: 0.75rem;
  margin-right: -0.75rem; cursor: pointer;
}
.menu-btn svg { width: 1.75rem; height: 1.75rem; }

.mobile-menu { display: none; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,0.2); }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0.5rem 0; }
.mobile-menu a {
  display: block; color: #fff; text-decoration: none; padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu li:last-child a { border-bottom: none; font-weight: 400; }

@media (max-width: 860px) {
  .header-nav, .header-top .socials, .header-top .btn { display: none; }
  .menu-btn { display: inline-flex; }
}

/* ===== Hero ===== */
.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: 88svh; background: var(--ink);
}
.hero.hero-short { min-height: 52svh; }
.hero-slides, .hero-slides .slide, .hero-img {
  position: absolute; inset: 0;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
.video-block { margin-top: 2.5rem; }
.video-block video { width: 100%; height: auto; display: block; background: var(--ink); }
.area-grid { display: grid; gap: 2.5rem 3rem; margin-top: 3rem; }
@media (min-width: 768px) { .area-grid { grid-template-columns: 1fr 1fr; } }
.area-grid h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.area-grid .drive-time { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--teal-dark); margin-bottom: 0.9rem; font-family: var(--sans); }
.map-embed { margin-top: 3rem; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 30rem; border: 0; display: block; }
.extras-note { border: 1px solid var(--orange); border-left: 5px solid var(--orange); background: #FFF6EA; padding: 1.4rem 1.6rem; margin: 2.5rem auto 0; }
.extras-note p { margin: 0; }

/* Special offer pop-out */
.offer-pop {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  background: var(--paper); border: 1px solid var(--ink); border-top: 5px solid var(--orange);
  padding: 1.5rem 1.6rem; max-width: 21rem; width: calc(100% - 2.5rem);
}
.offer-pop[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .offer-pop { transform: translateY(0.75rem); opacity: 0; transition: transform 0.45s ease, opacity 0.45s ease; }
  .offer-pop.show { transform: none; opacity: 1; }
}
.offer-close {
  position: absolute; top: 0.4rem; right: 0.4rem; background: none; border: 0; cursor: pointer;
  color: var(--ink); padding: 0.6rem; display: inline-flex;
}
.offer-close svg { width: 1.1rem; height: 1.1rem; }
.offer-title { font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; margin: 0.6rem 0 0.5rem; }
.offer-body { margin: 0 0 0.9rem; font-size: 0.95rem; }
.offer-save { display: inline-block; background: var(--orange); color: var(--ink); font-weight: 600; font-size: 1.05rem; padding: 0.35rem 0.75rem; margin: 0 0 1.1rem; }
.offer-actions { display: flex; align-items: center; gap: 1rem; }
.offer-decline { background: none; border: 0; cursor: pointer; color: var(--stone, #6b6b66); font-size: 0.85rem; text-decoration: underline; padding: 0.6rem 0.2rem; }
@media (max-width: 480px) { .offer-pop { right: 0.75rem; bottom: 0.75rem; width: calc(100% - 1.5rem); } }
.hero-slides .slide {
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-slides .slide.active { opacity: 1; }
.hero-img { object-fit: cover; width: 100%; height: 100%; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.65) 0%, rgba(10,10,10,0.2) 45%, rgba(10,10,10,0.3) 100%);
}
.hero-content { position: relative; width: 100%; padding-bottom: 4.5rem; padding-top: 12rem; }
.hero-content .kicker { color: rgba(255,255,255,0.85); }
.hero-content h1 {
  color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: none;
}
.hero-content .lede { color: rgba(255,255,255,0.9); max-width: 36rem; font-size: 1.1rem; margin: 1.4rem 0 0; }
.hero-ctas { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

/* ===== Sections ===== */
.section { padding: 5.5rem 0; }
@media (min-width: 768px) { .section { padding: 7.5rem 0; } }
.section-mist { background: var(--mist); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .stone-text { color: rgba(255,255,255,0.75); }

.section h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.stone-text { color: var(--stone); }
.measure { max-width: 46rem; }
.center { text-align: center; }
.center .measure { margin-left: auto; margin-right: auto; }

.parallax {
  min-height: 24rem; background-size: cover; background-position: center;
}
@media (min-width: 1024px) {
  .parallax { background-attachment: fixed; min-height: 30rem; }
}

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin: 4rem 0 0;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats > div { padding: 2rem 1rem; text-align: center; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: none; }
.stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--stone); }
.stats dd { margin: 0.5rem 0 0; font-family: var(--serif); font-size: 2.2rem; }

/* Button rows */
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 3rem; }

/* Extras list (rates) */
.extras-list { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 34rem; }
.extras-list li {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--line);
}
.extras-list .price { color: var(--stone); white-space: nowrap; }

/* Distances list (luz) */
.distance-list { list-style: none; margin: 2rem 0 0; padding: 0; }
.distance-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }

/* Gallery */
.gallery-grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-grid a { display: block; overflow: hidden; cursor: zoom-in; }
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3;
  transition: transform 0.5s ease;
}
.gallery-grid a:hover img { transform: scale(1.03); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(8,8,8,0.94);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: none; color: #fff; cursor: pointer; padding: 1rem;
}
.lightbox button svg { width: 2rem; height: 2rem; }
.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.8); font-size: 0.875rem; }

/* Link cards (links page) */
.link-card {
  display: grid; gap: 2rem; align-items: center;
  padding: 3rem 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .link-card { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .link-card.flip .link-card-img { order: 2; }
}
.link-card h3 { font-size: 1.6rem; margin-bottom: 0.8rem; }
.link-card-img img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

/* Embeds */
.embed-block { margin: 2.5rem auto 0; }
.embed-white {
  background: #fff; border: 1px solid var(--line); padding: 1.5rem;
}

/* Terms */
.terms-body h2 { font-size: 1.35rem; margin: 2.6rem 0 0.8rem; }
.terms-body p { margin: 0.9rem 0; color: var(--stone); }
.terms-body ul { color: var(--stone); }
.terms-body .contact-block { margin-top: 2.5rem; color: var(--ink); }

/* Contact page */
.contact-list { list-style: none; padding: 0; margin: 2.5rem 0 0; max-width: 30rem; }
.contact-list li {
  border-bottom: 1px solid var(--line); padding: 1.1rem 0;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.contact-list .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--stone); align-self: center; }
.contact-list a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.contact-list a:hover { text-decoration-color: var(--ink); }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); }
.footer-cta { text-align: center; padding: 3.5rem 1.25rem 0; }
.footer-main {
  display: grid; gap: 3rem; padding: 3.5rem 0;
}
@media (min-width: 768px) { .footer-main { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; }
.footer-heading {
  color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  margin: 0 0 1.2rem; font-family: var(--sans); font-weight: 400;
}
.footer-main ul { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.footer-main li { margin-bottom: 0.7rem; }
.footer-main a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.footer-main a:hover { color: #fff; }
.footer-main .socials { margin-top: 1rem; margin-left: -0.6rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); }
.footer-bottom-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 1.5rem 0; font-size: 0.78rem;
}
.footer-bottom-inner p { margin: 0 0 0.4rem; }
.footer-logo { background: var(--paper); padding: 0.35rem 0.6rem; display: inline-flex; align-items: center; }
.footer-logo img { height: 3.4rem; width: auto; }
.footer-bottom a { color: rgba(255,255,255,0.7); }

/* Reveal animation (JS adds .js-motion to body when allowed) */
.js-motion .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-motion .reveal.in { opacity: 1; transform: none; }
