/* ============================================================
   Matrix Print — Página 404
   Arquivo: mp-404.css
   Prefixo: mp4- (mp 404)
   ============================================================ */

/* ============================================================
   VARIÁVEIS
   ============================================================ */
:root {
  --mp4-dark:       #090b12;
  --mp4-dark-2:     #0f1220;
  --mp4-dark-3:     #161b2e;
  --mp4-orange:     #FF6B1A;
  --mp4-orange-dim: rgba(255, 107, 26, 0.10);
  --mp4-orange-glow:rgba(255, 107, 26, 0.35);
  --mp4-orange-bdr: rgba(255, 107, 26, 0.25);
  --mp4-red:        #ff3b3b;
  --mp4-red-dim:    rgba(255, 59, 59, 0.12);
  --mp4-white:      #ffffff;
  --mp4-gray:       #a0a8c0;
  --mp4-border:     rgba(255, 255, 255, 0.06);
  --mp4-font-d:     'Syne', sans-serif;
  --mp4-font-b:     'Space Grotesk', sans-serif;
}

/* ============================================================
   01. SEÇÃO
   ============================================================ */
.mp4-section {
  background: var(--mp4-dark);
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 40px) 0;  /* ← era clamp(60px, 8vw, 120px) */
  min-height: 85vh;
  display: flex;
  align-items: center;
}

/* Grade de fundo */
.mp4-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,26,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,26,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Glow radial central */
.mp4-section::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,107,26,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.mp4-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* ============================================================
   02. IMPRESSORA ANIMADA
   ============================================================ */
.mp4-printer-wrap {
  position: relative;
  margin-bottom: 48px;
  display: inline-block;
}

/* Glow de erro ao redor da impressora */
.mp4-printer-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: radial-gradient(ellipse, rgba(255,59,59,0.08) 0%, transparent 70%);
  animation: mp4-glow-pulse 2s ease-in-out infinite;
}

@keyframes mp4-glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* SVG da impressora */
.mp4-printer-svg {
  width: clamp(180px, 22vw, 280px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255,59,59,0.3));
  animation: mp4-printer-shake 4s ease-in-out infinite;
}

@keyframes mp4-printer-shake {
  0%, 85%, 100% { transform: translateX(0) rotate(0deg); }
  87%  { transform: translateX(-3px) rotate(-0.5deg); }
  89%  { transform: translateX(3px) rotate(0.5deg); }
  91%  { transform: translateX(-2px) rotate(-0.3deg); }
  93%  { transform: translateX(2px) rotate(0.3deg); }
  95%  { transform: translateX(-1px) rotate(0deg); }
}

/* Papel saindo torto */
.mp4-paper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(80px, 10vw, 120px);
  background: #f0f0ee;
  border-radius: 2px 2px 4px 4px;
  overflow: hidden;
  animation: mp4-paper-out 3s ease-in-out infinite;
  transform-origin: top center;
  z-index: 2;
}

@keyframes mp4-paper-out {
  0%   { height: 0; top: 42%; opacity: 0; transform: translateX(-50%) rotate(0deg); }
  15%  { height: clamp(40px, 5vw, 60px); top: 52%; opacity: 1; transform: translateX(-50%) rotate(-3deg); }
  40%  { height: clamp(80px, 10vw, 110px); top: 62%; transform: translateX(-50%) rotate(4deg); }
  65%  { height: clamp(80px, 10vw, 110px); top: 62%; transform: translateX(-50%) rotate(4deg); opacity: 1; }
  85%  { height: clamp(80px, 10vw, 110px); top: 68%; transform: translateX(-50%) rotate(6deg); opacity: 0; }
  100% { height: 0; top: 42%; opacity: 0; transform: translateX(-50%) rotate(0deg); }
}

/* Linhas de erro no papel */
.mp4-paper-line {
  height: 4px;
  margin: 8px 10px;
  border-radius: 2px;
  background: #ddd;
}

.mp4-paper-line--error {
  background: var(--mp4-red);
  opacity: 0.7;
  width: 60%;
}

.mp4-paper-line--short {
  width: 40%;
}

.mp4-paper-code {
  font-family: monospace;
  font-size: 8px;
  color: var(--mp4-red);
  text-align: center;
  padding: 4px;
  font-weight: bold;
}

/* Luz de status piscando */
.mp4-status-light {
  position: absolute;
  top: 18%;
  right: 14%;
  width: 10px;
  height: 10px;
  background: var(--mp4-red);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--mp4-red);
  animation: mp4-blink-red 0.8s ease-in-out infinite;
}

@keyframes mp4-blink-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--mp4-red); }
  50%       { opacity: 0.2; box-shadow: none; }
}

/* Fumaça de erro */
.mp4-smoke {
  position: absolute;
  top: 5%;
  left: 50%;
  display: flex;
  gap: 6px;
}

.mp4-smoke-puff {
  width: 8px;
  height: 8px;
  background: rgba(160, 168, 192, 0.4);
  border-radius: 50%;
  animation: mp4-smoke-rise 2s ease-out infinite;
}

.mp4-smoke-puff:nth-child(2) { animation-delay: 0.4s; }
.mp4-smoke-puff:nth-child(3) { animation-delay: 0.8s; }

@keyframes mp4-smoke-rise {
  0%   { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-40px) scale(2.5); opacity: 0; }
}

/* ============================================================
   03. CÓDIGO DE ERRO GLITCH
   ============================================================ */
.mp4-error-code {
  font-family: 'Space Grotesk', sans-serif;  /* ← era var(--mp4-font-d) */
  font-size: clamp(80px, 12vw, 160px);       /* ← era clamp(100px, 16vw, 200px) */
  font-weight: 700;                           /* ← era 800 */
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,107,26,0.3);
  position: relative;
  margin-bottom: 8px;
  user-select: none;
}

/* Camada de glitch laranja */
.mp4-error-code::before {
  content: '404';
  position: absolute;
  inset: 0;
  color: var(--mp4-orange);
  -webkit-text-stroke: 0;
  clip-path: inset(0 0 60% 0);
  animation: mp4-glitch-top 3s ease-in-out infinite;
  opacity: 0.85;
}

/* Camada de glitch vermelho */
.mp4-error-code::after {
  content: '404';
  position: absolute;
  inset: 0;
  color: var(--mp4-red);
  -webkit-text-stroke: 0;
  clip-path: inset(60% 0 0 0);
  animation: mp4-glitch-bot 3s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes mp4-glitch-top {
  0%, 90%, 100% { transform: translate(0, 0); clip-path: inset(0 0 60% 0); }
  92% { transform: translate(-4px, -2px); clip-path: inset(0 0 55% 0); }
  94% { transform: translate(4px, 0);    clip-path: inset(5% 0 60% 0); }
  96% { transform: translate(-2px, 1px); clip-path: inset(0 0 58% 0); }
}

@keyframes mp4-glitch-bot {
  0%, 90%, 100% { transform: translate(0, 0); clip-path: inset(60% 0 0 0); }
  92% { transform: translate(4px, 2px);  clip-path: inset(58% 0 0 0); }
  94% { transform: translate(-4px, 0);   clip-path: inset(65% 0 0 0); }
  96% { transform: translate(2px, -1px); clip-path: inset(60% 0 0 0); }
}

/* ============================================================
   04. MENSAGEM DE ERRO — estilo terminal
   ============================================================ */
.mp4-terminal {
  background: var(--mp4-dark-2);
  border: 1px solid var(--mp4-border);
  border-left: 3px solid var(--mp4-red);
  border-radius: 10px;
  padding: 16px 22px;
  margin-bottom: 32px;
  text-align: left;
  max-width: 520px;
  width: 100%;
}

.mp4-terminal-line {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.8;
  display: flex;
  gap: 10px;
}

.mp4-terminal-prompt {
  color: var(--mp4-orange);
  flex-shrink: 0;
}

.mp4-terminal-text {
  color: var(--mp4-gray);
}

.mp4-terminal-text--error {
  color: var(--mp4-red);
}

.mp4-terminal-text--ok {
  color: #4ade80;
}

/* Cursor piscando */
.mp4-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--mp4-orange);
  margin-left: 2px;
  vertical-align: middle;
  animation: mp4-cursor-blink 1s step-end infinite;
}

@keyframes mp4-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   05. TÍTULO E SUBTÍTULO
   ============================================================ */
.mp4-title {
  font-family: var(--mp4-font-d);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: var(--mp4-white);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.2;
}

.mp4-title em {
  color: var(--mp4-orange);
  font-style: normal;
}

.mp4-subtitle {
  font-family: var(--mp4-font-b);
  font-size: clamp(14px, 1.2vw, 16px);
  color: var(--mp4-gray);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 0 40px;
}

/* ============================================================
   06. AÇÕES
   ============================================================ */
.mp4-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
}

.mp4-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mp4-font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--mp4-dark);
  background: var(--mp4-orange);
  border: 2px solid var(--mp4-orange);
  border-radius: 8px;
  padding: 13px 26px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.3s;
  letter-spacing: 0.01em;
}

.mp4-btn-primary:hover {
  background: transparent;
  color: var(--mp4-orange);
  transform: translateY(-2px);
  text-decoration: none;
}

.mp4-btn-primary svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.mp4-btn-primary:hover svg {
  transform: translateX(3px);
}

.mp4-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mp4-font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--mp4-gray);
  background: transparent;
  border: 1px solid var(--mp4-border);
  border-radius: 8px;
  padding: 13px 26px;
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, transform 0.3s;
}

.mp4-btn-ghost:hover {
  border-color: var(--mp4-orange-bdr);
  color: var(--mp4-orange);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ============================================================
   07. LINKS RÁPIDOS
   ============================================================ */
.mp4-quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.mp4-quick-label {
  font-family: var(--mp4-font-b);
  font-size: 12px;
  color: var(--mp4-gray);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.mp4-quick-link {
  font-family: var(--mp4-font-b);
  font-size: 12px;
  font-weight: 600;
  color: var(--mp4-gray);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--mp4-border);
  border-radius: 20px;
  transition: border-color 0.25s, color 0.25s;
}

.mp4-quick-link:hover {
  border-color: var(--mp4-orange-bdr);
  color: var(--mp4-orange);
  text-decoration: none;
}

/* ============================================================
   08. PARTÍCULAS FLUTUANTES
   ============================================================ */
.mp4-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mp4-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--mp4-orange);
  border-radius: 50%;
  opacity: 0;
  animation: mp4-float-particle 8s ease-in-out infinite;
}

.mp4-particle:nth-child(1)  { left: 10%; animation-delay: 0s;    animation-duration: 7s; }
.mp4-particle:nth-child(2)  { left: 20%; animation-delay: 1s;    animation-duration: 9s; width: 2px; height: 2px; }
.mp4-particle:nth-child(3)  { left: 35%; animation-delay: 2s;    animation-duration: 8s; }
.mp4-particle:nth-child(4)  { left: 50%; animation-delay: 0.5s;  animation-duration: 6s; width: 2px; height: 2px; }
.mp4-particle:nth-child(5)  { left: 65%; animation-delay: 1.5s;  animation-duration: 10s; }
.mp4-particle:nth-child(6)  { left: 78%; animation-delay: 3s;    animation-duration: 7s; width: 2px; height: 2px; }
.mp4-particle:nth-child(7)  { left: 88%; animation-delay: 2.5s;  animation-duration: 9s; }
.mp4-particle:nth-child(8)  { left: 55%; animation-delay: 4s;    animation-duration: 8s; width: 2px; height: 2px; background: var(--mp4-red); }
.mp4-particle:nth-child(9)  { left: 25%; animation-delay: 3.5s;  animation-duration: 7s; background: var(--mp4-red); }
.mp4-particle:nth-child(10) { left: 72%; animation-delay: 1s;    animation-duration: 11s; }

@keyframes mp4-float-particle {
  0%   { bottom: -10px; opacity: 0; transform: translateX(0); }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { bottom: 100%; opacity: 0; transform: translateX(30px); }
}

/* ============================================================
   09. RESPONSIVIDADE
   ============================================================ */
@media (max-width: 640px) {
  .mp4-actions {
    flex-direction: column;
    width: 100%;
  }
  .mp4-btn-primary,
  .mp4-btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .mp4-error-code {
    font-size: clamp(80px, 22vw, 140px);
  }
}
