/* ============================================
   META.SYS / terminal stylesheet
   self-contained — does not load main.css
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #000;
  color: #fff;
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  opacity: 0;
  animation: page-load 0.5s ease forwards;
}
@keyframes page-load {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* CRT scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 255, 65, 0.022) 2px,
    rgba(0, 255, 65, 0.022) 3px
  );
  pointer-events: none;
  z-index: 100;
}

/* Vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: 99;
}

/* ===== Splash (tap-to-enter overlay) ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}
.splash.fade {
  opacity: 0;
  pointer-events: none;
}
.splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 255, 65, 0.022) 2px,
    rgba(0, 255, 65, 0.022) 3px
  );
  pointer-events: none;
}
.splash-execute {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 6px;
  color: #00ff41;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid #00ff41;
  padding: 18px 38px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  user-select: none;
  text-shadow: 0 0 14px rgba(0, 255, 65, 0.55);
  box-shadow:
    0 0 32px rgba(0, 255, 65, 0.18),
    inset 0 0 24px rgba(0, 255, 65, 0.05);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    text-shadow 0.22s ease;
  animation: execute-pulse 2.2s ease-in-out infinite;
}
.splash-execute:hover,
.splash-execute:focus,
.splash:hover .splash-execute {
  background: #00ff41;
  color: #000;
  text-shadow: none;
  box-shadow:
    0 0 56px rgba(0, 255, 65, 0.55),
    inset 0 0 24px rgba(0, 255, 65, 0.0);
  outline: none;
  animation: none;
}
.splash-execute:active {
  background: #00ff41;
  color: #000;
  transform: translateY(1px);
}
@keyframes execute-pulse {
  0%, 100% {
    box-shadow:
      0 0 32px rgba(0, 255, 65, 0.18),
      inset 0 0 24px rgba(0, 255, 65, 0.05);
  }
  50% {
    box-shadow:
      0 0 44px rgba(0, 255, 65, 0.35),
      inset 0 0 24px rgba(0, 255, 65, 0.08);
  }
}

/* ===== Meta boot sequence (runs between splash and main page) =====
   Opaque from page load so it sits underneath the splash with zero
   gap. When the splash fades out, the boot overlay is already there
   instead of fading in — no flash of the terminal underneath. */
.meta-boot {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 998;
  opacity: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'DM Mono', monospace;
  color: #888;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 32px;
}
.meta-boot.active { pointer-events: all; }
.meta-boot.fade { opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
.meta-boot-line {
  opacity: 0;
  margin-bottom: 10px;
  transition: opacity 0.2s ease;
  width: 100%;
  max-width: 480px;
}
.meta-boot-line.shown { opacity: 1; }
.meta-boot-line .ok { color: #00ff41; }
.meta-boot-line .warn { color: #ff6644; }
.meta-boot-line .prompt { color: #00ff41; margin-right: 8px; }
.meta-boot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0, 255, 65, 0.02) 2px, rgba(0, 255, 65, 0.02) 3px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s;
}
.meta-boot.active::after { opacity: 1; }

/* ===== Terminal window chrome ===== */
.chrome {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #1a1a1a;
  background: rgba(255,255,255,0.025);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.chrome-buttons { display: flex; gap: 8px; margin-right: 24px; }
.chrome-buttons .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #2a2a2a;
}
.chrome-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #555;
  letter-spacing: 2.5px;
}
.chrome-meta {
  font-size: 11px;
  color: #888;
  letter-spacing: 1.5px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.audio-toggle {
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  user-select: none;
}
.audio-toggle:hover { color: #00ff41; }
.audio-toggle.muted { color: #555; opacity: 0.75; }
.live-indicator { display: inline-flex; align-items: center; }
.chrome-meta .live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00ff41;
  margin-right: 8px;
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ===== Main terminal area ===== */
.terminal {
  padding: 48px 32px 80px;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== META wordmark ===== */
.meta-wordmark {
  font-family: 'DM Mono', monospace;
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: 4px;
  color: #fff;
  margin: 0 0 14px;
  text-shadow: 0 0 24px rgba(255,255,255,0.15);
  display: flex;
  align-items: baseline;
}
.meta-wordmark .underscore {
  display: inline-block;
  color: #00ff41;
  margin-left: 8px;
  animation: cursor-blink 1.1s steps(1) infinite;
  text-shadow: 0 0 18px rgba(0, 255, 65, 0.6);
}
@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ===== Subtitle ===== */
.meta-subtitle {
  font-size: 13px;
  color: #555;
  letter-spacing: 5px;
  margin-bottom: 72px;
}

/* ===== Status block ===== */
.status-block {
  margin: 0 0 64px;
  max-width: 680px;
}
.status-block-title {
  color: #555;
  font-size: 11px;
  letter-spacing: 3.5px;
  margin-bottom: 22px;
}
.status-block-title::before {
  content: '// ';
  color: #00ff41;
}
.status-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.status-line:last-child { border-bottom: none; }
.status-label {
  color: #888;
  letter-spacing: 2.5px;
  font-size: 12px;
}
.status-value {
  color: #fff;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 2.5px;
}
.status-value.standby { color: #ffaa00; }
.status-value.encrypted { color: #ff6644; }
.status-value.live { color: #00ff41; }

/* ===== Notice between status and subscribe ===== */
.notice {
  margin: -32px 0 48px;
  max-width: 680px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  line-height: 1.7;
  color: #888;
}
.notice p { margin: 0; }
.notice p::before {
  content: '// ';
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
}

/* ===== Subscribe block ===== */
.subscribe {
  margin: 64px 0 48px;
  max-width: 680px;
}
.subscribe-prompt {
  color: #00ff41;
  font-size: 13px;
  margin-bottom: 18px;
  letter-spacing: 1px;
}
.subscribe-prompt::before { content: '> '; }
.subscribe-form {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  transition: border-color 0.25s ease;
}
.subscribe-form:focus-within { border-color: #00ff41; box-shadow: 0 0 24px rgba(0, 255, 65, 0.1); }
.subscribe-form::before {
  content: '>';
  color: #00ff41;
  padding: 0 14px 0 18px;
  font-weight: 700;
  font-size: 16px;
}
.subscribe-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 18px 0;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
}
.subscribe-form input::placeholder { color: rgba(255,255,255,0.3); }
.subscribe-form input:focus { outline: none; }
.subscribe-form button {
  background: transparent;
  color: #00ff41;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.18);
  padding: 18px 28px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 2.5px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.subscribe-form button:hover { background: #00ff41; color: #000; }
.subscribe-form button:disabled { cursor: wait; opacity: 0.7; }

/* ===== Signup confirm / error states ===== */
.signup-confirm {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #00ff41;
  padding: 18px 0;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}
.signup-confirm::before { content: '> '; }
.signup-error {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #ff6644;
  margin-top: 12px;
}
.signup-error::before { content: '> ERROR: '; opacity: 0.85; }

/* ===== Closing ===== */
.closing {
  margin: 56px 0 40px;
  max-width: 680px;
  color: #666;
  font-size: 13px;
  line-height: 1.8;
}
.closing p + p { margin-top: 14px; }

/* ===== Footer chrome ===== */
.footer-chrome {
  border-top: 1px solid #1a1a1a;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #555;
  letter-spacing: 2px;
  background: rgba(255,255,255,0.025);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-chrome a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-chrome a:hover { color: #00ff41; }
.footer-chrome .arrow { margin-right: 6px; }

/* ===== Exit fade (META → parent) ===== */
.exit-fade {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.exit-fade.active { opacity: 1; pointer-events: all; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { opacity: 1 !important; }
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .chrome-title { display: none; }
  .terminal { padding: 40px 20px 60px; }
  .meta-wordmark { font-size: clamp(72px, 22vw, 200px); letter-spacing: 4px; }
  .status-label, .status-value { font-size: 11px; }
  .subscribe-form { flex-wrap: wrap; }
  .subscribe-form input { padding: 16px 0; }
  .subscribe-form button { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.18); }
}
