*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #f5f8ff;
  --accent: #f6c65d;
  --blue: #6da2ff;
  --card: rgba(9, 18, 50, 0.88);
  --card-strong: rgba(7, 12, 38, 0.96);
  --stroke: rgba(255, 255, 255, 0.16);
  --muted: rgba(255, 255, 255, 0.7);
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: #050914;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

.video-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05) brightness(0.45);
}

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(32, 64, 120, 0.25), #050914),
    linear-gradient(135deg, rgba(5, 9, 20, 0.9), rgba(12, 30, 62, 0.6));
}

.portal {
  min-height: 100vh;
  padding: clamp(48px, 8vw, 110px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 52px);
  text-align: center;
  position: relative;
  z-index: 1;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 40px);
  flex-wrap: wrap;
}

.logo-36 {
  width: min(220px, 60vw);
  filter: drop-shadow(0 18px 45px rgba(0, 0, 0, 0.55));
}

.brand-block {
  text-align: left;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Cinzel", "Times New Roman", serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  color: #e5efff;
}

.brand-name img {
  width: 56px;
}

.brand-tagline {
  margin: 10px 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.portal-card {
  width: min(560px, 92vw);
  position: relative;
  padding: 38px 32px;
  border-radius: 30px;
  background: linear-gradient(165deg, var(--card), var(--card-strong));
  border: 1px solid var(--stroke);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at top,
      rgba(109, 162, 255, 0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom,
      rgba(246, 198, 93, 0.14),
      transparent 60%
    );
  opacity: 0.85;
  pointer-events: none;
}

.portal-card > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.portal-title {
  margin: 12px 0 8px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.portal-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.98rem;
}

.portal-form {
  display: grid;
  gap: 16px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.field input {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.field input:focus {
  border-color: rgba(246, 198, 93, 0.8);
  box-shadow: 0 0 0 3px rgba(246, 198, 93, 0.2);
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: #1b1202;
  box-shadow: 0 12px 24px rgba(246, 198, 93, 0.3);
}

.btn-muted {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f6ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(246, 198, 93, 0.5);
  outline-offset: 2px;
}

.helper {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(420px, 92vw);
  background: rgba(10, 18, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 28px 24px;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.is-visible .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-card h2 {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 1.4rem;
  margin: 0 0 10px;
}

.modal-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: transform, opacity;
}

.reveal.is-visible {
  animation: reveal 1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .brand-block {
    text-align: center;
  }

  .brand-name {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .portal-card {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .logo-36 {
    width: min(180px, 70vw);
  }

  .brand-tagline {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
