/* =========================================================
   NAV — MOBILE HAMBURGER
   SAFS flex-wrap pattern. No position: fixed (the header's
   backdrop-filter traps fixed descendants in its own box).
   Toggles .is-open on #siteHeader, not on .nav.
   Desktop (>960px) is untouched — the hamburger is hidden
   and the existing header layout is preserved.
========================================================= */

/* ---------- Button reset — hidden by default on desktop ---------- */
.nav-toggle {
    display: none; /* appears only at ≤960px */
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #1F2922;
    flex-shrink: 0;   /* critical — flex must not squeeze below 44×44 */
    -webkit-tap-highlight-color: transparent;
  }
  
  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    color: #C2602F;
  }
  
  .nav-toggle:focus-visible {
    outline: 2px solid #C2602F;
    outline-offset: 2px;
  }
  
  .nav-toggle-bar {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition:
      transform 0.25s cubic-bezier(.4, 0, .2, 1),
      opacity 0.18s ease,
      top 0.25s cubic-bezier(.4, 0, .2, 1);
  }
  
  .nav-toggle-bar:nth-child(1) { top: 14px; }
  .nav-toggle-bar:nth-child(2) { top: 21px; }
  .nav-toggle-bar:nth-child(3) { top: 28px; }
  
  /* Animate to × when drawer is open */
  .header.is-open .nav-toggle-bar:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
  }
  .header.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .header.is-open .nav-toggle-bar:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
  }
  
  /* Scroll lock when the drawer is open */
  html.nav-locked,
  html.nav-locked body {
    overflow: hidden;
  }
  
  
  /* =========================================================
     MOBILE LAYER — kicks in at ≤960px
     Overrides the existing ≤768px/≤480px rules on .header-inner,
     .brand, .nav and .social via higher specificity (.header + child).
  ========================================================= */
  
  @media (max-width: 960px) {
  
    /* Flex-wrap approach: the hamburger sits on the first row,
       the .nav wraps onto a new row below when open. */
    .header .header-inner {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 0;
    }
  
    /* The brand keeps its intrinsic width — do NOT let earlier
       mobile rules stretch it to 100% (that would push the hamburger
       onto its own row before being tapped). */
    .header .brand {
      width: auto;
      flex: 0 1 auto;
    }
  
    /* Show hamburger */
    .nav-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: auto; /* pushes to the far right of the first row */
    }
  
    /* Hide .nav by default; it drops onto its own row via flex-basis
       once .is-open adds display: flex. */
    .header .nav {
      display: none;
      flex-basis: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
  
      /* Neutralise the ≤768px horizontal-scroll styles that would
         otherwise bleed into our column drawer. */
      overflow: visible;
      white-space: normal;
      gap: 0;
    }
  
    /* Open state — reveal as a column drawer under the header strip. */
    .header.is-open .nav {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      padding: 14px 0 20px;
      margin-top: 10px;
      border-top: 1px solid rgba(31, 41, 34, 0.12);
    }
  
    /* Nav links — full-width Georgia serif rows with hairline dividers */
    .header.is-open .nav > a {
      display: block;
      width: 100%;
      flex: initial;
      font-family: Georgia, 'Times New Roman', serif;
      font-size: 20px;
      font-weight: 400;
      line-height: 1.2;
      letter-spacing: -0.3px;
      color: #1F2922;
      padding: 16px 2px;
      border-bottom: 1px solid rgba(31, 41, 34, 0.12);
      text-align: left;
      white-space: normal;
    }
  
    .header.is-open .nav > a:hover,
    .header.is-open .nav > a:focus-visible {
      color: #C2602F;
      background: transparent;
      border-bottom-color: #C2602F;
    }
  
    /* The CTA — pulled out of the hairline-row stack and shown
       as a full-width terracotta button at the bottom of the drawer. */
    .header.is-open .nav .cta {
      display: block;
      width: 100%;
      margin: 20px 0 0 0;
      padding: 16px 20px;
      font-family: 'Inter', -apple-system, sans-serif;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-align: center;
      color: #FFFFFF;
      background: #C2602F;
      border: 0;
      border-radius: 3px 18px 18px 3px;
    }
  
    .header.is-open .nav .cta:hover,
    .header.is-open .nav .cta:focus-visible {
      color: #FFFFFF;
      background: #9E4A24;
      border-bottom-color: transparent;
    }
  
    /* Reveal-animation elements must be visible inside the drawer
       — otherwise the CTA would start at opacity: 0 and translateX. */
    .header.is-open [data-reveal] {
      opacity: 1;
      transform: none;
    }
  
    /* Social icons — horizontal row at the bottom of the drawer,
       bigger tap targets, with a thin ochre-tinted border per icon. */
    .header.is-open .nav .social {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      width: 100%;
      margin: 18px 0 0 0;
      padding: 16px 0 0 0;
      gap: 12px;
      border: 0;
      border-top: 1px solid rgba(31, 41, 34, 0.12);
      order: initial;
      white-space: normal;
      justify-content: flex-start;
    }
  
    .header.is-open .nav .social-link {
      width: 42px;
      height: 42px;
      border: 1px solid rgba(31, 41, 34, 0.15);
    }
  
    .header.is-open .nav .social-link:hover,
    .header.is-open .nav .social-link:focus-visible {
      color: #C2602F;
      border-color: #C2602F;
      background: rgba(194, 96, 47, 0.06);
    }
  }
  
  
  /* =========================================================
     NARROW MOBILE — ≤360px
     Hide the vertical divider and the wordmark so the logo
     alone has room to breathe next to the hamburger.
  ========================================================= */
  
  @media (max-width: 360px) {
    .brand-divider {
      display: none;
    }
    .mark {
      display: none;
    }
  
    /* Keep the logo compact */
    .logo-placeholder {
      width: 100px;
      height: 38px;
    }
  }
  
  
  /* =========================================================
     REDUCED MOTION — bars snap, no slide-in on drawer
  ========================================================= */
  
  @media (prefers-reduced-motion: reduce) {
    .nav-toggle-bar {
      transition: none;
    }
  }