/*
  404-08 — Abstract Orbit / System Nodes, 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. The entire visual is one
  responsive inline SVG (`viewBox="0 0 1200 700"`) — no viewport-dependent
  JS positioning.
*/

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

:root {
  --brand: #39ff14;
  --brand-foreground: #0a0a0a;
  --foreground: #0a0a0a;
  --background: #ffffff;
  --border: #e2e2e2;
  --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(--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, non-looping 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-fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes al-spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes al-pulse {
    0%,
    100% {
      opacity: 0.55;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.35);
    }
  }

  .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;
  }

  .art {
    animation: al-fade 900ms ease-out both;
    animation-delay: 260ms;
  }

  .orbit {
    transform-box: view-box;
    transform-origin: 600px 350px;
    animation: al-spin 90s linear infinite;
  }

  .node--accent {
    transform-box: fill-box;
    transform-origin: center;
    animation: al-pulse 2600ms cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }
}

/* Introduction */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(4rem, 3rem + 3vw, 7rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.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: 34rem;
  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;
}

/* Orbit artwork — decorative, `aria-hidden` in the markup. */
.art {
  margin-top: 3.5rem;
  width: 100%;
  max-width: 42rem;
}

.orbit {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}

.mark {
  font-size: 200px;
  font-weight: 700;
  letter-spacing: -4px;
  fill: var(--foreground);
  opacity: 0.06;
}

.node {
  fill: var(--border);
}

.node--accent {
  fill: var(--brand);
}

.break {
  stroke-linecap: round;
}

.break path {
  stroke: var(--border);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  fill: none;
}

.break__x path {
  stroke: var(--muted-foreground);
  stroke-width: 2;
  stroke-dasharray: none;
}

.break circle {
  fill: var(--brand);
}

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