/* ============================================================
   Shiva Temple Manchester — the shell

   The header and the footer, lifted out of main.css so the
   booking app at /book/ can wear the same ones. Both are
   generated by build.js, so there is one copy of the markup and
   one copy of the styling; neither can drift from the other.

   The rules here were chosen by reading the classes the
   generated shell actually uses, not by matching a prefix. An
   earlier attempt matched \bmenu\b and friends, which silently
   skipped every BEM child — .menu__link, .foot__top,
   .topbar__in, .submenu — because an underscore is a word
   character. The main site kept working, since it still loads
   main.css; only the booking pages fell apart.

   What is NOT here, deliberately: .btn, .btn--ghost and .muted.
   Those are utilities the booking app defines for itself, and
   two definitions on one page would fight. Each stylesheet keeps
   its own, and since ticket 01 they resolve through the same
   tokens.

   The site's mobile navigation is .site-drawer, not .drawer:
   the booking app's .drawer is its event panel.
   ============================================================ */

/* ---------------------------------------------------------------------------
   The shell brings its own reset.

   These rules are the handful main.css sets globally that the header and
   footer quietly depend on: lists without bullets, buttons without the
   browser's grey box, images that behave, icons sized to the text. A page that
   loads main.css gets them anyway; the booking pages do not, and the first
   time they wore this header the topbar came out as a bulleted list and the
   drawer's section buttons as grey 2px-outset boxes.

   They are scoped to the shell rather than declared globally, because the
   booking app has a reset of its own and the two must not argue.
   -------------------------------------------------------------------------- */
/* Every selector here is wrapped in :where(), which contributes no
   specificity. That matters: these mirror element-level rules from main.css,
   and a scoped version like `.site-head a {color:inherit}` would score (0,1,1)
   and outrank the component rules it is meant to sit beneath. It did, on the
   first attempt — the Donate button quietly changed colour, because .btn is
   only (0,1,0). Written this way they beat the browser's defaults and nothing
   else, which is exactly the job. */
:where(.topbar, .site-head, .site-drawer, .foot) ul,
:where(.menu, .foot__links, .socials) {
  margin: 0; padding: 0; list-style: none;
}
:where(.topbar, .site-head, .site-drawer, .foot) button,
:where(.burger, .site-drawer__top) {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
:where(.topbar, .site-head, .foot) img { max-width: 100%; display: block; }
:where(.topbar, .site-head, .site-drawer, .foot) svg {
  width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.18em;
}
:where(.topbar, .site-head, .site-drawer, .foot) a { color: inherit; text-decoration: none; }

.wrap{width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--gutter)}

.small{font-size:var(--t-small)}

.btn--solid{--btn-fg:var(--ink); background:linear-gradient(100deg,var(--saffron),var(--marigold)); border-color:transparent}

.btn--solid::after{background:linear-gradient(100deg,var(--marigold),var(--sand-deep))}

.btn--solid:hover{color:var(--ink)}

.topbar{
  background:var(--paper); border-bottom:1px solid var(--hair-soft);
  font-size:.76rem; letter-spacing:.06em; color:var(--muted);
}

.topbar__in{display:flex; align-items:center; justify-content:space-between; gap:var(--s5); min-height:40px; flex-wrap:wrap}

.topbar a:hover{color:var(--brand-red)}

.topbar__list{display:flex; gap:var(--s5); flex-wrap:wrap; align-items:center}

.topbar__list li{display:flex; align-items:center; gap:.45em; white-space:nowrap}
@media(max-width:720px){ .topbar__list{gap:var(--s3)} }

.topbar svg{width:13px; height:13px; color:var(--gold-deep); flex:none}

@media(max-width:720px){ .topbar__meta{display:none} }

/* Phones: the phone and email links were 21px high. They look the same, but an invisible
   strip makes the part that answers a finger about 45px high without making the bar taller:
   it starts at the top of the screen and runs a few pixels into the header, so it sits above
   the header (z-index 90, the header is 80). */
@media(max-width:720px){
  .topbar__list a{position:relative}
  .topbar__list a::after{content:""; position:absolute; top:-10px; bottom:-14px; left:-8px; right:-8px; z-index:90}
}

.site-head{position:sticky; top:0; z-index:80; transition:background .4s var(--ease), box-shadow .4s var(--ease);
  view-transition-name:site-head}

.site-head::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:linear-gradient(180deg, rgba(250,245,231,.97), rgba(250,245,231,.92));
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
}

.site-head.is-stuck::before{background:var(--paper); border-bottom:1px solid var(--hair-soft); box-shadow:0 10px 28px -22px rgba(42,31,18,.45)}

.nav{display:flex; align-items:center; justify-content:space-between; gap:var(--s4); min-height:102px; transition:min-height .4s var(--ease)}

.site-head.is-stuck .nav{min-height:82px}

.brand{display:flex; align-items:center; flex:none; text-decoration:none}

.brand__logo{display:block; line-height:0}

.brand__logo img{width:100%; height:auto; display:block}

.brand__logo--head{width:168px; transition:width .4s var(--ease)}

.site-head.is-stuck .brand__logo--head{width:138px}

.brand__logo--full{width:min(250px,72vw)}

@media(max-width:640px){
  .brand__logo--head{width:132px}
  .site-head.is-stuck .brand__logo--head{width:118px}
}

.menu{display:none}

@media(min-width:1140px){ .menu{display:flex; align-items:center; gap:2px} }

.menu__item{position:relative}

.menu__link{
  display:flex; align-items:center; gap:.35em; padding:.85em .58em;
  font-size:.75rem; font-weight:500; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink-soft); transition:color .3s var(--ease); white-space:nowrap;
}

.menu__link::after{
  content:""; position:absolute; left:.58em; right:.58em; bottom:.45em; height:1px;
  background:var(--brand-red); transform:scaleX(0); transform-origin:left;
  transition:transform .45s var(--ease-out);
}

.menu__item:hover .menu__link,.menu__link[aria-current="page"]{color:var(--brand-red)}

.menu__item:hover .menu__link::after,.menu__link[aria-current="page"]::after{transform:scaleX(1)}

.menu__caret{width:9px; height:9px; opacity:.6; transition:transform .35s var(--ease)}

.menu__item:hover .menu__caret{transform:rotate(180deg)}

.submenu{
  position:absolute; top:100%; left:50%; translate:-50% 0; min-width:262px; max-width:min(300px,92vw);
  background:linear-gradient(170deg,#FFFDF6,#F3EAD4);
  border:1px solid var(--hair); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lift); padding:var(--s3);
  opacity:0; visibility:hidden; transform:translateY(10px);
  transition:opacity .3s var(--ease), transform .35s var(--ease-out), visibility .3s;
}

.menu__item:hover .submenu,.menu__item:focus-within .submenu{opacity:1; visibility:visible; transform:translateY(0)}

.submenu::before{
  content:""; position:absolute; top:-8px; left:0; right:0; height:8px;
}

.submenu a{
  display:block; padding:.7em .9em; font-size:.85rem; color:var(--ink-soft);
  border-radius:var(--radius); border-left:1px solid transparent; transition:.3s var(--ease);
}

.submenu a:hover{background:rgba(246,183,38,.20); color:var(--brand-red); border-left-color:var(--gold-deep); padding-left:1.15em}

.submenu a span{display:block; font-size:.75rem; color:var(--muted-dim); letter-spacing:.02em; margin-top:2px}

.submenu a:hover span{color:var(--muted)}

.nav__cta{display:none}

@media(min-width:1140px){ .nav__cta{display:inline-flex; flex:none; padding:.8em 1.35em; font-size:.75rem; letter-spacing:.13em} }

@media(min-width:1440px){
  .menu{gap:4px}
  .menu__link{padding:.85em .72em; letter-spacing:.09em}
  .menu__link::after{left:.72em; right:.72em}
  .nav__cta{padding:.9em 1.7em; letter-spacing:.16em}
}

.burger{display:flex; flex-direction:column; justify-content:center; gap:5px; width:48px; height:48px; align-items:center; flex:none}

@media(min-width:1140px){ .burger{display:none} }

.burger span{display:block; width:24px; height:1.5px; background:var(--ink); transition:.4s var(--ease)}

.burger[aria-expanded="true"] span:nth-child(1){transform:translateY(6.5px) rotate(45deg)}

.burger[aria-expanded="true"] span:nth-child(2){opacity:0}

.burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-6.5px) rotate(-45deg)}

.site-drawer{
  position:fixed; inset:0; z-index:90; background:linear-gradient(165deg,#FBF7EB,#F1E6CE);
  padding:calc(84px + var(--s5)) var(--gutter) var(--s8);
  overflow-y:auto; transform:translateX(100%); visibility:hidden;
  transition:transform .5s var(--ease-out), visibility .5s;
}

.site-drawer.is-open{transform:translateX(0); visibility:visible}

@media(min-width:1140px){ .site-drawer{display:none} }

.site-drawer__group{border-bottom:1px solid var(--hair-soft)}

.site-drawer__top{
  display:flex; align-items:center; justify-content:space-between; width:100%;
  padding:1.05em 0; font-family:var(--display); font-size:1.4rem; color:var(--ink); text-align:left;
}

.site-drawer__top svg{width:14px; height:14px; color:var(--gold-deep); transition:transform .35s var(--ease)}

.site-drawer__top[aria-expanded="true"]{color:var(--brand-red)}

.site-drawer__top[aria-expanded="true"] svg{transform:rotate(45deg)}

.site-drawer__panel{display:grid; grid-template-rows:0fr; transition:grid-template-rows .45s var(--ease-out)}

.site-drawer__panel>div{overflow:hidden}

.site-drawer__top[aria-expanded="true"]+.site-drawer__panel{grid-template-rows:1fr}

.site-drawer__panel a{display:block; padding:.62em 0 .62em 1.1em; font-size:.95rem; color:var(--muted); border-left:1px solid var(--hair-soft)}

.site-drawer__panel a:hover{color:var(--brand-red)}

.site-drawer__panel>div{padding-bottom:var(--s4)}

.site-drawer__foot{margin-top:var(--s7); display:grid; gap:var(--s4)}

@media print {
  .nav, .topbar, .foot, .site-drawer, .reader-tools, .reader-jump, .crumbs,
  .btn-row, .ribbon{display:none !important}
}

.foot{background:linear-gradient(180deg,var(--paper-2),var(--paper-3)); border-top:1px solid var(--hair); position:relative}

.foot__top{padding-block:clamp(3.5rem,7vw,5.5rem); display:grid; gap:var(--s7)}

@media(min-width:900px){ .foot__top{grid-template-columns:1.5fr 1fr 1fr 1.2fr} }

@media(min-width:1140px){ .foot__top{grid-template-columns:1.3fr 1fr 1fr 1fr 1.15fr} }

.foot h2, .foot h3{font-size:.75rem; letter-spacing:.26em; text-transform:uppercase; color:var(--gold-deep); font-family:var(--body); font-weight:600; margin-bottom:var(--s5)}

.foot__links li+li{margin-top:.62em}

.foot__links a{font-size:.9rem; color:var(--muted); transition:.3s var(--ease)}

.foot__links a:hover{color:var(--brand-red); padding-left:5px}

/* The footer's text links are short lines, 18 to 22px high. Invisible padding above and
   below makes each one about 26px high to tap (24 is the WCAG minimum). In the link
   columns the links sit in a line of text, where vertical padding moves nothing; the
   bottom row is a flex row, where it would, so an equal negative margin cancels it. */
.foot__links a{padding-block:4px}
.foot__legal a{padding-block:4px; margin-block:-4px}

.foot__brand p{font-size:.9rem; color:var(--muted); max-width:38ch}

.foot__addr{font-size:.9rem; color:var(--muted); font-style:normal; line-height:1.9}

.foot__addr a:hover{color:var(--brand-red)}

.socials{display:flex; gap:var(--s3); margin-top:var(--s5)}

.socials a{
  width:40px; height:40px; display:grid; place-items:center;
  border:1px solid var(--hair-soft); border-radius:50%; color:var(--muted); transition:.4s var(--ease);
}

.socials a:hover{border-color:var(--gold-deep); color:var(--brand-red); transform:translateY(-3px)}

.socials svg{width:17px; height:17px}

.foot__bar{
  border-top:1px solid var(--hair-soft); padding-block:var(--s5);
  display:flex; flex-wrap:wrap; gap:var(--s4); justify-content:space-between; align-items:center;
  font-size:.78rem; color:var(--muted-dim);
}

.foot__bar a:hover{color:var(--brand-red)}

.foot__legal{display:flex; flex-wrap:wrap; gap:var(--s5)}

.skip{position:absolute; left:-9999px; z-index:200; padding:1rem 1.5rem; background:var(--saffron); color:var(--ink); font-weight:600}

.skip:focus{left:var(--gutter); top:1rem}

@media print {
  .site-head,.site-drawer,.foot,.hero__bg{display:none !important}
}

.hero .btn:not(.btn--solid){color:var(--on-photo); border-color:rgba(255,253,247,.45)}

.hero .btn:not(.btn--solid):hover{color:var(--ink); border-color:var(--marigold)}
