/* =====================================================================
   Villa Mar BE35 — Luxury Baja design system
   Palette: warm ivory, soft sand, Baja stone/taupe, deep ocean navy,
   muted gold, charcoal, desert green, Sea of Cortez blue.
   You normally do NOT need to edit this file. Colors are set as
   variables at the top if you ever want to adjust the brand.
   ===================================================================== */

:root {
  --ivory:        #F8F4EC;
  --sand:         #EFE6D5;
  --stone:        #C9BBA1;
  --stone-soft:   #DDD2BC;
  --navy:         #15263A;
  --navy-deep:    #0E1B2B;
  --gold:         #B08D57;
  --gold-soft:    #C9A876;
  --charcoal:     #2B2A26;
  --desert-green: #7E8B6F;
  --cortez:       #5E8BA0;
  --line:         rgba(176,141,87,0.35);
  --line-soft:    rgba(43,42,38,0.12);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 2px;
  --shadow: 0 18px 50px -28px rgba(14,27,43,0.45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--ivory);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--gold); }
button { font-family: inherit; cursor: pointer; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; color: var(--navy); line-height: 1.1; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #43413b; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 1rem;
  display: inline-block;
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: .8em; transform: translateY(-3px); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: var(--ivory); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--ivory); }
.section--navy .eyebrow { color: var(--gold-soft); }
.section--navy .eyebrow::before { background: var(--gold-soft); }
.section--stone { background: var(--stone-soft); }
.center { text-align: center; }
.measure { max-width: 60ch; }
.center .measure { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .95em 1.9em;
  font-family: var(--font-body);
  font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--navy); border-radius: var(--radius);
  background: var(--navy); color: var(--ivory);
  transition: all .25s ease; cursor: pointer; line-height: 1;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--navy); border-color: var(--navy); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--ivory); }
.section--navy .btn--ghost { color: var(--ivory); border-color: rgba(248,244,236,.6); }
.section--navy .btn--ghost:hover { background: var(--gold); border-color: var(--gold); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6rem; }
.center .btn-row { justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,244,236,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px var(--gut); max-width: 1320px; margin: 0 auto; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-size: 1.45rem; color: var(--navy); letter-spacing: .04em; font-weight: 600; }
.brand__sub { font-size: .58rem; text-transform: uppercase; letter-spacing: .3em; color: var(--gold); margin-top: 4px; font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav__links a {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  color: var(--charcoal); padding: 8px 9px; border-radius: var(--radius); white-space: nowrap;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--gold); }
.nav__links a.is-active { border-bottom: 1px solid var(--gold); }
.nav__cta { margin-left: 6px; }
.nav__toggle { display: none; background: none; border: 0; padding: 8px; }
.nav__toggle span { display: block; width: 26px; height: 2px; background: var(--navy); margin: 5px 0; transition: .3s; }

/* Mobile nav */
@media (max-width: 1080px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px);
    background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: 90px 32px 32px; gap: 4px; transform: translateX(100%); transition: transform .35s ease;
    overflow-y: auto; z-index: 120;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { color: var(--ivory); font-size: .8rem; padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav__links a:hover, .nav__links a.is-active { color: var(--gold-soft); }
  .nav__cta { margin: 18px 0 0; }
  .nav-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__scrim { position: fixed; inset: 0; background: rgba(14,27,43,.5); opacity: 0; pointer-events: none; transition: .3s; z-index: 110; }
  .nav-open .nav__scrim { opacity: 1; pointer-events: auto; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ivory); overflow: hidden; }
.hero--page { min-height: 56vh; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,27,43,.35) 0%, rgba(14,27,43,.55) 100%); }
.hero__inner { position: relative; z-index: 2; padding: 0 var(--gut); max-width: 900px; }
.hero__inner h1 { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero--page h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.hero .eyebrow { color: var(--gold-soft); }
.hero .eyebrow::before { background: var(--gold-soft); }
.hero__sub { font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-style: italic; color: #f3ead9; margin-top: .4rem; }
.hero__facts { margin-top: 1.6rem; font-size: .82rem; letter-spacing: .06em; color: #ece3d2; }

/* ---------- AI summary box ---------- */
.ai-summary {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: rgba(255,255,255,.55); padding: 22px 26px; border-radius: var(--radius);
  font-size: .98rem; color: #45433d; max-width: 70ch;
}
.section--navy .ai-summary { background: rgba(255,255,255,.06); color: #e7e0d2; border-color: rgba(201,168,118,.4); }
.ai-summary__label { display: block; text-transform: uppercase; letter-spacing: .2em; font-size: .62rem; font-weight: 700; color: var(--gold); margin-bottom: .5rem; }

/* ---------- Generic grids & cards ---------- */
.grid { display: grid; gap: clamp(20px, 3vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__body { padding: 24px; }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; font-size: .96rem; color: #565349; }

.feature { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.5); }
.section--navy .feature { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }

/* Split rows (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split--reverse .split__media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse .split__media { order: 0; } }
.split__media img, .split__media .img-ph { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.split + .split { margin-top: clamp(48px, 7vw, 96px); }

/* Image placeholder (shown until real photos are uploaded) */
.img-ph { aspect-ratio: 3/2; background: linear-gradient(135deg, var(--stone) 0%, var(--stone-soft) 100%); display: flex; align-items: center; justify-content: center; color: var(--navy); font-family: var(--font-display); font-size: 1rem; letter-spacing: .05em; text-align: center; padding: 20px; border-radius: var(--radius); }
.img-ph span { opacity: .7; }
.hero__bg.is-ph { background: linear-gradient(135deg, var(--navy) 0%, var(--cortez) 120%); }

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.gallery-filters button { background: transparent; border: 1px solid var(--line); color: var(--charcoal); padding: 8px 16px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; border-radius: 40px; transition: .25s; }
.gallery-filters button:hover { border-color: var(--gold); color: var(--gold); }
.gallery-filters button.is-active { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { position: relative; cursor: pointer; overflow: hidden; border-radius: var(--radius); background: var(--stone-soft); }
.gallery-item img, .gallery-item .img-ph { aspect-ratio: 3/2; object-fit: cover; width: 100%; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(14,27,43,.7)); color: #fff; font-size: .8rem; opacity: 0; transition: .3s; }
.gallery-item:hover figcaption { opacity: 1; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,18,28,.94); display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox__cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #e7e0d2; font-size: .9rem; }
.lightbox__close, .lightbox__nav { position: absolute; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

/* ---------- Quick facts strip ---------- */
.facts-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts-strip div { flex: 1 1 150px; text-align: center; padding: 22px 14px; border-right: 1px solid var(--line); }
.facts-strip div:last-child { border-right: 0; }
.facts-strip strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--gold); line-height: 1; }
.facts-strip span { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #5b584f; margin-top: 6px; display: block; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; padding: 22px 40px 22px 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--navy); position: relative; }
.faq__q::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--gold); transition: .3s; }
.faq__item.open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq__a p { padding: 0 0 22px; margin: 0; color: #54514a; }
.section--navy .faq__item { border-color: rgba(255,255,255,.16); }
.section--navy .faq__q { color: var(--ivory); }
.section--navy .faq__a p { color: #ddd6c8; }

/* ---------- Direct answers (AI-friendly Q&A) ---------- */
.qa { display: grid; gap: 20px; }
.qa__item h3 { font-size: 1.15rem; margin-bottom: .25em; }
.qa__item p { margin: 0; color: #54514a; font-size: .98rem; }

/* ---------- Contact / CEM block ---------- */
.contact-block { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 540px; }
.contact-block a { font-weight: 600; }
.contact-line { display: flex; align-items: center; gap: 12px; font-size: 1.02rem; }
.contact-line .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .18em; color: var(--gold); min-width: 70px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; max-width: 640px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
.form label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: #5b584f; display: block; margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 14px; font-family: var(--font-body); font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--charcoal);
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold-soft); outline-offset: 1px; border-color: var(--gold); }
.form .check { display: flex; align-items: flex-start; gap: 10px; }
.form .check input { width: auto; margin-top: 4px; }
.form .check label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .95rem; color: var(--charcoal); margin: 0; }
.form-note { font-size: .82rem; color: #7a766b; }

/* ---------- Directory ---------- */
.dir-group { margin-bottom: 40px; }
.dir-group > h3 { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px; }
.dir-card { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px 22px; background: #fff; margin-bottom: 14px; }
.dir-card h4 { font-family: var(--font-display); font-size: 1.25rem; color: var(--navy); margin: 0 0 .3em; }
.dir-card p { margin: 0 0 .6em; font-size: .95rem; color: #565349; }
.dir-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .9rem; }
.dir-meta a { font-weight: 600; }
.dir-note { font-size: .82rem; color: #837e72; font-style: italic; margin-top: .6em; }

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .post-card__img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.post-card__meta { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); font-weight: 700; margin: 0 0 .5em; }
.article { max-width: 760px; margin: 0 auto; }
.article h2 { margin-top: 1.6em; }
.article p { color: #45433d; }
.article img { border-radius: var(--radius); margin: 1.4em 0; box-shadow: var(--shadow); }
.article__hero { aspect-ratio: 16/9; object-fit: cover; width: 100%; border-radius: var(--radius); margin-bottom: 1.6em; }

/* ---------- Disclaimer ---------- */
.disclaimer { font-size: .82rem; color: #837e72; font-style: italic; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; max-width: 70ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #cfc8ba; padding: clamp(50px, 7vw, 80px) 0 30px; }
.site-footer h4 { color: var(--ivory); font-size: 1.4rem; margin-bottom: .2em; }
.site-footer a { color: #cfc8ba; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-col h5 { text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; color: var(--gold-soft); margin: 0 0 14px; font-family: var(--font-body); font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; font-size: .92rem; }
.footer-sub { font-size: .9rem; line-height: 1.7; }
.footer-sub .tagline { color: var(--gold-soft); font-style: italic; font-family: var(--font-display); font-size: 1.05rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .78rem; color: #8d8678; }

/* ---------- Sticky mobile action bar ---------- */
.sticky-bar { display: none; }
@media (max-width: 760px) {
  .sticky-bar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--navy); border-top: 1px solid var(--gold);
  }
  .sticky-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 4px; color: var(--ivory); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; border-right: 1px solid rgba(255,255,255,.12); }
  .sticky-bar a:last-child { border-right: 0; }
  .sticky-bar a:hover { color: var(--gold-soft); }
  .sticky-bar svg { width: 20px; height: 20px; }
  body { padding-bottom: 60px; }
}

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #8a8678; padding: 14px 0; }
.crumbs a { color: var(--gold); }

/* ---------- Misc ---------- */
.section-head { max-width: 64ch; margin-bottom: clamp(32px, 5vw, 56px); }
.center .section-head { margin-left: auto; margin-right: auto; }
.hr-gold { width: 60px; height: 2px; background: var(--gold); border: 0; margin: 0 0 1.4rem; }
.center .hr-gold { margin-left: auto; margin-right: auto; }
.pill { display: inline-block; background: var(--sand); border: 1px solid var(--line); color: var(--navy); padding: 6px 14px; border-radius: 40px; font-size: .76rem; letter-spacing: .06em; margin: 0 6px 8px 0; }
.amenity-list { columns: 2; column-gap: 40px; list-style: none; padding: 0; margin: 0; }
.amenity-list li { padding: 9px 0 9px 26px; position: relative; break-inside: avoid; border-bottom: 1px solid var(--line-soft); }
.amenity-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); }
@media (max-width: 560px) { .amenity-list { columns: 1; } }

/* Accessibility */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
