:root {
  --virtius-blue: #1E8FFF;
  --virtius-blue-dark: #0B72D9;
  --ink: #111418;
  --muted: #5a6370;
  --panel-bg: rgba(255, 255, 255, 0.86);
  --panel-radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #e9ecef;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #c9ced4;
  background-image: url("assets/bg.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 8px 14px 8px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, transform 0.05s ease;
}
.back-btn:hover { background: #fff; }
.back-btn:active { transform: translateY(1px); }
.back-btn[hidden] { display: none; }

.step {
  width: 100%;
  max-width: 720px;
  animation: fadeIn 0.35s ease-out;
}
.step[data-step="welcome"],
.step[data-step="thanks"] {
  max-width: 720px;
}
.step[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--panel-radius);
  padding: 44px 48px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
.panel-wide { max-width: 820px; margin: 0 auto; }
.panel.center { text-align: center; }

.logo-mark {
  position: relative;
  width: min(360px, 65%);
  margin: 90px auto 28px;
}
.logo-mark .virtius-wordmark {
  width: 100%;
  height: auto;
  display: block;
}
.logo-mark .popup-wordmark {
  position: absolute;
  left: 0;
  bottom: 92%;
  width: 70%;
  height: auto;
  display: block;
  transform: translateX(-12.2%);
  z-index: 2;
}

.event-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
}
.event-logos img {
  height: 160px;
  width: auto;
  object-fit: contain;
  display: block;
}
.event-logos .venue-logo {
  height: 105px;
}

h1 {
  font-size: 38px;
  text-align: center;
  margin: 8px 0 4px;
  letter-spacing: 0.02em;
}
h2 {
  font-size: 26px;
  margin: 0 0 12px;
  line-height: 1.2;
}
.panel.center h2 { margin-top: 16px; }

p { margin: 6px 0; line-height: 1.5; }
.muted { color: var(--muted); }
.muted-italic { color: var(--muted); font-style: italic; text-align: center; }
.emphasis { font-weight: 700; text-align: center; margin: 14px 0 4px; }
.nowrap { white-space: nowrap; }
.panel:not(.panel-wide):not(.center) > p:not(.muted):not(.muted-italic):not(.emphasis) {
  text-align: center;
}

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  margin: 18px 0;
  background: #000 center / cover no-repeat;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: filter 0.15s ease;
}
.video-facade:hover { filter: brightness(1.08); }
.video-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-facade .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, opacity 0.15s ease;
  opacity: 0.92;
  pointer-events: none;
}
.video-facade:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
.video-facade .play-btn svg { width: 100%; height: 100%; display: block; }

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.panel:not(.panel-wide):not(.center) .cta-row { justify-content: center; }

.btn-primary {
  background: var(--virtius-blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 22px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-primary:hover { background: var(--virtius-blue-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.hint { color: var(--muted); font-size: 13px; }
kbd {
  background: #fff;
  border: 1px solid #d4d8de;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  font: inherit;
  font-size: 11px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.choice {
  background: rgba(30, 143, 255, 0.12);
  color: var(--virtius-blue-dark);
  border: 1px solid rgba(30, 143, 255, 0.35);
  font: inherit;
  font-weight: 500;
  font-size: 16px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.choice:hover {
  background: rgba(30, 143, 255, 0.22);
  border-color: var(--virtius-blue);
}
.choice .key {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  background: rgba(30, 143, 255, 0.2);
  border-radius: 4px;
  font-weight: 700;
  margin-right: 10px;
  font-size: 13px;
}

.faq p { margin: 10px 0; }
.faq strong { color: var(--ink); }
.faq a { color: var(--virtius-blue-dark); }

.faq-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-collapsible > summary::-webkit-details-marker { display: none; }
.faq-collapsible > summary h2 { margin: 0; }

@media (min-width: 641px) {
  .faq-collapsible > summary { cursor: default; pointer-events: none; }
}

#email-form input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 22px;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid var(--virtius-blue);
  background: transparent;
  outline: none;
  color: var(--ink);
}
#email-form input[type="email"]::placeholder {
  color: #a3a9b2;
  font-weight: 300;
}

.error {
  color: #c0392b;
  font-size: 14px;
  margin-top: 10px;
}

.consent-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin: 14px 0 0;
}
.consent-note a {
  color: var(--virtius-blue-dark);
}

@media (max-width: 640px) {
  .panel { padding: 28px 22px; }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }

  .stage {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    padding: 20px 12px 40px;
    gap: 20px;
  }
  .step { width: 100%; animation: none; }
  .step[hidden]:not([data-step="thanks"]) { display: block !important; }

  .step[data-step="welcome"] {
    min-height: calc(100dvh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
  }

  .back-btn { display: none !important; }
  .hint, .choices { display: none !important; }
  .step[data-step="welcome"] .cta-row,
  .step[data-step="faq"] .cta-row { display: none !important; }

  body[data-step="thanks"] .step[data-step="email"] { display: none !important; }
  .step[data-step="thanks"] .logo-mark,
  .step[data-step="thanks"] .event-logos { display: none !important; }

  .event-logos { gap: 24px; margin-top: 24px; }
  .event-logos img { height: 120px; }
  .event-logos .venue-logo { height: 80px; }
  .logo-mark { width: 78%; margin-top: 60px; margin-bottom: 0; }

  .faq-collapsible > summary::after {
    content: "⌄";
    margin-left: auto;
    font-size: 22px;
    color: var(--virtius-blue);
    transition: transform 0.2s ease;
    line-height: 1;
  }
  .faq-collapsible[open] > summary::after { transform: rotate(180deg); }
}
