@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Special+Elite&display=swap');

/* ==========================================================================
   PROJECT BLACK FEATHER - BRAND PALETTE
   Background: Dark Charcoal (#121314)
   Text: Warm Paper/Cream (#E6DFD3)
   Accent: Dusty Red (#8B2626)
   Muted Text: Subtle Grey-Paper (#9A9386)
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #121314;
  color: #E6DFD3;
  font-family: 'Courier Prime', monospace;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

/* --------------------------------------------------------------------------
   STYLIZED AMBIENT EFFECTS & GEOMETRIC LAYERS
   -------------------------------------------------------------------------- */

.ambient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    rgba(18, 19, 20, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 999;
  pointer-events: none;
}

.vignette-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(
    circle, 
    transparent 50%, 
    rgba(10, 10, 11, 0.9) 85%,
    rgba(139, 38, 38, 0.15) 100%
  );
  z-index: 998;
  pointer-events: none;
  animation: ambientPulse 8s infinite ease-in-out;
}

.bg-stripe {
  position: absolute;
  background-color: rgba(139, 38, 38, 0.04);
  transform: rotate(-15deg);
  pointer-events: none;
  z-index: 1;
}
.stripe-1 {
  top: 15%;
  left: -10%;
  width: 120%;
  height: 60px;
  border-top: 1px solid rgba(139, 38, 38, 0.15);
  border-bottom: 1px solid rgba(139, 38, 38, 0.15);
}
.stripe-2 {
  bottom: 20%;
  right: -5%;
  width: 80%;
  height: 25px;
  background-color: transparent;
  border-bottom: 2px dashed rgba(154, 147, 134, 0.08);
}

.corner-brace {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(154, 147, 134, 0.15);
  pointer-events: none;
  z-index: 1;
}
.brace-tl { top: 40px; left: 40px; border-right: none; border-bottom: none; }
.brace-br { bottom: 40px; right: 40px; border-left: none; border-top: none; }

/* --------------------------------------------------------------------------
   POWER INTERCEPT INTERFACE SCREEN & CONNECTING LOADER
   -------------------------------------------------------------------------- */
.boot-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #121314;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  cursor: pointer;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
}

.boot-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-prompt, .boot-loader {
  text-align: center;
  transition: opacity 0.2s ease;
}

.boot-prompt.hidden, .boot-loader.hidden {
  display: none;
  opacity: 0;
}

.boot-glitch {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 4px;
  color: #8B2626;
  position: relative;
  margin-bottom: 10px;
}

.boot-glitch::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 2px;
  text-shadow: -1px 0 #E6DFD3;
  width: 100%;
  height: 100%;
  background: #121314;
  clip: rect(0, 0, 0, 0);
  animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.boot-sub {
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #9A9386;
  animation: blink 2s infinite;
}

.spinner-frame {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px auto;
}

.cyber-spinner {
  width: 100%;
  height: 100%;
  border: 2px solid #8B2626;
  border-top-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(0deg);
  animation: spinSquare 0.8s infinite linear;
}

.cyber-spinner-inner {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 30px;
  height: 30px;
  border: 1px dashed #9A9386;
  border-left-color: transparent;
  border-right-color: transparent;
  transform: rotate(0deg);
  animation: spinSquareReverse 0.5s infinite linear;
}

.loader-status {
  font-size: 0.75rem;
  color: #E6DFD3;
  letter-spacing: 3px;
  font-weight: bold;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   TERMINAL CONTAINER & CRT WAKE UP ANIMATION
   -------------------------------------------------------------------------- */
.terminal-container {
  width: 100%;
  max-width: 750px;
  border: 1px solid #343538;
  padding: 40px;
  background-color: #161719;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
  z-index: 10;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.terminal-container.hidden {
  display: none;
}

.terminal-reveal {
  animation: crtWakeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.terminal-container:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 15px 35px rgba(139, 38, 38, 0.08);
}

.archive-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #9A9386;
  border-bottom: 1px dashed #343538;
  padding-bottom: 10px;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

.security-level {
  color: #8B2626;
  font-weight: bold;
}

.project-title {
  font-family: 'Courier Prime', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
  color: #E6DFD3;
  position: relative;
}

.project-title::before,
.project-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #161719;
  clip: rect(0, 0, 0, 0); 
}

.project-title::before {
  left: 1px;
  text-shadow: -1px 0 #8B2626;
  animation: glitch-anim-1 4s infinite linear alternate-reverse;
}

.project-title::after {
  left: -1px;
  text-shadow: -1px 0 #9A9386;
  animation: glitch-anim-2 4s infinite linear alternate-reverse;
}

.subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: #9A9386;
  letter-spacing: 2px;
  margin-top: 5px;
}

.divider {
  border: none;
  border-top: 1px solid #8B2626;
  margin: 25px 0;
  opacity: 0.6;
}

.system-log {
  background-color: #0E0F10;
  border: 1px solid #222325;
  padding: 20px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #B5AFA4;
  margin-bottom: 40px;
}

.log-line {
  opacity: 0;
}

.system-log.run-animation .log-line {
  animation: logPrint 0.05s forwards steps(1, start);
  margin-bottom: 4px;
}

.status-alert {
  color: #8B2626;
  font-weight: bold;
  animation: blink 1.5s infinite;
}

.redacted {
  background-color: #E6DFD3;
  color: #E6DFD3;
  cursor: pointer;
  padding: 0 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.redacted.revealed {
  background-color: transparent;
  color: #8B2626;
  font-weight: bold;
}

.archive-stamp {
  position: absolute;
  top: 120px;
  right: -20px;
  font-family: 'Special Elite', cursive;
  color: #8B2626;
  border: 3px double #8B2626;
  padding: 8px 15px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(12deg);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
  letter-spacing: 2px;
}

.entry-zone {
  text-align: center;
  margin-top: 20px;
}

.instruction {
  font-size: 0.8rem;
  color: #9A9386;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.access-btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: transparent;
  color: #E6DFD3;
  border: 1px solid #E6DFD3;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
  transition: color 0.25s ease, border-color 0.25s ease;
  z-index: 2;
}

.access-btn span {
  position: relative;
  z-index: 3;
}

.access-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: #8B2626;
  transform: skewX(-15deg);
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.access-btn:hover {
  color: #121314;
  border-color: #8B2626;
  box-shadow: 0 0 15px rgba(139, 38, 38, 0.3);
}

.access-btn:hover::before {
  left: 0;
  width: 120%; 
}

.margin-note {
  position: absolute;
  bottom: 60px;
  left: -40px;
  transform: rotate(-5deg);
  font-family: 'Special Elite', cursive;
  color: #6e675b;
  font-size: 0.8rem;
  max-width: 200px;
  line-height: 1.3;
}

.archive-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #555047;
  border-top: 1px dashed #343538;
  padding-top: 10px;
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes logPrint {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spinSquare {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinSquareReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes crtWakeUp {
  0% {
    transform: scaleX(0.01) scaleY(0.005);
    opacity: 0;
  }
  40% {
    transform: scaleX(1) scaleY(0.005);
    opacity: 0.8;
  }
  100% {
    transform: scaleX(1) scaleY(1);
    opacity: 1;
  }
}

@keyframes glitch-anim-1 {
  0% { clip: rect(20px, 9999px, 66px, 0); }
  5% { clip: rect(81px, 9999px, 5px, 0); }
  10% { clip: rect(0, 0, 0, 0); }
  45% { clip: rect(0, 0, 0, 0); }
  50% { clip: rect(14px, 9999px, 55px, 0); }
  54% { clip: rect(0, 0, 0, 0); }
  100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(0, 0, 0, 0); }
  46% { clip: rect(0, 0, 0, 0); }
  50% { clip: rect(76px, 9999px, 12px, 0); }
  55% { clip: rect(3px, 9999px, 85px, 0); }
  60% { clip: rect(0, 0, 0, 0); }
  100% { clip: rect(0, 0, 0, 0); }
}

@media (max-width: 768px) {
  .terminal-container {
    padding: 20px;
  }
  .bg-stripe, .corner-brace {
    display: none; 
  }
  .archive-stamp {
    position: static;
    margin: 20px auto;
    transform: none;
    width: fit-content;
  }
  .margin-note {
    position: static;
    transform: none;
    margin: 20px 0;
    max-width: 100%;
  }
}