/* =========================================================================
 * Component CSS. Colors, type and spacing all come from theme.json presets —
 * there are no raw hex values in this file on purpose, so a brand change is a
 * theme.json edit and nothing else.
 * ====================================================================== */

/* Quality floor ---------------------------------------------------------- */

:where(a:focus-visible),
:where(button:focus-visible),
:where(input:focus-visible),
:where(select:focus-visible),
:where(textarea:focus-visible),
:where(.wp-block-navigation-item__content:focus-visible) {
  outline: 2px solid var(--wp--preset--color--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

html { scroll-behavior: smooth; }

img, video { height: auto; max-width: 100%; }
figure.wp-block-image img { display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: .75em 1.25em;
  background: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--ink-deep);
  text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

h1, h2 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Shared utility classes applied from patterns ---------------------------- */

.is-eyebrow {
  font-family: var(--wp--preset--font-family--util);
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--yellow);
}

.is-lede {
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 300;
  color: var(--wp--preset--color--muted);
}

.is-note {
  font-family: var(--wp--preset--font-family--util);
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
}

/* Header ------------------------------------------------------------------ */

/* position:sticky only sticks within its parent's box. The block theme wraps
   the header in a template-part <div> that is exactly header-height, so the
   sticky header scrolled away instead of pinning. display:contents drops that
   wrapper from the box tree, making .wp-site-blocks (full page height) the
   header's containing block, so sticky actually holds. */
.wp-block-template-part:has(.site-header) {
  display: contents;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--wp--preset--color--ink) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--wp--custom--rule);
  transition: background .2s ease;
}

/* backdrop-filter makes the header the containing block for position:fixed
   descendants, which traps the mobile nav overlay inside the header's ~84px box
   instead of letting it cover the viewport — so the open menu looked empty.
   Drop the filter while the overlay is open; the full-screen menu hides whatever
   the frosted header was blurring anyway. */
.site-header:has(.wp-block-navigation__responsive-container.is-menu-open) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Admin bar must not sit on top of a sticky header. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header .header-inner {
  min-height: var(--wp--custom--header-height);
  transition: min-height .22s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--wp--preset--color--ink-deep) 94%, transparent);
}
.site-header.is-scrolled .header-inner {
  min-height: var(--wp--custom--header-height-compact);
}

.site-header .header-inner { width: 100%; }

/* The lockup is a 1080x800 artboard, so setting a WIDTH makes its height
   unpredictable — 132px wide came out 98px tall inside an 84px bar and pushed
   the whole header open. Size it by height and let width follow. */
.site-header .wp-block-site-logo img {
  height: 3.25rem;
  width: auto;
  max-width: none;
  transition: height .22s ease;
}
.site-header.is-scrolled .wp-block-site-logo img { height: 2.5rem; }

/* Menu items must never wrap mid-label. */
.site-header .wp-block-navigation-item__content { white-space: nowrap; }

.site-header .brand-tagline {
  font-family: var(--wp--preset--font-family--util);
  font-size: .625rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  margin: .25rem 0 0;
}
.site-header.is-scrolled .brand-tagline { display: none; }

/* Desktop nav underline. The mobile overlay is core's own — styled below. */
.site-header .wp-block-navigation-item__content {
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
}
.site-header .wp-block-navigation-item__content:hover {
  border-bottom-color: var(--wp--preset--color--gold);
}

/* Core switches to the hamburger at 600px. Between 600px and roughly 1000px
   the full menu plus the call-to-action genuinely does not fit — that is the
   squeeze. Push the switch out to 62rem. */
@media (max-width: 62rem) {
  .site-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none;
  }
  .site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }
  .site-header .header-cta { display: none; }
}

/* Core's overlay menu, restyled. */
.wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--wp--preset--color--ink-deep) !important;
  padding: clamp(1.25rem, 4vw, 3rem);
}
/* The desktop nav is flex/nowrap so it stays on one line. Core stacks the
   overlay's content wrapper when the menu opens, but NOT the inner list — so
   that list keeps the nowrap row and all 16 items overflow off-screen, leaving
   only the first ("Home") visible. Stack the inner list, full width, left. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  width: 100%;
  align-items: stretch !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0;
  width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid var(--wp--custom--rule-faint);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  width: 100%;
  justify-content: flex-start !important;
  text-align: left !important;
  padding: .95rem .25rem !important;
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xl);
  letter-spacing: .02em;
  text-transform: uppercase;
  border-bottom: none;
}

/* Submenu parents become drawers. Core force-expands submenus in the overlay
   and hides the toggle icon; we override both and drive the open state from a
   .gs-open class set by nav-drawer.js. Grid keeps the label and chevron on one
   row (flex-wrap would drop the chevron to its own line) with the submenu
   spanning the full width beneath. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu {
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation-item__content {
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 !important;
  background: transparent;
  border: 0;
  color: var(--wp--preset--color--yellow);
  cursor: pointer;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon svg {
  width: 1rem;
  height: 1rem;
  transition: transform .18s ease;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu.gs-open > .wp-block-navigation__submenu-icon svg {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon svg { transition: none; }
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation__submenu-container {
  grid-column: 1 / -1;
  grid-row: 2;
  display: none !important;
  width: 100% !important;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 0 .6rem 1rem !important;
  border: 0 !important;
  background: transparent !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu.gs-open > .wp-block-navigation__submenu-container {
  display: block !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
  border: 0 !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--body);
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: normal;
  padding: .45rem 0 !important;
  color: var(--wp--preset--color--muted);
}

/* Hero -------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; }

/* The hero photograph, shipped with the theme. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: image-set(
    url('../img/hero-taps.webp') type('image/webp'),
    url('../img/hero-taps.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center 38%;
}

/* Scrim. Two layers: a horizontal ramp that keeps the left column readable
   over any photograph, and a bottom fade that ties the section into the page
   below. Tuned against the tap-pull shot — if the image changes, re-check the
   headline against it rather than assuming these numbers still hold. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--wp--preset--color--ink-deep) 92%, transparent) 0%,
      color-mix(in srgb, var(--wp--preset--color--ink-deep) 78%, transparent) 42%,
      color-mix(in srgb, var(--wp--preset--color--ink-deep) 45%, transparent) 100%),
    linear-gradient(180deg, transparent 55%, var(--wp--preset--color--ink) 100%);
}

@media (max-width: 62rem) {
  /* Single column on mobile means text sits over the whole frame, so the
     scrim has to be flat rather than a side ramp. */
  .hero::before {
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--wp--preset--color--ink-deep) 80%, transparent) 0%,
      color-mix(in srgb, var(--wp--preset--color--ink-deep) 88%, transparent) 60%,
      var(--wp--preset--color--ink) 100%);
  }
}
.hero > * { position: relative; z-index: 2; }

.hero-title em {
  font-style: normal;
  color: var(--wp--preset--color--yellow);
  display: block;
}

.hero-lede {
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 300;
  max-width: 34ch;
}

/* Tap panel --------------------------------------------------------------- */

.tap-panel {
  background: var(--wp--preset--color--ink-raised);
  border: 1px solid var(--wp--custom--rule);
}

.tap-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--wp--custom--rule);
  padding-bottom: .85rem;
}

.tap-panel__head h2 { font-size: 1.35rem; letter-spacing: .04em; margin: 0; }

/* Taproom switch: segmented control in the panel head. Roving tabindex, so
   only the selected tab is a tab stop. */
.tap-switch {
  display: inline-flex;
  gap: .25rem;
  font-family: var(--wp--preset--font-family--util);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tap-switch__btn {
  appearance: none;
  margin: 0;
  padding: .35rem .55rem;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1;
  color: var(--wp--preset--color--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}
.tap-switch__btn:hover { color: var(--wp--preset--color--cream); }

/* Yellow (8.09:1) carries the active state; gold is a fill/border only. A
   leading live-dot marks the shown list. */
.tap-switch__btn[aria-selected="true"] {
  color: var(--wp--preset--color--yellow);
  border-color: var(--wp--custom--rule);
}
.tap-switch__btn[aria-selected="true"]::before {
  content: '';
  display: inline-block;
  width: .4rem; height: .4rem;
  margin-right: .4rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--wp--preset--color--yellow);
}

.tap-switch__btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--yellow);
  outline-offset: 2px;
}

.tap-region[hidden] { display: none; }

.tap-list { list-style: none; margin: 0; padding: 0; }

.tap-list li {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: .75rem;
  align-items: baseline;
  padding: .7rem 0;
  border-bottom: 1px solid var(--wp--custom--rule-faint);
}
.tap-list li:last-child { border-bottom: none; }

.tap-list .num { font-family: var(--wp--preset--font-family--util); font-size: .75rem; color: var(--wp--preset--color--muted); }
.tap-list .name { font-size: 1rem; }
.tap-list .style { display: block; font-size: .8125rem; color: var(--wp--preset--color--muted); }
.tap-list .abv {
  font-family: var(--wp--preset--font-family--util);
  font-size: .8125rem;
  color: var(--wp--preset--color--yellow);
  white-space: nowrap;
}

/* Reserved height stops the third-party menu embed shifting the page as it
   loads. Adjust to match the tallest menu you actually render. */
.menu-embed { min-height: 32rem; }

/* Medals ------------------------------------------------------------------ */

.medals-count {
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--xxxl);
  color: var(--wp--preset--color--yellow);
  line-height: .85;
  margin: 0;
}

.medals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: clamp(.75rem, 2vw, 1.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.medals-grid li {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--wp--custom--rule);
  background: var(--wp--custom--rule-faint);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--wp--preset--font-family--util);
  font-size: .5625rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  padding: .4rem;
  line-height: 1.25;
}
.medals-grid li img { border-radius: 50%; }

/* Locations --------------------------------------------------------------- */

.location-card {
  border: 1px solid var(--wp--custom--rule);
  background: var(--wp--preset--color--ink-deep);
  height: 100%;
}
.location-card h3 { margin-top: 0; }
.location-card .location-meta { color: var(--wp--preset--color--muted); font-size: .9375rem; margin: 0 0 .35rem; }
.location-card .location-hours {
  font-family: var(--wp--preset--font-family--util);
  font-size: .8125rem;
  color: var(--wp--preset--color--cream);
}

/* Events (markup comes from the events plugin) ---------------------------- */

.gse-list__items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wp--custom--rule); }

.gse-event {
  display: grid;
  gap: .35rem 1.75rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--wp--custom--rule);
}
@media (min-width: 48rem) {
  .gse-event { grid-template-columns: 11rem 1fr auto; align-items: baseline; }
}

.gse-event__when {
  font-family: var(--wp--preset--font-family--util);
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--yellow);
}
.gse-event__title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.35rem;
  text-transform: uppercase;
  margin: 0;
}
.gse-event__title a { text-decoration: none; color: var(--wp--preset--color--cream); }
.gse-event__title a:hover { color: var(--wp--preset--color--yellow); }
.gse-event__meta {
  font-family: var(--wp--preset--font-family--util);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  margin: 0;
}
.gse-event__excerpt { color: var(--wp--preset--color--muted); font-size: .9375rem; margin: .35rem 0 0; }

/* Footer ------------------------------------------------------------------ */

.site-footer { background: var(--wp--preset--color--ink-deep); border-top: 1px solid var(--wp--custom--rule); }
.site-footer .wp-block-heading {
  font-family: var(--wp--preset--font-family--util);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
}
