/*
  404-04 — Split Content + Supporting Visual, 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 {
  --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;
}

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

.notfound__section {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(4rem, 3.2rem + 3.6vw, 7rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

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

.notfound__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.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;
  max-width: 26rem;
  font-weight: 600;
  font-size: clamp(2rem, 1.55rem + 2.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
}

.description {
  margin: 1.25rem 0 0;
  max-width: 26rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-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.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background-color 150ms ease,
    opacity 150ms ease,
    border-color 150ms ease;
}

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

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

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

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

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

.notfound__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
}

.illustration-frame {
  border-radius: 1.5rem;
  border: 1px solid var(--color-border);
  background-image: linear-gradient(to bottom right, #fafafa, #f2f2f2);
  padding: 1.5rem;
}

.illustration {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  max-width: 28rem;
}

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

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

  @keyframes al-dot {
    from {
      opacity: 0;
      transform: scale(0.6);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .badge,
  .heading,
  .description,
  .actions {
    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;
  }
  .actions {
    animation-delay: 280ms;
  }

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

  .part {
    animation: al-part 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-box: fill-box;
  }

  .part--desk {
    animation-delay: 260ms;
  }
  .part--monitor {
    animation-delay: 320ms;
  }
  .part--plant {
    animation-delay: 420ms;
  }
  .part--glyph {
    animation-delay: 540ms;
  }
  .part--seated {
    animation-delay: 480ms;
  }
  .part--standing {
    animation-delay: 560ms;
  }

  .dot {
    animation: al-dot 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-box: fill-box;
    transform-origin: center;
  }

  .dot--1 {
    animation-delay: 520ms;
  }
  .dot--2 {
    animation-delay: 600ms;
  }
  .dot--3 {
    animation-delay: 680ms;
  }
  .dot--4 {
    animation-delay: 560ms;
  }
}

/* Structural breakpoints — reserved for layout changes that genuinely need
   to happen, not ordinary proportional scaling (handled above via clamp). */
@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    width: auto;
  }
}

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

  .notfound__panel {
    max-width: none;
    margin: 0;
  }
}
