/* =============================================
   THE BEACH HOUSES – Global Styles
   ============================================= */

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

:root {
  --color-bg: #f2ede8;
  --color-bg-section: #eeebe5;
  --color-nav-bg: #f7f4f0;
  --color-text: #2c2826;
  --color-text-muted: #5a504a;
  --color-accent: #b07050;
  --color-border: #c8b8a8;
  --color-frame-border: #c9b99a;
  --color-inquire-border: #2c2826;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav-bar {
  background-color: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 80px;
  gap: 20px;
}

/* Logo */
.nav-logo {
  flex-shrink: 0;
  text-decoration: none;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-text);
  line-height: 1.1;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: 3px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  text-decoration: none;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

/* Inquire Button */
.inquire-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid #b07050;
  padding: 8px 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.inquire-btn:hover {
  color: #b07050;
}

/* Hidden on desktop, shown via 768px media query */
.hamburger {
  display: none;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: visible;
}

.hero-bg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 53%;
  display: block;
}

/* Overlapping framed image – sits over hero + content boundary */
.hero-overlay-frame {
  position: absolute;
  bottom: -380px;
  left: calc((100vw - 1200px) / 2 + 40px);
  z-index: 10;
  width: 600px;
  background-color: #eeebe5;
}

.frame-inner {
  position: relative;
  padding: 12px;
  background: #fff;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.15);
}

.frame-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: 0% 92%;
  display: block;
  padding: 12px;
  border: 1px solid #b4856b;
}


/* =============================================
   CONTENT SECTION
   ============================================= */
.content-section {
  background-color: var(--color-bg-section);
  position: relative;
  padding-top: 60px;
  padding-bottom: 80px;
}

.content-inner {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  gap: 60px;
}

/* Left column: reserves space for the overlapping frame image */
.content-left {
  flex-shrink: 0;
  width: 600px;
  min-height: 380px;
}

/* Two square thumbs below the inset on desktop */
.photo-thumbs {
  display: flex;
  gap: 16px;
  margin-top: 330px; /* clears the inset frame that overlaps from above */
}

.thumb-img {
  width: calc(50% - 8px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Mobile gallery: hidden on desktop, shown at 768px */
.mobile-gallery {
  display: none;
}

/* Right column: text */
.content-right {
  flex: 1;
  padding-top: 40px;
  max-width: 520px;
}

.content-heading {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--color-text);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.content-tagline {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.tagline-script {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-accent);
  line-height: 1;
  display: inline;
  vertical-align: baseline;
}

.tagline-italic {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-accent);
  font-size: 1.3rem;
  line-height: 1.3;
}

.content-body {
  font-family: 'Quattrocento', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-cta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text);
  margin-bottom: 28px;
}

.content-cta strong {
  font-weight: 600;
}

.content-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  width: 100%;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background-color: var(--color-nav-bg);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-text);
}

.footer-logo-sub {
  font-family: var(--font-sans);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-top: 3px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-link {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

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

/* Tablet landscape — tighten inset so text column has room */
@media (max-width: 1100px) {
  .hero-overlay-frame {
    width: 420px;
    bottom: -260px;
    left: calc((100vw - 1000px) / 2 + 32px);
  }

  .frame-img {
    height: 300px;
  }

  .content-left {
    width: 420px;
    min-height: 270px;
  }

  .content-inner {
    max-width: 1000px;
    padding: 0 32px;
    gap: 40px;
  }

  .photo-thumbs {
    margin-top: 210px;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .hero-img {
    object-position: 0% 22%;
  }

  .hero-overlay-frame {
    left: 20px;
    width: 300px;
    bottom: -160px;
  }

  .frame-img {
    height: 300px;
  }

  .content-left {
    width: 300px;
    min-height: 200px;
  }

  .content-heading {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 18px;
  }

  .photo-thumbs {
    margin-top: 110px;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow gap */
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* ── Hamburger button ── */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
  }

  .hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* Animate to X when active */
  .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* ── Nav: hide links + BOOK, collapse to one row ── */
  .nav-inner {
    flex-wrap: nowrap;
    height: 60px;
    padding: 0 20px;
    gap: 0;
    align-items: center;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-nav-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 24px;
    gap: 18px;
    z-index: 200;
  }

  /* BOOK flows as last item in the dropdown column */
  .nav-links .inquire-btn {
    align-self: center;
    margin-top: 8px;
    border-color: var(--color-text);
  }

  /* ── Hero: let it expand naturally to contain stacked frame ── */
  .hero {
    height: auto;
    overflow: visible;
    width: 100%;
    background-color: var(--color-bg-section);
  }

  .hero-bg {
    width: 100%;
    height: 450px;
  }

  .hero-img {
    object-position: 0% 22%;
  }

  /* Hide desktop inset — replaced by mobile-gallery below hero */
  .hero-overlay-frame {
    display: none;
  }

  /* 3-across photo strip */
  .mobile-gallery {
    display: flex;
    gap: 6px;
    padding: 6px;
    background-color: var(--color-bg-section);
  }

  .mobile-gallery-img {
    width: calc(33.333% - 4px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
  }

  /* Text section flows naturally after the inset */
  .content-section {
    padding-top: 28px;
  }

  .content-inner {
    flex-direction: column;
    gap: 16px;
    padding: 0 20px;
  }

  .content-left {
    display: none;
  }

  .content-right {
    padding-top: 0;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .hero-img {
    object-position: 0% 14%;
  }

  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 20px;
    gap: 12px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    height: 280px;
  }

  .hero-overlay-frame {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    margin: 0;
}

  .content-inner {
    flex-direction: column;
    gap: 24px;
    padding: 0 20px;
  }

  .content-left {
    display: none;
  }

  .content-right {
    padding-top: 20px;
    max-width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .hero-bg {
    height: 260px;
  }

  .hero-img {
    object-position: 0% 30%;
  }

  .mobile-gallery {
    display: none;
  }
}
