/* ============================================================
   518 Official — WB PARTY / KYLE RICHH ticket push
   css/ticket.css?v=1 — loads AFTER site.css on every page.

   Four parts, one job (sell Sat Sept 12):
     1. .ticket-bar   permanent bar pinned above the header
     2. .neon-tix     flashing neon TICKETS sign, fixed, all pages
     3. .flyer-head   the event flyer at the head of every page
     4. announce      popup restyle (flyer + email/phone funnel)

   COLOR LAW (tokens.css): cobalt is page chrome, DROP AMBER is
   commerce-only. Tickets are commerce, so the bar and the neon
   sign are amber — and text ON amber is --bg, never ivory.

   FLASH SAFETY: the neon pulse runs at ~0.83Hz (1.2s cycle),
   far under the 3-flashes-per-second seizure threshold, and it
   stops dead under prefers-reduced-motion / .motion-paused.
   Nothing here animates layout — opacity/transform/filter only.
   ============================================================ */

:root {
  --tbar-h: 2.75rem;          /* 44px — the pinned ticket bar */
  --chrome-h: calc(var(--tbar-h) + var(--header-h));
}

@media (max-width: 640px) {
  :root { --tbar-h: 3.5rem; } /* wraps to two lines on small screens */
}

/* The whole fixed chrome moves down by the bar's height. */
.site-header { top: var(--tbar-h); }
.page-top { padding-top: calc(var(--chrome-h) + var(--sp-7)); }
html { scroll-padding-top: calc(var(--chrome-h) + 1rem); }

/* Pages that open DIRECTLY on the flyer band (gallery, wall, archive wrap their
   whole page in one <section>, so the band is the first child of <main> and has
   no hero to sit under) must budget for the fixed chrome themselves. */
main > .flyer-head:first-child { padding-top: calc(var(--chrome-h) + var(--sp-5, 2rem)); }

/* The mobile menu overlay starts at the top of the viewport; without this its
   first item ("Home") renders under the ticket bar + header. */
.menu-overlay { padding-top: var(--chrome-h); }

/* While a modal owns the page the bar must not paint on top of it. It is inert
   either way, but a fully-lit GET TICKETS control floating over the dialog is
   still wrong. Drop it below the overlay instead of hiding it (no layout jump). */
.menu-open .ticket-bar,
.announce-open .ticket-bar { z-index: calc(var(--z-menu) - 1); }

/* ---------- 1 · Permanent ticket bar ---------- */
.ticket-bar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: calc(var(--z-header) + 10);
  min-height: var(--tbar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.35rem var(--gutter);
  background: var(--drop);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--font-label, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  border-bottom: 1px solid rgba(10, 10, 10, 0.35);
  transition: background var(--dur-1, 160ms) var(--ease, ease);
}

.ticket-bar:hover,
.ticket-bar:focus-visible { background: #F0A93C; }
.ticket-bar:focus-visible { outline: 2px solid var(--bg); outline-offset: -4px; }

.ticket-bar__when { font-weight: 700; }
.ticket-bar__where { opacity: 0.78; }

.ticket-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border: 1.5px solid var(--bg);
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.ticket-bar__cta::after {
  content: "\2192";
  transition: transform var(--dur-1, 160ms) var(--ease, ease);
}

.ticket-bar:hover .ticket-bar__cta::after { transform: translateX(3px); }

@media (max-width: 480px) {
  .ticket-bar { font-size: 0.75rem; gap: 0.5rem; }
  .ticket-bar__where { display: none; }
}

/* ---------- 2 · Flashing neon TICKETS sign ---------- */
.neon-tix {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 1.05rem 0.6rem;
  border: 2px solid var(--drop);
  border-radius: 0.6rem;
  background: rgba(10, 10, 10, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--drop-text);
  text-decoration: none;
  text-align: center;
  font-family: var(--font-label, inherit);
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px rgba(232, 155, 46, 0.25),
    0 0 18px rgba(232, 155, 46, 0.35),
    inset 0 0 12px rgba(232, 155, 46, 0.14);
  transition: transform var(--dur-1, 160ms) var(--ease, ease);
}

.neon-tix:hover { transform: translateY(-2px); }
.neon-tix:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; }

.neon-tix__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-shadow: 0 0 8px rgba(232, 155, 46, 0.75), 0 0 20px rgba(232, 155, 46, 0.4);
}

.neon-tix__arrow { font-size: 0.8em; opacity: 0.9; }

.neon-tix__sub {
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--ivory-80);
  font-weight: 600;
}

/* The pulse: slow enough to be safe, alive enough to read as neon. */
@media (prefers-reduced-motion: no-preference) {
  .neon-tix__row { animation: neon-buzz 1.2s steps(1, end) infinite; }
  .neon-tix__arrow:first-child { animation: neon-chase 1.2s ease-in-out infinite; }
  .neon-tix__arrow:last-child { animation: neon-chase 1.2s ease-in-out infinite reverse; }
  .neon-tix { animation: neon-frame 1.2s ease-in-out infinite; }
}

.motion-paused .neon-tix,
.motion-paused .neon-tix__row,
.motion-paused .neon-tix__arrow { animation: none !important; }

@keyframes neon-buzz {
  0%, 82%  { opacity: 1; }
  86%      { opacity: 0.35; }
  90%      { opacity: 1; }
  94%      { opacity: 0.5; }
  100%     { opacity: 1; }
}

@keyframes neon-chase {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50%      { transform: translateX(3px); opacity: 1; }
}

@keyframes neon-frame {
  0%, 100% { box-shadow: 0 0 0 1px rgba(232,155,46,0.25), 0 0 18px rgba(232,155,46,0.35), inset 0 0 12px rgba(232,155,46,0.14); }
  50%      { box-shadow: 0 0 0 1px rgba(232,155,46,0.45), 0 0 30px rgba(232,155,46,0.6),  inset 0 0 16px rgba(232,155,46,0.22); }
}

/* Click state: the sign says it before it sends you. */
.neon-tix.is-firing {
  border-color: var(--ivory);
  color: var(--ivory);
  animation: none;
  box-shadow: 0 0 0 1px rgba(242,239,228,0.4), 0 0 34px rgba(232,155,46,0.7);
}

.neon-tix.is-firing .neon-tix__row { animation: none; opacity: 1; }
.neon-tix.is-firing .neon-tix__sub { color: var(--drop-text); font-weight: 700; }

@media (max-width: 480px) {
  .neon-tix { padding: 0.55rem 0.8rem 0.5rem; }
  .neon-tix__row { font-size: 0.9375rem; }
}

/* Keep the sign clear of the footer's own CTAs on short screens */
@media (max-height: 520px) { .neon-tix { display: none; } }

/* ---------- 3 · Flyer at the head of every page ---------- */
.flyer-head {
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(232, 155, 46, 0.10), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding-block: var(--sp-6, 2.5rem);
}

.flyer-head__inner {
  width: min(100% - (2 * var(--gutter)), var(--w-wide));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.flyer-head__art {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--flyer-ground);
  line-height: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.flyer-head__art img {
  display: block;
  width: 100%;
  height: auto;
}

.flyer-head__kicker {
  color: var(--drop-text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.flyer-head__title {
  margin: 0 0 0.75rem;
  line-height: 0.95;
}

.flyer-head__facts {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  color: var(--ivory-80);
  font-size: 0.9375rem;
}

.flyer-head__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.flyer-head__facts li + li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rizz-line);
  margin-right: 0.35rem;
}

.flyer-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 760px) {
  .flyer-head__inner { grid-template-columns: 1fr; }
  /* width MUST be explicit. As a shrink-to-fit grid item wrapping an image that
     has not loaded yet, this figure collapsed to a ~2px sliver — and a zero-area
     box never counts as "near the viewport", so the lazy image never started
     fetching and the flyer never appeared on mobile at all. */
  .flyer-head__art { width: 100%; max-width: 420px; margin-inline: auto; }
}

/* ---------- 4 · Announce popup (flyer + funnel) ---------- */
.announce-card.has-flyer .announce-art img { object-fit: contain; background: var(--flyer-ground); }

.announce-facts {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  color: var(--drop-text);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.announce-tix {
  display: block;
  margin-bottom: 0.85rem;
}

.announce-form .f-field + .f-field { margin-top: 0.6rem; }

.announce-note {
  color: var(--ivory-60);
  font-size: 0.75rem;
  margin: 0.6rem 0 0;
}

/* ---------- 5 · SELLING OUT — full-page callout ---------- */
/* The owner asked for the whole page to say it, not a corner box. Built by
   js/ticket.js on click and removed on bfcache restore. It lives ~1.15s and
   then the navigation happens, so it deliberately does NOT trap focus. */
.tix-takeover {
  position: fixed;
  inset: 0;
  z-index: var(--z-skip);          /* above every other layer on the way out */
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(232, 155, 46, 0.22), transparent 70%),
    rgba(8, 8, 9, 0.97);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .tix-takeover { transition: opacity 180ms ease-out; }
  .tix-takeover__in { transform: scale(0.94); transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }
  .tix-takeover.is-up .tix-takeover__in { transform: scale(1); }
}

.tix-takeover.is-up { opacity: 1; }
:root.motion-paused .tix-takeover { transition: none; opacity: 1; }
:root.motion-paused .tix-takeover__in { transform: none; }

.tix-takeover__big {
  margin: 0 0 0.6rem;
  font-family: var(--font-display, inherit);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.86;
  font-size: clamp(3.2rem, 17vw, 11rem);
  color: var(--drop-text);
  text-shadow: 0 0 26px rgba(232, 155, 46, 0.55), 0 0 70px rgba(232, 155, 46, 0.28);
}

.tix-takeover__sub {
  margin: 0 0 0.9rem;
  color: var(--ivory);
  font-size: clamp(0.95rem, 2.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tix-takeover__meta {
  margin: 0;
  color: var(--ivory-60);
  font-size: clamp(0.7rem, 1.8vw, 0.85rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Early-bird callout extras. The VIP line LEADS the card (owner's call), so it
   reads as a banner above the headline rather than a footnote under it. */
.tix-takeover__vip {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(232, 155, 46, 0.35);
  color: var(--drop-text);
  font-size: clamp(0.9rem, 2.4vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tix-takeover__go {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.55rem 1.15rem;
  border: 1.5px solid var(--drop);
  border-radius: 999px;
  color: var(--drop-text);
  font-size: clamp(0.75rem, 1.9vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tix-takeover { cursor: pointer; }

