/* ==================================================================
   MOTION & FEEL
   Loads last. Everything here answers something the visitor did —
   a press, a hover, an open. Nothing moves on its own except the
   hero's one load sequence in home.css.
================================================================== */

:root {
  --ease: cubic-bezier(0.32, 0.72, 0.28, 1);
  --ease-out: cubic-bezier(0.22, 0.68, 0.3, 1);
  --fast: 0.16s;
  --mid: 0.28s;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;   /* anchors clear the sticky header */
}

/* cross-page navigation fades instead of flashing (Chrome/Edge) */
@view-transition { navigation: auto; }

/* one focus ring everywhere */
:where(a, button, select, input, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}
.header :where(a, button):focus-visible,
.footer :where(a, button):focus-visible,
.stage :where(a, button):focus-visible { outline-color: var(--sand); }

/* ------------------------------ press feedback ------------------------------ */

.button,
.qty button,
.maptab,
.mapcontrols button,
.signup button {
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.button--primary { box-shadow: 0 1px 2px rgba(25, 12, 0, 0.14); }
.button--primary:not(:disabled):hover { box-shadow: 0 6px 18px rgba(80, 40, 21, 0.26); }
.button:not(:disabled):active,
.signup button:active { transform: translateY(1px) scale(0.985); }
.button--primary:disabled { box-shadow: none; }

.qty button:not(:disabled):active,
.mapcontrols button:active { transform: scale(0.88); }

.iconbtn { transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.iconbtn:active { transform: scale(0.92); }

/* ------------------------------ ticket options ------------------------------ */

.option {
  cursor: pointer;
  transition:
    border-color var(--mid) var(--ease),
    background-color var(--mid) var(--ease),
    box-shadow var(--mid) var(--ease),
    transform var(--mid) var(--ease);
}
.option:hover { border-color: #d9c8be; box-shadow: 0 4px 14px rgba(25, 12, 0, 0.05); }
.option.is-active {
  box-shadow: 0 4px 16px rgba(80, 40, 21, 0.1);
  transform: translateY(-1px);
}
.option .qty { cursor: default; }

/* the count pops when it changes */
.qty__value { transition: transform var(--fast) var(--ease-out); }
.qty__value.is-bumped { animation: pop 0.26s var(--ease-out); }
@keyframes pop {
  0% { transform: scale(1); }
  38% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* running total settles rather than jumps */
.buyrow__total-value { transition: color var(--fast) var(--ease); }
.buyrow__total-value.is-bumped { animation: pop 0.24s var(--ease-out); color: var(--primary); }

/* the limit line eases in instead of appearing */
.limit-note {
  overflow: hidden;
  animation: slip 0.26s var(--ease-out);
}
@keyframes slip {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

/* on phones the buy bar follows you down the page */
@media (max-width: 999px) {
  .buyrow {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-inline: calc(var(--gutter) * -1);
    padding: 12px var(--gutter);
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(10px);
    border-top: 1px solid #ece2db;
  }
}

/* ------------------------------ cart ------------------------------ */

.cart-count { transition: transform var(--fast) var(--ease-out); }
.cart-count.is-bumped { animation: pop 0.34s var(--ease-out); }

.drawer { transition: transform 0.38s var(--ease); }
.drawer-backdrop { transition: opacity 0.38s var(--ease); }

.lineitem { animation: slip 0.3s var(--ease-out) backwards; }
.lineitem__remove { transition: color var(--fast) var(--ease); }
.lineitem__remove:hover { color: var(--primary); }

/* ------------------------------ accordion ------------------------------ */

/* js wraps each panel so it can grow from 0fr to 1fr — a real height
   transition without measuring anything */
.acc-anim {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s var(--ease);
}
.accordion-item.active .acc-anim { grid-template-rows: 1fr; }
.acc-anim__in { overflow: hidden; min-height: 0; }

/* scoped to the wrapper so panels stay collapsed until js wraps them */
.acc-anim .accordion-content { display: block; }

.accordion-title { transition: background-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease); }
.accordion-title:active { transform: none; }
.accordion-icon { display: inline-block; }

/* ------------------------------ maps ------------------------------ */

.mapviewer img { transition: transform 0.3s var(--ease); }
.mapviewer.is-panning img,
.mapviewer.is-wheeling img { transition: none; }
.maptab { transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease); }

/* ------------------------------ homepage ------------------------------ */

.day--live a { transition: background-color var(--mid) var(--ease), padding-left var(--mid) var(--ease); }
.day--live a::after {
  content: "";
  width: 18px;
  height: 10px;
  align-self: center;
  background: currentColor;
  opacity: 0.35;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
  -webkit-mask: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 14"><path d="M1 7h21M16 1l6 6-6 6" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  mask: no-repeat center / contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 14"><path d="M1 7h21M16 1l6 6-6 6" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
.day--live a:hover::after { opacity: 1; transform: translateX(5px); }

.pricelist li { transition: background-color var(--fast) var(--ease); }
.pricelist li:hover { background: #fdf8f4; }

.stage__cta svg { transition: transform var(--mid) var(--ease-out); }
.stage__cta:hover svg { transform: translateY(4px); }

.footer a, .nav a { transition: opacity var(--fast) var(--ease); }

/* ------------------------------ reduced motion ------------------------------ */

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