/* Participant registration — premium wizard (AITC) */

:root {
  --reg-page: #0b1f3a;
  --reg-gold: #c5a052;
  --reg-gold-light: #e8cc84;
  --reg-card: rgba(255, 255, 255, 0.04);
  --reg-border: rgba(255, 255, 255, 0.1);
  --reg-muted: rgba(255, 255, 255, 0.55);
  --reg-err: #f87171;
}

.reg-page {
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--reg-page);
  color: #f8fafc;
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  position: relative;
  overflow-x: hidden;
}

.reg-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.reg-ambient__grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.reg-ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
}

.reg-ambient__glow--gold {
  width: min(90vw, 420px);
  height: min(90vw, 420px);
  top: -6rem;
  right: -4rem;
  background: rgba(197, 160, 82, 0.2);
}

.reg-ambient__glow--blue {
  width: min(70vw, 360px);
  height: min(70vw, 360px);
  bottom: -3rem;
  left: -10%;
  background: rgba(30, 90, 170, 0.22);
}

.reg-ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.reg-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.25rem 1rem 1.5rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .reg-main {
    padding: 1.5rem 1.5rem 2rem;
  }
}

/* Same footprint as login.php login-card-wrap */
.reg-card-wrap {
  position: relative;
  width: 100%;
  max-width: min(100%, 23.5rem);
}

@media (min-width: 640px) {
  .reg-card-wrap {
    max-width: 25rem;
  }
}

@media (min-width: 768px) {
  .reg-card-wrap {
    max-width: 26rem;
  }
}

.reg-card-glow {
  pointer-events: none;
  position: absolute;
  inset: -1px;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(139, 36, 81, 0.22) 0%, rgba(139, 36, 81, 0.06) 40%, transparent 100%);
  opacity: 0.45;
  filter: blur(6px);
}

.reg-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.5px solid rgba(139, 36, 81, 0.38);
  border-left: 3px solid rgba(139, 36, 81, 0.65);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

@media (min-width: 640px) {
  .reg-card {
    border-radius: 1.25rem;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65);
  }
}

.reg-card__inner {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 1.25rem;
}

@media (min-width: 640px) {
  .reg-card__inner {
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

.reg-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0.25rem;
}

.reg-card-header__rule {
  width: 2.5rem;
  height: 3px;
  margin: 0 auto 1rem;
  background: linear-gradient(90deg, var(--reg-gold), var(--reg-gold-light), var(--reg-gold));
  border-radius: 2px;
}

.reg-logo {
  display: block;
  width: 100%;
  max-width: 15.5rem;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

@media (min-width: 380px) {
  .reg-logo {
    max-width: 17rem;
  }
}

@media (min-width: 640px) {
  .reg-logo {
    max-width: 20.5rem;
  }
}

.reg-kicker {
  margin: 0.85rem 0 0;
  font-size: clamp(0.72rem, 2.4vw, 0.8125rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--reg-gold-light);
  line-height: 1.45;
}

.reg-card-body {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 1rem;
  padding-top: 1rem;
}

.reg-theme-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.875rem, 2.8vw, 1rem);
  font-weight: 600;
  color: #e8d4a8;
  line-height: 1.45;
  text-align: center;
  margin: 0 0 0.85rem;
}

.reg-head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.reg-head--compact::before {
  display: none;
}

.reg-head--compact h1 {
  font-size: 1.125rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.reg-head h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.reg-head p {
  font-size: 0.8125rem;
  color: var(--reg-muted);
  margin: 0;
  line-height: 1.5;
}

/* Progress */
.reg-progress {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.reg-progress__seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.25s ease;
}

.reg-progress__seg.is-done,
.reg-progress__seg.is-active {
  background: linear-gradient(90deg, var(--reg-gold), var(--reg-gold-light));
}

.reg-progress__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.reg-progress__labels span.is-active {
  color: var(--reg-gold-light);
}

.reg-step-title {
  margin: 0 0 0.85rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--reg-gold-light);
}

.reg-step-title--spaced {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reg-step .reg-field:last-of-type {
  margin-bottom: 0.75rem;
}

/* Steps */
.reg-step {
  display: none;
  animation: regFadeUp 0.35s ease both;
}

.reg-step.is-active {
  display: block;
}

@keyframes regFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reg-field {
  margin-bottom: 1rem;
}

.reg-field--photo {
  margin-bottom: 1.1rem;
  text-align: center;
}

.reg-field--photo .reg-label {
  text-align: center;
}

.reg-field--photo .reg-hint,
.reg-field--photo .reg-error {
  text-align: center;
}

/* Photo upload (step 1) */
.reg-photo-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0.35rem auto 0;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reg-photo-upload__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--reg-gold), var(--reg-gold-light), rgba(139, 36, 81, 0.6));
  opacity: 0.55;
  z-index: 0;
}

.reg-photo-upload.has-photo .reg-photo-upload__ring {
  opacity: 0.85;
}

.reg-photo-upload__preview,
.reg-photo-upload__placeholder {
  position: relative;
  z-index: 1;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
}

.reg-photo-upload__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(197, 160, 82, 0.45);
  color: var(--reg-gold-light);
}

.reg-photo-upload__icon {
  display: flex;
  opacity: 0.85;
}

.reg-photo-upload__cta {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reg-photo-upload__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
}

.reg-photo-upload.is-invalid .reg-photo-upload__placeholder {
  border-color: rgba(248, 113, 113, 0.55);
}

.reg-photo-upload.is-invalid .reg-photo-upload__ring {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.6), rgba(248, 113, 113, 0.25));
}

/* Summary pass card */
.reg-pass {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(197, 160, 82, 0.22);
  border-radius: 12px;
}

.reg-pass__photo,
.reg-pass__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.reg-pass__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(197, 160, 82, 0.12);
  border: 1px solid rgba(197, 160, 82, 0.35);
  color: var(--reg-gold-light);
  font-weight: 700;
  font-size: 1.125rem;
}

.reg-pass__photo {
  border: 1px solid rgba(197, 160, 82, 0.35);
}

.reg-pass__body {
  min-width: 0;
  flex: 1;
}

.reg-pass__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  word-break: break-word;
}

.reg-pass__meta {
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  color: var(--reg-muted);
  line-height: 1.4;
  word-break: break-word;
}

.reg-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.4rem;
}

.reg-label--opt::after {
  content: ' (opsional)';
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.35);
}

.reg-input,
.reg-select,
.reg-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: #fff;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.reg-select {
  appearance: none;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23c5a052' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.reg-select option {
  background: #0b1f3a;
  color: #f8fafc;
}

.reg-textarea {
  resize: vertical;
  min-height: 4.5rem;
}

.reg-input:focus,
.reg-select:focus,
.reg-textarea:focus {
  outline: none;
  border-color: rgba(197, 160, 82, 0.5);
  box-shadow: 0 0 0 2px rgba(197, 160, 82, 0.12);
}

.reg-input.is-invalid,
.reg-select.is-invalid,
.reg-textarea.is-invalid {
  border-color: rgba(248, 113, 113, 0.55);
}

.reg-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.35rem;
}

.reg-error {
  font-size: 0.75rem;
  color: var(--reg-err);
  margin-top: 0.35rem;
}

.reg-flash {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.reg-flash--err {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

/* Summary */
.reg-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.reg-summary--compact {
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.reg-summary--compact .reg-summary__row {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}

.reg-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.8125rem;
}

.reg-summary__row dt {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  flex-shrink: 0;
}

.reg-summary__row dd {
  margin: 0;
  text-align: right;
  color: #fff;
  word-break: break-word;
}

.reg-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.75rem;
  color: var(--reg-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  cursor: pointer;
}

.reg-error--check {
  margin-top: -0.5rem;
  margin-bottom: 0.85rem;
}

.reg-check input {
  margin-top: 0.2rem;
  accent-color: var(--reg-gold);
}

/* Buttons */
.reg-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.reg-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
  border: none;
}

.reg-btn:active {
  transform: scale(0.98);
}

.reg-btn--ghost {
  flex: 0 0 auto;
  min-width: 5.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

.reg-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.28);
}

.reg-btn--gold {
  background: linear-gradient(135deg, #c5a052 0%, #e8cc84 45%, #b89150 100%);
  color: #0b1f3a;
  box-shadow: 0 4px 20px rgba(197, 160, 82, 0.25);
}

.reg-btn--gold:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.reg-btn--gold:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.reg-btn--full {
  width: 100%;
}

/* Success */
.reg-success {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.reg-success__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #6ee7b7;
}

.reg-code-box {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(197, 160, 82, 0.35);
  border-radius: 12px;
}

.reg-code-box__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--reg-gold-light);
  margin-bottom: 0.35rem;
}

.reg-code-box__code {
  font-family: ui-monospace, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.reg-footer-links {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--reg-muted);
}

.reg-footer-links a {
  color: var(--reg-gold-light);
  text-decoration: none;
  font-weight: 600;
}

.reg-footer-links a:hover {
  text-decoration: underline;
}

.reg-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.85rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.reg-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.reg-trust svg {
  opacity: 0.65;
  color: var(--reg-gold);
}
