@layer base, components, utilities;

@layer base {
:root {
  color-scheme: dark;
  --app-bg: #131722;
  --app-surface: #1e222d;
  --app-surface-elevated: #2a2e39;
  --app-surface-hover: #363a45;
  --app-border: #434651;
  --app-text: #d1d4dc;
  --app-text-muted: #787b86;
  --app-section-header-text: #e8e8e8;
  --app-accent: #ce422b;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    "Source Sans 3",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  background: var(--app-bg);
  color: var(--app-text);
  line-height: 1.45;
}

.demo {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

.demo__hero {
  margin-bottom: 1.5rem;
}

.demo__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.demo__title-logo {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.35rem;
  flex-shrink: 0;
}

.demo__subtitle {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--app-text-muted);
}

.demo__panel {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  scroll-margin-top: 1rem;
}

.demo__panel + .demo__panel {
  margin-top: 0;
}

.demo__hero-copy {
  min-width: 0;
}

.demo__hero .seed-bar {
  margin-top: 0.75rem;
}

.demo__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.demo__nav-link {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: var(--app-surface-elevated);
  color: var(--app-text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.demo__nav-link:hover {
  color: #fff;
  border-color: var(--app-accent);
  background: var(--app-surface-hover);
}

.demo__randomize {
  margin-top: 0.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--app-border);
  border-radius: 0.25rem;
  background: var(--app-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.demo__randomize:hover {
  filter: brightness(1.08);
}

.demo__panel--row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo__panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.demo__panel-head .demo__panel-title {
  margin: 0;
}

.demo__panel-hint {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--app-text-muted);
  line-height: 1.4;
}

.demo__panel-mark {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.demo__panel-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-text-muted);
}

.demo-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.demo-decor__mark-field {
  position: absolute;
  left: calc(50% + min(21rem, 50vw - 1rem) - 4rem);
  top: 42%;
  width: min(28vw, 20rem);
  height: min(42vh, 26rem);
  pointer-events: none;
  transition:
    left 0.5s ease,
    top 0.5s ease,
    width 0.5s ease,
    height 0.5s ease;
}

.demo-decor--shuffle .demo-decor__mark-field {
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
}

.demo-decor__crab,
.demo-decor__mark {
  position: absolute;
  user-select: none;
  transition:
    left 0.5s ease,
    top 0.5s ease,
    transform 0.5s ease;
  animation: demo-decor-float 3.8s ease-in-out infinite;
}

.demo-decor__crab {
  font-size: 2rem;
  line-height: 1;
  opacity: 0.75;
  filter: hue-rotate(-18deg) saturate(2.8) brightness(1.05)
    drop-shadow(0 2px 6px rgb(229 57 53 / 40%));
}

.demo-decor__mark {
  animation: demo-decor-float 5s ease-in-out infinite;
}

.demo-decor__crab:nth-child(odd) {
  animation-delay: -1.4s;
}

.demo-decor__crab:nth-child(3n) {
  animation-duration: 4.6s;
}

.demo-decor__mark-field .demo-decor__mark:nth-child(odd) {
  animation-delay: -2.4s;
}

.demo-decor__mark-field .demo-decor__mark:nth-child(3n) {
  animation-duration: 5.4s;
}

@keyframes demo-decor-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -7px;
  }
}
}

@layer utilities {
}
