/*
 * Kouider — Red & Black Glassmorphism
 * Aesthetic layer only. Layout handled by theme.json.
 */


/* --- 404 --- */
.k-404-main { flex: 1 0 auto; display: flex; align-items: center; width: 100%; }
.k-404-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) 20px;
  text-align: center;
}
.k-404-eyebrow {
  color: var(--wp--preset--color--k-red-bright);
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.k-404-code {
  position: relative;
  margin: 0 0 .5rem;
  font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: clamp(6rem, 24vw, 12rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--wp--preset--color--k-white);
  text-shadow: 0 0 90px rgba(255,38,56,.35);
}
.k-404-code::before,
.k-404-code::after {
  content: "404";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.k-404-code::before {
  color: var(--wp--preset--color--k-red);
  animation: k-404-glitch-a 3.2s infinite steps(1);
}
.k-404-code::after {
  color: #ff8d96;
  animation: k-404-glitch-b 2.7s infinite steps(1);
}
@keyframes k-404-glitch-a {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  92% { opacity: .85; transform: translate(-5px, 2px); clip-path: inset(12% 0 58% 0); }
  94% { opacity: .85; transform: translate(4px, -2px); clip-path: inset(55% 0 12% 0); }
  96% { opacity: .6; transform: translate(-3px, 1px); clip-path: inset(30% 0 40% 0); }
  98% { opacity: .8; transform: translate(5px, -1px); clip-path: inset(72% 0 4% 0); }
}
@keyframes k-404-glitch-b {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  90% { opacity: .7; transform: translate(5px, -1px); clip-path: inset(65% 0 8% 0); }
  93% { opacity: .7; transform: translate(-4px, 2px); clip-path: inset(8% 0 72% 0); }
  95% { opacity: .5; transform: translate(3px, 1px); clip-path: inset(42% 0 28% 0); }
  97% { opacity: .7; transform: translate(-5px, -2px); clip-path: inset(20% 0 52% 0); }
}
.k-404-title {
  color: var(--wp--preset--color--k-white);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -.03em;
  margin: 0 0 .75rem;
}
.k-404-sub {
  color: var(--wp--preset--color--k-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.k-404-terminal { margin-bottom: 2rem; text-align: left; }
.k-404-terminal .k-terminal-body { min-height: 168px; }
.k-404-error { color: var(--wp--preset--color--k-red-bright); font-weight: 700; }
.k-404-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.k-404-actions .k-contact-btn { white-space: nowrap; }

@media (max-width: 600px) {
  .k-404-inner { padding-top: 40px; padding-bottom: 56px; }
  .k-404-terminal .k-terminal-body { min-height: 0; font-size: .76rem; }
  .k-404-actions { flex-direction: column; align-items: stretch; }
  .k-404-actions .k-contact-btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .k-404-code::before,
  .k-404-code::after { animation: none; }
}
