:root {
  color-scheme: dark;
  --ink: #fffaf7;
  --muted: #c7bdd3;
  --pink: #ff6ca8;
  --lavender: #65b9ff;
  --panel: rgba(18, 31, 63, .76);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #08152d;
}

body.modal-open { overflow: hidden; }

button, input { font: inherit; }

.page {
  min-height: 100svh;
  width: 100%;
  position: relative;
}

.gate-page {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 34px 18px;
  background:
    radial-gradient(circle at 85% 5%, rgba(255, 92, 167, .48), transparent 38%),
    radial-gradient(circle at 5% 88%, rgba(44, 151, 255, .48), transparent 42%),
    linear-gradient(145deg, #071932 0%, #173d73 42%, #a52e70 100%);
}

.glow { position: absolute; border-radius: 999px; filter: blur(55px); opacity: .28; pointer-events: none; }
.glow-one { width: 220px; height: 220px; background: var(--pink); top: -85px; right: -60px; }
.glow-two { width: 190px; height: 190px; background: #42a5ff; bottom: -70px; left: -60px; }

.gate-card {
  position: relative;
  z-index: 1;
  width: min(100%, 690px);
  padding: clamp(28px, 6vw, 52px);
  text-align: center;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 26px 90px rgba(0,0,0,.44);
  backdrop-filter: blur(18px);
}

.eyebrow { margin: 0 0 10px; color: #f7a9ca; font-size: .72rem; font-weight: 800; letter-spacing: .22em; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 600; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); }
.intro { margin: 16px auto 30px; color: var(--muted); line-height: 1.55; font-size: clamp(.94rem, 3vw, 1.06rem); }

.portrait-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 3vw, 24px); }
.portrait-slot { display: grid; justify-items: center; gap: 13px; }
.portrait-ring {
  width: 100%;
  aspect-ratio: 1;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--pink), #ffd2e4 47%, var(--lavender));
  box-shadow: 0 8px 26px rgba(0,0,0,.34);
}
.portrait-ring img { width: 100%; height: 100%; display: block; border: 3px solid #21142e; border-radius: 50%; object-fit: cover; }
.photo-one { object-position: 63% 43%; }
.photo-two { object-position: 58% 32%; }
.photo-three { object-position: 56% 39%; }
.photo-four { object-position: 30% 39%; }

.portrait-slot input {
  width: min(72px, 100%);
  height: 48px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  outline: none;
  background: rgba(7,4,12,.55);
  color: white;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: .12em;
  caret-color: var(--pink);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.portrait-slot input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,108,168,.15); transform: translateY(-1px); }
.portrait-slot input.bad { animation: shake .34s ease; border-color: #ff6a76; }
.portrait-slot input.good { border-color: #69e3ac; }
.message { min-height: 22px; margin: 18px 0 3px; color: #ff98a1; font-size: .9rem; }

.unlock-button {
  width: min(100%, 330px);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 16px 20px;
  border: 0;
  border-radius: 999px;
  color: #1c0d18;
  background: linear-gradient(100deg, #ff79ae, #dca3ff);
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255,108,168,.2);
}
.unlock-button:active { transform: scale(.985); }

.reveal-page {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  overflow: auto;
  background: linear-gradient(135deg, rgba(5, 27, 61, .88), rgba(120, 18, 76, .86));
  backdrop-filter: blur(10px);
  text-align: center;
}
.reveal-page[hidden] { display: none; }
.reveal-copy { padding: 0 0 16px; }
.reveal-copy h2 { font-size: clamp(2rem, 8vw, 3.8rem); }
.video-shell {
  position: relative;
  width: min(calc(100vw - 32px), 920px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 100px rgba(0,0,0,.82), 0 0 0 1px rgba(80,174,255,.22);
}
.video-shell video { display: block; width: 100%; max-height: calc(100svh - 145px); background: #000; }
.play-fallback {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  padding: 15px 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #170d24;
  font-weight: 800;
  cursor: pointer;
}
.modal-action {
  justify-self: center;
  margin: 18px auto 0;
  padding: 13px 24px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: linear-gradient(100deg, #ff79ae, #65b9ff);
  color: #08152d;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.modal-action:active { transform: scale(.985); }

@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@media (max-width: 540px) {
  .gate-card { padding: 30px 18px; border-radius: 24px; }
  .portrait-grid { grid-template-columns: repeat(2, minmax(0, 118px)); justify-content: center; row-gap: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; } }
