@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/cinzel-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: #000;
  color: #c9c9d6;
  font-family: 'Space Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

.void {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(60, 20, 90, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(20, 40, 90, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 70%, rgba(90, 10, 40, 0.25) 0%, transparent 55%),
    #050507;
  z-index: -3;
}

.stars, .stars::before, .stars::after {
  position: fixed;
  top: 0; left: 0;
  width: 1px; height: 1px;
  background: transparent;
  z-index: -2;
}
.stars {
  box-shadow:
    127px 412px #fff, 813px 156px #fff, 442px 998px #fff, 234px 67px #fff,
    890px 543px #fff, 78px 821px #fff, 1234px 234px #fff, 567px 1098px #fff,
    345px 456px #fff, 901px 789px #fff, 156px 234px #fff, 678px 567px #fff,
    1456px 890px #fff, 234px 1234px #fff, 789px 345px #fff, 1123px 678px #fff,
    456px 901px #fff, 890px 123px #fff, 234px 567px #fff, 678px 890px #fff,
    1345px 456px #fff, 67px 789px #fff, 990px 234px #fff, 567px 678px #fff,
    890px 1098px #fff, 234px 123px #fff, 1234px 567px #fff, 456px 234px #fff,
    789px 890px #fff, 1098px 345px #fff, 234px 678px #fff, 567px 1234px #fff;
  animation: drift 240s linear infinite;
}
.stars::before {
  content: '';
  box-shadow:
    213px 678px #ddd, 902px 234px #ddd, 345px 891px #ddd, 1098px 456px #ddd,
    567px 123px #ddd, 789px 1098px #ddd, 234px 345px #ddd, 1456px 678px #ddd,
    890px 891px #ddd, 123px 567px #ddd, 678px 234px #ddd, 1234px 901px #ddd,
    456px 1234px #ddd, 891px 678px #ddd, 234px 891px #ddd, 1098px 234px #ddd;
  animation: drift 360s linear infinite;
  opacity: 0.6;
}
.stars::after {
  content: '';
  box-shadow:
    400px 200px #b8a4ff, 800px 600px #ff9bd9, 200px 800px #9ed6ff,
    1100px 300px #b8a4ff, 600px 100px #ff9bd9, 1300px 700px #9ed6ff,
    300px 500px #b8a4ff, 950px 900px #ff9bd9, 100px 1100px #9ed6ff;
  animation: drift 180s linear infinite, twinkle 3s ease-in-out infinite alternate;
  opacity: 0.85;
}
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-1500px); }
}
@keyframes twinkle {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  z-index: 1;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%22200%22%3E%3Cfilter%20id%3D%22n%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20values%3D%220%200%200%200%201%20%200%200%200%200%201%20%200%200%200%200%201%20%200%200%200%200.6%200%22%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url(%23n)%22%2F%3E%3C%2Fsvg%3E");
  mix-blend-mode: overlay;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(255,255,255,0.015) 3px,
    transparent 4px
  );
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.85) 100%);
}

.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
}

.sigil {
  width: 240px;
  height: 240px;
  margin-bottom: 3rem;
  position: relative;
  animation: float 8s ease-in-out infinite;
}

.sigil-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.sigil-layer svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sigil-layer--outer {
  animation: spin 60s linear infinite;
}
.sigil-layer--heptagram {
  animation: spin 30s linear infinite reverse;
}

.sigil .pupil {
  animation: pulse-pupil 4s ease-in-out infinite;
  transform-box: view-box;
  transform-origin: center;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse-pupil {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.title {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  letter-spacing: 0.18em;
  color: #f4f0ff;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow:
    0 0 20px rgba(184, 164, 255, 0.4),
    0 0 40px rgba(184, 164, 255, 0.2),
    0 0 80px rgba(120, 80, 200, 0.15);
  position: relative;
  animation: title-breathe 6s ease-in-out infinite;
}
@keyframes title-breathe {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(184, 164, 255, 0.4),
      0 0 40px rgba(184, 164, 255, 0.2),
      0 0 80px rgba(120, 80, 200, 0.15);
  }
  50% {
    text-shadow:
      0 0 30px rgba(184, 164, 255, 0.6),
      0 0 60px rgba(184, 164, 255, 0.35),
      0 0 120px rgba(120, 80, 200, 0.25);
  }
}

.title::before, .title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
}
.title::before {
  color: #ff2e6c;
  animation: glitch-1 7s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  transform: translate(-2px, 0);
}
.title::after {
  color: #00e5ff;
  animation: glitch-2 9s infinite;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
  transform: translate(2px, 0);
}
@keyframes glitch-1 {
  0%, 92%, 100% { opacity: 0; transform: translate(0, 0); }
  93% { opacity: 0.8; transform: translate(-3px, 1px); }
  94% { opacity: 0.6; transform: translate(2px, -1px); }
  95% { opacity: 0.9; transform: translate(-2px, 0); }
  96% { opacity: 0; }
}
@keyframes glitch-2 {
  0%, 88%, 100% { opacity: 0; transform: translate(0, 0); }
  89% { opacity: 0.7; transform: translate(3px, -1px); }
  90% { opacity: 0.5; transform: translate(-2px, 1px); }
  91% { opacity: 0.8; transform: translate(2px, 0); }
  92% { opacity: 0; }
}

.whisper {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(184, 164, 255, 0.5);
  margin-bottom: 5rem;
  animation: whisper-fade 8s ease-in-out infinite;
}
@keyframes whisper-fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

.contact {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.contact-label {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(201, 201, 214, 0.7);
}

.form {
  width: 100%;
  display: flex;
  gap: 0;
  position: relative;
  border: 1px solid rgba(184, 164, 255, 0.25);
  background: rgba(10, 5, 20, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.4s ease;
}
.form::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(90deg, transparent, rgba(184, 164, 255, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(8px);
}
.form:focus-within {
  border-color: rgba(184, 164, 255, 0.7);
}
.form:focus-within::before {
  opacity: 1;
}

.form .honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1.1rem 1.25rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  color: #f4f0ff;
  letter-spacing: 0.05em;
}
.form input[type="email"]::placeholder {
  color: rgba(201, 201, 214, 0.55);
  letter-spacing: 0.1em;
  font-style: italic;
}

.form button {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(184, 164, 255, 0.2);
  color: rgba(184, 164, 255, 0.85);
  padding: 0 1.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}
.form button:hover {
  background: rgba(184, 164, 255, 0.1);
  color: #fff;
}
.form button:focus-visible {
  outline: 1px solid rgba(184, 164, 255, 0.7);
  outline-offset: 4px;
  color: #fff;
}
.form button:disabled {
  cursor: wait;
  opacity: 0.7;
  color: rgba(184, 164, 255, 0.5);
}
.form input[type="email"]:focus-visible {
  outline: none;
}

.transmission-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(10, 5, 20, 0.85) 0%, rgba(0, 0, 0, 0.95) 80%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
  outline: none;
}
.transmission-modal:focus-visible {
  outline: none;
}
.transmission-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.transmission-modal .seal {
  width: 120px;
  height: 120px;
  margin-bottom: 3rem;
  animation: seal-pulse 4s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 1.4s ease 0.3s, transform 1.8s cubic-bezier(.2,.6,.2,1) 0.3s;
}
.transmission-modal.is-open .seal { opacity: 1; transform: scale(1); }
.transmission-modal .seal svg { width: 100%; height: 100%; overflow: visible; }
@keyframes seal-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(184,164,255,0.3)); }
  50%      { filter: drop-shadow(0 0 14px rgba(184,164,255,0.6)); }
}
.transmission-modal .received {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  letter-spacing: 0.25em;
  color: #f4f0ff;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow:
    0 0 20px rgba(184, 164, 255, 0.4),
    0 0 40px rgba(184, 164, 255, 0.2);
  opacity: 0;
  transition: opacity 1.6s ease 0.8s;
}
.transmission-modal.is-open .received { opacity: 1; }
.transmission-modal .modal-whisper {
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(184, 164, 255, 0.55);
  margin-bottom: 3rem;
  opacity: 0;
  transition: opacity 1.6s ease 1.2s;
}
.transmission-modal.is-open .modal-whisper { opacity: 1; }
.transmission-modal .modal-body {
  max-width: 420px;
  font-size: 0.85rem;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: rgba(201,201,214,0.75);
  opacity: 0;
  transition: opacity 1.6s ease 1.6s;
}
.transmission-modal.is-open .modal-body { opacity: 1; }
.transmission-modal .modal-body em {
  font-style: normal;
  color: #f4f0ff;
  letter-spacing: 0.12em;
}

.seal {
  width: 120px;
  height: 120px;
  margin-bottom: 3rem;
  animation: seal-pulse-standalone 4s ease-in-out infinite;
}
.seal svg { width: 100%; height: 100%; overflow: visible; }
@keyframes seal-pulse-standalone {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(184,164,255,0.3)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 14px rgba(184,164,255,0.6)); transform: scale(1.02); }
}

.received {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  letter-spacing: 0.25em;
  color: #f4f0ff;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  text-shadow:
    0 0 20px rgba(184, 164, 255, 0.4),
    0 0 40px rgba(184, 164, 255, 0.2);
  animation: title-breathe 6s ease-in-out infinite;
}

.bodytext {
  max-width: 420px;
  font-size: 0.85rem;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: rgba(201,201,214,0.7);
}
.bodytext em {
  font-style: normal;
  color: #f4f0ff;
  letter-spacing: 0.12em;
}

.footer {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 0.65rem;
  letter-spacing: 0.5em;
  color: rgba(201, 201, 214, 0.25);
  text-transform: uppercase;
}

.return-link {
  color: #f4f0ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 164, 255, 0.4);
  padding-bottom: 2px;
  letter-spacing: 0.15em;
  transition: all 0.3s ease;
}
.return-link:hover,
.return-link:focus-visible {
  color: #b8a4ff;
  border-bottom-color: rgba(184, 164, 255, 0.8);
  outline: none;
}

@media (max-width: 600px) {
  .sigil { width: 180px; height: 180px; margin-bottom: 2rem; }
  .seal { width: 90px; height: 90px; margin-bottom: 2rem; }
  .whisper { margin-bottom: 3rem; font-size: 0.7rem; letter-spacing: 0.3em; }
  .form { flex-direction: column; }
  .form button {
    border-left: none;
    border-top: 1px solid rgba(184, 164, 255, 0.2);
    padding: 1rem;
  }
  .transmission-modal .seal { width: 90px; height: 90px; margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .stars, .stars::before, .stars::after,
  .sigil, .sigil-layer--outer, .sigil-layer--heptagram, .sigil .pupil,
  .title, .title::before, .title::after,
  .whisper, .transmission-modal .seal, .seal {
    animation: none !important;
  }
  .transmission-modal,
  .transmission-modal .seal,
  .transmission-modal .received,
  .transmission-modal .modal-whisper,
  .transmission-modal .modal-body {
    transition-duration: 200ms !important;
    transition-delay: 0ms !important;
  }
}
