/* ============================================================
   Delta — Mobile navigation (shared)

   Owns the whole small-screen nav story: the point at which the
   inline links give way, the toggle, and the drawer. Link this on
   any page that has a .site-header / .site-nav and include
   mobile-nav.js — the toggle and drawer are injected from the
   real nav, so there is no markup to keep in sync.

   The breakpoint lives here and nowhere else. It was previously
   set per page at 760, 860 and 900px, which meant the links
   disappeared at three different widths across the site.

   Tokens are declared locally rather than inherited: the pages
   don't share one :root, and the drawer should look identical
   wherever it opens.
   ============================================================ */

:root{ --mnav-bp: 900px; }

.mnav-toggle,
.mnav,
.mnav-scrim{
  --mn-bg:      #FBEEDF;
  --mn-ink:     #2B1539;
  --mn-soft:    rgba(43,21,57,.62);
  --mn-orange:  #CB5209;
  --mn-line:    rgba(43,21,57,.12);
  --mn-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mn-serif:   "Playfair Display", Georgia, serif;
  --mn-ease:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Toggle ---------- */

.mnav-toggle{
  display:none;                     /* shown at the breakpoint below */
  flex:none; align-items:center; justify-content:center;
  width:42px; height:42px; padding:0;
  background:transparent; border:1.5px solid var(--mn-line);
  border-radius:50%; cursor:pointer; color:var(--mn-ink);
  transition:background .26s var(--mn-ease), border-color .26s var(--mn-ease);
}
.mnav-toggle:hover{ border-color:var(--mn-ink); }
.mnav-toggle:focus-visible{ outline:3px solid var(--mn-orange); outline-offset:3px; }

.mnav-toggle__bars{ display:block; width:17px; height:12px; position:relative; }
.mnav-toggle__bars i{
  position:absolute; left:0; right:0; height:1.8px; border-radius:2px;
  background:currentColor;
  transition:transform .34s var(--mn-ease), opacity .2s var(--mn-ease);
}
.mnav-toggle__bars i:nth-child(1){ top:0; }
.mnav-toggle__bars i:nth-child(2){ top:5.1px; }
.mnav-toggle__bars i:nth-child(3){ top:10.2px; }

.mnav-toggle[aria-expanded="true"] .mnav-toggle__bars i:nth-child(1){ transform:translateY(5.1px) rotate(45deg); }
.mnav-toggle[aria-expanded="true"] .mnav-toggle__bars i:nth-child(2){ opacity:0; }
.mnav-toggle[aria-expanded="true"] .mnav-toggle__bars i:nth-child(3){ transform:translateY(-5.1px) rotate(-45deg); }

/* ---------- Scrim ---------- */

.mnav-scrim{
  position:fixed; inset:0; z-index:7500;
  background:rgba(30,15,40,.5);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none;
  transition:opacity .34s var(--mn-ease);
}
.mnav-scrim.is-open{ opacity:1; pointer-events:auto; }

/* ---------- Drawer ---------- */

.mnav{
  position:fixed; top:0; right:0; bottom:0; z-index:7600;
  width:min(86vw, 340px);
  display:flex; flex-direction:column;
  background:var(--mn-bg);
  font-family:var(--mn-sans); color:var(--mn-ink);
  box-shadow:-24px 0 60px -30px rgba(30,15,40,.55);
  transform:translate3d(100%,0,0);
  transition:transform .40s var(--mn-ease);
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  /* keeps the panel clear of notches and the iOS home indicator */
  padding:max(18px, env(safe-area-inset-top)) 0 max(22px, env(safe-area-inset-bottom));
}
.mnav.is-open{ transform:translate3d(0,0,0); }

.mnav__head{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:6px 20px 18px;
  border-bottom:1px solid var(--mn-line);
}
.mnav__wordmark{
  margin:0; font-family:var(--mn-serif); font-style:italic; font-weight:700;
  font-size:22px; line-height:1; letter-spacing:-.02em; color:var(--mn-ink);
}
.mnav__close{
  flex:none; display:grid; place-items:center;
  width:38px; height:38px; border-radius:50%;
  border:1.5px solid var(--mn-line); background:transparent;
  color:var(--mn-ink); cursor:pointer;
  transition:background .26s var(--mn-ease), color .26s var(--mn-ease);
}
.mnav__close svg{ width:40%; height:40%; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.mnav__close:hover{ background:var(--mn-ink); color:var(--mn-bg); }
.mnav__close:focus-visible{ outline:3px solid var(--mn-orange); outline-offset:3px; }

.mnav__list{ margin:0; padding:8px 0 0; list-style:none; flex:1 1 auto; }
.mnav__list li{ border-bottom:1px solid var(--mn-line); }

.mnav__list a{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:17px 20px;
  font-size:17px; font-weight:600; letter-spacing:-.01em;
  color:var(--mn-ink); text-decoration:none;
  transition:color .22s var(--mn-ease), background .22s var(--mn-ease);
}
.mnav__list a:hover{ color:var(--mn-orange); }
.mnav__list a:focus-visible{ outline:3px solid var(--mn-orange); outline-offset:-3px; }

/* Current page gets the same orange marker the desktop nav uses. */
.mnav__list a[aria-current="page"]{ color:var(--mn-orange); }
.mnav__list a[aria-current="page"]::after{
  content:""; flex:none; width:18px; height:2.5px;
  border-radius:2px; background:var(--mn-orange);
}

.mnav__foot{ padding:20px; }
.mnav__cta{
  display:flex; align-items:center; justify-content:center;
  width:100%; padding:14px 18px;
  border:1.5px solid var(--mn-orange); border-radius:999px;
  background:transparent; color:var(--mn-orange);
  font-family:var(--mn-sans); font-size:15px; font-weight:600;
  text-decoration:none; cursor:pointer;
  transition:background .28s var(--mn-ease), color .28s var(--mn-ease);
}
.mnav__cta:hover{ background:var(--mn-orange); color:var(--mn-bg); }
.mnav__cta:focus-visible{ outline:3px solid var(--mn-ink); outline-offset:3px; }

.mnav__tag{
  margin:16px 0 0; padding:0 20px;
  font-size:12.5px; line-height:1.5; color:var(--mn-soft);
}

/* ---------- Breakpoint ---------- */

@media (max-width: 900px){
  .site-nav a:not(.btn-share){ display:none; }
  .mnav-toggle{ display:inline-flex; }

  /* Installed to the home screen there is no browser chrome, so a pinned
     header would sit under the status bar. */
  .site-header{ padding-top:max(14px, env(safe-area-inset-top)); }
}

/* Small handsets: the brand, the CTA and the toggle together overrun the
   header at 320px, so the gaps and the controls tighten up. Loaded after
   the page stylesheets, so these win on equal specificity. */
@media (max-width: 420px){
  .site-header{ gap:12px; }
  .site-nav{ gap:10px; }
  .brand__logo{ height:28px; }
  .btn-share{ font-size:12px; padding:.5em .9em; }
  .mnav-toggle{ width:38px; height:38px; }
}

/* Above the breakpoint the drawer must never be reachable, including by
   keyboard — a resize while it is open leaves it off-canvas otherwise. */
@media (min-width: 901px){
  .mnav, .mnav-scrim{ display:none; }
}

@media (prefers-reduced-motion: reduce){
  .mnav, .mnav-scrim, .mnav-toggle__bars i, .mnav__cta, .mnav__list a{
    transition-duration:.01ms;
  }
}
