/* =============================================================
   BIOVA THEME - Global Styles
   v2.1 — mobile nav, output escaping cleanup
   ============================================================= */

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

:root {
  --ivory:      #F2EDE6;
  --charcoal:   #2B2A2E;
  --taupe:      #A48C7A;
  --warm-beige: #D8C9BC;
  --lavender:   #D7D0E6;
  --white:      #ffffff;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Prevent scroll when mobile drawer is open */
body.nav-open {
  overflow: hidden;
}

/* ── Desktop Nav ──────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 3.5rem;
  background: rgba(242,237,230,0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(164,140,122,0.15);
  min-height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 1002;
}

.nav-logo img,
.nav-logo .custom-logo,
.custom-logo-link img {
  height: 72px !important;
  width: auto !important;
  display: block !important;
  object-fit: contain !important;
  max-width: none !important;
}

.custom-logo-link {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a:focus { opacity: 1; }

.nav-cta {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--taupe);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.8rem;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-cta:hover,
.nav-cta:focus { background: #8f7868; }

/* ── Hamburger Button ─────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  /* Minimum touch target */
  touch-action: manipulation;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile Drawer ────────────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  height: 100dvh; /* dynamic viewport height — handles mobile browser chrome */
  background: var(--ivory);
  z-index: 1001;
  flex-direction: column;
  padding: 7rem 2.5rem 3rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(43,42,46,0.12);
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2.5rem;
}

.nav-drawer-links li {
  border-bottom: 1px solid var(--warm-beige);
}

.nav-drawer-links a {
  display: block;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--charcoal);
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-drawer-links a:hover,
.nav-drawer-links a:focus {
  color: var(--taupe);
}

.nav-drawer-cta {
  display: block;
  padding: 1rem 2rem;
  background: var(--taupe);
  color: var(--white);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s;
}

.nav-drawer-cta:hover,
.nav-drawer-cta:focus { background: #8f7868; }

/* Drawer overlay / scrim */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(43,42,46,0.45);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  cursor: pointer;
}

.nav-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 0.95rem 2.6rem;
  background: var(--taupe);
  color: var(--white);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: background 0.25s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover,
.btn-primary:focus { background: #8f7868; transform: translateY(-1px); }

.btn-outline {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  border: 1px solid var(--taupe);
  color: var(--taupe);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: all 0.25s;
  background: transparent;
  cursor: pointer;
}
.btn-outline:hover,
.btn-outline:focus { background: var(--taupe); color: var(--white); }

/* ── Layout ───────────────────────────────────────────────── */
section { padding: 7rem 4rem; }

.section-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1rem;
  font-weight: 400;
}

.section-title {
  font-family: 'Cormorant Garant', serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}
.section-title em { font-style: italic; color: var(--taupe); }

/* ── Footer ───────────────────────────────────────────────── */
footer { background: var(--charcoal); color: var(--ivory); padding: 4rem; }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-logo img {
  height: 72px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  margin-bottom: 1.25rem;
  display: block;
}

.footer-tagline {
  font-size: 0.82rem;
  color: rgba(242,237,230,0.5);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { text-decoration: none; color: rgba(242,237,230,0.55); font-size: 0.82rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--ivory); }

.footer-ig {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: rgba(242,237,230,0.55);
  font-size: 0.82rem; transition: color 0.2s;
}
.footer-ig:hover { color: var(--ivory); }
.footer-ig svg { width: 16px; height: 16px; flex-shrink: 0; }

.footer-newsletter { margin-top: 1.25rem; }
.footer-newsletter p { font-size: 0.78rem; color: rgba(242,237,230,0.45); margin-bottom: 0.75rem; line-height: 1.6; }

.newsletter-form { display: flex; }
.newsletter-form input {
  flex: 1; padding: 0.65rem 1rem;
  background: rgba(242,237,230,0.08);
  border: 1px solid rgba(242,237,230,0.2);
  color: var(--ivory);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  outline: none;
  border-right: none;
}
.newsletter-form input::placeholder { color: rgba(242,237,230,0.3); }
.newsletter-form button {
  padding: 0.65rem 1rem;
  background: var(--taupe);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #8f7868; }

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(242,237,230,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { font-size: 0.72rem; color: rgba(242,237,230,0.3); letter-spacing: 0.05em; }

/* ── Marquee ──────────────────────────────────────────────── */
.marquee-strip {
  background: var(--charcoal);
  color: var(--warm-beige);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-inner {
  display: inline-flex;
  gap: 3rem;
  animation: marquee 30s linear infinite;
}
.marquee-inner span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
}
.marquee-dot { color: var(--taupe) !important; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1280px) {
  nav { padding: 0.75rem 2rem; }
  .nav-links { gap: 1.5rem; }
}

@media (max-width: 900px) {
  /* Show hamburger, hide desktop links and CTA */
  .nav-hamburger { display: flex; }
  .nav-links     { display: none; }
  .nav-cta       { display: none; }
  .nav-drawer    { display: flex; }
  .nav-scrim     { display: block; }

  nav {
    padding: 0.75rem 1.5rem;
    min-height: 70px;
  }
  .nav-logo img { height: 54px; }

  section { padding: 5rem 1.5rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  footer { padding: 3rem 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  .nav-drawer { width: 100vw; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ── WordPress reset ──────────────────────────────────────── */
.wp-site-blocks,
.is-layout-flow,
.wp-block-post-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Accessibility ────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 0;
  padding: 0.5rem 1rem;
  background: var(--charcoal);
  color: var(--ivory);
  z-index: 99999;
  font-size: 0.8rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Focus ring for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--taupe);
  outline-offset: 3px;
}

/* ── Fluent Forms ─────────────────────────────────────────── */
.ff-el-input,
.ff-el-form-control,
.fluentform input,
.fluentform textarea,
.fluentform select {
  font-family: 'Inter', sans-serif !important;
  font-weight: 300 !important;
}

/* ── Misc ─────────────────────────────────────────────────── */
img { max-width: 100%; height: auto; }
