/* ============================================================
   CSS RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 160px; /* Positions content near the top below the navbar */
  overflow: hidden;
}

/* ── Video Background ── */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ── Dark Overlay ── */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: -1;
  pointer-events: none;
}

/* ── Hamburger button (hidden on desktop) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* X state */
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: capitalize;
  transition: color 0.25s ease, letter-spacing 0.25s ease;
  position: relative;
  padding-bottom: 3px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #ffffff;
  letter-spacing: 0.16em;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: #ffffff;
}

/* ============================================================
   HERO CONTENT (centered text)
   ============================================================ */
.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 24px;
  max-width: 860px;
  /* Subtle box outline matching the reference screenshot */
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 38px 52px 34px;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.78rem, 1.4vw, 0.96rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.7;
  font-style: italic;
}

/* ============================================================
   KELLER WILLIAMS LOGO — bottom-left
   ============================================================ */
.kw-logo-wrapper {
  position: absolute;
  bottom: 24px;
  left: 28px;
  z-index: 10;
}

.kw-logo {
  width: 160px;
  height: auto;
  /* The logo has a white background — add a subtle drop shadow
     so it sits cleanly over the dark video footage */
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  border-radius: 2px;
}

/* ============================================================
   PLACEHOLDER SECTIONS  (expand these later)
   ============================================================ */
.section-placeholder {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e1a14;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-placeholder h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   WELCOME TO PALMETTO BAY SECTION
   ============================================================ */

/* ---------- Fade-in keyframe ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Script line "Welcome to" fades first */
@keyframes fadeInScript {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bold "Palmetto Bay" fades a beat later */
@keyframes fadeInBold {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Section shell ---------- */
.welcome-section {
  background-color: #ede8dd;   /* warm cream from reference */
  color: #2b2b2b;
  padding: 72px 60px 80px;
  font-family: 'Montserrat', sans-serif;
}

/* ---------- Top row: seal + heading ---------- */
.welcome-top {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 40px;
}

/* ---------- Seal ---------- */
.seal-wrapper {
  flex-shrink: 0;
}

.palmetto-seal {
  width: 280px;
  height: 280px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

/* ---------- Heading ---------- */
.welcome-heading {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

/* "Welcome to" — script / cursive */
.wt-script {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 700;
  color: #2b2b2b;
  display: block;
  /* Animation — starts hidden; JS adds .is-visible to trigger */
  opacity: 0;
  animation: none;
}

/* "Palmetto Bay" — bold display */
.wt-bold {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 900;
  color: #1a1a1a;
  display: block;
  opacity: 0;
  animation: none;
}

/* Triggered by IntersectionObserver */
.welcome-heading.is-visible .wt-script {
  animation: fadeInScript 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.welcome-heading.is-visible .wt-bold {
  animation: fadeInBold 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

/* ---------- Body copy ---------- */
.welcome-body {
  max-width: 960px;
  margin: 0 auto;
}

.welcome-para {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  font-weight: 400;
  line-height: 1.85;
  color: #2b2b2b;
  text-align: justify;
  margin-bottom: 28px;
}

/* First paragraph — slight box / indent matching reference */
.welcome-para--boxed {
  padding-left: 20px;
  border-left: 2px solid rgba(43, 43, 43, 0.15);
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
  position: relative;
  padding: 72px 48px;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Blurred background layer — pulls gallery-1.jpg and blurs it */
.gallery-bg {
  position: absolute;
  inset: -30px; /* extend past edges so blur edge doesn't show */
  background-image: url('gallery-1.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.75) saturate(1.1);
  z-index: 0;
  transform: scale(1.05); /* slight scale to hide blur edges */
}

/* Semi-dark overlay on top of blur */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 1;
}

/* ── Grid container ── */
.gallery-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1100px;
  /* Subtle bounding box matching reference */
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ── Individual photo card ── */
.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  aspect-ratio: 4 / 3;
  background: #1a1a1a; /* fallback while image loads */
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.4s ease;
  filter: brightness(0.95);
}

/* Hover zoom + brighten */
.gallery-item:hover .gallery-img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .gallery-section {
    padding: 52px 28px;
  }

  .gallery-grid {
    gap: 12px;
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .gallery-section {
    padding: 40px 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
  }
}

@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
  }
}

/* ============================================================
   AGENT FOOTER
   ============================================================ */
.agent-footer {
  position: relative;
  z-index: 10;
  background: #111111;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 28px 40px 28px 0;
  overflow: visible;
}

/* ── Circular photo — floats on the left, half-overlaps top ── */
.agent-photo-wrapper {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #222;
  margin-top: -30px;          /* lifts above the footer top edge */
  margin-left: 24px;
  margin-right: 32px;
  background: #2a2a2a;        /* fallback if photo missing */
  align-self: flex-start;
}

.agent-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Right-side text block ── */
.footer-content {
  flex: 1;
}

/* Specialty line */
.footer-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* 2-column contact grid */
.footer-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 48px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e0e0e0;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  padding: 5px;
  color: #fff;
}

.contact-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.footer-link {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

/* ── Footer responsive ── */
@media (max-width: 640px) {
  .agent-footer {
    flex-direction: column;
    align-items: center;
    padding: 16px 24px 32px;
    text-align: center;
  }

  .agent-photo-wrapper {
    margin: -50px auto 20px;
    width: 100px;
    height: 100px;
  }

  .footer-tagline {
    text-align: center;
    font-size: 0.72rem;
  }

  .footer-contacts {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: center;
  }

  .contact-item {
    justify-content: center;
  }
}


/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .welcome-section {
    padding: 52px 28px 60px;
  }

  .welcome-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .palmetto-seal {
    width: 140px;
    height: 140px;
  }

  .welcome-para {
    font-size: 0.92rem;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .welcome-section {
    padding: 40px 20px 48px;
  }

  .palmetto-seal {
    width: 110px;
    height: 110px;
  }

  .welcome-para--boxed {
    padding-left: 14px;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablet  (≤ 900px) ── */
@media (max-width: 900px) {
  .nav-links {
    gap: 36px;
  }

  .nav-link {
    font-size: 0.78rem;
    letter-spacing: 0.09em;
  }

  .hero-content {
    padding: 32px 36px 28px;
    max-width: 90vw;
  }

  .kw-logo {
    width: 130px;
  }
}

/* ── Mobile nav (≤ 768px) — hamburger kicks in ── */
@media (max-width: 768px) {
  .navbar {
    padding: 14px 20px;
    justify-content: flex-start;
  }

  .hamburger {
    display: flex;
  }

  /* Collapsed state */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    background: rgba(10, 14, 12, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 15;
  }

  /* Open state — toggled via JS */
  .nav-links.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav-link {
    font-size: 1.1rem;
    letter-spacing: 0.18em;
    font-weight: 400;
  }

  .nav-link::after {
    bottom: -4px;
    height: 1px;
  }

  .hero {
    justify-content: flex-start;
    padding-top: 80px;
  }

  .hero-content {
    padding: 28px 28px 24px;
    max-width: 88vw;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .hero-title {
    font-size: clamp(1.6rem, 7.5vw, 2.4rem);
    letter-spacing: 0.1em;
  }

  .hero-subtitle {
    font-size: clamp(0.76rem, 2.4vw, 0.9rem);
  }

  .kw-logo {
    width: 110px;
  }

  .kw-logo-wrapper {
    bottom: 18px;
    left: 16px;
  }
}

/* ── Small phones (≤ 480px) ── */
@media (max-width: 480px) {
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: 22px 20px 20px;
    max-width: 92vw;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
  }

  .hero-title {
    font-size: clamp(1.4rem, 8.5vw, 2rem);
    letter-spacing: 0.08em;
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: clamp(0.7rem, 3vw, 0.82rem);
    letter-spacing: 0.04em;
    line-height: 1.65;
  }

  .kw-logo {
    width: 88px;
  }

  .kw-logo-wrapper {
    bottom: 14px;
    left: 12px;
  }
}

/* ── Landscape phones ── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vw;
  }

  .hero-content {
    padding: 18px 28px 16px;
  }

  .hero-title {
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 0.72rem;
  }

  .kw-logo {
    width: 80px;
  }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

/* Hidden by default — full-screen fixed overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Start invisible */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* When open */
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

/* Dark backdrop — clicking this closes the lightbox */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

/* Photo container — sits above the backdrop */
.lightbox-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 90vh;
  /* Pop-in scale animation */
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.is-open .lightbox-container {
  transform: scale(1);
}

/* The expanded image */
.lightbox-img {
  display: block;
  max-width: 88vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  border-radius: 2px;
  /* Prevent click-through to backdrop when clicking the image */
  pointer-events: auto;
}

/* ── Close button (top-right of image) ── */
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* ── Prev / Next arrows ── */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

.lightbox-arrow svg {
  width: 20px;
  height: 20px;
}

/* ── Photo counter (bottom-center) ── */
.lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* ── Mobile adjustments ── */
@media (max-width: 640px) {
  .lightbox-prev { left: -40px; }
  .lightbox-next { right: -40px; }

  .lightbox-arrow {
    width: 36px;
    height: 36px;
    padding: 8px;
  }

  .lightbox-img {
    max-width: 94vw;
    max-height: 80vh;
  }
}

