/* ========================================
   404 PAGE
   ======================================== */

body.page-404 {
  background-color: var(--blue-900);
  overflow: hidden;
}

/* ── Shell ────────────────────────────── */
.not-found-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Background image ─────────────────── */
.not-found-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.not-found-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: saturate(0.5);
}

.not-found-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(13, 27, 42, 0.96) 0%,
    rgba(27, 58, 92, 0.7) 50%,
    rgba(13, 27, 42, 0.97) 100%
  );
  z-index: 1;
}

/* ── Header ───────────────────────────── */
.not-found-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  background: rgba(13, 27, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.not-found-logo {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

/* ── Main content ─────────────────────── */
.not-found-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  width: 100%;
}

/* Logo above the code */
.not-found-logo-wrap {
  opacity: 0;
  transform: translateY(-16px);
  animation: nfFadeDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
  margin-bottom: 2rem;
}

/* "Error" eyebrow */
.not-found-eyebrow {
  font-family: var(--font-headings);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--yellow-500);
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px);
  animation: nfFadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
  margin-bottom: 0.5rem;
}

/* Big 404 */
.not-found-code {
  font-family: var(--font-headings);
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  letter-spacing: -4px;
  margin: 0 0 1.25rem;
  opacity: 0;
  transform: translateY(24px);
  animation: nfFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

/* Subtitle message */
.not-found-message {
  font-family: var(--font-headings);
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(16px);
  animation: nfFadeUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.75s forwards;
}

/* CTA button — reuses .btn .btn-primary from home-layout.css */
.not-found-cta {
  opacity: 0;
  transform: translateY(12px);
  animation: nfFadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.95s forwards;
}

.not-found-cta:hover {
  box-shadow: 0 8px 24px rgba(245, 197, 24, 0.35);
}

/* ── Footer ───────────────────────────── */
.not-found-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  padding: 1rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.not-found-footer p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.5px;
}

/* ── Keyframes ────────────────────────── */
@keyframes nfFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nfFadeDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Reduced motion ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .not-found-logo-wrap,
  .not-found-eyebrow,
  .not-found-code,
  .not-found-message,
  .not-found-cta {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
