.site-header {
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: color-mix(in oklch, var(--bg), transparent 5%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.site-header > .container {

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--space-8);
}

.brand { text-transform: none; display: flex; align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
}

.main-nav {
  display: flex;
  gap: var(--space-8);
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
  padding: 0; height: var(--header-height); display: flex; align-items: center;
}

.main-nav a:hover { color: var(--fg); }

.main-nav a.active {
  position: relative;
  color: var(--fg);
  font-weight: 700;
  border-bottom: 2px solid var(--fg);
  z-index: 1;
  margin-bottom: -1px;
}

.nav-drawer { display: none; }

@media (max-width: 767px) {

  .site-header > .container {
    display: flex;
    justify-content: space-between;
    padding-inline: var(--space-4);
  }

  .site-header .main-nav { display: none; }

  .nav-drawer {
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    color: var(--fg);
  }

  .nav-toggle::-webkit-details-marker { display: none; }

  .nav-drawer-panel {
    position: absolute;
    top: var(--header-height);
    right: var(--space-4);
    left: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 30px color-mix(in oklch, var(--fg) 14%, transparent);
  }

  .nav-drawer:not([open]) .nav-drawer-panel { display: none; }

  .nav-drawer-panel > a {
    display: flex;
    align-items: center;
    height: auto;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    border-radius: 4px;
  }

  .nav-drawer-panel > a:hover { color: var(--fg); background: var(--fg-wash); }

  .nav-drawer-panel > a.active {
    color: var(--fg);
    font-weight: 700;
  }
}

.site-footer {
  background: var(--fg-wash);
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-10) var(--space-6);
  margin-top: var(--space-20);
}

.footer-breadcrumb { margin-bottom: var(--space-6); }

.footer-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
}

.footer-breadcrumb li:not(:last-child)::after {
  content: "/";
  opacity: 0.4;
}

.footer-breadcrumb a { color: var(--muted); text-decoration: none; }
.footer-breadcrumb a:hover { color: var(--fg); }
.footer-breadcrumb [aria-current] { color: var(--fg); }

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
}

@media (max-width: 860px) {
  .footer-sitemap { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px) {
  .footer-sitemap { grid-template-columns: repeat(2, 1fr); }
}

.footer-block h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg);
  margin: 0 0 var(--space-4);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li { margin-bottom: var(--space-2); }

.footer-list a {
  font-size: var(--type-sm);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-list a:hover { color: var(--fg); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-8);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--fg); }
.footer-bottom .sep { margin-inline: var(--space-3); opacity: 0.3; }
.footer-bottom .rights { white-space: nowrap; }

@media (max-width: 700px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.is-minimal .site-footer {
  margin-top: 0;
  padding-block: var(--space-6);
  background: transparent;
  border-top: none;
}

.site-footer.minimal .footer-bottom {
  border-top: none;
  padding-top: 0;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-8);
  color: var(--fg-quiet);
}

.site-footer.minimal .footer-legal,
.site-footer.minimal .footer-meta-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.is-minimal .footer-sitemap,
.is-minimal .footer-path { display: none; }

.is-demo .demo-runner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-block: var(--space-8);
}

.game-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;

  &:hover { color: var(--fg); }
}

.hero-wrapper {
  display: grid;

  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-8);
  padding-block: calc(var(--space-unit) * 24) calc(var(--space-unit) * 18);
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: calc(var(--space-unit) * 150);

  container-type: inline-size;
  width: 100%;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: stretch;
  width: 100%;
  min-height: calc(var(--space-unit) * 90);
  opacity: 0.9;
  contain: layout style;
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 6% 10% 18%;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, color-mix(in oklch, var(--fg), transparent 94%) 0%, transparent 72%);
  opacity: 0.9;
  z-index: 0;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--space-unit) * 105);
}

.hero-illustration {
  position: relative;
  z-index: 1;
  width: min(100%, calc(var(--space-unit) * 175));
  overflow: visible;
}

.hero-illustration > * {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual {
    animation: hero-visual-float 16s ease-in-out infinite;
  }

  .hero-illustration > :nth-child(-n + 2) {
    animation: hero-grid-drift 22s ease-in-out infinite alternate;
  }

  .hero-illustration > :nth-child(n + 3) {
    animation: hero-line-breathe 10s ease-in-out infinite alternate;
  }
}

@keyframes hero-visual-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, calc(var(--space-unit) * -2), 0) scale(1.01);
  }
}

@keyframes hero-grid-drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.08;
  }

  100% {
    transform: translate3d(calc(var(--space-unit) * 1.5), calc(var(--space-unit) * -1.5), 0);
    opacity: 0.16;
  }
}

@keyframes hero-line-breathe {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.94;
  }

  100% {
    transform: translate3d(0, calc(var(--space-unit) * -1), 0);
    opacity: 1;
  }
}

@media (max-width: 1000px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding-block: var(--space-16) var(--space-12);
    text-align: center;
  }

  .hero {
    max-width: calc(var(--space-unit) * 160);
    margin-inline: auto;
  }

  .hero-visual {
    width: 100%;
    min-height: 0;
    margin-right: 0;
    justify-content: center;
  }

  .hero-visual::before {
    inset: 10% 6%;
  }

  .hero-illustration {
    width: min(100%, calc(var(--space-unit) * 185));
  }
}

.brand span { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }

.brand-p2p {
  font-weight: 900;
  background: var(--fg);
  color: var(--bg);
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 4px;
  font-size: 10px;
  vertical-align: middle;
  letter-spacing: 0.05em;
}

.hero-title strong {
  display: block;
  color: var(--fg);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-title {
  font-size: clamp(2.375rem, 14.5cqi, 5.75rem);
  line-height: 0.84;
  text-transform: uppercase;
  font-weight: 800;
  margin: 0;
  max-width: calc(var(--space-unit) * 150);
  letter-spacing: -0.04em;
}
