/* ==========================================================
   THE TABLE — Public Site Styles
   Palette: deep purple, white, light cream
   ========================================================== */

:root {
  --purple: #5b2c83;
  --purple-dark: #34155a;
  --purple-light: #7c4aa5;
  --purple-soft: #ede3f5;
  --cream: #faf3e7;
  --cream-deep: #f0e4d0;
  --white: #ffffff;
  --ink: #2a1c1e;
  --muted: #7a6a63;
  --gold: #c79a4b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(110, 20, 35, 0.12);
  --shadow-card: 0 6px 20px rgba(110, 20, 35, 0.08);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-light); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(199,154,75,0.18), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(199,154,75,0.12), transparent 40%),
    linear-gradient(160deg, var(--purple-dark) 0%, var(--purple) 55%, var(--purple-light) 100%);
  color: var(--white);
  padding: 4.5rem 1rem 5rem;
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60px;
  background: var(--cream);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
}

.hero .eyebrow {
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero .brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 8vw, 5rem);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.hero .tagline {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.25rem;
}

.hero .subtitle {
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.75rem;
}

.hero .agenda-strip {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.9rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2.25rem;
  backdrop-filter: blur(4px);
}

.hero .agenda-strip span:not(:last-child)::after {
  content: "•";
  margin-left: 0.9rem;
  color: var(--gold);
}

.btn-pre-register {
  background: var(--gold);
  color: var(--purple-dark);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  padding: 0.95rem 2.75rem;
  border-radius: 999px;
  border: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-pre-register:hover {
  background: #d8ac5c;
  color: var(--purple-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.3);
}

.spots-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

/* ---------------- Event details ---------------- */

.details-section {
  padding: 4rem 1rem 3rem;
  background: var(--cream);
}

.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  color: var(--purple);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.section-heading .rule {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  height: 100%;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--cream-deep);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.detail-card .icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.detail-card .label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.detail-card .value {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.4;
}

.host-banner {
  margin-top: 2.5rem;
  background: var(--white);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.host-banner .label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.host-banner .value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--purple);
  font-weight: 700;
}

.cta-wrap {
  text-align: center;
  padding: 2.5rem 1rem 4rem;
}

.cta-wrap .btn-pre-register {
  background: var(--purple);
  color: var(--white);
}

.cta-wrap .btn-pre-register:hover {
  background: var(--purple-light);
}

.closed-banner {
  max-width: 640px;
  margin: 3rem auto;
  background: var(--white);
  border-left: 5px solid var(--purple);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.closed-banner i { font-size: 2.5rem; color: var(--purple); margin-bottom: 0.75rem; }

/* ---------------- Event hub (landing / events list) ---------------- */

.hero-hub { padding-bottom: 3.5rem; }

.hero-logo {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.4);
  margin-bottom: 1rem;
  background: var(--white);
}

.event-hub-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  color: inherit;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--cream-deep);
}

.event-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  color: inherit;
}

.event-hub-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.event-hub-thumb i { font-size: 2.5rem; color: rgba(255,255,255,0.6); }

.event-hub-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: var(--white);
}

.event-hub-badge.badge-open { background: #1e7e34; }
.event-hub-badge.badge-closed { background: #b3261e; }
.event-hub-badge.badge-past { background: var(--muted); }

.event-hub-body { padding: 1.25rem 1.4rem 1.5rem; }
.event-hub-body h3 { font-size: 1.2rem; color: var(--purple); margin-bottom: 0.35rem; }
.event-hub-tagline { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.event-hub-meta { font-size: 0.85rem; color: var(--ink); margin-bottom: 0.35rem; }

.event-hub-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--purple);
}

/* ---------------- Single event extras ---------------- */

.event-flyer-wrap { text-align: center; margin-bottom: 2rem; }
.event-flyer-img {
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.event-description {
  max-width: 680px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--ink);
  line-height: 1.7;
}

/* ---------------- Footer ---------------- */

.table-footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 1rem;
}

.table-footer .footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.text-muted-cream { color: rgba(255,255,255,0.55) !important; }

/* ---------------- Registration form ---------------- */

.form-page {
  padding: 2.5rem 1rem 4rem;
}

.form-shell {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.form-shell .form-header {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: var(--white);
  padding: 2.25rem 1.75rem;
  text-align: center;
}

.form-shell .form-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.35rem;
}

.form-shell .form-header p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 0.95rem;
}

.form-body { padding: 2rem 1.75rem 2.5rem; }

.form-section-title {
  font-weight: 700;
  color: var(--purple);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.75rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cream-deep);
}

.form-section-title:first-child { margin-top: 0; }

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.form-label .req { color: var(--purple); }

.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid #e6dccb;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 0.2rem rgba(110,20,35,0.12);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
}

.topic-chip {
  position: relative;
}

.topic-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
}

.topic-chip label {
  display: block;
  text-align: center;
  padding: 0.6rem 0.5rem;
  border: 1.5px solid #e6dccb;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--cream);
}

.topic-chip input:checked + label {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
  font-weight: 600;
}

.anon-note {
  background: var(--purple-soft);
  border-left: 4px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--purple-dark);
  margin-top: 0.6rem;
}

.consent-box {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--cream-deep);
  margin-top: 1.75rem;
}

.btn-submit-registration {
  width: 100%;
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.95rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  margin-top: 1.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-submit-registration:hover { background: var(--purple-light); transform: translateY(-2px); }
.btn-submit-registration:disabled { opacity: 0.65; transform: none; }

.age-readout {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.field-error {
  color: #b3261e;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.is-invalid ~ .field-error,
.field-error.show { display: block; }

/* ---------------- Success page ---------------- */

.success-page { padding: 3rem 1rem 4rem; }

.success-shell {
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: center;
}

.success-header {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: var(--white);
  padding: 2.75rem 1.75rem 2.25rem;
}

.success-header .checkmark {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1rem;
  color: var(--gold);
}

.success-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.4rem;
}

.success-body { padding: 2rem 1.75rem; }

.reg-number-badge {
  display: inline-block;
  background: var(--purple-soft);
  color: var(--purple);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 1px;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  margin: 0.5rem 0 1.5rem;
}

.success-detail-list {
  text-align: left;
  border-top: 1px solid var(--cream-deep);
  padding-top: 1.25rem;
}

.success-detail-list .row-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--cream-deep);
  font-size: 0.92rem;
}

.success-detail-list .row-item .k { color: var(--muted); font-weight: 500; }
.success-detail-list .row-item .v { font-weight: 600; text-align: right; }

.qr-wrap { margin: 1.5rem 0; }
.qr-wrap canvas, .qr-wrap img { border: 6px solid var(--cream); border-radius: var(--radius-sm); }

.success-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.success-actions .btn { flex: 1 1 200px; border-radius: 999px; padding: 0.7rem 1rem; font-weight: 600; }

@media (max-width: 576px) {
  .form-body { padding: 1.5rem 1.1rem 2rem; }
  .form-shell, .success-shell { border-radius: var(--radius-md); }
}
