/*
  404-06 — Search & Recovery Experience, standalone HTML/CSS/JS
  implementation. No build step, no framework, no external dependency: copy
  these files into any project and open index.html as-is.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-brand: #39ff14;
  --color-brand-foreground: #171717;
  --color-foreground: #171717;
  --color-background: #ffffff;
  --color-border: #e4e4e4;
  --color-muted-foreground: #737373;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-foreground);
  background-color: var(--color-background);
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.notfound {
  background-color: var(--color-background);
}

.notfound__section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(4rem, 3.2rem + 3.6vw, 6rem) clamp(1rem, 0.3rem + 3vw, 2rem);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-foreground);
}

.badge__dot {
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 999px;
  background-color: var(--color-brand);
}

.heading {
  margin: 1.5rem 0 0;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.35rem + 2vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
}

.description {
  margin: 1rem 0 0;
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted-foreground);
}

.search-form {
  width: 100%;
  max-width: 28rem;
  margin-top: 2.25rem;
  text-align: left;
}

.search-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
}

.search-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.search-form__input {
  display: block;
  width: 100%;
  min-width: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  padding: 0.625rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-foreground);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.search-form__input::placeholder {
  color: var(--color-muted-foreground);
}

.search-form__input:focus-visible,
.search-form__input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.35);
  outline: none;
}

.search-form__submit {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--color-brand);
  color: var(--color-brand-foreground);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 150ms ease;
}

.search-form__submit:hover {
  opacity: 0.9;
}

.search-form__icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.search-form__input:focus-visible,
.search-form__submit:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.search-form__status {
  margin-top: 0.75rem;
  min-height: 1.5rem;
}

.search-form__status-message {
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-foreground);
}

.quick-links {
  margin-top: 2rem;
}

.quick-links__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.quick-links__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background-color: var(--color-background);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
  transition: background-color 150ms ease;
}

.quick-links__link:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.quick-links__link:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* Motion — disabled entirely under reduced motion; every element already
   renders at its final, fully visible state outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-up {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes al-status-in {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .badge,
  .heading,
  .description,
  .search-form,
  .quick-links {
    animation: al-up 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .badge {
    animation-delay: 40ms;
  }
  .heading {
    animation-delay: 120ms;
  }
  .description {
    animation-delay: 200ms;
  }
  .search-form {
    animation-delay: 280ms;
  }
  .quick-links {
    animation-delay: 340ms;
  }

  .search-form__status-message {
    animation: al-status-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

/* Structural breakpoint — reserved for the layout change that genuinely
   needs to happen, not ordinary proportional scaling (handled above via
   clamp). */
@media (min-width: 640px) {
  .search-form__row {
    flex-direction: row;
  }

  .search-form__input {
    flex: 1;
  }
}
