/* Canonical moorkyz-core tokens + header-moorkyz-signature (echo preset) + TiltCard + canonical .site-footer */
:root {
  color-scheme: dark;
  --viewport-height: 100vh;
  --bg: #07060e;
  --surface: rgba(12, 11, 24, 0.88);
  --surface-2: rgba(18, 18, 34, 0.78);
  --line: rgba(168, 185, 255, 0.16);
  --text: #eef3ff;
  --muted: rgba(190, 202, 228, 0.64);
  --dim: rgba(154, 168, 200, 0.42);
  --accent: #a8b9ff;
  --echo-c1: #85dfed;
  --echo-c2: #a8b9ff;
  --echo-c3: #cc99ef;
  --echo-c4: #f1e9fb;
  --echo-grad: linear-gradient(115deg, #85dfed 0%, #a8b9ff 40%, #cc99ef 76%, #f1e9fb 100%);
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --radius: 0.75rem;
}
@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-height: var(--viewport-height);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--font-sans);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}
:focus-visible { outline: 2px solid var(--echo-c1); outline-offset: 3px; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }

/* 1. Canonical header-moorkyz-signature (simplistic top-left corner, echo preset) */
.hdr-moorkyz-sig {
  --hue-angle: 115deg;
  --hue-c1: #85dfed;
  --hue-c2: #a8b9ff;
  --hue-c3: #cc99ef;
  --hue-c4: #f1e9fb;
  --hue-gradient: linear-gradient(var(--hue-angle), var(--hue-c1) 0%, var(--hue-c2) 40%, var(--hue-c3) 76%, var(--hue-c4) 100%);
  --hue-glow: color-mix(in srgb, var(--hue-c2) 36%, transparent);
  position: sticky;
  top: 0;
  z-index: 35;
  background: rgba(7, 6, 14, 0.62);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #eff3ff;
}
.hdr-moorkyz-sig[data-gradient-preset="echo"] {
  --hue-c1: #85dfed;
  --hue-c2: #a8b9ff;
  --hue-c3: #cc99ef;
  --hue-c4: #f1e9fb;
}
.hdr-moorkyz-sig__inner {
  width: 100%;
  padding: 15px clamp(18px, 3vw, 30px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.hdr-moorkyz-sig__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #eff3ff;
  text-decoration: none;
  border-radius: 8px;
}
.hdr-moorkyz-sig__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px var(--hue-glow));
  animation: hdr-moorkyz-pop 0.65s cubic-bezier(0.16, 0.9, 0.24, 1);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), filter 200ms ease;
}
.hdr-moorkyz-sig__brand:hover .hdr-moorkyz-sig__mark {
  transform: scale(1.05);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--hue-c1) 55%, transparent));
}
.hdr-moorkyz-sig__mark img { width: 100%; height: 100%; display: block; }
.hdr-moorkyz-sig__wordmark {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: #eff3ff;
}
.hdr-moorkyz-sig__hue {
  color: var(--hue-c2);
  background: var(--hue-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes hdr-moorkyz-pop {
  0% { transform: scale(0.87); }
  65% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

/* 2. THE DOT CosmicBackdrop + breathing .hue-border */
.cosmic-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.cosmic-veil {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(circle at 18% 18%, rgba(133, 223, 237, 0.12), transparent 34%),
    radial-gradient(circle at 82% 22%, rgba(168, 185, 255, 0.11), transparent 30%),
    radial-gradient(circle at 72% 76%, rgba(204, 153, 239, 0.12), transparent 34%);
}
.cosmic-cloud {
  position: absolute;
  border-radius: 999px;
  filter: blur(42px);
  animation: cosmic-drift var(--drift-duration, 30s) ease-in-out infinite;
}
.cosmic-star {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(244, 248, 255, 0.95) 0%, rgba(168, 185, 255, 0.88) 46%, transparent 100%);
  box-shadow: 0 0 8px rgba(133, 223, 237, 0.32);
  opacity: var(--star-opacity, 0.22);
  animation: cosmic-twinkle var(--twinkle-duration, 6s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
}
@keyframes cosmic-twinkle {
  0%, 100% { opacity: var(--star-opacity, 0.22); transform: scale(1); }
  50% { opacity: calc(var(--star-opacity, 0.22) + 0.24); transform: scale(1.38); }
}
@keyframes cosmic-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(14px, -10px, 0) scale(1.04); }
}
@keyframes hue-rotate-border {
  0%, 100% { border-color: rgba(133, 223, 237, 0.34); box-shadow: 0 0 22px rgba(133, 223, 237, 0.12); }
  33% { border-color: rgba(168, 185, 255, 0.38); box-shadow: 0 0 24px rgba(168, 185, 255, 0.15); }
  66% { border-color: rgba(204, 153, 239, 0.36); box-shadow: 0 0 22px rgba(204, 153, 239, 0.14); }
}
.hue-border {
  border: 1px solid rgba(168, 185, 255, 0.32);
  animation: hue-rotate-border 6.5s ease-in-out infinite;
}

/* 3. Minimalist THE DOT Centerpiece + Cards Two-Card Tilt Showcase */
.dot-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 64px) 22px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 54px;
}
.dot-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.dot-kicker {
  font: 0.68rem/1.4 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.dot-title {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: #f6f8ff;
}
.dot-title-hue {
  background: var(--echo-grad);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dot-lead {
  margin-top: 16px;
  max-width: 440px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}
.dot-cta-row {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.dot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(168, 185, 255, 0.26);
  background: rgba(255, 255, 255, 0.03);
  color: #eef3ff;
  font: 0.76rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}
.dot-btn:hover {
  border-color: rgba(241, 233, 251, 0.78);
  box-shadow: 0 0 20px rgba(133, 223, 237, 0.18);
  transform: translateY(-1px);
}
.dot-btn--primary {
  background: rgba(168, 185, 255, 0.11);
  border-color: rgba(133, 223, 237, 0.48);
}
.dot-micro {
  margin-top: 16px;
  font: 0.7rem/1.5 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--dim);
}

/* Cards-inspired Layered Two-Card Showcase + moorkyz-core TiltCard */
.card {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(168, 185, 255, 0.22);
  border-radius: 14px;
  padding: 22px 22px 18px;
  background: rgba(10, 8, 20, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 42px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 380ms cubic-bezier(.2, .8, .2, 1), border-color 160ms ease, opacity 280ms ease;
}
.card[data-tilt] {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--scale, 1));
}
.card[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  z-index: -1;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.09), transparent 56%);
  opacity: var(--glow, 0);
  transition: opacity 280ms ease;
}
.showcase-stack {
  position: relative;
  min-height: 256px;
  padding-bottom: 24px;
}
.showcase-back-card {
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 76%;
  padding: 15px 16px;
  opacity: 0.52;
  transform: rotate(3.5deg);
  pointer-events: none;
  z-index: 0;
}
.showcase-front-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 0.68rem/1 var(--font-mono);
  color: var(--dim);
  letter-spacing: 0.08em;
}
.sc-pill {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(133, 223, 237, 0.32);
  color: var(--echo-c1);
  font: 0.65rem/1 var(--font-mono);
}
.sc-brand {
  font-size: 1.32rem;
  font-weight: 550;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.sc-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
  min-height: 2.6em;
}
.sc-cli {
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 185, 255, 0.14);
  font: 0.72rem/1.4 var(--font-mono);
  color: #cfe0ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  font: 0.7rem/1 var(--font-mono);
  color: var(--dim);
}
.sc-step-btn {
  background: transparent;
  border: 1px solid rgba(168, 185, 255, 0.2);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 9px;
  font: 0.74rem/1 var(--font-mono);
}
.sc-step-btn:hover { border-color: var(--echo-c1); color: #fff; }

/* Minimalist Showcase Strip (auto-synced with catalog.json) */
.showcase-drawer {
  border-top: 1px solid rgba(168, 185, 255, 0.1);
  padding-top: 28px;
}
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.cat-pill {
  background: transparent;
  border: 1px solid rgba(168, 185, 255, 0.16);
  color: var(--dim);
  border-radius: 999px;
  padding: 5px 11px;
  font: 0.68rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 150ms ease;
}
.cat-pill:hover, .cat-pill.is-active {
  color: #f6f8ff;
  border-color: rgba(133, 223, 237, 0.52);
  background: rgba(133, 223, 237, 0.08);
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}
.mini-tile {
  text-align: left;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid rgba(168, 185, 255, 0.12);
  background: rgba(12, 11, 24, 0.66);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.mini-tile:hover, .mini-tile.is-selected {
  border-color: rgba(133, 223, 237, 0.48);
  background: rgba(18, 18, 36, 0.9);
  transform: translateY(-1px);
}
.mini-tile__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.mini-tile__name { font-size: 0.88rem; font-weight: 550; color: #eef3ff; }
.mini-tile__stat { font: 0.65rem/1 var(--font-mono); color: var(--echo-c2); }
.mini-tile__desc {
  font-size: 0.76rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 4. Canonical moorkyz-core .site-footer (fading hairline, 1.44s glint, 3s hover RGB double twitch) */
.site-footer {
  position: relative;
  display: flex;
  justify-content: center;
  padding: clamp(0.6rem, 1.8vmin, 1rem) clamp(1rem, 3vmin, 1.75rem);
  background: linear-gradient(0deg, rgba(3, 6, 14, 0.72) 0%, rgba(3, 6, 14, 0) 100%);
  font-family: var(--font-mono);
  user-select: none;
  animation: site-footer-fade-in 900ms ease-out 400ms both;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(165, 205, 255, 0) 0%, rgba(165, 205, 255, 0.34) 50%, rgba(165, 205, 255, 0) 100%);
}
.site-footer::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(225, 240, 255, 0) 0%, rgba(210, 232, 255, 0.62) 26%, rgba(255, 255, 255, 1) 50%, rgba(210, 232, 255, 0.62) 74%, rgba(225, 240, 255, 0) 100%) 130% 0 / 26% 100% no-repeat;
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  filter: drop-shadow(0 0 4px rgba(195, 224, 255, 0.9)) drop-shadow(0 0 10px rgba(140, 188, 255, 0.55));
  pointer-events: none;
  animation: site-footer-glint 1.44s ease-in-out 0.9s both;
}
.site-footer__note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: rgba(190, 208, 236, 0.76);
  text-shadow: 0 0 14px rgba(120, 165, 255, 0.35);
}
.site-footer__link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: color 180ms ease, text-shadow 180ms ease, filter 180ms ease, transform 180ms ease;
}
.site-footer__link--name:hover, .site-footer__link--name:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(190, 218, 255, 0.85), 0 0 22px rgba(130, 178, 255, 0.65);
}
.site-footer__link--logo { position: relative; }
.site-footer__logo {
  display: block;
  width: 1.3em;
  height: 1.3em;
  color: #ffffff;
  filter: drop-shadow(0 0 6px rgba(150, 190, 255, 0.55));
  transform: translateY(-0.015em);
  transition: filter 180ms ease, transform 180ms ease;
}
.site-footer__link--logo:hover .site-footer__logo, .site-footer__link--logo:focus-visible .site-footer__logo {
  filter: drop-shadow(0 0 8px rgba(215, 232, 255, 0.95)) drop-shadow(0 0 18px rgba(140, 185, 255, 0.75));
  transform: translateY(-0.015em) scale(1.07);
}
@media (prefers-reduced-motion: no-preference) {
  .site-footer__link--logo:hover:not(.js-glitch-bound) .site-footer__logo {
    animation: site-footer-rgb-twitch 260ms steps(1, end) 3s 1;
  }
  .site-footer__link--logo.is-glitching .site-footer__logo {
    animation: site-footer-rgb-twitch 260ms steps(1, end) 1 both;
  }
}
@keyframes site-footer-rgb-twitch {
  0%, 32%, 56%, 100% {
    transform: translateY(-0.015em) scale(1.07);
    filter: drop-shadow(0 0 8px rgba(215, 232, 255, 0.95)) drop-shadow(0 0 18px rgba(140, 185, 255, 0.75));
  }
  14% {
    transform: translate(-1.15px, 0.25px) scale(1.07);
    filter: drop-shadow(-1.25px 0 0 rgba(255, 72, 116, 0.72)) drop-shadow(1.25px 0 0 rgba(72, 218, 255, 0.72));
  }
  72% {
    transform: translate(1.1px, -0.25px) scale(1.07);
    filter: drop-shadow(1.2px 0 0 rgba(255, 72, 116, 0.68)) drop-shadow(-1.2px 0 0 rgba(72, 218, 255, 0.68));
  }
}
@keyframes site-footer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes site-footer-glint { from { background-position: -30% 0; } to { background-position: 130% 0; } }

@media (max-width: 860px) {
  .dot-stage { grid-template-columns: 1fr; }
  .showcase-back-card { right: 0; width: 84%; }
}
@media (max-width: 640px) {
  .hdr-moorkyz-sig__wordmark { font-size: 1.08rem; }
  .hdr-moorkyz-sig__mark { width: 29px; height: 29px; flex-basis: 29px; }
  .dot-main { padding: 22px 16px 44px; gap: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .cosmic-cloud, .cosmic-star, .hue-border, .hdr-moorkyz-sig__mark, .site-footer, .site-footer::after {
    animation: none !important;
    transition: none !important;
  }
  .card { transform: none !important; }
}
