/* =========================================================================
   THE HOLLOW MINISTRY — creep.css
   Page-scoped atmosphere for the Contact page. Loaded only there.
   Everything here is gated behind body.creep so nothing leaks to other pages.
   ========================================================================= */

body.creep { background: #050303; }

/* heavier, slowly breathing vignette that closes in on the reader */
body.creep::after {
  background:
    radial-gradient(90% 60% at 50% 42%, color-mix(in srgb, var(--rust) 20%, transparent), transparent 60%),
    radial-gradient(160% 130% at 50% 50%, transparent 30%, rgba(0,0,0,.9) 100%);
  animation: breathe 11s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .82; } 50% { opacity: 1; } }

/* stronger grain */
body.creep::before { opacity: .07; }

/* --- flicker & tremble ------------------------------------------------ */
@keyframes flicker {
  0%, 100%   { opacity: 1; }
  8%         { opacity: .35; }
  9%         { opacity: 1; }
  40%        { opacity: 1; }
  41%        { opacity: .55; }
  42%        { opacity: 1; }
  74%, 77%   { opacity: 1; }
  75%        { opacity: .2; }
  76%        { opacity: .9; }
}
.flicker { animation: flicker 7s linear infinite; }

@keyframes tremble {
  0%,100% { transform: translate(0,0) rotate(0); }
  25%     { transform: translate(.5px,-.4px) rotate(.15deg); }
  50%     { transform: translate(-.4px,.5px) rotate(-.12deg); }
  75%     { transform: translate(.4px,.3px) rotate(.1deg); }
}
.tremble { display: inline-block; animation: tremble .22s steps(2) infinite; color: var(--blood); }

/* --- the watching hero ------------------------------------------------ */
.creep-hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.creep-hero .inner { position: relative; z-index: 4; max-width: 40ch; }
.creep-hero h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 500;
  line-height: .96;
  text-wrap: balance;
  margin-top: 1.4rem;
}
.creep-hero h1 em { color: var(--blood); font-style: italic; }
.creep-hero .lede {
  color: var(--dust);
  font-size: var(--step-s);
  line-height: 1.5;
  margin: 1.6rem auto 0;
  max-width: 34ch;
}

/* --- the eyes --------------------------------------------------------- */
.watchers { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pupil { transition: transform .18s ease-out; }

/* the big central eye */
.bigeye {
  position: absolute; top: 50%; left: 50%;
  width: min(120%, 900px); height: auto;
  transform: translate(-50%, -50%);
  opacity: .5;
  z-index: 1;
  filter: drop-shadow(0 0 60px color-mix(in srgb, var(--blood) 35%, transparent));
}
.bigeye .eyeball { transform-box: fill-box; transform-origin: center; animation: blink 6.5s infinite; }
.bigeye .pupil.big { animation: dilate 8s ease-in-out infinite; }

@keyframes blink {
  0%, 91%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.04); }
}
@keyframes dilate {
  0%, 100% { r: 20px; }
  50%      { r: 27px; }
}

/* scattered small eyes */
.eye { position: absolute; width: 46px; height: auto; opacity: 0; animation: peer 9s ease-in-out infinite; }
.eye .eyeball { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
@keyframes peer { 0%, 100% { opacity: 0; } 15%, 70% { opacity: .55; } }

/* --- the dossier ("we already have your details") --------------------- */
.dossier {
  border: 1px solid var(--line);
  background:
    linear-gradient(color-mix(in srgb, var(--pitch) 92%, black), color-mix(in srgb, var(--pitch) 92%, black));
  padding: clamp(1.5rem, 4vw, 2.6rem);
  position: relative;
}
.dossier::before {
  content: "● REC";
  position: absolute; top: 1rem; right: 1.2rem;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .2em;
  color: var(--blood); animation: rec 1.6s steps(1) infinite;
}
@keyframes rec { 0%,49% { opacity: 1; } 50%,100% { opacity: .25; } }

.dossier .subject {
  font-family: var(--display); font-size: var(--step-m); color: var(--ash);
  margin-bottom: 1.6rem; line-height: 1.1;
}
.dossier .subject b { color: var(--blood); font-weight: 500; }

.dline {
  display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px dotted color-mix(in srgb, var(--oxblood) 45%, transparent);
  font-family: var(--mono); font-size: .82rem; align-items: baseline;
}
.dline .k { color: var(--blood); letter-spacing: .1em; text-transform: uppercase; font-size: .64rem; }
.dline .v { color: var(--ash); }
.dline .v.pending { color: var(--faint); }
.dline .v.pending::after {
  content: "▮"; color: var(--blood); margin-left: .1em;
  animation: caret .7s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 560px) { .dline { grid-template-columns: 1fr; gap: .2rem; } }

.dossier .assurance {
  margin-top: 1.6rem; font-family: var(--mono); font-size: .68rem; line-height: 1.7;
  color: var(--faint); letter-spacing: .02em;
}
.dossier .assurance b { color: var(--dust); }

/* --- typing indicator ------------------------------------------------- */
.typing { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.typing .dots { display: inline-flex; gap: .28em; }
.typing .dots i { width: .42em; height: .42em; border-radius: 50%; background: var(--blood); display: inline-block; animation: pip 1.4s ease-in-out infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; }
.typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pip { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-.28em); } }

/* --- whispers --------------------------------------------------------- */
.whispers { display: grid; gap: 1.2rem; }
.whisper {
  font-family: var(--display); font-style: italic; font-size: var(--step-s);
  color: color-mix(in srgb, var(--ash) 55%, var(--void)); line-height: 1.3; max-width: 40ch;
}
.whisper:nth-child(even) { justify-self: end; text-align: right; color: color-mix(in srgb, var(--blood) 45%, var(--void)); }

/* --- creepy form additions ------------------------------------------- */
.creep .field input::placeholder,
.creep .field textarea::placeholder { color: color-mix(in srgb, var(--dust) 60%, transparent); font-style: italic; }
.reply {
  margin-top: 1rem; border-left: 2px solid var(--blood);
  padding: .9rem 1.1rem; background: color-mix(in srgb, var(--oxblood) 16%, transparent);
  font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: var(--ash);
  display: none;
}
.reply.show { display: block; animation: fadein .6s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.reply b { color: var(--ember); }
