/* =========================================================================
   Shared nav overrides — kept minimal.
   Most nav styling still comes from each page's per-page <style> block
   (the well-tuned original design). This file only pins the rules that
   MUST be identical across every page:

   1. Mobile CTA visibility (avoid duplicate "Get a free quote" on desktop)
   2. Dropdown item appearance (font, case, spacing) — the "Selected
      projects" list should look exactly the same everywhere.
   3. Universal mobile polish (safe-area insets, tap-highlight, touch)
   4. Canonical site footer — rendered by nav.js on <div data-footer>
   5. Custom editorial scrollbar (desktop only — mobile OS handles it)
   ========================================================================= */

/* =========================================================================
   Custom scrollbar — thin, editorial, gold accent.
   Uses gradient thumb + subtle track. Native smooth-scroll already set on
   the html element by each page's own CSS. Kept desktop-only so mobile
   browsers keep their native overlay scrollbar behavior.
   ========================================================================= */

/* Firefox */
@media (min-width: 641px) {
  html {
    scrollbar-width: thin;
    scrollbar-color: #b89968 rgba(50, 37, 25, 0.05);
  }
}

/* Chrome, Safari, Edge (WebKit / Blink) */
@media (min-width: 641px) {
  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }
  ::-webkit-scrollbar-track {
    background: rgba(50, 37, 25, 0.04);
    border-radius: 999px;
  }
  ::-webkit-scrollbar-thumb {
    /* Gold-to-umber gradient — matches the site's editorial accents */
    background: linear-gradient(180deg, #b89968 0%, #6b4f33 100%);
    border-radius: 999px;
    /* Inset border so thumb reads slimmer than track — feels refined */
    border: 3px solid transparent;
    background-clip: padding-box;
    min-height: 60px;
    transition: background 0.25s ease;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d4c2a0 0%, #a68a6c 100%);
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #a68a6c 0%, #322519 100%);
    background-clip: padding-box;
  }
  ::-webkit-scrollbar-corner { background: transparent; }
}

/* ============ Canonical site footer (prefixed .omne-footer-*) ============ */
.omne-footer {
  padding: 2.5rem 0 1.5rem;
  background:
    radial-gradient(600px 400px at 12% 0%, rgba(184, 153, 104, 0.08), transparent 60%),
    linear-gradient(180deg, #2c1f14 0%, #1f160d 100%);
  color: #f5ede0;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(212, 176, 121, 0.22);
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
}
.omne-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 176, 121, 0.5), transparent);
  pointer-events: none;
}
.omne-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}
.omne-footer-grid {
  display: grid;
  /* Mobile default: brand row full width, then Explore + Contact side by side */
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "brand brand"
    "explore contact";
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.omne-footer-brand-col { grid-area: brand; }
.omne-footer-col:nth-child(2) { grid-area: explore; }
.omne-footer-col:nth-child(3) { grid-area: contact; }
@media (min-width: 768px) {
  .omne-footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-areas: "brand explore contact";
    gap: 2.5rem;
    margin-bottom: 1.75rem;
  }
}
.omne-footer-col h4 {
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #b89968;
  margin: 0 0 0.85rem;
  font-weight: 700;
}
.omne-footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding: 0;
  margin: 0;
}
.omne-footer-col a {
  color: rgba(245, 237, 224, 0.78);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.omne-footer-col a:hover { color: #b89968; }
.omne-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f5ede0;
  text-decoration: none;
  font-family: "Playfair Display", "Times New Roman", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
}
.omne-footer-brand em {
  font-style: italic;
  color: #b89968;
}
.omne-footer-brand-mark {
  display: inline-flex;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: #322519;
  color: #d4c2a0;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.85rem;
}
.omne-footer-brand-mark::before { content: "O"; }
.omne-footer-tagline {
  color: rgba(245, 237, 224, 0.65);
  font-size: 0.82rem;
  margin: 0.85rem 0 0;
  max-width: 32ch;
  line-height: 1.5;
}
.omne-footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(212, 176, 121, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.omne-footer-bottom p {
  font-size: 0.72rem;
  color: rgba(245, 237, 224, 0.45);
  margin: 0;
}

/* Mobile compaction — collapse the whole footer into a single tight cluster
   so it takes about 30% of the space it does on desktop. */
@media (max-width: 640px) {
  .omne-footer {
    padding: 1.15rem 0 0.85rem;
  }
  .omne-footer-tagline { display: none; }
  .omne-footer-col h4 { display: none; } /* No column headers on mobile — links speak for themselves */

  /* Everything collapses into one vertical cluster, tightly stacked */
  .omne-footer-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    grid-template-areas: none;
  }
  .omne-footer-brand-col,
  .omne-footer-col:nth-child(2),
  .omne-footer-col:nth-child(3) {
    grid-area: auto;
    width: 100%;
  }

  .omne-footer-brand { font-size: 1rem; }
  .omne-footer-brand-mark { width: 22px; height: 22px; font-size: 0.75rem; }

  /* Links: inline horizontal row that wraps — no vertical stack */
  .omne-footer-col ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding: 0;
    margin: 0;
  }
  .omne-footer-col a { font-size: 0.78rem; }

  .omne-footer-bottom {
    padding-top: 0.75rem;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(212, 176, 121, 0.12);
  }
  .omne-footer-bottom p {
    font-size: 0.62rem;
    line-height: 1.4;
  }
}


/* ---------- Universal nav back-link — pinned to medium weight, not bold.
   Some per-page CSS (Ambush notably) applies font-weight: 700 on .back-link
   because it inherits from the surrounding editorial dark hero copy. Force
   it back to a refined 500 so the nav crumb reads clean everywhere. ---------- */
.nav .back-link,
.nav .back-link:hover,
.nav .back-link:visited {
  font-weight: 500 !important;
  letter-spacing: 0.22em !important;
}

/* ---------- Universal mobile polish (loaded on every page via nav.css) ---------- */

/* Kill iOS's grey tap-highlight overlay; use our own subtle transitions */
html { -webkit-tap-highlight-color: transparent; }

/* Prevent iOS from auto-zooming inputs when font-size < 16px (accessibility + UX). */
@media (max-width: 820px) {
  input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
  input[type="search"], input[type="password"], input[type="number"], textarea, select {
    font-size: 16px !important;
  }
}

/* Buttons and interactive tiles: skip 300ms click delay, no double-tap zoom */
button, .btn, a.btn, [role="button"], .work-tile, .nav-toggle, .quote-tile {
  touch-action: manipulation;
}

/* Respect iPhone notch / Dynamic Island / home indicator on fixed nav.
   Nav container gets safe padding on the sides so content never sits under
   the notch cutout in landscape. */
.nav .container,
.nav .nav-inner {
  padding-left: max(clamp(1.5rem, 4vw, 3rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.5rem, 4vw, 3rem), env(safe-area-inset-right));
}

/* =========================================================================
   Mobile drawer (.mnav-*) — separate namespaced element rendered on <body>.
   Zero conflicts with per-page CSS. Only shown at ≤820px.
   ========================================================================= */

/* The drawer element is present on every page but hidden on desktop. */
.mnav-drawer { display: none; }

@media (max-width: 820px) {
  /* Body scroll lock while drawer open */
  body.mnav-body-open { overflow: hidden; touch-action: none; }

  /* Hide the original .nav-links horizontal list on mobile — the .mnav drawer
     replaces it entirely. Per-page CSS may still show it; we force it off. */
  .nav .nav-links { display: none !important; }

  /* Make sure the nav toggle button is visible on mobile */
  .nav .nav-toggle { display: flex !important; position: relative; z-index: 160; }

  /* ============ Drawer container ============ */
  .mnav-drawer {
    display: block;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #ede4d1;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(env(safe-area-inset-top) + 4.25rem)
             max(1.5rem, env(safe-area-inset-right))
             calc(env(safe-area-inset-bottom) + 1.25rem)
             max(1.5rem, env(safe-area-inset-left));
    -webkit-tap-highlight-color: transparent;
  }
  .mnav-drawer.mnav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
  }

  /* Dedicated close X — prominent top-right of the drawer, always visible.
     Solid dark pill so it reads as an intentional close affordance, not
     ambient chrome. */
  .mnav-close {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 0.9rem);
    right: max(1rem, env(safe-area-inset-right));
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #322519;
    border: none;
    color: #f5ede0;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.3);
    transition: background 0.2s ease, transform 0.15s ease;
    -webkit-appearance: none;
  }
  .mnav-close:hover { background: #56463a; }
  .mnav-close:active { transform: scale(0.92); }

  .mnav-inner {
    display: flex;
    flex-direction: column;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }

  /* Link list */
  .mnav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .mnav-item {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(50, 37, 25, 0.10);
  }
  .mnav-item:last-child { border-bottom: none; }
  .mnav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 1rem 0;
    color: #322519;
    /* Editorial serif for main nav — matches the display type on the site */
    font-family: "Playfair Display", "Times New Roman", Georgia, serif;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
    font-weight: 400;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-appearance: none;
    transition: color 0.2s ease, opacity 0.15s ease;
  }
  .mnav-row:active { opacity: 0.55; }
  .mnav-row > span:first-child { flex: 1; min-width: 0; }

  /* Plus icon on Work → rotates to X when expanded */
  .mnav-plus {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(50, 37, 25, 0.06);
    color: #322519;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.2s ease;
  }
  .mnav-item-has-sub.mnav-sub-open .mnav-plus {
    /* Caret flips upward to indicate the sub-menu is expanded */
    transform: rotate(180deg);
    background: #322519;
    color: #f5ede0;
  }

  /* Sub-menu (Work → projects) */
  .mnav-sub {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .mnav-item-has-sub.mnav-sub-open .mnav-sub { max-height: 500px; padding-bottom: 0.5rem; }
  .mnav-sub li { border-top: 1px solid rgba(50, 37, 25, 0.06); }
  .mnav-sub a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0 0.55rem 1rem;
    color: #6b4f33;
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
    font-style: normal;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.01em;
  }
  .mnav-sub a:active { color: #b89968; }
  .mnav-sub-all {
    font-family: "Inter Tight", sans-serif !important;
    font-style: normal !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    color: #6b4f33 !important;
    font-weight: 600 !important;
  }

  /* Bottom CTA pill — smaller, sits closer to the last nav item */
  .mnav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    min-height: 48px;
    background: #322519;
    color: #f5ede0;
    border-radius: 999px;
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
  }
  .mnav-cta:active { transform: scale(0.98); background: #56463a; }

  /* Nav toggle stays above the drawer so hamburger transforms to X visually */
  .nav .nav-toggle { z-index: 9999 !important; }
}

/* Consistent minimum tap target size across all interactive elements on mobile.
   Apple + Google guidelines: 44×44pt / 48×48dp. */
@media (max-width: 820px) {
  .nav-links a,
  .nav-toggle,
  .btn,
  a.btn,
  button.btn {
    min-height: 44px;
  }
  /* Quote-builder pill chips — the tile is a flex container with
     align-items:stretch, so setting min-height on the outer tile pushes
     both the toggle and the info buttons to full 44px height. Fixes the
     ~32px tap target that pills otherwise ship at (0.55rem padding + 0.88rem line). */
  .quote-tile,
  .quote-tile-pill-toggle,
  .quote-tile-pill-info {
    min-height: 44px;
  }
}

/* When the mobile drawer is open, hide the floating sticky CTA — the
   drawer's own CTA lives inside the menu. Otherwise the fixed CTA sits
   on top of the drawer and confuses tap intent. */
body.nav-open .sticky-cta {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* =========================================================================
   Tactile feedback — subtle compression on tap.
   Every interactive control gets a small scale-down on :active so pressing
   feels like the button has physical weight. Uses GPU transform only.
   Kept intentionally subtle (0.97 scale, 40ms) — premium, not cartoonish.
   ========================================================================= */
.btn, a.btn, button.btn,
.nav-toggle,
.nav-links a,
.work-tile,
.quote-tile,
.review-card,
.google-badge,
.hero-pill,
.sticky-cta {
  transition-property: transform, background, color, opacity, box-shadow, border-color;
  transition-duration: 0.35s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: none) and (pointer: coarse) {
  /* Touch devices only — no hover states here, just press feedback */
  .btn:active, a.btn:active, button.btn:active,
  .work-tile:active,
  .quote-tile:active,
  .review-card:active,
  .google-badge:active,
  .hero-pill:active,
  .sticky-cta:active {
    transform: scale(0.97);
    transition-duration: 0.06s;
  }
  .nav-toggle:active { transform: scale(0.92); transition-duration: 0.06s; }
  .nav-links a:active { opacity: 0.55; transition-duration: 0.06s; }
}

/* Reduced-motion: kill parallax + transforms for users who ask for it.
   Prevents motion sickness and dropped frames on low-end devices. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ---------- (1) mobile CTA visibility ----------
   Nav.js outputs BOTH .nav-cta-desktop and .nav-cta-mobile.
   Force one to hide per breakpoint with !important. Some per-page CSS
   was still rendering both. */
.nav-links a.nav-cta-mobile,
.nav-links li:has(.nav-cta-mobile) { display: none !important; }

@media (max-width: 820px) {
  /* On mobile, desktop CTA hides, mobile CTA shows in the drawer */
  .nav-links a.nav-cta-mobile,
  .nav-links li:has(.nav-cta-mobile) { display: inline-flex !important; }
  .nav-links a.nav-cta-desktop,
  .nav-links li:has(.nav-cta-desktop) { display: none !important; }
}

/* ---------- nav spacing sanity (force flex gap so items never smush) ----------
   IMPORTANT: only apply on desktop (>=821px). Below 820px, per-page CSS controls
   the mobile hamburger drawer, which uses flex-direction:column + fullscreen
   overlay. If we force flex-row here on mobile, the drawer items become invisible. */
@media (min-width: 821px) {
  .nav .nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    list-style: none !important;
  }
}
@media (max-width: 1180px) and (min-width: 981px) {
  .nav .nav-links { gap: 1.25rem !important; }
}
@media (max-width: 980px) and (min-width: 821px) {
  .nav .nav-links { gap: 0.9rem !important; }
}

/* ---------- (2) kill nav text-shadows everywhere ----------
   The original CSS added a heavy drop-shadow to the nav text so it stayed
   readable over the dark hero image. Looks bad once the nav is scrolled or
   sits over cream/light backgrounds. Removing it entirely. */
.nav .brand,
.nav .nav-links a,
.nav .subpage-label,
.nav .subpage-crumb,
.nav .back-link,
.nav .brand em,
.nav .brand span {
  text-shadow: none !important;
}
.nav .brand-mark {
  box-shadow: none !important;
}

/* ---------- (2) dropdown item appearance ---------- */
/* Playfair Display sentence-case rows with italic gold numbers and a solid
   dark LIVE pill. This is the canonical style — pinned with !important so
   it wins over whatever per-page CSS each file happens to define. */

.nav-dropdown-label {
  display: block !important;
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.55rem !important;
  letter-spacing: 0.26em !important;
  text-transform: uppercase !important;
  color: #a68a6c !important;
  padding: 0.4rem 1.1rem 0.6rem !important;
  font-weight: 600 !important;
  border-bottom: 1px solid rgba(50, 37, 25, 0.10) !important;
  margin-bottom: 0.25rem !important;
}

.nav-links a.nav-dropdown-item,
.nav-dropdown-item {
  display: grid !important;
  grid-template-columns: 32px 1fr auto !important;
  align-items: center !important;
  gap: 0.7rem !important;
  padding: 0.6rem 1.1rem !important;
  font-family: "Playfair Display", "Times New Roman", Georgia, serif !important;
  font-size: 0.85rem !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: 1.25 !important;
  color: #322519 !important;
  height: auto !important;
  min-height: 0 !important;
  transition: background 0.2s ease !important;
}
.nav-dropdown-item::after { display: none !important; }
.nav-dropdown-item:hover { background: #ede4d1 !important; }

.nav-dropdown-num {
  font-family: "Playfair Display", "Times New Roman", Georgia, serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: 0.8rem !important;
  color: #a68a6c !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.nav-dropdown-name {
  color: #322519 !important;
  font-family: "Playfair Display", "Times New Roman", Georgia, serif !important;
  font-weight: 400 !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.85rem !important;
}

.nav-dropdown-status {
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.48rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #f5ede0 !important;
  background: #c67d3a !important; /* project orange (amber) */
  padding: 0.4em 0.85em !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  font-style: normal !important;
}

.nav-dropdown-all {
  display: block !important;
  text-align: center !important;
  padding: 0.75rem 1.1rem !important;
  margin-top: 0.35rem !important;
  border-top: 1px solid rgba(50, 37, 25, 0.10) !important;
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #6b4f33 !important;
  font-weight: 500 !important;
}
.nav-dropdown-all:hover { color: #322519 !important; background: #ede4d1 !important; }

/* Invisible hover-bridge so mouse can travel from WORK label down to the
   dropdown without losing :hover. Now generously tall + overhangs on
   each side so diagonal mouse paths never break the hover chain. */
.nav-dropdown::before {
  content: "" !important;
  position: absolute !important;
  top: -26px !important;
  left: -12px !important;
  right: -12px !important;
  height: 30px !important;
  /* Bridge captures mouse only when dropdown is already open (parent state). */
}

/* Also extend the hover zone BELOW the WORK trigger so a slight downward
   pause on the trigger itself doesn't drop out of hover. */
.nav-has-dropdown > a::before {
  content: "" !important;
  position: absolute !important;
  top: 100% !important;
  left: -8px !important;
  right: -8px !important;
  height: 14px !important;
}

/* ---------- Dropdown panel: full appearance pinned ---------- */
.nav-has-dropdown { position: relative !important; }
.nav-has-dropdown > a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5em !important;
}
.nav-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  min-width: 280px !important;
  /* padding-top only — the "View all work" footer sits flush against the
     bottom of the panel with no gap. */
  padding: 0.55rem 0 0 !important;
  background: #f5ede0 !important;
  border: 1px solid rgba(50, 37, 25, 0.22) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px -20px rgba(50, 37, 25, 0.32) !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  /* When the mouse LEAVES the trigger, wait 500ms before starting the fade-out.
     Generous — lets users pause on the panel or move slowly toward it. */
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.5s,
              visibility 0s linear 0.8s !important;
  visibility: hidden !important;
  z-index: 200 !important;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  /* On the way IN, no delay — panel appears immediately. */
  transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1) 0s,
              visibility 0s linear 0s !important;
}
/* Caret circle next to WORK — pinned same size/color */
.nav-caret {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: rgba(50, 37, 25, 0.10) !important;
  flex-shrink: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.nav-caret::before {
  content: "" !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 3px solid transparent !important;
  border-right: 3px solid transparent !important;
  border-top: 4px solid currentColor !important;
}
.nav-has-dropdown:hover .nav-caret,
.nav-has-dropdown:focus-within .nav-caret {
  background: rgba(50, 37, 25, 0.18) !important;
}

/* =========================================================================
   MNAV DRAWER v2 — right slide-in editorial layout with preview cards.
   Overrides prior mnav rules by coming later in the cascade.
   ========================================================================= */
.mnav-scrim { display: none; }

@media (max-width: 820px) {
  /* Backdrop — dims the visible page strip on the left */
  .mnav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 6, 0.55);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.35s;
  }
  body.mnav-body-open .mnav-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
  }

  /* Right slide-in drawer — 82vw wide so ~18% of page peeks through on the left.
     `inset: auto` MUST come first so it clears the earlier full-viewport
     `inset: 0`, then we set explicit top/right/bottom (leaving left auto). */
  .mnav-drawer {
    display: block;
    position: fixed;
    inset: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(82vw, 460px);
    height: 100vh;
    height: 100dvh;
    background: #f5ede0;
    z-index: 9998;
    opacity: 1;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0.45s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(env(safe-area-inset-top) + 4rem)
             max(1.75rem, env(safe-area-inset-right))
             calc(env(safe-area-inset-bottom) + 1.5rem)
             1.75rem;
    box-shadow: -12px 0 40px -8px rgba(20, 12, 6, 0.3);
  }
  .mnav-drawer.mnav-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
  }

  /* Close X — subtle circle top-right inside the drawer itself */
  .mnav-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 0.9rem);
    right: 1.15rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(50, 37, 25, 0.14);
    color: #322519;
    z-index: 3;
    box-shadow: none;
  }
  .mnav-close:hover { background: rgba(50, 37, 25, 0.06); border-color: rgba(50, 37, 25, 0.28); }

  .mnav-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    gap: 1rem;
  }

  /* Numbered nav list — big editorial serif + dotted rule + number */
  .mnav-item { border-bottom: none; }
  .mnav-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 0.75rem;
    width: 100%;
    padding: 0.95rem 0;
    color: #322519;
    font-family: "Playfair Display", "Times New Roman", Georgia, serif;
    font-size: 1.85rem;
    line-height: 1;
    letter-spacing: -0.01em;
    font-weight: 400;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    min-height: 0;
    -webkit-appearance: none;
    transition: color 0.2s ease;
  }
  .mnav-row:active { color: var(--project-orange, #c67d3a); opacity: 1; }
  .mnav-label { display: inline-block; }
  .mnav-label em { font-style: italic; font-weight: 400; }
  .mnav-dots {
    display: block;
    align-self: end;
    height: 1px;
    margin-bottom: 0.5rem;
    background-image: radial-gradient(circle, rgba(50, 37, 25, 0.4) 0.9px, transparent 1.1px);
    background-size: 7px 2px;
    background-repeat: repeat-x;
    background-position: 0 center;
  }
  .mnav-num {
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: rgba(50, 37, 25, 0.55);
    font-weight: 500;
    letter-spacing: 0.02em;
    align-self: center;
  }

  /* Hide the old plus/caret since we're using dotted rules now */
  .mnav-plus { display: none; }

  /* Sub-menu: horizontal swipe preview cards */
  .mnav-sub {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .mnav-item-has-sub.mnav-sub-open .mnav-sub {
    max-height: 340px;
    padding-bottom: 0.75rem;
  }
  .mnav-cards {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, black 0%, black 92%, transparent 100%);
            mask-image: linear-gradient(90deg, black 0%, black 92%, transparent 100%);
  }
  .mnav-cards::-webkit-scrollbar { display: none; }
  .mnav-card,
  .mnav-sub a.mnav-card {
    /* Override the legacy .mnav-sub a { display: flex } rule — cards need
       to stack image-above-name, not lay them out side-by-side. */
    display: block !important;
    flex: 0 0 auto;
    width: 55%;
    max-width: 200px;
    min-height: 0 !important;
    padding: 0 !important;
    text-decoration: none;
    color: #322519;
    scroll-snap-align: start;
    transition: transform 0.2s ease;
    border-top: none !important;
    border-bottom: none !important;
  }
  .mnav-card:active { transform: scale(0.97); }
  .mnav-card-img {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(50, 37, 25, 0.08);
    margin-bottom: 0.55rem;
  }
  .mnav-card-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
  }
  .mnav-card-name {
    font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #322519;
    letter-spacing: 0.005em;
  }
  .mnav-sub-all {
    display: inline-block;
    font-family: "Inter Tight", sans-serif !important;
    font-size: 0.66rem !important;
    letter-spacing: 0.24em !important;
    text-transform: uppercase !important;
    color: var(--project-orange, #c67d3a) !important;
    font-weight: 700 !important;
    text-decoration: none;
    padding: 0.35rem 0 0.5rem 0.25rem;
    min-height: 0 !important;
  }

  /* Bottom quick-links row above CTA */
  .mnav-footer {
    display: flex;
    gap: 1.5rem;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(50, 37, 25, 0.10);
    font-family: "Inter Tight", sans-serif;
    font-size: 0.78rem;
    color: rgba(50, 37, 25, 0.7);
  }
  .mnav-footer a {
    color: inherit;
    text-decoration: none;
    letter-spacing: 0.01em;
  }
  .mnav-footer a:active { color: var(--project-orange, #c67d3a); }

  .mnav-cta {
    margin-top: 0.5rem;
  }
}
