/* An event's registration form on its own page (part event-registrations; app/page.py registration_page). The event's
   colours arrive as --ep-brand and --ep-accent; everything else is drawn from them, so every event gets its own look.
   The form inside the card is styled by registration.js (classes rr-…). */

:root {
  --ep-brand: #2f5d8a;
  --ep-accent: #2f5d8a;
  --ep-ink: #1d232b;
  --ep-muted: #5b6470;
  --ep-line: #dfe4ea;
  --ep-page: #f5f7fa;
  --ep-tint: color-mix(in srgb, var(--ep-brand) 9%, #ffffff);
  --ep-tint-2: color-mix(in srgb, var(--ep-accent) 14%, #ffffff);
  --ep-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ep {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ep-font);
  color: var(--ep-ink);
  background: var(--ep-page);
  line-height: 1.5;
}

/* Preview banner: stays at the top while scrolling. */
.ep-preview {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: .35rem .6rem; justify-content: center; align-items: center;
  padding: .6rem 1rem; text-align: center; font-size: .95rem;
  color: #3d2a00; background: #ffe7a3; border-bottom: 1px solid #f0c95a;
}
.ep-preview strong { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }

/* The header: a soft wash in the event's colours with a few large, very light circles behind. */
.ep-hero {
  position: relative; overflow: hidden;
  padding: clamp(2rem, 5vw, 3.75rem) 1.25rem clamp(5.5rem, 9vw, 7rem);
  background:
    radial-gradient(circle at 8% 18%, var(--ep-tint-2) 0 7rem, transparent 7.05rem),
    radial-gradient(circle at 92% 12%, var(--ep-tint) 0 10rem, transparent 10.05rem),
    radial-gradient(circle at 78% 92%, var(--ep-tint-2) 0 5rem, transparent 5.05rem),
    linear-gradient(160deg, #ffffff 0%, var(--ep-tint) 100%);
  border-bottom: 1px solid var(--ep-line);
}
.ep-hero-in {
  position: relative;
  max-width: 60rem; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center;
}
.ep-brand {
  background: #ffffff; border-radius: 22px; padding: clamp(1rem, 3vw, 1.6rem) clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px -12px color-mix(in srgb, var(--ep-brand) 35%, transparent);
}
.ep-logo { display: block; width: min(320px, 72vw); height: auto; }
.ep-info { min-width: 0; }
.ep-title {
  margin: 0 0 .75rem; font-size: clamp(1.6rem, 3.6vw, 2.35rem); line-height: 1.15; font-weight: 750; letter-spacing: -.01em;
  color: color-mix(in srgb, var(--ep-brand) 80%, #0b1220);
}
.ep-has-logo .ep-title {                 /* the logo carries the event's name: the title stays for screen readers */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.ep-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.ep-lines li { font-size: clamp(1.05rem, 2.1vw, 1.25rem); color: var(--ep-ink); }
.ep-lines li:first-child { font-weight: 650; color: color-mix(in srgb, var(--ep-brand) 85%, #0b1220); }
.ep-note {
  display: inline-block; margin: 1rem 0 0; padding: .5rem 1rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem;
  color: color-mix(in srgb, var(--ep-brand) 88%, #0b1220);
  background: color-mix(in srgb, var(--ep-brand) 12%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--ep-brand) 28%, #ffffff);
}

@media (min-width: 52rem) {
  .ep-hero-in { flex-direction: row; justify-content: center; text-align: left; gap: 2.75rem; }
  .ep-has-logo .ep-info { padding-left: 2.75rem; border-left: 2px solid color-mix(in srgb, var(--ep-brand) 22%, transparent); }
  .ep-lines { justify-items: start; }
}

/* The form in a card that rises into the header. */
.ep-main { padding: 0 1rem 3rem; }
.ep-card {
  position: relative;
  max-width: 50rem; margin: clamp(-4.5rem, -7vw, -3.5rem) auto 0;
  background: #ffffff; border: 1px solid var(--ep-line); border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 20px 48px -24px rgba(16, 24, 40, .22);
  overflow: hidden;
}
.ep-card::before {                       /* a thin band in the event's two colours along the card's top edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--ep-brand), var(--ep-accent));
}
.ep-card .rr { --activa-font: var(--ep-font); --activa-text: var(--ep-ink); --activa-muted: var(--ep-muted); }
.ep-notice {                             /* a form not open: its one message in place of the form */
  margin: 0; padding: 1.1rem 1.25rem; border-left: 4px solid var(--ep-brand); background: #f8fafc;
  font-size: 1.05rem; white-space: pre-line;
}
.ep-noscript { margin: 0; padding: 1rem; border-left: 4px solid #b42318; background: #fff5f4; }

/* The event's own words at the foot (e.g. the organiser's secretariat). */
.ep-foot {
  max-width: 50rem; margin: 2rem auto 0; padding: 0 .5rem;
  text-align: center; color: var(--ep-muted); font-size: .9rem;
}
.ep-foot p { margin: 0; white-space: pre-line; }

@media (max-width: 30rem) {
  .ep-main { padding: 0 .5rem 2rem; }
  .ep-card { border-radius: 14px; }
  .ep-note { border-radius: 14px; }
}
@media print {
  .ep-preview { display: none; }
  .ep-hero { background: none; }
  .ep-card { box-shadow: none; }
}
