@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* Custom variables */
:root {
  --halem-ink: #0d0b0a;
  --halem-paper: #f7f1ea;
  --halem-cream: #fff8ef;
  --halem-muted: #8f8177;
  --halem-line: rgba(13, 11, 10, 0.16);
  --halem-rose: #ff4f8b;
  --halem-gold: #d9b46f;
  --halem-deep: #2b171d;
  --halem-max: 1180px;

  /* Global alias variables used across pages */
  --ink: var(--halem-ink);
  --paper: var(--halem-paper);
  --cream: var(--halem-cream);
  --muted: var(--halem-muted);
  --line: var(--halem-line);
  --accent: var(--halem-rose);
  --deep: var(--halem-deep);
  --max: var(--halem-max);
}

/* Resets */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

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

/* Shared Header Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(18px, 4vw, 58px);
  background: linear-gradient(to bottom, rgba(15, 13, 11, 0.82), rgba(15, 13, 11, 0));
  backdrop-filter: blur(10px);
  color: #fff;
}

.site-brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 23px;
  letter-spacing: .18em;
  font-weight: 700;
  white-space: nowrap;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: auto;
  scrollbar-width: none;
}

.site-links::-webkit-scrollbar {
  display: none;
}

.site-links a {
  white-space: nowrap;
  border-radius: 999px;
  padding: 10px 13px;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .13em;
  opacity: .82;
  transition: .22s ease;
}

.site-links a:hover,
.site-links a.active {
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
}

.site-links a.nav-cta {
  background: var(--halem-cream);
  color: var(--halem-ink);
  opacity: 1;
}

/* Smooth transitions for navigation contrast change */
.site-nav,
.site-brand,
.site-links a,
.menu-toggle span {
  transition: color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
}

/* Light background state for fixed header */
.site-nav.site-nav--light-bg {
  color: var(--ink);
  background: linear-gradient(to bottom, rgba(247, 241, 234, 0.92), rgba(247, 241, 234, 0.3));
}

.site-nav.site-nav--light-bg .site-links a {
  color: var(--ink);
}

.site-nav.site-nav--light-bg .site-links a:hover,
.site-nav.site-nav--light-bg .site-links a.active {
  background: rgba(13, 11, 10, 0.08);
  color: var(--ink);
}

.site-nav.site-nav--light-bg .site-links a.nav-cta {
  background: var(--ink);
  color: var(--cream);
}

.site-nav.site-nav--light-bg .menu-toggle span {
  background-color: var(--ink);
}

body.menu-active .site-nav {
  color: #fff !important;
  background: transparent !important;
}

body.menu-active .menu-toggle span {
  background-color: #fff !important;
}

body.menu-active .site-brand {
  color: #fff !important;
}

body.menu-active {
  overflow: hidden;
}

.menu-toggle {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

@media(max-width: 760px) {
  .site-links {
    display: none; /* Hide standard links on mobile */
  }

  .site-nav {
    padding: 18px 24px;
    background: rgba(15, 13, 11, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .site-brand {
    font-size: 20px;
    z-index: 101; /* Keep brand above menu overlay if open */
  }

  /* Hamburger Button */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101; /* Keep above overlay */
    transition: transform 0.3s ease;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: left center;
  }

  /* Hamburger transform to X */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(1px, -1px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(1px, 1px);
  }

  /* Full Screen Overlay */
  .mobile-menu-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(15, 13, 11, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-content {
    width: 100%;
    padding: 0 40px;
    text-align: center;
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .mobile-menu-links a {
    font-family: Georgia, serif;
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: -0.02em;
    transition: color 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
  }

  /* Stagger animation when menu is open */
  .mobile-menu-overlay.active .mobile-menu-links a {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(1) { transition-delay: 0.05s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(2) { transition-delay: 0.1s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(3) { transition-delay: 0.15s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(4) { transition-delay: 0.2s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(5) { transition-delay: 0.25s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(6) { transition-delay: 0.3s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(7) { transition-delay: 0.35s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(8) { transition-delay: 0.4s; }

  .mobile-menu-links a:hover,
  .mobile-menu-links a.active {
    color: #fff;
    transform: scale(1.05);
  }

  .mobile-menu-links a.nav-cta {
    align-self: center;
    background: var(--halem-cream);
    color: var(--halem-ink);
    padding: 14px 44px;
    border-radius: 999px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 12px;
  }
  
  .mobile-menu-links a.nav-cta:hover {
    background: #fff;
    color: #000;
  }
}

.page-offset {
  padding-top: 92px;
}

@media(max-width: 760px) {
  .page-offset {
    padding-top: 126px;
  }
}

/* Shared Footer */
footer, .footer {
  padding: 40px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Reveal utility classes */
.reveal {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* Default state: slide up if no specific animation is provided */
.reveal,
.reveal.fade-up {
  transform: translateY(34px);
}

.reveal.fade-down {
  transform: translateY(-34px);
}

.reveal.fade-left {
  transform: translateX(-34px);
}

.reveal.fade-right {
  transform: translateX(34px);
}

.reveal.scale-up {
  transform: scale(0.94);
}

/* Active reveal state */
.reveal.show {
  opacity: 1;
  transform: none;
}

/* Delay helpers */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* text */
.text-white{
  color: #ffffff;
}


/* Mobile Menu */

body.menu-active {
  overflow: hidden;
}

.menu-toggle {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

@media(max-width: 760px) {
  .site-links {
    display: none; /* Hide standard links on mobile */
  }

  .site-nav {
    padding: 18px 24px;
    background: rgba(15, 13, 11, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .site-brand {
    font-size: 20px;
    z-index: 101; /* Keep brand above menu overlay if open */
  }

  /* Hamburger Button */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101; /* Keep above overlay */
    transition: transform 0.3s ease;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: left center;
  }

  /* Hamburger transform to X */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(1px, -1px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(1px, 1px);
  }

  /* Full Screen Overlay */
  .mobile-menu-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(15, 13, 11, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-content {
    width: 100%;
    padding: 0 40px;
    text-align: center;
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .mobile-menu-links a {
    font-family: Georgia, serif;
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: -0.02em;
    transition: color 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
  }

  /* Stagger animation when menu is open */
  .mobile-menu-overlay.active .mobile-menu-links a {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(1) { transition-delay: 0.05s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(2) { transition-delay: 0.1s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(3) { transition-delay: 0.15s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(4) { transition-delay: 0.2s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(5) { transition-delay: 0.25s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(6) { transition-delay: 0.3s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(7) { transition-delay: 0.35s; }
  .mobile-menu-overlay.active .mobile-menu-links a:nth-child(8) { transition-delay: 0.4s; }

  .mobile-menu-links a:hover,
  .mobile-menu-links a.active {
    color: #fff;
    transform: scale(1.05);
  }

  .mobile-menu-links a.nav-cta {
    align-self: center;
    background: var(--halem-cream);
    color: var(--halem-ink);
    padding: 14px 44px;
    border-radius: 999px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 12px;
  }
  
  .mobile-menu-links a.nav-cta:hover {
    background: #fff;
    color: #000;
  }
}