/* by.Apostrophe: shared styles for every page (menu, page frame).
   Each page keeps its own layout styles in its <style> block. */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #e1e1dd url(/assets/img/bya-f-plaster.jpg) center top / cover no-repeat; color: #000000; }
main { display: block; }
.bya-f { min-height: 100vh; min-height: 100svh; }
.bya-f a { color: inherit; }

/* ---------- Menu ---------- */
.bya-h {
  --bya-red: #9D1A26;
  --bya-nav: #000000;
  --bya-fs: clamp(14.3px, 1.43vw, 24.2px);
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 2.1vw 2.6vw 0 2.2vw;
  font-family: "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;
  font-weight: 400; font-size: var(--bya-fs); line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}
.bya-h ul { list-style: none; margin: 0; padding: 0; }
.bya-h a, .bya-h button {
  color: var(--bya-nav); text-decoration: none; font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  transition: color .2s;
}
.bya-h a:hover, .bya-h a:focus-visible, .bya-h button:hover, .bya-h button:focus-visible { color: var(--bya-red); }
.bya-h a[aria-current="page"], .bya-h .is-current > button { color: var(--bya-red); font-weight: 500; }

.bya-h-nav { display: flex; justify-content: space-between; align-items: flex-start; }
.bya-h-left, .bya-h-right { display: flex; gap: 1.45em; }
.bya-h-dd { position: relative; }
.bya-h-sub { position: absolute; left: .2em; top: 100%; padding-top: .1em; white-space: nowrap; display: none; }
.bya-h-dd::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: .4em; } /* keeps hover alive between Products and its list */
.bya-h-sub a { display: block; line-height: 1.2; }
.bya-h-dd:hover .bya-h-sub, .bya-h-dd:focus-within .bya-h-sub, .bya-h-dd.is-open .bya-h-sub { display: block; }
/* faucet collections: open when Faucets is clicked, and the other categories step aside */
.bya-h .bya-h-sub2 { display: none; padding: .1em 0 .3em 1em; font-size: .85em; letter-spacing: .02em; }
.bya-h-fc.is-open > .bya-h-sub2 { display: block; }
.bya-h-sub:has(> .bya-h-fc.is-open) > li:not(.bya-h-fc) { display: none; }
.bya-h-sub button { display: block; line-height: 1.2; text-align: left; }
.bya-h-sub2 a { line-height: 1.3; }

.bya-h-brand, .bya-h-burger { display: none; }
.bya-wm { font-family: "Times New Roman", Tinos, Times, serif; font-weight: 400; }
.bya-wm em { color: var(--bya-red, #9D1A26); font-style: italic; }

/* ---------- Back to top (same button as theapostrophegroup.com, in by. crimson) ---------- */
.bya-top {
  position: fixed; right: calc(26px + env(safe-area-inset-right)); bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 9;
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: #9D1A26; color: #fff; font: 400 1.05rem/1 "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .4s, transform .4s;
}
.bya-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.bya-top:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
@media (max-width: 760px) { .bya-top { right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); } }

/* Phones and narrow windows: wordmark + menu button, the menu opens full screen */
@media (max-width: 760px) {
  .bya-h { --bya-fs: 24.2px; padding: 5vw 6vw 0; display: flex; justify-content: space-between; align-items: center; }
  .bya-h.is-open { position: fixed; }
  .bya-h-brand { display: block; font-size: 19px; color: #000000; position: relative; z-index: 2; }
  .bya-h-burger { display: block; width: 32px; height: 22px; position: relative; z-index: 2; }
  .bya-h-burger span, .bya-h-burger::before, .bya-h-burger::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: #000000; transition: transform .25s, opacity .2s;
  }
  .bya-h-burger::before { top: 2px; } .bya-h-burger span { top: 10px; } .bya-h-burger::after { top: 18px; }
  .bya-h.is-open .bya-h-burger::before { transform: translateY(8px) rotate(45deg); }
  .bya-h.is-open .bya-h-burger span { opacity: 0; }
  .bya-h.is-open .bya-h-burger::after { transform: translateY(-8px) rotate(-45deg); }

  .bya-h-nav {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: flex-start; gap: 1.2em;
    padding: 26vw 8vw 10vw; background: #e1e1dd url(/assets/img/bya-f-plaster.jpg) center / cover no-repeat;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; overflow-y: auto;
  }
  .bya-h.is-open .bya-h-nav { opacity: 1; visibility: visible; transition: opacity .25s; }
  .bya-h-left, .bya-h-right { flex-direction: column; gap: 1.2em; }
  .bya-h-sub { display: block; position: static; padding: .5em 0 0 .9em; }
  .bya-h-sub a { line-height: 1.6; font-size: 20.9px; }
  /* phones: no pointer to hover with, so the collections are always listed */
  .bya-h .bya-h-sub2 { display: block; padding: 0 0 .3em 1em; }
  .bya-h-sub > li:not(.bya-h-fc) { display: list-item !important; }
  .bya-h-sub2 a { font-size: 17px; line-height: 1.55; }
  .bya-h-dd > button { cursor: default; }
  body.bya-menu-open { overflow: hidden; }
  /* leave room under the wordmark and menu button */
  main .bya-f > .bya-f-in:first-child, main .bya-ct-top > .bya-f-in { padding-top: 27vw; }
}
