/* ==========================================================================
   EventGo Australia — /events/ · discovery, "THE PROGRAMME"
   (branch eventgo-v3-attendee-conversion-flow)
   --------------------------------------------------------------------------
   Reads like a printed festival programme rather than a marketplace grid:

     · an oversized "Events" and ONE big search field
     · THE NIGHT RAIL — the real upcoming dates as nights (weekday / huge day
       numeral / month), the page's signature: you browse nights, not a
       database
     · kinds of event as chips with honest counts (a 0 is a 0)
     · results grouped by month under an oversized outlined month numeral
     · the homepage's event card, unchanged (22-home-events.css), so leaving
       the homepage feels continuous; the organiser's Featured listing takes
       the wide slot

   Motion is small and optional: chips and nights press, the numeral of a
   pressed night lifts. Transform/opacity only; nothing under reduced motion.
   ========================================================================== */

/* ---- head ----------------------------------------------------------------- */
.eg-c-dx { position: relative; padding: calc(var(--hdr-h) + clamp(2.5rem, 7vh, 5rem)) var(--c-gut) clamp(1.5rem, 4vh, 2.5rem); overflow: hidden; }
/* A soft brand glow behind the word — not an image, so it costs nothing. */
.eg-c-dx::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -30%; width: 120vw; height: 80vh;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c-violet) 32%, transparent), transparent 70%);
  opacity: .7;
}
.eg-c-dx__in { width: 100%; max-width: 1320px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.eg-c-dx__k { color: var(--c-accent); margin: 0; }
.eg-c-dx__h {
  margin: 0; font-size: clamp(4rem, 2rem + 11vw, 11rem); line-height: .8; letter-spacing: -.055em;
}
.eg-c-dx__lead { margin: 0; max-inline-size: 44ch; }

.eg-c-dx__search {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem;
  width: min(100%, 52rem); min-height: 4rem; padding: .375rem .375rem .375rem 1.25rem;
  border-radius: var(--radius-full); border: 1px solid var(--c-line-strong);
  background: color-mix(in srgb, var(--c-ink-soft) 86%, transparent);
}
.eg-c-dx__search:focus-within { border-color: var(--c-accent); }
.eg-c-dx__search > svg { width: 1.375rem; height: 1.375rem; color: var(--c-accent); }
.eg-c-dx__search input {
  min-width: 0; min-height: 48px; border: 0; background: none; color: var(--c-text);
  font: inherit; font-size: var(--t-lead);
}
.eg-c-dx__search input::placeholder { color: var(--c-text-3); }
.eg-c-dx__search input:focus-visible { outline: none; }
.eg-c-dx__search .eg-c-btn { min-height: 52px; }
@media (max-width: 519.98px) {
  .eg-c-dx__search { grid-template-columns: auto minmax(0, 1fr); border-radius: var(--radius-xl); padding: .5rem .5rem .5rem 1rem; }
  .eg-c-dx__search .eg-c-btn { grid-column: 1 / -1; width: 100%; }
  .eg-c-dx__search input { font-size: var(--t-body); }
}
@media (max-width: 379.98px) {
  /* The whole placeholder must fit: "Search events, artists or venues". */
  .eg-c-dx__search input { font-size: .875rem; letter-spacing: -.015em; }
  .eg-c-dx__search { padding-left: .625rem; gap: .375rem; }
  .eg-c-dx__search > svg { width: 1.125rem; height: 1.125rem; }
}

.eg-c-dx__deliver { display: inline-flex; align-items: center; gap: .625rem; margin: 0; font-size: var(--t-meta); color: var(--c-text-2); }
.eg-c-dx__deliver b { color: var(--c-text); }
.eg-c-dx__ico {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none;
  border-radius: var(--radius-full); border: 1px solid var(--c-line-strong); color: var(--c-teal);
}
.eg-c-dx__ico svg { width: 1rem; height: 1rem; }

/* ---- filters -------------------------------------------------------------- */
.eg-c-dxf { padding: 0 var(--c-gut) clamp(1.5rem, 4vh, 2.5rem); }
.eg-c-dxf__in {
  width: 100%; max-width: 1320px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem;
  padding-top: 1.25rem; border-top: 1px solid var(--c-line);
}
.eg-c-dxf__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .625rem; min-width: 0; }
@media (min-width: 900px) { .eg-c-dxf__row { grid-template-columns: 10rem minmax(0, 1fr); align-items: center; } }
.eg-c-dxf__label { margin: 0; font-size: var(--t-label); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--c-text-3); }

/* THE NIGHT RAIL — nights, not a date picker. Wraps (never clips). */
.eg-c-nights { display: flex; flex-wrap: wrap; gap: .625rem; }
.eg-c-night {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: .625rem;
  align-items: end; min-height: 64px; padding: .625rem 1rem .625rem .875rem;
  border-radius: var(--radius-lg); border: 1px solid var(--c-line-strong); background: none; color: var(--c-text-2);
  font: inherit; text-align: left; cursor: pointer;
}
.eg-c-night__day {
  grid-row: 1 / 3; font-family: var(--font-headline); font-weight: 800; font-size: 2.5rem; line-height: .85;
  letter-spacing: -.04em; color: var(--c-text); font-variant-numeric: tabular-nums;
}
.eg-c-night__dow { font-size: var(--t-label); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eg-c-night__mon { grid-column: 2; font-size: var(--t-label); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent); }
.eg-c-night__dow { grid-column: 2; grid-row: 1; }
.eg-c-night__mon { grid-row: 2; }
.eg-c-night__n { grid-column: 1 / -1; margin-top: .375rem; font-size: .8125rem; color: var(--c-text-3); }
.eg-c-night--all .eg-c-night__day { font-size: 1.5rem; grid-row: 1; }
.eg-c-night--all .eg-c-night__n { grid-column: 1; margin-top: .25rem; }
.eg-c-night:hover { border-color: var(--c-text-2); }
.eg-c-night[aria-pressed="true"] { border-color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 12%, transparent); }
.eg-c-night[aria-pressed="true"] .eg-c-night__n { color: var(--c-text); }
.eg-c-night:focus-visible, .eg-c-cat:focus-visible, .eg-c-seg__b:focus-visible, .eg-c-dxf__clear:focus-visible {
  outline: 3px solid var(--c-accent); outline-offset: 2px;
}

/* Kinds of event. Counts are the truth: a 0 is shown as a 0. */
.eg-c-cats { display: flex; flex-wrap: wrap; gap: .5rem; }
.eg-c-cat {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .5rem .5rem 1rem;
  border-radius: var(--radius-full); border: 1px solid var(--c-line-strong); background: none;
  color: var(--c-text-2); font: inherit; font-size: var(--t-meta); font-weight: 600; cursor: pointer;
}
.eg-c-cat__n {
  display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 .4rem;
  border-radius: var(--radius-full); background: rgb(255 255 255 / .08); font-size: .8125rem; font-variant-numeric: tabular-nums;
}
.eg-c-cat:hover { color: var(--c-text); border-color: var(--c-text-2); }
.eg-c-cat[aria-pressed="true"] { background: var(--c-violet); border-color: transparent; color: var(--c-text); }
.eg-c-cat[aria-pressed="true"] .eg-c-cat__n { background: rgb(0 0 0 / .25); }
/* Phones: an operable "+n" disclosure instead of five rows of chips
   (UI/UX Pro Max "chip collection reflow"). Only when eg-discovery.js has
   added .eg-c-cats--fold, so without JavaScript every chip shows. */
.eg-c-cats__more { display: none; }
@media (max-width: 699.98px) {
  .eg-c-cats--fold:not(.is-open) .eg-c-cat[data-fold] { display: none; }
  .eg-c-cats--fold .eg-c-cats__more {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
    border-radius: var(--radius-full); border: 1px dashed var(--c-line-strong); background: none;
    color: var(--c-text); font: inherit; font-size: var(--t-meta); font-weight: 600; cursor: pointer;
  }
  .eg-c-cats__more:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
}

.eg-c-dxf__row--meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
@media (min-width: 900px) { .eg-c-dxf__row--meta { padding-left: 10.625rem; } }
.eg-c-seg { display: inline-flex; padding: 4px; border-radius: var(--radius-full); border: 1px solid var(--c-line-strong); }
.eg-c-seg__b {
  min-height: 40px; padding: 0 1rem; border: 0; border-radius: var(--radius-full); background: none;
  color: var(--c-text-2); font: inherit; font-size: var(--t-meta); font-weight: 600; cursor: pointer;
}
.eg-c-seg__b[aria-pressed="true"] { background: var(--c-text); color: var(--c-ink); }
.eg-c-dxf__count { margin: 0; font-size: var(--t-meta); color: var(--c-text-2); }
.eg-c-dxf__clear {
  min-height: 44px; padding: 0 .25rem; border: 0; background: none; color: var(--c-accent);
  font: inherit; font-size: var(--t-meta); font-weight: 600; text-decoration: underline; text-underline-offset: .3em; cursor: pointer;
}
.eg-c-dxf__clear[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .eg-c-night, .eg-c-cat, .eg-c-seg__b { transition: border-color .2s var(--c-ease), background-color .2s var(--c-ease), color .2s var(--c-ease), transform .15s var(--c-ease); }
  .eg-c-night:active, .eg-c-cat:active { transform: scale(.97); }
  .eg-c-night__day { transition: transform .35s var(--c-ease); }
  .eg-c-night[aria-pressed="true"] .eg-c-night__day { transform: translateY(-3px); }
}

/* ---- results: months ------------------------------------------------------- */
.eg-c-dxr { padding: 0 var(--c-gut) var(--c-sec); }
.eg-c-dxr > * { width: 100%; max-width: 1320px; margin-inline: auto; }
.eg-c-month { margin-bottom: clamp(3rem, 8vh, 5rem); }
.eg-c-month[hidden] { display: none; }
.eg-c-month__h {
  display: flex; align-items: flex-end; gap: 1rem; margin: 0 0 1.5rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--c-line);
}
/* The oversized month numeral: outlined, so it is scale without weight. */
.eg-c-month__n {
  font-family: var(--font-headline); font-weight: 800; font-size: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  line-height: .78; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  color: transparent; -webkit-text-stroke: 1.5px var(--c-text-3);
}
@supports not (-webkit-text-stroke: 1px black) { .eg-c-month__n { color: var(--c-line-strong); } }
.eg-c-month__w { padding-bottom: .5rem; font-size: var(--t-card); font-weight: 700; letter-spacing: -.01em; }

.eg-c-month__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }
@media (min-width: 640px) { .eg-c-month__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Wide: a PROGRAMME — the month sits in its own column beside its events,
   numeral over name, and stays in view while its events scroll past. */
@media (min-width: 1100px) {
  .eg-c-month { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .eg-c-month__h { flex-direction: column; align-items: flex-start; gap: .75rem; margin: 0; padding: 1rem 0 0; border-bottom: 0; border-top: 1px solid var(--c-line-strong); }
  .eg-c-month__w { padding: 0; }
}

/* The organiser's Featured listing: the wide slot, artwork beside the facts.
   The artwork is still shown whole (contain) — never cropped over. */
@media (min-width: 1100px) {
  .eg-c-dxr .eg-c-ecard--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .eg-c-dxr .eg-c-ecard--feature .eg-c-ecard__media { aspect-ratio: auto; height: 100%; }
}

/* A card that is focused or hovered re-frames its artwork a touch — the
   poster leans toward you. The art is contained, so nothing is cropped. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .eg-c-dxr .eg-c-ecard__art { transition: transform .6s var(--c-ease); }
  .eg-c-dxr .eg-c-ecard:hover .eg-c-ecard__art,
  .eg-c-dxr .eg-c-ecard:focus-within .eg-c-ecard__art { transform: scale(1.03); }
}

.eg-c-dxr__empty {
  display: grid; gap: .75rem; padding: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 2rem;
  border-radius: var(--radius-xl); border: 1px dashed var(--c-line-strong); color: var(--c-text-2);
}
.eg-c-dxr__empty[hidden] { display: none; }
.eg-c-dxr__empty p { margin: 0; max-inline-size: 60ch; }
.eg-c-dxr__empty-h { font-family: var(--font-headline); font-weight: 800; font-size: var(--t-title); color: var(--c-text); }
.eg-c-dxr__empty-a { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: .5rem; }
.eg-c-dxr__note { margin-top: 0; font-size: var(--t-meta); color: var(--c-text-3); max-inline-size: 70ch; }

/* ---- organiser close ------------------------------------------------------ */
.eg-c-dxo { padding: 0 var(--c-gut) var(--c-sec); }
.eg-c-dxo__in {
  width: 100%; max-width: 1320px; margin-inline: auto; display: grid; gap: 1rem; justify-items: start;
  padding: clamp(1.75rem, 5vw, 3.5rem); border-radius: var(--radius-xl);
  border: 1px solid var(--c-line); background: var(--c-ink-soft);
}
.eg-c-dxo__h { margin: 0; font-size: var(--t-section); }
.eg-c-dxo__a { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 559.98px) { .eg-c-dxo__a .eg-c-btn { flex: 1 1 100%; } }
