/* ============================================================
   Dominican Builder — Stylesheet
   Palette: sand / white / charcoal + deep ocean blue accent
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --color-sand: #ece5d8;
  --color-sand-dark: #ddd2bd;
  --color-white: #ffffff;
  --color-charcoal: #23241f;
  --color-charcoal-soft: #3a3b34;
  --color-accent: #0e4b5a;      /* deep ocean blue */
  --color-accent-light: #16687d;
  --color-brass: #c9a35e;       /* secondary highlight, used sparingly */
  --color-whatsapp: #25d366;

  --font-headline: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1240px;
  --radius: 2px;
  --transition: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; background: none; border: none; }

h1, h2, h3 {
  font-family: var(--font-headline);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 400; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.25rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

section { position: relative; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.9rem;
}

.section-heading { max-width: 720px; margin-bottom: 3.5rem; }
.section-heading.fade-in { margin-bottom: 3.5rem; }
.section-sub { margin-top: 1rem; font-size: 1.05rem; color: var(--color-charcoal-soft); }
.placeholder-note { font-style: italic; opacity: 0.75; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-accent-light); }

.btn-outline {
  border: 1.5px solid var(--color-charcoal);
  color: var(--color-charcoal);
}
.btn-outline:hover { background: var(--color-charcoal); color: var(--color-white); }

.btn-outline-light {
  border: 1.5px solid var(--color-white);
  color: var(--color-white);
}
.btn-outline-light:hover { background: var(--color-white); color: var(--color-accent); }

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
  padding: 0.65rem 1.15rem;
  font-size: 0.85rem;
}
.btn-whatsapp:hover { background: #1fb857; }

.btn-block { width: 100%; justify-content: center; }

.icon-whatsapp { width: 1.1em; height: 1.1em; fill: currentColor; }

/* ---------- Fade-in on scroll ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: 1.4rem 0;
}
.site-header.scrolled {
  background: rgba(35, 36, 31, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
  padding: 0.8rem 0;
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--color-white);
}
.nav-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-brass);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  color: var(--color-white);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1.5px;
  width: 0;
  background: var(--color-brass);
  transition: width var(--transition);
}
.nav-link:hover::after { width: 100%; }

.nav-cta-item { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 24px;
  z-index: 950;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-white);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,20,20,0.55) 0%, rgba(15,20,20,0.35) 45%, rgba(15,20,20,0.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
  color: var(--color-white);
}
.hero-content .eyebrow { color: var(--color-brass); }
.hero-content h1 { max-width: 820px; margin-bottom: 1.5rem; }
.hero-sub {
  max-width: 560px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 20px;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  background: var(--color-white);
  border-radius: 50%;
  animation: scrollcue 1.8s infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 24px; }
  100% { opacity: 0; top: 24px; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: 7rem 0; background: var(--color-white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}
.about-media img { border-radius: var(--radius); width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.about-text p { margin-bottom: 1.1rem; color: var(--color-charcoal-soft); }
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-sand-dark);
}
.about-stats li { display: flex; flex-direction: column; gap: 0.35rem; }
.about-stats strong { font-family: var(--font-headline); font-size: 1.5rem; color: var(--color-accent); }
.about-stats span { font-size: 0.85rem; color: var(--color-charcoal-soft); }

/* ============================================================
   SERVICES
   ============================================================ */
.services { padding: 7rem 0; background: var(--color-sand); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
}
.service-card {
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(14, 75, 90, 0.12);
}
.service-icon {
  width: 52px; height: 52px;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { margin-bottom: 0.75rem; }
.service-card p { color: var(--color-charcoal-soft); font-size: 0.96rem; }

/* ============================================================
   PORTFOLIO / GALLERY
   ============================================================ */
.portfolio { padding: 7rem 0; background: var(--color-white); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 0.9rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  display: block;
  width: 100%;
  height: 100%;
}
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }
.gallery-item:nth-child(7) { grid-column: span 2; grid-row: span 2; }

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-item::after {
  content: "\2795";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.4rem;
  background: rgba(14, 75, 90, 0.0);
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after {
  opacity: 1;
  background: rgba(14, 75, 90, 0.45);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(15, 16, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: min(90vw, 1100px); max-height: 78vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-caption { color: var(--color-white); margin-top: 1.2rem; font-size: 0.95rem; opacity: 0.85; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.8rem;
  color: var(--color-white); font-size: 2.2rem; line-height: 1;
}
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--color-white); font-size: 1.6rem;
  padding: 0.8rem 1rem;
}
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover { color: var(--color-brass); }

/* ============================================================
   HOUSE PLANS
   ============================================================ */
.plans { padding: 7rem 0; background: var(--color-sand); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.plan-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(35,36,31,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
}
.plan-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(14,75,90,0.14); }
.plan-diagram {
  background: #fbfaf6;
  border-bottom: 1px solid var(--color-sand-dark);
  padding: 1.5rem;
  color: var(--color-charcoal);
}
.plan-svg { width: 100%; height: auto; }
.plan-label { font-size: 8px; font-family: var(--font-body); letter-spacing: 0.04em; fill: var(--color-charcoal-soft); }
.plan-info { padding: 1.75rem; }
.plan-meta { color: var(--color-accent); font-size: 0.85rem; font-weight: 600; margin: 0.4rem 0 0.9rem; }
.plan-info p { color: var(--color-charcoal-soft); font-size: 0.94rem; margin-bottom: 1rem; }
.plan-link { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; }
.plan-link:hover { color: var(--color-charcoal); }

/* ============================================================
   WHY SOSÚA / CABARETE (region)
   ============================================================ */
.region {
  position: relative;
  padding: 8rem 0;
  color: var(--color-white);
  overflow: hidden;
}
.region-media { position: absolute; inset: 0; z-index: 0; }
.region-media img { width: 100%; height: 100%; object-fit: cover; }
.region-overlay { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(14,30,35,0.88) 0%, rgba(14,30,35,0.55) 100%); }
.region-content { position: relative; z-index: 1; max-width: 980px; }
.region-content .eyebrow { color: var(--color-brass); }
.region-content p { margin-bottom: 1.2rem; color: rgba(255,255,255,0.92); }
.region-intro { max-width: 660px; }

.region-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 2.5rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.region-stat { display: flex; flex-direction: column; gap: 0.35rem; }
.region-stat strong { font-family: var(--font-headline); font-size: 1.7rem; color: var(--color-brass); }
.region-stat span { font-size: 0.85rem; color: rgba(255,255,255,0.82); max-width: 220px; }

.region-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.region-feature {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.region-feature-icon { width: 40px; height: 40px; color: var(--color-brass); margin-bottom: 1.1rem; }
.region-feature-icon svg { width: 100%; height: 100%; }
.region-feature h3 { font-size: 1.05rem; margin-bottom: 0.65rem; color: var(--color-white); }
.region-feature p { font-size: 0.88rem; color: rgba(255,255,255,0.82); margin-bottom: 0; }

/* ============================================================
   REAL ESTATE CROSS-LINK BANNER
   ============================================================ */
.cross-link { padding: 4rem 0; background: var(--color-white); }
.cross-link-card {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 3rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cross-link-text h2 { margin-bottom: 0.6rem; }
.cross-link-text p { color: rgba(255,255,255,0.8); max-width: 480px; }

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact { background: var(--color-charcoal); color: var(--color-white); padding: 7rem 0 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 5rem;
}
.contact-info .eyebrow { color: var(--color-brass); }
.contact-info p { color: rgba(255,255,255,0.78); margin-bottom: 1.75rem; }
.contact-details { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.75rem; }
.contact-details li { display: flex; align-items: center; gap: 0.85rem; font-size: 0.98rem; }
.contact-details svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-brass); }
.contact-details a:hover { color: var(--color-brass); }

.social-icons { display: flex; gap: 1rem; margin-bottom: 2rem; }
.social-icons a {
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}
.social-icons svg { width: 19px; height: 19px; }
.social-icons a:hover { border-color: var(--color-brass); background: rgba(201,163,94,0.12); }

.map-embed { border-radius: var(--radius); overflow: hidden; height: 220px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) contrast(1.05); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.75rem 0; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.6); }

/* ============================================================
   FLOATING WHATSAPP BUTTON
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 850;
  width: 58px; height: 58px;
  background: var(--color-whatsapp);
  color: var(--color-white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform var(--transition);
}
.whatsapp-float .icon-whatsapp { width: 30px; height: 30px; }
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-whatsapp);
  opacity: 0.55;
  animation: pulse-ring 2.4s infinite;
  z-index: -1;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:nth-child(7) { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 860px) {
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 340px);
    background: var(--color-charcoal);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem 2.5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-cta-item { margin-left: 0; margin-top: 1rem; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .about-media img { aspect-ratio: 16/10; }
  .about-stats { grid-template-columns: 1fr; gap: 1rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }

  .contact-grid { padding-bottom: 3.5rem; }
  .cross-link-card { padding: 2.25rem; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
  .whatsapp-float { width: 52px; height: 52px; bottom: 1.25rem; right: 1.25rem; }
  .whatsapp-float .icon-whatsapp { width: 26px; height: 26px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { transition: none; opacity: 1; transform: none; }
  .scroll-cue span, .whatsapp-float::before { animation: none; }
}
