/* ============================================================
   Wag'n Tails  -  Events / Tradeshows (TEC-backed)
   Enqueue on events, tradeshows, single tribe_events.
   Scoped under body.wagn-events.
   ============================================================ */

body.wagn-events *,
body.wagn-events *::before,
body.wagn-events *::after {
  box-sizing: border-box;
}

html:has(body.wagn-events) {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body.wagn-events {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--wagn-atmosphere);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.wagn-events img,
body.wagn-events svg {
  display: block;
  max-width: 100%;
}

body.wagn-events a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

body.wagn-events h1,
body.wagn-events h2,
body.wagn-events h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 0.75rem;
}

body.wagn-events p {
  margin: 0 0 1rem;
}

body.wagn-events p:last-child {
  margin-bottom: 0;
}

body.wagn-events ul,
body.wagn-events ol,
body.wagn-events dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.wagn-events :focus {
  outline: none;
}

body.wagn-events :focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
}

body.wagn-events .container {
  width: min(100% - (2 * var(--page-gutter)), var(--container));
  margin-inline: auto;
}

body.wagn-events .container--narrow {
  width: min(100% - (2 * var(--page-gutter)), var(--container-narrow));
  margin-inline: auto;
}

body.wagn-events .section {
  padding-block: var(--section-y);
  position: relative;
}

body.wagn-events .section > .container,
body.wagn-events .section > .container--narrow {
  position: relative;
  z-index: 1;
}

body.wagn-events .text-gradient {
  background-image: var(--heading-gradient);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

body.wagn-events .tile-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  transition: transform 0.3s var(--ease, ease);
}

/* Hide TEC / Kadence leftovers that may still print around singles */
body.wagn-events .tribe-events-single .tribe-events-back,
body.wagn-events .tribe-events-notices,
body.wagn-events #tribe-events-footer,
body.wagn-events .tribe-events-schedule,
body.wagn-events .tribe-events-cal-links,
body.wagn-events .tribe-events-event-meta,
body.wagn-events .tribe-events-single-event-title,
body.wagn-events .tribe-events-nav-pagination {
  display: none !important;
}

/* ---------- Section headers ---------- */
.ev-section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto clamp(1.35rem, 3vw, 1.85rem);
}

.ev-section-header h2 {
  font-family: var(--font-fun);
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.ev-section-header p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin: 0;
}

.ev-section-header--left {
  text-align: center;
  margin-inline: auto;
}

.ev-section-header--sub {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.ev-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Hero ---------- */
.ev-hero {
  position: relative;
  width: 100%;
  padding-top: calc(var(--header-h) + var(--header-gap));
  padding-bottom: clamp(1.25rem, 2.5vw, 1.85rem);
  text-align: center;
  overflow: hidden;
  background: var(--wagn-hero-atmosphere);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.ev-hero__glow {
  position: absolute;
  inset: 0;
  background: var(--wagn-hero-glow);
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.ev-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-fun);
  font-size: clamp(1.75rem, 4.2vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--purple);
}

.ev-hero__eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ev-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.6vw, 3.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 16ch;
  margin: 0 auto 1rem;
}

.ev-hero--single .ev-hero__title {
  max-width: 20ch;
}

.ev-hero__lede {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--ink-muted);
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  font-weight: 500;
  line-height: 1.55;
}

.ev-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.ev-hero__photo {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  box-shadow: none;
}

.ev-hero__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 0;
}

@media (min-width: 900px) {
  .ev-hero__photo {
    margin-inline: calc(-1 * var(--page-gutter));
    width: calc(100% + 2 * var(--page-gutter));
  }
}

.ev-wave {
  line-height: 0;
  margin-top: -0.5rem;
  color: var(--mint);
}

.ev-wave--mint {
  color: var(--mint);
}

.ev-wave svg {
  width: 100%;
  height: clamp(2.5rem, 6vw, 4rem);
}

.ev-wave__fill {
  fill: currentColor;
}

/* ---------- Schedule list (interaction rows, not cards) ---------- */
.ev-schedule {
  background: var(--mint);
}

.ev-empty {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  color: var(--ink-muted);
}

.ev-empty a,
.ev-empty__reset {
  color: var(--purple);
  font-weight: 600;
}

.ev-empty__reset {
  display: inline;
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.ev-empty--filter {
  margin-top: 1.25rem;
}

.ev-row[hidden] {
  display: none !important;
}

/* ---------- Hub filter chips ---------- */
.ev-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-start;
  max-width: 52rem;
  margin: 0 auto clamp(1.15rem, 2.5vw, 1.65rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.2rem;
}

.ev-filters__chip {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(96, 51, 135, 0.22);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--purple);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color 0.22s var(--ease, ease),
    border-color 0.22s var(--ease, ease),
    color 0.22s var(--ease, ease),
    transform 0.22s var(--ease, ease);
}

.ev-filters__chip:hover,
.ev-filters__chip:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(96, 51, 135, 0.4);
}

.ev-filters__chip.is-active,
.ev-filters__chip[aria-pressed="true"] {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

@media (min-width: 720px) {
  .ev-filters {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
  }
}

/* ---------- Ways to connect (hub) ---------- */
.ev-ways {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 44rem;
  margin: 0.35rem auto 0;
}

.ev-ways li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.ev-ways h3 {
  font-family: var(--font-fun);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.ev-ways p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.ev-ways a {
  color: var(--purple);
  font-weight: 600;
}

.ev-ways li:hover .tile-icon {
  transform: translateY(-2px) scale(1.04);
}

.ev-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 52rem;
  margin: 0 auto;
}

.ev-row__link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1.1rem;
  align-items: center;
  padding: 1rem 0.15rem;
  border-bottom: 1px solid rgba(96, 51, 135, 0.12);
  text-decoration: none;
  transition: background-color 0.25s var(--ease, ease), transform 0.25s var(--ease, ease);
}

.ev-row:last-child .ev-row__link {
  border-bottom: 0;
}

.ev-row__link:hover,
.ev-row__link:focus-visible {
  background: rgba(255, 255, 255, 0.45);
}

.ev-row__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.35rem 0.4rem;
  color: var(--purple);
  font-family: var(--font-fun);
  line-height: 1;
}

.ev-row__month {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--aqua-deep, #3d8f86);
}

.ev-row__day {
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0.2rem;
}

.ev-row__type {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8296);
}

.ev-row__title {
  font-family: var(--font-fun);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--purple);
}

.ev-row__meta {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.ev-row__cta {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--purple);
}

.ev-row__arrow {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s var(--ease, ease);
}

.ev-row__link:hover .ev-row__arrow,
.ev-row__link:focus-visible .ev-row__arrow {
  transform: rotate(-45deg) translate(2px, 2px);
}

@media (min-width: 720px) {
  .ev-row__link {
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    padding: 1.15rem 0.35rem;
  }

  .ev-row__cta {
    grid-column: auto;
  }
}

.ev-row--past {
  opacity: 0.72;
}

.ev-past {
  background: var(--cream, #f7f4ee);
}

.ev-list--past .ev-row__link {
  border-bottom-color: rgba(96, 51, 135, 0.08);
}

/* ---------- Expect / split ---------- */
.ev-expect {
  background: var(--cream, #f7f4ee);
}

.ev-main--single .ev-expect {
  background: var(--mint);
}

.ev-split {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .ev-split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 4vw, 3.25rem);
  }
}

.ev-pillars {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.25rem;
}

.ev-pillars li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.ev-pillars h3 {
  font-family: var(--font-fun);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.ev-pillars p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.ev-pillars li:hover .tile-icon {
  transform: translateY(-2px) scale(1.04);
}

.ev-split__media {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

.ev-split__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 35%;
}

/* ---------- Show-floor photo strip ---------- */
.ev-floor {
  background: var(--mint);
}

.ev-floor__gallery {
  display: grid;
  gap: 0.95rem;
  margin-top: 0.35rem;
}

@media (min-width: 700px) {
  .ev-floor__gallery {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.1rem;
    align-items: stretch;
  }
}

.ev-floor__item {
  margin: 0;
  overflow: hidden;
  height: 100%;
}

.ev-floor__item img {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 700px) {
  .ev-floor__gallery > li:first-child .ev-floor__item img {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .ev-floor__gallery > li:last-child .ev-floor__item img {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }
}

/* ---------- Facts (single) ---------- */
.ev-facts {
  background: var(--cream, #f7f4ee);
}

.ev-facts__grid {
  display: grid;
  gap: 1rem;
  max-width: 48rem;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .ev-facts__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.75rem;
  }
}

.ev-facts__item {
  padding-block: 0.35rem;
  border-top: 1px solid rgba(96, 51, 135, 0.14);
}

.ev-facts__item dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint, #8a8296);
  margin: 0 0 0.35rem;
}

.ev-facts__item dd {
  margin: 0;
  font-family: var(--font-fun);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 800;
  color: var(--purple);
  letter-spacing: -0.02em;
}

/* ---------- CMS body ---------- */
.ev-body {
  background: var(--cream, #f7f4ee);
}

.ev-body__content {
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.ev-body__content a {
  color: var(--purple);
  font-weight: 600;
}

.ev-body__content h2,
.ev-body__content h3 {
  margin-top: 1.5rem;
}

/* ---------- CTA ---------- */
.ev-cta {
  text-align: center;
  background: var(--wagn-hero-atmosphere, var(--cream));
}

.ev-cta__title {
  font-family: var(--font-fun);
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin: 0 auto 0.85rem;
}

.ev-cta__lede {
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.ev-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.ev-cta__back {
  margin-top: 1.35rem;
  font-weight: 600;
}

.ev-cta__back a {
  color: var(--purple);
}

/* ---------- Motion ---------- */
body.wagn-events .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--reveal-duration, 0.7s) var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
    transform var(--reveal-duration, 0.7s) var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1));
  transition-delay: var(--reveal-delay, 0ms);
}

body.wagn-events .reveal.is-inview {
  opacity: 1;
  transform: none;
}

body.wagn-events .reveal--title {
  transform: translateY(22px);
}

body.wagn-events .ev-row.is-inview .ev-row__day {
  animation: ev-day-settle 0.55s var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

@keyframes ev-day-settle {
  from {
    transform: translateY(6px);
    opacity: 0.35;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 700px) {
  .ev-hero__title {
    font-size: clamp(1.85rem, 8vw, 2.55rem);
    padding-inline: 0.15rem;
  }

  .ev-hero__lede {
    font-size: 0.98rem;
    padding-inline: 0.2rem;
  }

  .ev-hero__actions,
  .ev-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ev-hero__actions .btn,
  .ev-cta__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wagn-events .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body.wagn-events .ev-row.is-inview .ev-row__day {
    animation: none;
  }

  .ev-pillars li:hover .tile-icon,
  .ev-ways li:hover .tile-icon {
    transform: none;
  }

  .ev-row__link:hover .ev-row__arrow,
  .ev-row__link:focus-visible .ev-row__arrow {
    transform: rotate(-45deg);
  }
}
