/* Events listing (/events, CARR-5032). The doorway to the event pages, so it borrows their world: the soft-orange
 * invitation band with thin rings, and each upcoming event as a white ticket (date stub, dashed tear, details).
 * Upcoming tickets sit on the warm wash; past events are quieter bordered cards on warm white. Public page opened from WhatsApp: phone width first (360px),
 * the ticket lays out in a row from 48rem. Motion: hover feedback only, off under reduced motion.
 */
@import url('/home.css');

.events-page {
  --evl-orange-ink: #8a4a0c;
  --evl-orange-ring: color-mix(in srgb, var(--color-orange) 20%, var(--color-orange-soft));
  --evl-orange-text: color-mix(in srgb, var(--color-ink) 84%, var(--color-orange));
  --evl-radius-ticket: 1.5rem;
  --evl-shadow-ticket: 0 12px 32px rgb(27 26 24 / .10), 0 2px 6px rgb(27 26 24 / .05);
  --evl-shadow-lift: 0 16px 40px rgb(27 26 24 / .13), 0 3px 8px rgb(27 26 24 / .06);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}
.events-page ::selection { background: var(--color-blue-soft); color: var(--color-ink); }
.events-page h1, .events-page h2, .events-page h3 { font-family: var(--font-display); font-style: normal; font-weight: 700; min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.events-page p { text-wrap: pretty; }
.events-page a { text-underline-offset: .2em; }
.events-page a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.events-page .icon { flex: none; width: 20px; height: 20px; }

/* The invitation band */
.evl-hero { position: relative; overflow: hidden; background: var(--color-orange-soft); }
.evl-ring { position: absolute; pointer-events: none; }
.evl-ring-high { right: -170px; top: -190px; }
.evl-ring-fill { fill: var(--evl-orange-ring); }
.evl-ring-line { fill: none; stroke: var(--evl-orange-ring); stroke-width: 2; }
.evl-hero-copy { position: relative; z-index: var(--z-base); display: grid; gap: var(--space-sm); padding-block: var(--space-xl) var(--space-2xl); }
.evl-hero h1 { max-width: 14ch; font-size: clamp(2.25rem, 5.2vw, 3.875rem); line-height: 1.06; letter-spacing: -.02em; }
.evl-hero p { max-width: 36rem; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--evl-orange-text); }

/* Sections */
.evl-section { padding-block: var(--space-2xl); }
.evl-stack { display: grid; gap: var(--space-lg); }
.evl-section h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.02em; }
/* Upcoming tickets sit on the warm wash, so the tear's notches read as holes punched through the white ticket. */
.evl-upcoming { padding-top: var(--space-xl); background: var(--color-wash); }

/* Upcoming: one ticket per event */
.evl-tickets, .evl-past-list { display: grid; margin: 0; padding: 0; list-style: none; }
.evl-tickets { gap: clamp(2.5rem, 4vw, 3.5rem); }
.evl-ticket { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'picture' 'stub' 'tear' 'body'; min-width: 0; border-radius: var(--evl-radius-ticket); background: var(--color-surface); box-shadow: var(--evl-shadow-ticket); transition: box-shadow var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.evl-picture { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--color-orange-soft); }
.evl-ticket .evl-picture { grid-area: picture; border-radius: var(--evl-radius-ticket) var(--evl-radius-ticket) 0 0; }
.evl-stub { grid-area: stub; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-lg) var(--space-lg) var(--space-md); }
.evl-date { display: grid; gap: .125rem; }
.evl-date span { font-size: .9375rem; font-weight: 700; color: var(--color-accent-deep); }
.evl-date strong { font: 700 clamp(2.125rem, 4vw, 2.75rem)/1.05 var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.evl-town { display: inline-flex; align-items: center; gap: var(--space-2xs); padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-xs); border-radius: var(--radius-pill); background: var(--color-orange-soft); color: var(--evl-orange-ink); font-weight: 800; }
.evl-town .icon { width: 18px; height: 18px; }
.evl-tear { grid-area: tear; position: relative; height: 0; margin: 0 1.125rem; border-top: 2px dashed var(--evl-orange-ring); }
.evl-tear::before, .evl-tear::after { content: ''; position: absolute; top: -.8125rem; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-pill); background: var(--color-wash); }
.evl-tear::before { left: -1.875rem; }
.evl-tear::after { right: -1.875rem; }
.evl-body { grid-area: body; display: grid; align-content: start; gap: var(--space-sm); min-width: 0; padding: var(--space-md) var(--space-lg) var(--space-lg); }
.evl-body h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.25; letter-spacing: -.01em; }
/* The heading's link covers the whole ticket, so one tap anywhere opens the event. */
.evl-body h3 a, .evl-past-card h3 a { color: inherit; text-decoration: none; }
.evl-body h3 a::after, .evl-past-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.evl-ticket:has(a:focus-visible), .evl-past-card:has(a:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.evl-ticket a:focus-visible, .evl-past-card a:focus-visible { outline: 0; }
.evl-facts { display: grid; gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.evl-facts li { display: flex; align-items: flex-start; gap: var(--space-sm); min-width: 0; }
.evl-facts .icon { margin-top: .125rem; color: var(--color-accent-deep); }
.evl-facts li:first-child .icon { color: var(--color-green); }
.evl-action { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-top: var(--space-xs); }
.evl-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font-weight: 700; transition: background-color var(--dur-short) var(--ease-out); }
.evl-button .icon, .evl-more .icon, .evl-text-link .icon { width: 18px; height: 18px; transition: transform var(--dur-short) var(--ease-out); }
.evl-closed-note { padding: var(--space-xs) var(--space-md); border-radius: var(--radius-sm); background: var(--color-wash); font-weight: 800; }
.evl-more { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; font-weight: 800; color: var(--color-accent); }
.evl-closed .evl-date strong, .evl-closed .evl-body h3 { color: color-mix(in srgb, var(--color-ink) 82%, var(--color-surface)); }

/* No upcoming events */
.evl-empty { display: grid; justify-items: start; gap: var(--space-xs); max-width: 40rem; padding: var(--space-lg); border: 1.5px solid var(--color-rule); border-radius: var(--radius-card); }
.evl-empty strong { font-size: 1.125rem; }
.evl-text-link { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; font-weight: 800; color: var(--color-accent); }

/* Past events: quieter cards */
.evl-past-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--space-md); }
.evl-past-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1.5px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); transition: border-color var(--dur-short) var(--ease-out); }
.evl-past-body { display: grid; align-content: start; gap: var(--space-xs); padding: var(--space-md) var(--space-lg) var(--space-lg); }
.evl-past-date { font-size: var(--text-sm); font-weight: 700; color: var(--color-accent-deep); }
.evl-past-card h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; }
.evl-past-place { display: flex; align-items: flex-start; gap: var(--space-xs); color: var(--color-muted); }
.evl-past-place .icon { width: 18px; height: 18px; margin-top: .125rem; }

/* From 48rem the ticket reads across: stub | tear | details | picture. */
@media (min-width: 48rem) {
  .evl-ticket { grid-template-columns: 12.5rem auto minmax(0, 1fr); grid-template-areas: 'stub tear body'; }
  .evl-ticket.evl-has-picture { grid-template-columns: 12.5rem auto minmax(0, 1fr) min(32%, 22rem); grid-template-areas: 'stub tear body picture'; }
  .evl-ticket .evl-picture { height: 100%; aspect-ratio: auto; min-height: 11rem; border-radius: 0 var(--evl-radius-ticket) var(--evl-radius-ticket) 0; }
  .evl-stub { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; padding: var(--space-lg); }
  .evl-tear { height: auto; width: 0; margin: 1.125rem 0; border-top: 0; border-left: 2px dashed var(--evl-orange-ring); }
  .evl-tear::before, .evl-tear::after { left: -.8125rem; right: auto; top: auto; }
  .evl-tear::before { top: -1.875rem; }
  .evl-tear::after { bottom: -1.875rem; }
  .evl-body { padding: var(--space-lg) var(--space-xl); align-content: center; }
}
@media (min-width: 60rem) {
  .evl-section { padding-block: var(--space-3xl); }
  .evl-upcoming { padding-top: var(--space-2xl); }
  .evl-hero-copy { padding-block: var(--space-2xl) var(--space-3xl); }
}

@media (hover: hover) {
  .evl-ticket:hover { box-shadow: var(--evl-shadow-lift); transform: translateY(-2px); }
  .evl-ticket:hover .evl-button { background: var(--color-accent-deep); }
  .evl-ticket:hover .evl-button .icon, .evl-ticket:hover .evl-more .icon, .evl-text-link:hover .icon { transform: translateX(3px); }
  .evl-past-card:hover { border-color: var(--color-accent); }
}
@media (prefers-reduced-motion: reduce) {
  .evl-ticket, .evl-button, .evl-past-card, .evl-button .icon, .evl-more .icon, .evl-text-link .icon { transition: none; }
  .evl-ticket:hover { transform: none; }
}
