/* Shared base styles for La Marimandona Beach — fonts, reset, header/nav, footer.
   Page-specific styles stay in each page's own <style> block. */

/* Visible keyboard focus (adapts to light/dark contexts via currentColor) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@font-face {
    font-family: 'Herculanum';
    src: url('../../fonts/Herculanum Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    }

@font-face {
    font-family: 'Bellarosa';
    src: url('../../fonts/Andrea Bellarosa.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    }

@font-face {
    font-family: 'Clarissa';
    src: url('../../fonts/Clarissa.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    }

:root{
  --bg:#f4f1ea;
  --bg-rgb: 244, 241, 234;
  --darkblue: #003e69;
  --dark:#3a3a3a;
}

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

body{
  font-family: Arial, Helvetica, sans-serif;
  background:var(--bg);
  color: var(--darkblue);
}

header{
  position: sticky;
  top: 0;
  z-index: 500;
  padding: 24px 40px;
  transition: opacity 0.4s ease;
}

/* Homepage-only: the header stays fully hidden over the hero logo and
   only fades in once the user scrolls down to the photo grid. It is
   already position:sticky from the top of the document, so once it
   fades in it's already pinned in place — no separate "start sticking"
   step needed. JS toggles body.nav-at-top (see nav.js). */
body.nav-at-top header {
  opacity: 0;
  pointer-events: none;
}

/* Blur lives on a pseudo-element, not on header itself — backdrop-filter
   on header would create a new containing block for position:fixed
   descendants (the mobile menu overlay), trapping it inside header's
   own box instead of covering the full screen. */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--bg-rgb), 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
}

.nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* Homepage-only: nav-at-top hides the whole header (see above), so no
   special internal layout is needed for that state anymore — once it
   fades in, it's already in its normal (post-scroll) layout. */
@media (min-width: 769px) {
  /* Scrolled/inner-page state: links stay close to the brand, CTA pins right. */
  body:not(.nav-at-top) .nav-cta {
    margin-left: auto;
  }
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--darkblue);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-brand {
  font-family: 'Herculanum', sans-serif;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--darkblue);
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-brand em {
  font-family: 'Bellarosa', sans-serif;
  font-style: normal;
  font-size: 23px;
  clip-path: inset(-40% -40%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  color: var(--dark);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--darkblue);
  border-bottom-color: var(--darkblue);
}

.nav-cta {
  padding: 10px 26px;
  border-radius: 25px;
  background: var(--darkblue);
  color: var(--bg);
  text-decoration: none;
  font-size: 15px;
  font-family: 'Cormorant Garamond', serif;
  white-space: nowrap;
  transition: background 0.25s ease;
}

.nav-cta:hover {
  background: var(--dark);
}

/* Footer */
.site-footer {
  padding: 50px 40px 30px;
  background: var(--darkblue);
  color: var(--bg);
  margin-top: 60px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
  font-family: 'Cormorant Garamond', serif;
}
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--bg); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.footer-name {
  font-family: 'Herculanum', sans-serif;
  font-size: 20px;
  margin-bottom: 8px !important;
}
.footer-social { display: flex; gap: 16px; align-items: flex-start; }
.footer-legal {
  max-width: 1100px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(244,241,234,0.2);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  opacity: 0.85;
}
.footer-legal a { color: var(--bg); text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  header { padding: 16px 20px; }

  .nav {
    justify-content: space-between;
  }

  .nav-bar {
    width: 100%;
    justify-content: space-between;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  /* Open state: the whole <nav> becomes a full-screen panel; nav-bar
     (brand + close button) stays as its top row, links + CTA stack below. */
  .nav.menu-open {
    position: fixed;
    inset: 0;
    background: var(--darkblue);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 16px 20px 30px;
    z-index: 999;
    overflow-y: auto;
  }

  .nav.menu-open .nav-brand {
    color: var(--bg);
    opacity: 1;
    position: static;
  }

  .nav.menu-open .nav-toggle span {
    background: var(--bg);
  }

  .nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
    margin-top: 50px;
  }

  .nav.menu-open .nav-links .nav-link {
    color: var(--bg);
    font-size: 24px;
    border-bottom: none;
  }

  .nav.menu-open .nav-links .nav-link.active,
  .nav.menu-open .nav-links .nav-link:hover {
    border-bottom: 1px solid var(--bg);
  }

  .nav.menu-open .nav-cta {
    display: inline-block;
    align-self: flex-start;
    margin-top: 36px;
    background: var(--bg);
    color: var(--darkblue);
  }

  .nav.menu-open .nav-cta:hover {
    background: rgba(244,241,234,0.8);
  }

  .site-footer { padding: 40px 20px 20px; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-social { justify-content: center; }
}

body.menu-locked {
  overflow: hidden;
}
