/* The moving strip under the top photo of the Food Menu and Our Beers pages
   (added 29 Oct 2026), drawn by assets/ticker.js from the page's own menu
   cards. It copies the Live Music ribbon (assets/pages/live-music.css,
   .lm-ribbon) rule for rule: the logo yellow between two black lines, the
   words in capitals with a black diamond before each, and the black "Pause
   motion" button at the left end. No rule here is scoped to a page.

   The strip is always the same height, --ticker-h (the words' line and
   their room above and below, or the 48px button if that is taller, and
   the two 4px lines), so a page can place things on the photo above it
   knowing exactly where the photo ends. Every animation sits inside
   prefers-reduced-motion: no-preference and stops in the toolbar's high
   contrast mode and when "Pause motion" is pressed (html.lm-still, shared
   with the Live Music page). */

:root { --ticker-h: calc(max(48px, var(--fs-h4) * 2.6) + 8px); }

.ticker {
  position: relative;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  height: var(--ticker-h);
  overflow: hidden;
  background: var(--c-yellow);
  color: #000;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
}
.ticker__viewport { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.ticker__track,
.ticker__half { display: flex; flex: none; align-items: center; width: max-content; white-space: nowrap; }
.ticker__item {
  display: flex;
  align-items: center;
  font-family: var(--f-head);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}
/* the diamond between items belongs to the item after it, so an item and its
   diamond always come and go together */
.ticker__item::before {
  content: "";
  flex: none;
  width: .5em;
  height: .5em;
  margin: 0 1.15em;
  background: #000;
  transform: rotate(45deg);
}
/* ticker.js measures one run of the words in this, then removes it */
.ticker__probe {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: max-content;
  white-space: nowrap;
  visibility: hidden;
  pointer-events: none;
}

/* Standing still (reduced motion, the toolbar's high contrast, and without
   JavaScript): the words once, centred on one line with room at both ends.
   ticker.js leaves out any item that would not fit whole, so nothing is cut
   off at the edge, and the strip keeps its one line's height. */
.ticker:not(.is-live) .ticker__viewport,
html.a11y-contrast .ticker .ticker__viewport { padding: 0 32px; }
.ticker:not(.is-live) .ticker__track,
.ticker:not(.is-live) .ticker__half,
html.a11y-contrast .ticker .ticker__track,
html.a11y-contrast .ticker .ticker__half { flex-wrap: wrap; justify-content: center; align-self: flex-start; width: 100%; white-space: normal; }
.ticker:not(.is-live) .ticker__item,
html.a11y-contrast .ticker .ticker__item { text-align: center; }
.ticker:not(.is-live) .ticker__track > .ticker__item:first-child::before,
.ticker:not(.is-live) .ticker__half:first-child > .ticker__item:first-child::before,
html.a11y-contrast .ticker .ticker__half:first-child > .ticker__item:first-child::before { display: none; }
html.a11y-contrast .ticker .ticker__half--clone,
html.a11y-contrast .ticker .ticker__item--rep,
html.a11y-contrast .ticker .ticker__item.is-off { display: none; }
@media (prefers-reduced-motion: reduce) {
  .ticker .ticker__viewport { padding: 0 32px; }
  .ticker .ticker__track,
  .ticker .ticker__half { flex-wrap: wrap; justify-content: center; align-self: flex-start; width: 100%; white-space: normal; }
  .ticker .ticker__item { text-align: center; }
  .ticker .ticker__half:first-child > .ticker__item:first-child::before { display: none; }
  .ticker .ticker__half--clone,
  .ticker .ticker__item--rep,
  .ticker .ticker__item.is-off { display: none; }
}
/* Still, the one line of words sits in the middle of the strip: the track
   starts at the top (so a cut item wraps out of sight below), and the line
   is as tall as the strip inside its two black lines */
.ticker:not(.is-live) .ticker__item,
html.a11y-contrast .ticker .ticker__item { min-height: calc(var(--ticker-h) - 8px); }
@media (prefers-reduced-motion: reduce) {
  .ticker .ticker__item { min-height: calc(var(--ticker-h) - 8px); }
}
@media (max-width: 767px) {
  .ticker:not(.is-live) .ticker__viewport,
  html.a11y-contrast .ticker .ticker__viewport { padding: 0 16px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .ticker .ticker__viewport { padding: 0 16px; }
}

/* Pause motion sits at the LEFT end: the accessibility toolbar is fixed at
   the right edge, half way down the window, so a button on the right could
   be covered */
.ticker__pause {
  display: none;
  flex: none;
  align-items: center;
  gap: .55em;
  min-width: 48px;
  min-height: 48px;
  padding: 0 1.1em;
  border: 0;
  border-right: 4px solid #000;
  background: #000;
  color: #fff;
  font-family: var(--f-head);
  font-size: .85em;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.ticker__pause[hidden] { display: none !important; }
.ticker__pause:hover { color: var(--c-yellow); }
.ticker__pause:focus-visible { outline: 3px solid var(--c-yellow); outline-offset: -6px; }
/* Moving: two pause bars. Still: a circular arrow, "Resume motion". Never a
   play triangle: the strip has no sound and must not look like a player. */
.ticker__icon { display: block; flex: none; width: 1.05em; height: 1.05em; fill: currentColor; }
.ticker__icon--resume { display: none; }
.ticker.is-paused .ticker__icon--pause { display: none; }
.ticker.is-paused .ticker__icon--resume { display: block; }
/* On a phone the button is its icon alone; its words stay for screen readers */
@media (max-width: 519px) {
  .ticker__pause { padding: 0 .8em; }
  .ticker__pause [data-ticker-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Phones (America, 29 Oct 2026: the strips "should be smaller too, similar size to the one
   you added to the home page"): a thin 44px strip with 2px lines and smaller capitals, and
   Pause motion a 44px wide button the strip's full height. --ticker-h follows, so whatever a
   page places by it stays right. The Live Music ribbon does the same (live-music.css). */
@media (max-width: 767px) {
  :root { --ticker-h: 44px; }
  .ticker { border-top-width: 2px; border-bottom-width: 2px; }
  .ticker__item { font-size: .8125em; letter-spacing: .08em; }
  .ticker__item::before { width: .45em; height: .45em; margin: 0 .9em; }
  .ticker__pause { min-width: 44px; min-height: 40px; padding: 0 .75em; border-right-width: 2px; }
  html.a11y-contrast .ticker .ticker__item { min-height: 40px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .ticker .ticker__item { min-height: 40px; }
}

/* ---------- Motion, only when welcome ---------- */
@keyframes ticker-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: no-preference) {
  html.tk-js:not(.a11y-contrast) .ticker.is-live .ticker__pause { display: inline-flex; }
  html.tk-js:not(.a11y-contrast) .ticker.is-live .ticker__track {
    animation: ticker-marquee var(--ticker-dur, 60s) linear infinite;
    will-change: transform;
  }
  /* paused, the strip holds where it is */
  html.tk-js:not(.a11y-contrast) .ticker.is-paused .ticker__track,
  html.tk-js.lm-still .ticker__track,
  html.tk-js:not(.a11y-contrast) .ticker.is-live .ticker__viewport:hover .ticker__track { animation-play-state: paused; }
}

@media print {
  .ticker { display: none; }
}

/* ---------- High contrast mode (toolbar) ----------
   site.css paints every box black with white words; the diamonds go white */
html.a11y-contrast .ticker__item::before { background-color: #fff !important; }
