/*
  404-09 — Broken Route / Product Dashboard, standalone HTML/CSS
  implementation. No build step, no framework, no external dependency:
  copy this file and index.html into any project and open it as-is.
*/

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

:root {
  --brand: #39ff14;
  --brand-foreground: #0a0a0a;
  --foreground: #0a0a0a;
  --background: #ffffff;
  --border: #e2e2e2;
  --muted-foreground: #737373;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --emerald-50: #ecfdf5;
  --emerald-700: #047857;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  --font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

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

/* 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-panel {
    from {
      opacity: 0;
      transform: translateY(18px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes al-row {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .eyebrow,
  .heading,
  .description,
  .actions {
    animation: al-up 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .eyebrow {
    animation-delay: 60ms;
  }
  .heading {
    animation-delay: 140ms;
  }
  .description {
    animation-delay: 220ms;
  }
  .actions {
    animation-delay: 300ms;
  }

  .panel {
    animation: al-panel 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 220ms;
  }

  .route-row,
  .nav-card {
    animation: al-row 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

/* Introduction */
.intro {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(4rem, 3rem + 3vw, 7rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
}

.intro__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

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

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

.description {
  margin: 1.25rem 0 0;
  max-width: 30rem;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted-foreground);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    opacity 150ms ease;
}

.button--primary {
  color: var(--brand-foreground);
  background-color: var(--brand);
}

.button--primary:hover {
  opacity: 0.9;
}

.button--secondary {
  color: var(--foreground);
  background-color: transparent;
  border: 1px solid var(--border);
}

.button--secondary:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

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

/* Dashboard mock — decorative product visual, `aria-hidden` in the markup,
   built entirely from DOM/CSS. */
.panel {
  width: 100%;
  min-width: 0;
  max-width: 32rem;
  margin: 0 auto;
}

.browser {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.15);
}

.browser__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  background-color: rgba(0, 0, 0, 0.02);
  padding: 0.75rem 1rem;
}

.dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
}

.dot--red {
  background-color: rgba(248, 113, 113, 0.7);
}

.dot--amber {
  background-color: rgba(251, 191, 36, 0.7);
}

.dot--green {
  background-color: rgba(52, 211, 153, 0.7);
}

.address-bar {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.375rem;
  margin-left: 0.5rem;
  overflow: hidden;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.address-bar svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.address-bar__text {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.address-bar__broken {
  font-weight: 500;
  color: var(--red-600);
}

.browser__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.status-chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  border: 1px solid var(--red-100);
  background-color: var(--red-50);
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--red-700);
}

.status-chip__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--red-500);
}

.route-rows {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.route-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
}

.route-row + .route-row {
  border-top: 1px solid var(--border);
}

.route-row__label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.route-row__path {
  margin-top: 0.125rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--foreground);
}

.route-row__status {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
}

.route-row__status--404 {
  background-color: var(--red-50);
  color: var(--red-700);
}

.route-row__status--200 {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.nav-card {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  padding: 0.75rem;
}

.nav-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.nav-card__description {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.system-chip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.system-chip__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--brand);
}

/* Structural breakpoints */
@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    width: auto;
  }
}

@media (min-width: 1024px) {
  .intro__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .panel {
    margin: 0;
  }
}
