/*
 * What the chrome behavior needs to be true in CSS.
 *
 * Deliberately small. The look of the header belongs to the site's own design
 * system, pushed by Orca into the Elementor kit; this file only carries the
 * three states the script switches between, and it carries them with enough
 * force to survive whatever the theme has to say about position.
 */

/* Stands in for the header while it is out of flow, so the page does not jump
   up by a header's height at the moment it pins. */
.iw-header-space { height: 0; }

/* Element-agnostic: since 1.4.4 the pin target is the .site-header BAND, not
   the theme template wrapper - the top bar above it must scroll away.

   NO will-change. It looked like a free performance hint and it was a
   CONTAINING BLOCK: any fixed-position descendant - the full-screen mobile
   nav overlay first among them - positions against the header's own box
   instead of the viewport, so `inset: 0` rendered the menu as a strip exactly
   one header tall ("navigation doesn't exist, really" - Nick, 30 Aug). The
   transform the transition animates creates the same containment only while
   the header is .iw-away - when the menu is closed anyway. */
.iw-pinned {
  position: fixed !important;
  top: var(--iw-pin-top, 0); left: 0; right: 0;
  z-index: 999;
  transition: transform .24s ease;
}

/* The WordPress admin bar sits above everything for logged-in users, and a
   header pinned to zero hides under it. 32px, and 46px on a phone, are the two
   heights that bar has ever had. A VARIABLE, not just a top: the hide
   transform below has to travel the same extra distance. */
body.admin-bar .iw-pinned { --iw-pin-top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .iw-pinned { --iw-pin-top: 46px; }
}

/* Gone on the way down. Transform only: it does not reflow, and it is the one
   property a compositor can animate without touching layout. THE OFFSET RIDES
   ALONG: a header pinned 46px down that slides up by only its own height
   leaves a 46px slice of itself on screen forever ("doesn't disappear" -
   Nick, 30 Aug, in the admin bar). */
.iw-pinned.iw-away { transform: translateY(calc(-100% - var(--iw-pin-top, 0px))); }

/* The frame it pins on, and only that frame. */
.iw-no-transition { transition: none !important; }

/* Anything the site sticks under the header reads this rather than a constant. */
:root { --iw-header-h: 0px; }

@media (prefers-reduced-motion: reduce) {
  .iw-pinned { transition-duration: .01ms !important; }
}

/* ---- the mobile quick action bar --------------------------------------- */
/*
 * ON A PHONE THE PRIMARY ACTION LEAVES THE HEADER. A one-handed grip puts the
 * thumb at the bottom of the device; the top corners are the hardest region to
 * reach and the one most likely to need a hand shuffle. The single action the
 * site exists to get does not live there.
 *
 * The bar is BUILT FROM THE PAGE, never invented: the primary is the header's
 * own button, cloned, and the secondaries are the tel: and map links the site
 * already carries. No header button and no phone number means no bar.
 *
 * It reveals on the same 100px pass that compacts the header rather than being
 * present from the first frame, and it ignores scroll direction (rule
 * chrome.quick-bar-behavior) - chrome.js decides when; this file only draws
 * the two states.
 */
.iw-cta-bar {
  position: fixed; z-index: 55;
  left: 0; right: 0; bottom: 0;
  display: none;
  padding: 12px var(--gutter, 20px) calc(12px + env(safe-area-inset-bottom, 0px));
  /* A SOLID SURFACE WITH A HAIRLINE, never a gradient fade (rule
     chrome.mobile-action-bar-solid). The fade let body copy show through the
     top half of the bar, so the buttons sat over half-legible text; a solid
     ground with a hairline reads as a deliberate piece of chrome. */
  background: var(--ground, #fff);
  border-top: 1px solid var(--hairline, rgba(0,0,0,.12));
  transform: translateY(110%);
  transition: transform .24s ease;
  pointer-events: none;
}
@media (max-width: 900px) { .iw-cta-bar { display: block; } }
.iw-cta-bar.iw-show { transform: translateY(0); pointer-events: auto; }

.iw-cta-row { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; align-items: stretch; }

/* THE BAR IS ACCENT ONLY - no brand color anywhere in it ("mobile action bar
   should only be accent color, no brand color. solid accent with white/text
   (best contrast) and outline/secondary button" - Nick, 30 Aug). The primary
   is the kit's SOLID button: accent fill, ink decided by contrast and
   published by the kit as --on-accent. The secondary is the OUTLINE button:
   accent border, accent text, ground fill. Both wear the kit's 2px border so
   the pair is the same two buttons the rest of the site uses.

   !important on the primary's colors, deliberately: it is a CLONE of the
   header's CTA and arrives wearing whatever button classes and theme-style
   colors the header gave it - which is exactly how a red bar shipped with
   brand-yellow text on it. */
.iw-cta-primary {
  flex: 1 1 auto; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 18px;
  border-radius: var(--radius, 6px);
  background: var(--accent, var(--chrome, #111)) !important;
  color: var(--on-accent, #fff) !important;
  border: 2px solid var(--accent, var(--chrome, #111)) !important;
  font-weight: 650; text-decoration: none; text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 8px 22px rgba(0,0,0,.08);
}
.iw-cta-primary:hover, .iw-cta-primary:focus-visible { color: var(--on-accent, #fff) !important; }

/* Secondaries are icon over label, fixed width - the outline half of the
   pair. A shortcut for somebody who already knows what they want, not a
   second offer, which is why they carry NO FILL (rule
   chrome.quick-bar-secondaries-quiet): transparent, so the bar's own ground
   is the only surface, and the accent outline is all that marks them. The
   primary keeps the full button and takes the rest of the row. */
.iw-quick {
  flex: 0 0 64px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  min-height: 46px; padding: 6px 2px; border-radius: var(--radius, 6px);
  background: transparent !important; border: 2px solid var(--accent, var(--ink, #222));
  color: var(--accent, var(--ink, #222)); text-decoration: none; box-shadow: none;
}
.iw-quick span { font-size: 10px; font-weight: 650; letter-spacing: .02em; }
.iw-quick svg { width: 18px; height: 18px; color: currentColor; }

/* The header's own button is the thing that MOVED, so it is not also still up
   there. Hidden only where the bar exists, and only when one was built.
   THE MOVED WIDGET, NOT EVERY BUTTON WIDGET: chrome.js marks the wrapper
   whose anchor it cloned with .iw-cta-moved. The old blanket selector hid
   every button widget in the header, which was fine while the CTA was the
   only one - the commerce header's account door is a button widget too,
   and it vanished on every phone (found 9 Sep). */
@media (max-width: 900px) {
  body.iw-has-cta-bar .elementor-location-header .iw-cta-moved,
  body.iw-has-cta-bar .elementor-location-header .iw-header-cta { display: none !important; }
}

/* ---- back to top ------------------------------------------------------- */
/* Earned later than the action bar - a screen and a half, by which point
   scrolling back by hand is a real cost. Shown at every width: a long page is
   long on a laptop too. It sits ABOVE the action bar, never beside it, so it
   cannot compete with the thing it must not compete with. */
/* A round accent control, not a ghost. The white version disappeared into
   the ground it floats over, and on the stale-CSS site it rendered as a
   bordered rectangle squatting on the legal line ("terribly ugly" - Nick,
   1 Sep). The accent circle is the one the quick-action bar already taught
   the thumb to expect. */
/* body button... because the KIT styles bare button elements now -- the
   Buttons theme-style section lands on every <button> at kit scope, which
   squared this circle and painted it like a CTA. Same properties, one
   specificity step up, no !important. */
body button.iw-to-top, .iw-to-top {
  position: fixed; right: var(--gutter, 20px); bottom: var(--gutter, 20px);
  z-index: 54; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #b45309); color: var(--on-accent, #fff);
  border: 0; padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.18), 0 8px 22px rgba(0,0,0,.14);
  cursor: pointer; opacity: 0; pointer-events: none;
  /* NOT REACHABLE BY TAB WHILE HIDDEN (rule a11y.back-to-top-not-tabbable-hidden).
     Opacity and pointer-events hide it from the eye and the mouse only; a
     keyboard user tabbed onto an invisible button. visibility: hidden takes it
     out of the tab order, and its transition is DELAYED by the fade's length
     so the fade out still plays before it goes. chrome.js also drops its
     tabindex, for a theme that overrides visibility. */
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  transform: translateY(8px);
}
.iw-to-top:hover { filter: brightness(1.06); }
body button.iw-to-top.iw-show, .iw-to-top.iw-show {
  opacity: 1; pointer-events: auto; transform: translateY(0);
  /* Visible at once on the way in, so the fade in is seen. */
  visibility: visible; transition-delay: 0s;
}
.iw-to-top svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  body.iw-has-cta-bar .iw-to-top { bottom: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .iw-cta-bar, .iw-to-top, body.iw-menu-panel .elementor-nav-menu--dropdown {
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
}

/* A LONG EMAIL NEVER PUSHES THE PAGE SIDEWAYS (playbook §4b, rule
   chrome.mobile-menu-overrides). An address is one unbreakable word, and on a
   phone the footer's and the contact panel's run past the window edge; anywhere
   lets it fold where it must. The panel's <wbr> before the @ still picks the
   nicer fold while it fits. */
[class*="-foot-email"], [class*="-foot-addr"], [class*="-fact"] b, a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

/* ---- the mobile navigation --------------------------------------------- */
/*
 * BELOW 900px THE INLINE NAVIGATION BECOMES A FULL SCREEN OVERLAY, NOT A
 * DRAWER. A drawer has to decide how wide it is and then justify the strip of
 * dimmed page beside it; an overlay has one job and does it at any screen size.
 * Links are set large and spaced, because the thing being tapped is a thumb
 * rather than a line of text.
 *
 * THE CALL TO ACTION DOES NOT GO IN HERE. It is in the quick action bar, where
 * it needs no gesture first. Burying the one action the site exists to get
 * behind a tap is the most expensive mistake in a mobile header.
 *
 * Scoped to body.iw-menu-panel, which chrome.js sets only when it found a real
 * panel to take over.
 */
@media (max-width: 900px) {
  body.iw-menu-panel .elementor-nav-menu--dropdown {
    position: fixed !important;
    inset: 0 !important;
    z-index: 60;
    width: auto !important; max-width: none !important;
    display: flex !important; flex-direction: column; justify-content: center;
    padding: var(--gutter, 24px);
    background: var(--dark, #14110f);
    overflow-y: auto;
    /* HIDDEN WITH VISIBILITY, NEVER display: none (rule
       chrome.mobile-nav-overlay). Hidden this way the closed panel's links
       leave the tab order and the accessibility tree, and the panel can still
       fade; Elementor's own scaleY/max-height collapse is switched off so the
       one state that shows it is body.iw-menu-open, which chrome.js keeps. */
    transform: none !important; max-height: none !important;
    visibility: hidden; opacity: 0;
    transition: opacity .2s ease, visibility 0s linear .2s;
  }
  body.iw-menu-panel.iw-menu-open .elementor-nav-menu--dropdown {
    visibility: visible; opacity: 1; transition-delay: 0s;
  }
  /* 44px, HEIGHT AND WIDTH (rule a11y.tap-target-44). Elementor sizes its
     toggle from the icon plus a quarter-em of padding - about 32px - and the
     trigger is the one control every phone visitor needs. The chrome's
     account icons are drawn at 15px in the top bar; the TARGET grows around
     them, the glyph does not. A button keeps its padding and gains a floor:
     height is what a thumb finds. */
  .elementor-location-header .elementor-menu-toggle,
  .elementor-social-icon {
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .elementor-widget-button .elementor-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .elementor-location-header [class*="-account-slot"] .elementor-button { min-width: 44px; }
  form[data-qf] button { min-height: 44px; }
  /* !important AND A STEP UP (playbook §4b, rule chrome.mobile-menu-overrides).
     The kit's compact and over-photo header rules color `.site-header .nav a`
     with !important at (0,3,1), and the panel's links are inside .nav - so
     once the reader had scrolled, a (0,2,2) rule lost and the panel showed
     ink links on the dark overlay. This one is (0,4,2). */
  body.iw-menu-panel .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item,
  body.iw-menu-panel .elementor-nav-menu--dropdown a {
    color: #fff !important;
    font-size: clamp(22px, 6vw, 34px); font-weight: 650;
    padding: 10px 0 !important; border: 0 !important;
    background: none !important;
  }
  body.iw-menu-panel .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item:hover,
  body.iw-menu-panel .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item:focus-visible,
  body.iw-menu-panel .elementor-nav-menu--dropdown a:hover,
  body.iw-menu-panel .elementor-nav-menu--dropdown a:focus-visible {
    color: var(--accent, #fff) !important;
  }
  /* The toggle sits above the panel it opened, so it is still the way out. */
  body.iw-menu-open .elementor-menu-toggle { position: relative; z-index: 61; color: #fff; }
}

/* ---- the pinned header and the sticky category strip ------------------- */
/*
 * TWO PIECES OF CHROME, ONE TOP EDGE. Orca's jump strip sticks to
 * top: var(--chrome-h) and this plugin pins the header with position: fixed -
 * two systems that had never heard of each other, so on Bennie's menu page
 * they both took the top of the viewport and interleaved into one unreadable
 * bar. The header's owner (this file) publishes its height as --iw-header-h;
 * the strip reads it here, whatever project prefix its class carries.
 *
 * THE OFFSET TRACKS THE HEADER'S VISIBLE HEIGHT, LIVE (Nick, 30 Aug). While
 * the header is hidden on a downward scroll the strip rides at top: 0; the
 * moment the header returns it pushes the strip down by its own height. The
 * transition is what makes that a push instead of a jump.
 *
 * --iw-header-vis is this plugin's live answer; --chrome-h is Orca's probe
 * and only the fallback for pages where this script never ran.
 */
[class*="-nav-strip"][class*="-stick"] {
  top: var(--iw-header-vis, var(--chrome-h, 0px)) !important;
  transition: top .24s ease;
}
@media (prefers-reduced-motion: reduce) {
  [class*="-nav-strip"][class*="-stick"] { transition: none; }
}
