/* vuduwulf.com CF Pages — style guide v1 + LAYOUT-SPEC fib structure (hidden) */
:root {
  --bg: #07060B;
  --panel: #15121F;
  --bone: #EDE6D6;
  --mute: #A8A091;
  --indigo: #5B5BF0;
  --amethyst: #9B5DE5;
  --teal: #2EC4B6;
  --peach: #E8A87C;
  --purple: #7B5EA7;
  --gold: #E8C468; /* Human Gate ONLY — unused on Face chrome */
  --phi: 1.618;
  --f5: 5px; --f6: 8px; --f7: 13px; --f8: 21px;
  --f9: 34px; --f10: 55px; --f11: 89px; --f12: 144px;
  --icon-world: var(--f12);   /* 144 desktop World */
  --icon-side: var(--f11);    /* 89 Pack/Create */
  --icon-gap: var(--f8);      /* 21 */
  --icon-tuck: calc(-1 * var(--f9)); /* -34 tight triangle */
  --max: 960px;
  --radius: 13px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--bone);
  font: 16px/1.618 system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Moving background — slow nebula + soft bokeh; CSS only; no glow green */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, color-mix(in srgb, var(--purple) 28%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 45% at 85% 20%, color-mix(in srgb, var(--teal) 18%, transparent), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 90%, color-mix(in srgb, var(--amethyst) 22%, transparent), transparent 55%),
    var(--bg);
}
.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(circle, rgba(237,230,214,0.55) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(155,93,229,0.35) 0 1.5px, transparent 3px);
  background-size: 89px 89px, 144px 144px;
  background-position: 0 0, 34px 55px;
  animation: drift 72s linear infinite;
  opacity: 0.35;
}
.sky::after {
  background-size: 233px 233px, 55px 55px;
  animation-duration: 110s;
  animation-direction: reverse;
  opacity: 0.22;
}
@keyframes drift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-89px, -55px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .sky::before, .sky::after { animation: none; }
}
@media (max-width: 600px) {
  .sky::before, .sky::after { opacity: 0.2; animation-duration: 96s, 140s; }
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

.mycelium {
  background-image: radial-gradient(circle, var(--amethyst) 1px, transparent 1.2px);
  background-size: 21px 21px;
  opacity: 0.18;
  pointer-events: none;
}
.panel:hover .mycelium,
.card:hover .mycelium,
.emblem:hover .mycelium { opacity: 0.42; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--f7) var(--f10);
  padding: var(--f10) 5vw;
  border-bottom: 1px dotted color-mix(in srgb, var(--amethyst) 45%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--bone);
  margin-right: auto;
}
.brand .wordmark { height: 28px; width: auto; }
.brand .mark-small {
  width: 34px; height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px dotted color-mix(in srgb, var(--amethyst) 50%, transparent);
}
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 21px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--mute);
  text-decoration: none;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
}
.primary-nav a:hover { color: var(--bone); }
.primary-nav a[aria-current="page"] { color: var(--indigo); }
.menu-toggle { display: none; }
@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--panel);
    border: 1px dotted color-mix(in srgb, var(--amethyst) 55%, transparent);
    color: var(--bone);
    border-radius: var(--radius);
    padding: 8px 13px;
    cursor: pointer;
    font: inherit;
  }
  .primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 13px 0 0;
    gap: 13px;
  }
  .primary-nav.open { display: flex; }
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--f11) 5vw var(--f11);
}
.hero { text-align: center; padding: var(--f10) 0 var(--f11); }
.hero .wordmark-hero {
  width: min(420px, 86vw);
  margin: 0 auto var(--f10);
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 13px;
}
.hero .tag {
  color: var(--mute);
  margin: 0 auto var(--f11);
  font-size: 1.05rem;
  max-width: 36rem;
}

/* Exactly THREE emblems — Pack / World / Create — tight triangle (LAYOUT-SPEC a) */
.emblem-tri {
  display: grid;
  grid-template-columns: var(--icon-side) var(--icon-side);
  column-gap: var(--icon-gap);
  row-gap: 0;
  justify-content: center;
  justify-items: center;
  align-items: start;
  margin: var(--f11) auto 0;
  max-width: 100%;
}
.emblem-tri .emblem.world {
  grid-column: 1 / -1;
  width: var(--icon-world);
  margin-bottom: var(--icon-tuck);
}
.emblem-tri .emblem.pack,
.emblem-tri .emblem.create {
  width: var(--icon-side);
}

/* phone: vertical stack World → Pack → Create (LAYOUT-SPEC mobile) */
@media (max-width: 600px) {
  :root {
    --icon-world: 144px;
    --icon-side: 144px;
    --icon-gap: var(--f8);
    --icon-tuck: 0px;
  }
  .emblem-tri {
    grid-template-columns: 1fr;
    row-gap: var(--icon-gap);
    max-width: 275px;
  }
  .emblem-tri .emblem.world { margin-bottom: 0; }
}

/* tablet */
@media (min-width: 601px) and (max-width: 1024px) {
  :root {
    --icon-world: var(--f12); /* 144 */
    --icon-side: var(--f11);  /* 89 */
    --icon-gap: var(--f8);    /* 21 */
    --icon-tuck: calc(-1 * var(--f9));
  }
}

/* laptop / desktop already default; large desktop bump */
@media (min-width: 1280px) {
  :root {
    --icon-world: 233px;
    --icon-side: 144px;
    --icon-gap: 34px;
    --icon-tuck: calc(-1 * 55px);
  }
}

.emblem {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--bone);
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.emblem img.icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.emblem .label {
  position: relative;
  z-index: 1;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--mute);
}
.emblem:hover .label,
.emblem:focus-visible .label { color: var(--bone); }
.emblem:hover img.icon,
.emblem:focus-visible img.icon {
  filter: brightness(1.08);
}
.emblem .info {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: min(260px, 80vw);
  padding: 13px 21px;
  background: var(--panel);
  border: 1px dotted color-mix(in srgb, var(--amethyst) 55%, transparent);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--mute);
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.emblem.is-open .info,
.emblem:focus-within .info {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .emblem:hover .info { opacity: 1; pointer-events: auto; }
}

.portals-note {
  margin: var(--f11) auto 0;
  max-width: 36rem;
  color: var(--mute);
  font-size: 0.9rem;
}

h1, h2 { color: var(--bone); font-weight: 600; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 21px; }
h2 { font-size: 1.15rem; letter-spacing: 0.08em; color: var(--indigo); margin: var(--f10) 0 13px; }
.lead { color: var(--mute); margin: 0 0 var(--f10); max-width: 42rem; }
.panel, .card {
  position: relative;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px dotted color-mix(in srgb, var(--amethyst) 45%, transparent);
  border-radius: var(--radius);
  padding: 34px 21px;
  margin: 21px 0;
  overflow: hidden;
}
.panel > *:not(.mycelium), .card > *:not(.mycelium) { position: relative; z-index: 1; }
.panel .mycelium, .card .mycelium { position: absolute; inset: 0; }

.page-emblem {
  width: var(--f12);
  height: var(--f12);
  margin: 0 0 var(--f8);
  object-fit: contain;
}
.page-gif {
  width: min(233px, 70vw);
  height: auto;
  margin: 0 0 var(--f8);
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 21px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}
.btn-primary { background: var(--indigo); color: var(--bone); }
.btn-primary:hover { background: color-mix(in srgb, var(--indigo) 80%, white); color: var(--bg); }
.btn-secondary {
  background: transparent;
  border-color: var(--amethyst);
  color: var(--bone);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }
.btn-teal {
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
}
.btn-teal:hover { background: color-mix(in srgb, var(--teal) 18%, transparent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 21px; justify-content: flex-start; }
.hero .cta-row { justify-content: center; }

.shop-card { display: grid; gap: 21px; }
.shop-card p { margin: 0; color: var(--mute); }

.mailto-note { color: var(--mute); font-size: 0.9rem; margin-top: 13px; }

.site-footer {
  text-align: center;
  color: var(--mute);
  font-size: 0.8rem;
  padding: var(--f11) 5vw;
  border-top: 1px dotted color-mix(in srgb, var(--amethyst) 40%, transparent);
}
.site-footer a { color: var(--mute); text-decoration: none; }
.site-footer a:hover { color: var(--bone); }
.site-footer .legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 21px;
  margin: 13px 0;
}
