@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,600&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --ink: #0d0712;
  --night: #160b1d;
  --cream: #f4e8d1;
  --muted: #c9b7b1;
  --orange: #ff7a1a;
  --orange-soft: #ffae4a;
  --purple: #71309a;
  --acid: #c7e56d;
  --line: rgba(244, 232, 209, 0.22);
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(113, 48, 154, 0.36), transparent 39rem),
    linear-gradient(160deg, var(--night), var(--ink) 55%);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
  content: '';
  opacity: 0.25;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.85rem;
  transform: translateY(-160%);
  border-radius: 0.25rem;
  background: var(--cream);
  color: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.gate-active {
  overflow: hidden;
}

.breach {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background: #020504;
  color: #a9ffcf;
  perspective: 1100px;
}

.breach[hidden] {
  display: none;
}

.door-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50% + 1px);
  overflow: hidden;
  border-color: rgba(89, 255, 171, 0.22);
  background:
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(89, 255, 171, 0.028) 4px 5px),
    radial-gradient(circle at 50% 44%, rgba(32, 116, 80, 0.16), transparent 28rem),
    linear-gradient(145deg, #07110d, #010403 70%);
  box-shadow: inset 0 0 5rem rgba(0, 0, 0, 0.88);
  transition: transform 1.25s cubic-bezier(0.7, 0, 0.2, 1), opacity 1.1s ease;
  will-change: transform;
}

.door-panel::before,
.door-panel::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #69ffc0;
  box-shadow: 0 0 1rem rgba(89, 255, 171, 0.8);
  content: '';
  opacity: 0.24;
  animation: signal-scan 5.2s linear infinite;
}

.door-panel::after {
  height: 7rem;
  background: linear-gradient(transparent, rgba(151, 44, 255, 0.08), transparent);
  box-shadow: none;
  animation-duration: 7.7s;
  animation-direction: reverse;
}

.door-panel-left {
  left: 0;
  border-right: 1px solid rgba(89, 255, 171, 0.36);
  transform-origin: left center;
}

.door-panel-right {
  right: 0;
  border-left: 1px solid rgba(89, 255, 171, 0.36);
  transform-origin: right center;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.025) 3px 4px),
    linear-gradient(90deg, rgba(255, 32, 92, 0.025), transparent 40%, rgba(73, 255, 220, 0.035));
  pointer-events: none;
  mix-blend-mode: screen;
}

.breach-interface {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 2rem, 42rem);
  text-align: center;
  transition: opacity 420ms ease, transform 620ms ease, filter 420ms ease;
}

.roleverse-mark {
  position: relative;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: #a9ffcf;
  font-family: var(--sans);
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 0 1rem rgba(89, 255, 171, 0.65);
  animation: glitch-shift 4.5s steps(1, end) infinite;
}

.roleverse-mark::before,
.roleverse-mark::after {
  position: absolute;
  left: 3.45rem;
  content: attr(data-text);
  opacity: 0;
  pointer-events: none;
}

.roleverse-mark::before { color: #ff2668; transform: translateX(-2px); }
.roleverse-mark::after { color: #6dfcff; transform: translateX(2px); }
.roleverse-mark:hover::before,
.roleverse-mark:hover::after { opacity: 0.48; }

.rv-symbol {
  width: 2.65rem;
  height: 3.9rem;
  object-fit: contain;
  filter: drop-shadow(0 0 0.65rem rgba(89, 255, 171, 0.42));
  animation: symbol-interference 5s steps(1, end) infinite;
}

.breach-code,
.knock-hint,
.breach-status {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breach-code {
  margin: 1.1rem 0 0;
  color: rgba(169, 255, 207, 0.52);
  font-size: 0.75rem;
}

.knocker {
  position: relative;
  display: block;
  width: min(62vw, 21rem);
  min-height: 0;
  margin: clamp(1.2rem, 4vh, 2.3rem) 0 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  filter: drop-shadow(0 1.5rem 2rem rgba(0, 0, 0, 0.65));
  touch-action: manipulation;
  transition: filter 180ms ease;
}

.knocker:hover,
.knocker:active {
  transform: none;
  background: transparent;
}

.knocker:disabled {
  cursor: wait;
}

.knocker:focus-visible {
  outline: 2px solid #a9ffcf;
  outline-offset: 0.55rem;
}

.knocker-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.knocker-art img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.15) hue-rotate(72deg) saturate(0.8) brightness(0.78);
  opacity: 0.94;
  transition: filter 220ms ease;
}

.knocker:hover .knocker-art img,
.knocker:focus-visible .knocker-art img {
  filter: grayscale(0.05) hue-rotate(72deg) saturate(1.1) brightness(0.96);
}

.knocker-base {
  position: relative;
  z-index: 1;
}

.knocker-handle {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 50% 67.5%;
  will-change: transform;
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.25, 1.3), filter 220ms ease;
}

.knocker:hover .knocker-handle,
.knocker:focus-visible .knocker-handle {
  transform: translateY(-0.35rem) scaleY(-1);
  filter: grayscale(0.02) hue-rotate(72deg) saturate(1.35) brightness(1.05) drop-shadow(0 0.55rem 0.5rem rgba(0, 0, 0, 0.48));
}

.knock-hint {
  margin: 0.65rem 0 0;
  color: rgba(169, 255, 207, 0.78);
  font-size: 0.78rem;
}

.breach-status {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  color: rgba(255, 72, 126, 0.86);
  font-size: 0.7rem;
}

.breach.is-knocking .knocker-base {
  animation: knock-impact 1.08s ease both;
}

.breach.is-knocking .knocker-handle {
  animation: handle-knock 1.08s cubic-bezier(0.3, 0.8, 0.28, 1) both;
}

.breach.is-opening .door-panel-left {
  transform: rotateY(-106deg) translateX(-12%);
  opacity: 0.62;
}

.breach.is-opening .door-panel-right {
  transform: rotateY(106deg) translateX(12%);
  opacity: 0.62;
}

.breach.is-opening .breach-interface,
.breach.is-opening .scanlines {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(7px);
}

@keyframes signal-scan {
  from { top: -8rem; }
  to { top: calc(100% + 8rem); }
}

@keyframes glitch-shift {
  0%, 91%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-1px, 0); }
}

@keyframes symbol-interference {
  0%, 89%, 94%, 100% { transform: translate(0); filter: drop-shadow(0 0 0.65rem rgba(89, 255, 171, 0.42)); }
  90% { transform: translateX(-2px); filter: drop-shadow(2px 0 #ff2668) drop-shadow(0 0 0.8rem rgba(89, 255, 171, 0.68)); }
  92% { transform: translateX(2px); filter: drop-shadow(-2px 0 #6dfcff) drop-shadow(0 0 0.8rem rgba(89, 255, 171, 0.68)); }
}

@keyframes knock-impact {
  0%, 100% { transform: translateY(0); }
  13%, 47%, 79% { transform: translateY(0.16rem); }
  21%, 55%, 87% { transform: translateY(0); }
}

@keyframes handle-knock {
  0%, 27%, 61%, 100% { transform: translateY(-0.35rem) scaleY(-1); }
  7%, 40%, 72% { transform: translateY(-0.9rem) scaleY(-0.82); }
  13%, 47%, 79% { transform: translateY(0.18rem) scaleY(1); }
  20%, 54%, 86% { transform: translateY(-0.35rem) scaleY(-1); }
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.eclipse {
  position: absolute;
  top: clamp(3rem, 8vw, 6rem);
  left: 50%;
  width: min(35vw, 27rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 4rem rgba(255, 122, 26, 0.24);
  opacity: 0.92;
  animation: moon-pulse 7s ease-in-out infinite;
}

.eclipse::after {
  position: absolute;
  inset: -3% -10% 5% 13%;
  border-radius: 50%;
  background: var(--night);
  content: '';
}

.mist {
  position: absolute;
  left: -15vw;
  width: 130vw;
  height: 9rem;
  border-radius: 50%;
  background: rgba(226, 204, 222, 0.06);
  filter: blur(24px);
  animation: drift 14s ease-in-out infinite alternate;
}

.mist-one { top: 34vh; }
.mist-two { top: 72vh; animation-delay: -6s; animation-duration: 18s; }

.spark {
  position: absolute;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--orange-soft);
  box-shadow: 0 0 1rem var(--orange);
  animation: flicker 3s steps(2, end) infinite;
}

.spark-one { top: 22%; left: 12%; }
.spark-two { top: 45%; right: 13%; animation-delay: -1.3s; }
.spark-three { top: 78%; left: 22%; animation-delay: -2s; }

.page-shell {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0 2rem;
}

.masthead {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow,
.save-label {
  margin: 0;
  color: var(--orange-soft);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.emblem {
  position: relative;
  z-index: 0;
  width: clamp(15rem, 27vw, 21rem);
  height: auto;
  margin: 0.5rem 0 -4.5rem;
  filter: drop-shadow(0 1.2rem 2.2rem rgba(0, 0, 0, 0.6));
  opacity: 0.82;
  animation: emblem-breathe 7s ease-in-out infinite;
}

.logo {
  position: relative;
  z-index: 1;
  width: min(82vw, 48rem);
  margin: 0;
}

.wordmark {
  display: block;
  width: 100%;
  height: auto;
  filter:
    brightness(0)
    saturate(100%)
    invert(91%)
    sepia(15%)
    saturate(446%)
    hue-rotate(347deg)
    brightness(103%)
    contrast(91%)
    drop-shadow(0 0 2rem rgba(13, 7, 18, 0.94));
}

.save-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 24rem;
  margin-top: clamp(2rem, 5vw, 4.5rem);
  padding: 3rem 1rem;
  overflow: hidden;
  border-block: 1px solid var(--line);
  text-align: center;
}

.save-card::before {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(113, 48, 154, 0.65);
  transform: rotate(45deg);
  content: '';
}

.ornament {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: min(18rem, 70vw);
  color: var(--orange-soft);
}

.ornament::before,
.ornament::after {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  content: '';
}

.ornament::after { transform: scaleX(-1); }
.ornament span { width: 0.48rem; height: 0.48rem; transform: rotate(45deg); background: currentColor; }

.save-label { position: relative; margin-top: 1.2rem; }

.month {
  position: relative;
  margin: 0;
  color: var(--cream);
  font-family: var(--display);
  font-size: clamp(6rem, 19vw, 13rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.78;
  text-transform: uppercase;
}

.month::after {
  position: absolute;
  right: -0.8rem;
  bottom: 0.05em;
  color: var(--orange);
  content: '’26';
  font-family: var(--sans);
  font-size: clamp(0.8rem, 2vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.coming-soon {
  position: relative;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.secret {
  display: flex;
  justify-content: center;
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.password-form {
  width: min(100%, 38rem);
  text-align: center;
}

.input-wrap {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: rgba(244, 232, 209, 0.045);
  backdrop-filter: blur(8px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-wrap:focus-within {
  border-color: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(255, 174, 74, 0.13);
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.9rem 0.85rem;
  background: transparent;
  color: var(--cream);
  font-size: 1rem;
}

input::placeholder { color: rgba(244, 232, 209, 0.43); }

button {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  border: 1px solid var(--orange);
  padding: 0.75rem 1.1rem;
  background: var(--orange);
  color: #1c0a03;
  cursor: pointer;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover { transform: translateY(-2px); background: var(--orange-soft); }
button:active { transform: translateY(0); }
button:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.button-mark { font-size: 1.15rem; transition: transform 160ms ease; }
button:hover .button-mark { transform: translate(2px, -2px); }

.hint,
.response {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  font-size: 0.88rem;
}

.hint { color: rgba(201, 183, 177, 0.65); }
.response { color: var(--acid); font-family: var(--display); font-size: 1.3rem; font-style: italic; }
.response { overflow-wrap: anywhere; }
.response.is-visible { animation: reveal 360ms ease both; }
.password-form.is-denied .input-wrap { animation: shake 360ms ease; }

footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 0;
  color: rgba(201, 183, 177, 0.65);
  font-family: var(--display);
  font-style: italic;
  text-align: center;
}

footer p { margin: 0; }
footer span { color: var(--orange-soft); }

@keyframes moon-pulse {
  0%, 100% { filter: saturate(0.9); transform: translateX(-50%) scale(1); }
  50% { filter: saturate(1.16); transform: translateX(-50%) scale(1.025); }
}

@keyframes drift { to { transform: translateX(8vw) scaleY(0.75); } }
@keyframes emblem-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 1.2rem 2.2rem rgba(0, 0, 0, 0.6)); }
  50% { transform: scale(1.025); filter: drop-shadow(0 1.5rem 2.8rem rgba(113, 48, 154, 0.48)); }
}
@keyframes flicker { 0%, 45%, 100% { opacity: 0.22; } 50%, 80% { opacity: 1; } }
@keyframes reveal { from { opacity: 0; transform: translateY(0.45rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 25% { transform: translateX(-0.28rem); } 50% { transform: translateX(0.28rem); } 75% { transform: translateX(-0.16rem); } }

@media (max-width: 860px) {
  .page-shell { width: min(100% - 1.25rem, 72rem); padding-top: 2rem; }
  .eclipse { width: min(72vw, 20rem); }
  .emblem { width: min(72vw, 19rem); margin-bottom: -2.2rem; }
  .logo { width: min(94vw, 34rem); }
  .save-card { min-height: 20rem; }
  .month { font-size: clamp(4rem, 19vw, 7rem); }
}

@media (max-width: 470px) {
  .page-shell { width: min(100% - 1rem, 72rem); }
  .eyebrow, .save-label { letter-spacing: 0.18em; }
  .emblem { width: min(82vw, 17rem); margin-bottom: -1.4rem; }
  .logo { width: min(98vw, 27rem); }
  .save-card { padding-inline: 0.5rem; }
  .coming-soon { max-width: 18rem; }
  .secret { padding-block: 4.5rem; }
  .input-wrap { flex-direction: column; }
  button { width: 100%; }
  .month::after { right: 0; bottom: -1.5rem; }
  footer { gap: 0.65rem; padding-inline: 0.5rem; }
  .breach-interface { width: min(100% - 1rem, 42rem); }
  .roleverse-mark { gap: 0.65rem; letter-spacing: 0.22em; }
  .rv-symbol { width: 2.2rem; height: 3.25rem; }
  .knocker { width: min(76vw, 18rem); }
  .knock-hint { max-width: 15rem; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
