/* ==========================================================================
   Event history - timeline (/events/history/), event page, events teaser.
   Uses the tokens and components of main.css / enhancements.css.
   ========================================================================== */

/* ---------- Hero ---------- */
.th-hero.page-hero--gala,
.th-hero .page-hero__inner { min-height: clamp(560px, 78vh, 760px); }
.th-hero .th-hero__inner { justify-content: flex-end; padding-bottom: 72px; }
.th-hero__kicker {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0 18px;
  color: rgba(212, 168, 48, .8);
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
}
.th-hero__rule { height: 1px; width: 44px; background: linear-gradient(90deg, transparent, rgba(212, 168, 48, .7)); }
.th-hero__rule--r { background: linear-gradient(90deg, rgba(212, 168, 48, .7), transparent); }
.th-hero__h1 { font-size: clamp(48px, 7.4vw, 116px); max-width: 13ch; }
.th-hero__h1 em { font-style: italic; display: inline-block; }

.th-stats {
  list-style: none; margin: 44px 0 0; padding: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 20px 56px;
  border-top: 1px solid rgba(212, 168, 48, .22);
}
.th-stats li { display: flex; flex-direction: column; gap: 6px; }
.th-stats__num { font-size: clamp(40px, 4.4vw, 64px); line-height: 1; font-weight: 400; letter-spacing: -.03em; padding-bottom: 0; }
.th-stats__label {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(243, 235, 217, .7);
}

/* ---------- Sticky year / format bar ---------- */
.th-bar {
  position: sticky; top: var(--th-top, 0px); z-index: 50;
  background: rgba(251, 248, 243, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.th-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 32px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.th-bar__years { display: flex; gap: 4px; }
.th-bar__year {
  font-family: var(--font-editorial); font-size: 22px; line-height: 1;
  padding: 6px 12px; border-radius: 999px; color: var(--ink-soft);
  text-decoration: none; transition: color .2s, background .2s;
}
.th-bar__year:hover { color: var(--accent); }
.th-bar__year.is-current { color: var(--green-darker); background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(198, 154, 46, .45); }
.th-bar__formats { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Timeline ---------- */
.th-timeline { padding: 72px 0 var(--section-pad); background: var(--bg); }
.th-year { position: relative; scroll-margin-top: calc(var(--th-top, 0px) + 90px); }
.th-year + .th-year { margin-top: 96px; }
.th-year[hidden] { display: none; }
.th-year__head {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 0 auto 56px; text-align: center;
}
.th-year__num {
  font-size: clamp(72px, 10vw, 148px); line-height: .9; letter-spacing: -.05em; font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--gold);
  background: linear-gradient(180deg, rgba(246, 217, 122, .35), rgba(198, 154, 46, 0) 70%);
  -webkit-background-clip: text; background-clip: text;
  padding: 0 .08em;
  background-color: var(--bg);
}
.th-year__count {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep);
  background: var(--bg); padding: 2px 12px;
}

.th-list {
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 88px; row-gap: 40px; align-items: start;
}
.th-list::before {
  content: ""; position: absolute; top: -48px; bottom: 0; left: 50%; width: 1px; transform: translateX(-.5px);
  background: linear-gradient(180deg, rgba(198, 154, 46, 0), rgba(198, 154, 46, .55) 60px, rgba(198, 154, 46, .55) calc(100% - 60px), rgba(198, 154, 46, 0));
}
.th-item { position: relative; min-width: 0; }
.th-item.is-left  { grid-column: 1; }
.th-item.is-right { grid-column: 2; margin-top: 132px; }
.th-item[hidden] { display: none; }
.th-item__dot {
  position: absolute; top: 36px; width: 15px; height: 15px; z-index: 1;
  border-radius: 50%; background: var(--bg);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 5px var(--bg), inset 0 0 0 3px var(--bg), inset 0 0 0 8px var(--gold-mid);
}
.th-item.is-left  .th-item__dot { right: -51.5px; }
.th-item.is-right .th-item__dot { left: -51.5px; }
.th-card::after { /* connector from the dot to the card */
  content: ""; position: absolute; top: 43px; width: 44px; height: 1px; background: rgba(198, 154, 46, .55);
}
.th-item.is-left  .th-card::after { right: -45px; }
.th-item.is-right .th-card::after { left: -45px; }

/* ---------- Card ---------- */
.th-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(20, 17, 13, .03), 0 18px 40px -24px rgba(7, 18, 12, .28);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.th-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(20, 17, 13, .03), 0 30px 60px -28px rgba(7, 18, 12, .4); }
.th-card__media {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: 6px 6px 0 0; background: var(--green-darker);
}
.th-card__media img, .th-card__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.th-card:hover .th-card__media img { transform: scale(1.045); }
.th-card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 18, 12, 0) 55%, rgba(7, 18, 12, .45));
}
.th-card__badge {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #0a1d13; padding: 6px 11px; border-radius: 999px;
  background: linear-gradient(180deg, #f6d97a 0%, #d4a830 60%, #c69a2e 100%);
}
.th-card__body { padding: 26px 28px 24px; }
.th-card__meta {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.th-card__title { font-size: clamp(22px, 2vw, 28px); line-height: 1.12; letter-spacing: -.02em; font-weight: 500; margin: 0 0 12px; }
.th-card__title a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--gold-mid), var(--gold-mid)) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.th-card__title a:hover { background-size: 100% 1px; }
.th-card__summary { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 12px; }
.th-card__with { font-size: 13.5px; line-height: 1.5; color: var(--ink); margin: 0 0 16px; }
.th-card__with span { font-family: var(--font-editorial); font-style: italic; color: var(--gold-deep); }
.th-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--rule); }
.th-card__more { font-size: 13px; font-weight: 600; color: var(--green-deep); text-decoration: none; }
.th-card__more span { display: inline-block; transition: transform .25s; }
.th-card__more:hover span { transform: translateX(4px); }
.th-card__rec {
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--accent);
  border: 1px solid rgba(176, 72, 38, .35); border-radius: 999px; padding: 5px 11px; text-decoration: none;
}
.th-card__rec:hover { background: var(--accent-soft); }

/* Photo strip on the card */
.th-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 16px; }
.th-thumbs__item {
  position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; overflow: hidden;
  cursor: zoom-in; background: var(--bg-alt);
}
.th-thumbs__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, filter .4s; }
.th-thumbs__item:hover img { transform: scale(1.08); filter: brightness(1.05); }
.th-thumbs__more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(7, 18, 12, .62); color: var(--gold-bright);
  font-family: var(--font-editorial); font-size: 22px;
}

/* Typographic poster for events without a photo */
.th-poster {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(46, 129, 89, .55), transparent 65%),
    radial-gradient(ellipse 60% 70% at 85% 90%, rgba(212, 168, 48, .18), transparent 60%),
    linear-gradient(160deg, #0a1d13, #07120c);
  color: #f3ebd9; text-align: center;
}
.th-poster__frame { position: absolute; inset: 14px; border: 1px solid rgba(212, 168, 48, .35); border-radius: 3px; pointer-events: none; }
.th-poster__mono {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  font-size: 15px; letter-spacing: .3em; color: rgba(246, 217, 122, .75);
}
.th-poster__day {
  font-size: clamp(64px, 7vw, 96px); line-height: .9; letter-spacing: -.04em;
  background: linear-gradient(135deg, #f6d97a 0%, #d4a830 40%, #b58320 60%, #f4d77a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.th-poster__month {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: rgba(243, 235, 217, .8);
}
.th-card--noimg .th-card__media::after { display: none; }

.th-empty { text-align: center; color: var(--ink-soft); font-family: var(--font-editorial); font-style: italic; font-size: 20px; padding: 40px 0; }

/* Reveal on scroll (only when JS marks the page) */
.th-js .th-item .th-card { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.th-js .th-item.is-in .th-card { opacity: 1; transform: none; }
.th-js .th-item.is-in .th-card:hover { transform: translateY(-4px); }

/* ---------- Invitation ---------- */
.th-invite { padding: var(--section-pad) 0; text-align: center; }
.th-invite__inner { max-width: 860px; }
.th-invite__eyebrow { color: var(--gold-bright); margin-bottom: 18px; }
.th-invite__h2 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1; letter-spacing: -.03em; font-weight: 400; margin: 0 0 18px; color: #f3ebd9; }
.th-invite__h2 em { font-style: italic; }
.th-invite__lead { font-family: var(--font-editorial); font-style: italic; font-size: 20px; color: rgba(243, 235, 217, .8); margin: 0 0 32px; }
.th-invite__ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Event page ---------- */
.th-page .case-hero__h1 { max-width: 20ch; }
.th-page__hero:not(:has(.case-hero__photo)) .case-hero__scrim { background: linear-gradient(180deg, rgba(10, 29, 19, 0), rgba(10, 29, 19, .6)); }
.th-highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.th-highlights li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 16px 20px; background: var(--bg-alt); border: 1px solid var(--rule); border-radius: 6px;
  font-size: 16px; line-height: 1.5; color: var(--ink);
}
.th-highlights__mark { color: var(--gold); font-size: 12px; flex: none; }
.th-partners { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.th-partners li { padding: 8px 16px; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; color: var(--ink); background: #fff; }

.th-speakers { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.th-speaker { display: flex; flex-direction: column; gap: 3px; padding-bottom: 14px; border-bottom: 1px solid rgba(246, 217, 122, .18); }
.th-speaker:last-child { border-bottom: 0; padding-bottom: 0; }
.th-speaker__name { font-size: 21px; line-height: 1.15; color: #f3ebd9; }
.th-speaker__role { font-size: 13px; line-height: 1.45; color: rgba(243, 235, 217, .68); }

/* Gallery: masonry columns keep every photo's own shape */
.th-gallery { columns: 3 260px; column-gap: 14px; }
.th-gallery__item {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; border-radius: 4px; overflow: hidden;
  break-inside: avoid; cursor: zoom-in; background: var(--bg);
}
.th-gallery__item img { width: 100%; height: auto; display: block; transition: transform .5s, filter .5s; }
.th-gallery__item:hover img { transform: scale(1.03); filter: brightness(1.04); }

/* Earlier / later */
.th-nearby { padding: 64px 0 var(--section-pad); background: var(--bg); border-top: 1px solid var(--rule); }
.th-nearby__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.th-nearby__card {
  display: flex; align-items: center; gap: 18px; padding: 16px; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--ink);
  transition: border-color .25s, transform .25s;
}
.th-nearby__card:hover { border-color: var(--gold); transform: translateY(-2px); }
.th-nearby__card--newer { flex-direction: row-reverse; text-align: right; }
.th-nearby__img {
  flex: none; width: 84px; height: 84px; border-radius: 4px; overflow: hidden;
  background: linear-gradient(160deg, #0a1d13, #07120c); display: flex; align-items: center; justify-content: center;
}
.th-nearby__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-nearby__mono { color: var(--gold-bright); letter-spacing: .25em; font-size: 14px; }
.th-nearby__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.th-nearby__label { font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.th-nearby__title { font-size: 20px; line-height: 1.2; letter-spacing: -.01em; }
.th-nearby__all { text-align: center; margin: 36px 0 0; }

/* ---------- Lightbox ---------- */
.th-lb {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  background: rgba(7, 18, 12, .96); opacity: 0; transition: opacity .25s;
}
.th-lb.is-open { opacity: 1; }
.th-lb__img { max-width: min(92vw, 1400px); max-height: 82vh; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); user-select: none; }
.th-lb__cap {
  position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; padding: 0 70px;
  color: rgba(243, 235, 217, .8); font-family: var(--font-editorial); font-style: italic; font-size: 16px;
}
.th-lb__count { font-family: var(--font-ui); font-style: normal; font-size: 11px; letter-spacing: .2em; color: var(--gold-bright); margin-left: 10px; }
.th-lb__btn {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(246, 217, 122, .35);
  background: rgba(7, 18, 12, .5); color: var(--gold-bright); font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s;
}
.th-lb__btn:hover { background: rgba(33, 108, 74, .55); border-color: var(--gold-bright); }
.th-lb__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.th-lb__next { right: 20px; top: 50%; transform: translateY(-50%); }
.th-lb__close { right: 20px; top: 20px; }
.th-lb[data-single] .th-lb__prev, .th-lb[data-single] .th-lb__next, .th-lb[data-single] .th-lb__count { display: none; }

/* ---------- Events page teaser ---------- */
.past-event-tile .th-poster { position: absolute; inset: 0; }
.past-event-tile > a { position: absolute; inset: 0; z-index: 2; }
.th-teaser__all { margin-top: 40px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .th-list { column-gap: 56px; }
  .th-item.is-left  .th-item__dot { right: -35.5px; }
  .th-item.is-right .th-item__dot { left: -35.5px; }
  .th-item.is-left  .th-card::after { right: -29px; width: 28px; }
  .th-item.is-right .th-card::after { left: -29px; width: 28px; }
}
@media (max-width: 860px) {
  .th-list { grid-template-columns: 1fr; padding-left: 36px; row-gap: 32px; }
  .th-list::before { left: 7px; }
  .th-item.is-left, .th-item.is-right { grid-column: 1; margin-top: 0; }
  .th-item.is-left .th-item__dot, .th-item.is-right .th-item__dot { left: -36.5px; right: auto; top: 30px; }
  .th-item.is-left .th-card::after, .th-item.is-right .th-card::after { left: -29px; right: auto; width: 28px; top: 37px; }
  .th-year__head { align-items: flex-start; text-align: left; margin-bottom: 36px; }
  .th-year + .th-year { margin-top: 72px; }
  .th-nearby__grid { grid-template-columns: 1fr; }
  .th-nearby__card--newer { flex-direction: row; text-align: left; }
}
@media (max-width: 767px) {
  .th-hero .th-hero__inner { padding-bottom: 48px; }
  .th-stats { gap: 18px 32px; margin-top: 32px; }
  .th-bar__inner { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .th-bar__years, .th-bar__formats { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .th-bar__years::-webkit-scrollbar, .th-bar__formats::-webkit-scrollbar { display: none; }
  .th-bar__formats .filter-chip { white-space: nowrap; }
  .th-bar__year { font-size: 19px; padding: 5px 10px; }
  .th-timeline { padding-top: 48px; }
  .th-card__body { padding: 20px 20px 18px; }
  .th-gallery { columns: 2 140px; column-gap: 8px; }
  .th-gallery__item { margin-bottom: 8px; }
  .th-lb__btn { width: 42px; height: 42px; font-size: 18px; }
  .th-lb__prev { left: 8px; } .th-lb__next { right: 8px; }
  .th-lb__cap { padding: 0 20px; bottom: 16px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .th-js .th-item .th-card { opacity: 1; transform: none; transition: none; }
  .th-card, .th-card__media img { transition: none; }
}

/* pages.css sets .post-body p { margin: 0 }, which beats the "* + *" rhythm. */
.th-page .post-body > * + * { margin-top: 18px; }

/* ---------- Homepage teaser ---------- */
.th-home { padding: var(--section-pad) 0; }
.th-home__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.th-home__eyebrow { color: var(--gold-bright); margin-bottom: 16px; }
.th-home__h2 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -.03em; font-weight: 400; color: #f3ebd9; margin: 0 0 20px; }
.th-home__h2 em { font-style: italic; display: inline-block; }
.th-home__lead { font-family: var(--font-editorial); font-style: italic; font-size: 19px; line-height: 1.45; color: rgba(243, 235, 217, .8); margin: 0; max-width: 460px; }
.th-home__stats { margin: 28px 0 32px; }
.th-home__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.th-home__tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.th-home__tiles .past-event-tile { border: 1px solid rgba(212, 168, 48, .25); }
.th-home__tiles .past-event-tile__title { font-size: clamp(17px, 1.5vw, 22px); }
@media (max-width: 900px) {
  .th-home { padding: var(--section-pad-m) 0; }
  .th-home__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .th-home__tiles { grid-template-columns: 1fr; }
}
