:root {
  --ink: #04111e;
  --muted: #7fa6b8;
  --night: #04111e;
  --night-2: #071827;
  --panel: #061522;
  --panel-solid: #061522;
  --violet: #dff5ff;
  --violet-2: #79acc2;
  --gold: #f4fbff;
  --aqua: #9bc7d8;
  --line: rgba(145, 194, 214, .24);
  --glow: transparent;
  --radius: 0;
  --max: 1440px;
}

@font-face {
  font-family: "KA Runic";
  src: url("assets/fonts/NotoSansRunic-Runic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+16A0-16FF;
}

body {
  color: var(--violet);
  background: var(--night);
  font-family: "Arial Narrow", "Microsoft YaHei", Arial, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--violet);
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

::selection { color: var(--violet); background: var(--ink); }
html { scrollbar-color: var(--violet) var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

body::before {
  opacity: .13;
  mix-blend-mode: screen;
}

.container { width: min(calc(100% - 32px), var(--max)); }
.site-header {
  position: sticky;
  top: 0;
  color: var(--ink);
  background: var(--violet);
  border-color: var(--ink);
  backdrop-filter: none;
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 10px 0 rgba(20,13,27,.12); }

.nav {
  width: 100%;
  min-height: 92px;
  padding: 0;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
}

.brand {
  align-self: stretch;
  min-width: 270px;
  padding: 0 22px;
  border-right: 1px solid var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 24px;
  letter-spacing: .03em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--violet);
  background: var(--ink);
  clip-path: none;
}

.nav-links { align-self: stretch; gap: 0; margin-left: auto; }
.nav-links a {
  min-width: 118px;
  display: grid;
  place-items: center;
  padding: 0 20px;
  border-left: 1px solid var(--ink);
  color: var(--ink);
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.nav-links a:hover { color: var(--violet); background: var(--ink); }

.domain {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 170px;
  border: 0;
  border-left: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 20px;
  color: var(--ink);
  font-weight: 700;
}
.domain::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(143, 190, 212, .18);
}

.menu-toggle {
  display: none;
  width: 58px;
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform .2s ease;
}
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}
.nav-links a[aria-current="true"] { color: var(--violet); background: var(--ink); }

.container.hero {
  width: 100%;
  max-width: none;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  color: var(--ink);
  background: var(--violet);
}

.hero-art {
  order: -1;
  width: 100%;
  min-height: clamp(400px, 48vw, 690px);
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  transform: none;
  background: #03101c;
  image-rendering: pixelated;
  isolation: isolate;
  --scene-x: 0px;
  --scene-y: 0px;
}

.scene-backdrop {
  position: absolute;
  z-index: 0;
  inset: -4%;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1, 11, 21, .02) 0%, transparent 52%, rgba(1, 11, 21, .5) 100%),
    linear-gradient(90deg, rgba(20, 89, 128, .1), transparent 34%, transparent 72%, rgba(2, 29, 49, .14)),
    url("hero-witch-city.webp") center center / cover no-repeat;
  image-rendering: pixelated;
  will-change: transform, filter;
  animation: scene-breathe 18s ease-in-out infinite alternate;
}

.scene-atmosphere {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.scene-glow,
.scene-mist,
.scene-stars { position: absolute; display: block; pointer-events: none; }

.scene-glow {
  border-radius: 50%;
  opacity: .36;
  filter: blur(13px);
  animation: scene-glow-pulse 4.8s steps(8, end) infinite alternate;
}
.scene-moon {
  top: 6%;
  left: 24%;
  width: 20%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(235, 247, 250, .44), rgba(115, 164, 184, .15) 36%, transparent 68%);
}
.scene-lantern-a {
  top: 3%;
  right: -1%;
  width: 11%;
  aspect-ratio: .8;
  background: radial-gradient(circle, rgba(161, 205, 220, .5), rgba(76, 132, 157, .14) 40%, transparent 72%);
  animation-delay: -1.4s;
}
.scene-lantern-b {
  right: 3%;
  bottom: 3%;
  width: 13%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(154, 200, 217, .48), rgba(72, 126, 151, .13) 42%, transparent 72%);
  animation-delay: -2.8s;
}
.scene-mist {
  left: -20%;
  right: -20%;
  bottom: 11%;
  height: 30%;
  opacity: .18;
  filter: blur(18px);
  background:
    radial-gradient(ellipse at 15% 60%, rgba(112, 165, 185, .26), transparent 34%),
    radial-gradient(ellipse at 49% 52%, rgba(94, 155, 181, .22), transparent 31%),
    radial-gradient(ellipse at 82% 66%, rgba(103, 162, 185, .22), transparent 35%);
  animation: scene-mist-drift 23s linear infinite alternate;
}
.scene-stars {
  inset: 0;
  opacity: .22;
  background:
    radial-gradient(circle at 17% 18%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 42% 11%, #efdfff 0 1px, transparent 2px),
    radial-gradient(circle at 55% 27%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 68% 12%, #f7d8ff 0 1px, transparent 2px),
    radial-gradient(circle at 78% 31%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 91% 20%, #e5d4ff 0 1px, transparent 2px);
  animation: scene-star-flicker 3.6s steps(6, end) infinite;
}

.hero-art::before {
  content: "MOTION / IMAGE / LAB";
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 4;
  color: #ded6ff;
  font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  text-shadow: 0 2px 0 rgba(9, 7, 31, .75), 0 0 14px rgba(111, 184, 255, .72);
}

.hero-art::after {
  content: "KA STUDIO";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -3vw;
  z-index: 4;
  overflow: hidden;
  color: rgba(225, 247, 255, .72);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(88px, 18.5vw, 270px);
  line-height: .78;
  letter-spacing: -.045em;
  white-space: nowrap;
  pointer-events: none;
  mix-blend-mode: screen;
  text-shadow: 0 0 28px rgba(61, 142, 255, .34);
}

.line-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  opacity: .82;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 7px rgba(70, 194, 243, .46));
}

@keyframes scene-breathe {
  0% { transform: translate3d(var(--scene-x), var(--scene-y), 0) scale(1.025); filter: hue-rotate(-48deg) saturate(.82) contrast(1.06) brightness(.92); }
  48% { transform: translate3d(var(--scene-x), calc(var(--scene-y) - 5px), 0) scale(1.052); filter: hue-rotate(-48deg) saturate(.9) contrast(1.07) brightness(.96); }
  100% { transform: translate3d(var(--scene-x), calc(var(--scene-y) + 3px), 0) scale(1.04); filter: hue-rotate(-48deg) saturate(.86) contrast(1.06) brightness(.94); }
}
@keyframes scene-glow-pulse {
  from { opacity: .23; transform: scale(.9); }
  to { opacity: .55; transform: scale(1.12); }
}
@keyframes scene-mist-drift {
  from { transform: translate3d(-5%, 5px, 0) scale(1); }
  to { transform: translate3d(7%, -5px, 0) scale(1.08); }
}
@keyframes scene-star-flicker {
  0%, 100% { opacity: .13; filter: brightness(.8); }
  40% { opacity: .34; filter: brightness(1.45); }
  70% { opacity: .2; filter: brightness(1); }
}

.art-meta {
  position: absolute;
  z-index: 5;
  color: #ded6ff;
  font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(9, 7, 31, .85), 0 0 12px rgba(82, 170, 255, .7);
}
.art-meta-a { top: 18px; right: 22px; }
.art-meta-b { right: 22px; bottom: 20px; writing-mode: vertical-rl; }
.art-meta-c { left: 22px; bottom: 18px; }

.orbit, .orbit::before, .orbit::after {
  z-index: 2;
  width: min(42vw, 540px);
  height: min(42vw, 540px);
  border-color: var(--ink);
  opacity: .62;
}
.orbit::before { width: 73%; height: 73%; }
.orbit::after { width: 118%; height: 58%; }

.runes {
  z-index: 3;
  width: min(45vw, 580px);
  height: min(45vw, 580px);
  color: var(--ink);
  font-weight: 800;
}

.witch {
  z-index: 3;
  width: min(28vw, 330px);
  color: var(--ink);
  filter: none;
  opacity: .92;
  mix-blend-mode: multiply;
}

.spark { z-index: 4; color: var(--gold); text-shadow: none; }

/* The supplied pixel scene replaces the geometric character placeholder. */
.hero-art .orbit,
.hero-art .runes,
.hero-art .witch,
.hero-art .spark { display: none; }

.magic-cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 9;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  mix-blend-mode: screen;
}

.hero > div:first-child {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  column-gap: 32px;
  padding: 28px 16px 34px;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
}

.hero .eyebrow { grid-column: 2; grid-row: 1; align-self: start; color: var(--ink); }
.hero h1 {
  grid-column: 1;
  grid-row: 1 / span 4;
  max-width: none;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: clamp(68px, 10vw, 158px);
  line-height: .82;
  letter-spacing: -.045em;
}
.hero h1 span { color: var(--ink); -webkit-text-stroke: 2px var(--ink); color: transparent; }
.hero-copy { grid-column: 2; margin: 26px 0 0; color: var(--ink); font-family: Inter, "Microsoft YaHei", sans-serif; font-weight: 400; letter-spacing: .02em; }
.hero .actions { grid-column: 2; margin-top: 28px; }
.hero-meta { grid-column: 2; color: var(--ink); }
.scroll-cue {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid rgba(20,13,27,.35);
  color: var(--ink);
  font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.scroll-cue i { font-size: 18px; font-style: normal; transition: transform .2s ease; }
.scroll-cue:hover i { transform: translateY(5px); }

.button {
  min-height: 46px;
  border-radius: 0;
  border-color: currentColor;
  padding: 0 16px;
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.button:hover { transform: translate(4px, -4px); border-color: currentColor; }
.button.primary { color: var(--violet); border-color: var(--ink); background: var(--ink); }

.ticker { border-color: var(--violet); background: var(--night); }
.ticker-track { color: var(--violet); }

.section { padding: 0; }
.section > .container {
  width: min(calc(100% - 32px), var(--max));
  padding: 92px 16px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 1.5fr .5fr;
  gap: 0;
  align-items: stretch;
  margin: 0 -16px 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head > div, .section-note { padding: 20px 22px; }
.section-note { max-width: none; margin: 0; border-left: 1px solid var(--line); font-family: Inter, "Microsoft YaHei", sans-serif; letter-spacing: .02em; }
.section h2 {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: clamp(64px, 9vw, 140px);
  line-height: .86;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.eyebrow { color: var(--gold); }

#spells { color: var(--violet); background: var(--night); }
.spell-layout { gap: 0; border: 1px solid var(--line); }
.spell-list { gap: 0; border-right: 1px solid var(--line); }
.spell-tab {
  min-height: 86px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 20px;
  color: var(--muted);
  background: transparent;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(22px, 2.2vw, 38px);
  letter-spacing: -.02em;
}
.spell-tab::after {
  content: attr(data-code);
  grid-column: 2;
  color: currentColor;
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  opacity: .54;
}
.spell-tab > span:nth-child(2) { grid-column: 2; }
.spell-tab .arrow { grid-column: 3; grid-row: 1 / span 2; }
.spell-tab:last-child { border-bottom: 0; }
.spell-tab:hover { color: var(--violet); transform: none; background: rgba(78, 188, 231, .08); }
.spell-tab.active { color: var(--ink); border-color: var(--violet); background: var(--violet); }
.spell-tab .num { color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.spell-tab.active .num { color: var(--ink); }

.spell-panel {
  min-height: 590px;
  grid-template-columns: .78fr 1.22fr;
  gap: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: var(--night);
  box-shadow: none;
}
.spell-panel::before,
.spell-panel::after {
  position: absolute;
  z-index: 3;
  color: var(--gold);
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  pointer-events: none;
}
.spell-panel::before { content: "KA / MODULE DISPLAY"; top: 12px; right: 14px; }
.spell-panel::after { content: "◢"; right: 10px; bottom: 7px; }
.spell-panel { position: relative; }
.spell-panel.switching .demo-scene { animation: module-in .46s cubic-bezier(.2,.72,.25,1); }
.spell-info { min-width: 0; padding: 34px; border-right: 1px solid var(--line); }
.spell-panel h3 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(46px, 6vw, 92px);
  word-break: break-word;
}
.spell-description { font-family: Inter, "Microsoft YaHei", sans-serif; line-height: 1.8; }
.spell-tags span { border-radius: 0; }
.spell-info .button.primary { color: var(--ink); border-color: var(--violet); background: var(--violet); }

.demo {
  min-height: 590px;
  align-self: stretch;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--night-2);
  background-size: 42px 42px;
}
.demo-label { top: 18px; left: 20px; color: var(--gold); }
.demo-scene { inset: 56px 28px 28px; }

.demo-watermark,
.auto-ka {
  fill: none;
  stroke: rgba(78, 188, 231, .22);
  stroke-width: 2px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 164px;
  letter-spacing: -10px;
}
.demo-caption {
  fill: var(--muted);
  font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 1.4px;
}

.maskstroke-image-demo text:not(.demo-caption) {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 178px;
  letter-spacing: -10px;
}
.image-fill { fill: var(--violet); }
.image-shadow {
  fill: rgba(0, 0, 0, .66);
  transform: translate(0, 0);
  opacity: 0;
  animation: image-shadow-on 5s cubic-bezier(.2,.72,.25,1) infinite;
}
.image-outline {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6px;
  stroke-linejoin: round;
  stroke-dasharray: 1280;
  stroke-dashoffset: 1280;
  paint-order: stroke;
  animation: image-outline-on 5s cubic-bezier(.65,0,.25,1) infinite;
}
.outline-nodes circle {
  fill: var(--night);
  stroke: var(--gold);
  stroke-width: 2px;
  opacity: 0;
  animation: outline-node-on 5s ease infinite;
}
.outline-nodes circle:nth-child(2) { animation-delay: .28s; }
.outline-nodes circle:nth-child(3) { animation-delay: .56s; }

.maskstroke-stack-demo .style-stack rect {
  fill: transparent;
  stroke: var(--line);
  stroke-width: 1px;
}
.maskstroke-stack-demo .style-stack text {
  fill: var(--muted);
  font: 700 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .5px;
}
.style-stack rect:nth-of-type(1), .style-stack text:nth-of-type(1) { animation: stack-row 6.8s ease infinite; }
.style-stack rect:nth-of-type(2), .style-stack text:nth-of-type(2) { animation: stack-row 6.8s .65s ease infinite; }
.style-stack rect:nth-of-type(3), .style-stack text:nth-of-type(3) { animation: stack-row 6.8s 1.3s ease infinite; }
.style-stack rect:nth-of-type(4), .style-stack text:nth-of-type(4) { animation: stack-row 6.8s 1.95s ease infinite; }
.style-stack rect:nth-of-type(5), .style-stack text:nth-of-type(5) { animation: stack-row 6.8s 2.6s ease infinite; }
.ka-style-result text {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 160px;
  letter-spacing: -10px;
  paint-order: stroke fill;
}
.ms-shadow {
  fill: rgba(0,0,0,.78);
  stroke: rgba(0,0,0,.78);
  stroke-width: 18px;
  transform: translate(14px,16px);
  opacity: 0;
  animation: ms-shadow-layer 6.8s ease infinite;
}
.ms-outer {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 20px;
  stroke-linejoin: round;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
  animation: ms-outer-layer 6.8s ease infinite;
}
.ms-inner {
  fill: none;
  stroke: var(--gold);
  stroke-width: 8px;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ms-inner-layer 6.8s ease infinite;
}
.ms-fill {
  fill: url(#msMaterial);
  opacity: .34;
  animation: ms-material-layer 6.8s ease infinite;
}

.automask-workflow-demo .auto-preview { fill: url(#autoChecker); stroke: var(--line); }
.auto-subject,
.auto-k-contour,
.auto-a-contour {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 164px;
  letter-spacing: -10px;
}
.auto-subject { fill: var(--violet); }
.auto-drag-area {
  fill: rgba(216,229,236,.05);
  stroke: var(--gold);
  stroke-width: 2px;
  stroke-dasharray: 9 6;
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: auto-drag 7.2s ease-in-out infinite;
}
.auto-crosshair path { fill: none; stroke: var(--gold); stroke-width: 1.5px; animation: auto-drag 7.2s ease-in-out infinite; }
.auto-k-contour,
.auto-a-contour {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3px;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: alpha-contour 7.2s cubic-bezier(.62,0,.25,1) infinite;
}
.auto-a-contour { animation-delay: .24s; }
.mask-result-labels text {
  fill: var(--gold);
  font: 700 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .8px;
  opacity: 0;
  animation: mask-result 7.2s ease infinite;
}
.auto-stage-labels text {
  fill: var(--gold);
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 1.2px;
  opacity: 0;
  animation: stage-label 7.2s linear infinite;
}
.auto-stage-labels text:nth-child(2) { animation-delay: 1.45s; }
.auto-stage-labels text:nth-child(3) { animation-delay: 2.9s; }
.auto-stage-labels text:nth-child(4) { animation-delay: 4.35s; }

.automask-demo .auto-ka {
  fill: var(--violet);
  stroke: none;
  opacity: .92;
}
.auto-search-path {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2px;
  stroke-dasharray: 8 8;
  opacity: 0;
  animation: search-boundary 6.2s ease-in-out infinite;
}
.auto-mask-fill {
  fill: rgba(216, 229, 236, .12);
  opacity: 0;
  animation: automask-fill 6.2s ease-in-out infinite;
}
.auto-mask-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4px;
  stroke-linejoin: round;
  stroke-dasharray: 930;
  stroke-dashoffset: 930;
  animation: automask-wrap 6.2s cubic-bezier(.68,.02,.23,1) infinite;
}
.snap-lines line {
  stroke: var(--gold);
  stroke-width: 1.5px;
  stroke-dasharray: 4 5;
  opacity: 0;
  animation: snap-line 6.2s ease-in-out infinite;
}
.auto-points circle {
  fill: var(--night);
  stroke: var(--gold);
  stroke-width: 3px;
  opacity: 0;
  transform: translate(var(--dx), var(--dy));
  transform-box: fill-box;
  transform-origin: center;
  animation: snap-point 6.2s cubic-bezier(.16,.86,.24,1) infinite;
}

.duang-stage,
.audio-stage,
.levels-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 330px;
  overflow: hidden;
}
.duang-word {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 66px;
  display: flex;
  align-items: end;
  justify-content: center;
  color: var(--violet);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(118px, 15vw, 190px);
  line-height: .82;
}
.duang-word span { display: inline-block; transform-origin: 50% 100%; animation: duang-letter 2.8s cubic-bezier(.18,.84,.25,1) infinite; }
.duang-word span:nth-child(2) { color: var(--gold); animation-delay: .09s; }
.impact-floor {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 64px;
  height: 2px;
  background: var(--violet);
}
.impact-ring {
  position: absolute;
  left: 50%;
  bottom: 48px;
  width: 64%;
  height: 42px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  transform: translateX(-50%) scale(.1);
  opacity: 0;
  animation: impact-ring 2.8s ease-out infinite;
}
.impact-ring.ring-b { animation-delay: .12s; }

.audiofill-demo text:not(.demo-caption) {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 178px;
  letter-spacing: -10px;
}
.audio-ka-outline {
  fill: rgba(78, 188, 231, .12);
  stroke: var(--violet);
  stroke-width: 2px;
}
.audio-fill-rect {
  fill: var(--gold);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: complete-fill 3.8s cubic-bezier(.45,.02,.28,1) infinite;
}
.audio-mini-bars rect {
  fill: var(--violet);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: audio-svg-bar .72s ease-in-out infinite alternate;
  animation-delay: calc(var(--bar) * -.6s);
}

.level-columns {
  position: absolute;
  inset: 36px 4% 76px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
}
.level-columns span {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--line);
  color: var(--violet);
  background: rgba(78, 188, 231, .08);
  animation: color-map-cycle 4s steps(1,end) infinite;
  animation-delay: var(--phase);
}
.level-columns span:last-child { border-right: 0; }
.level-columns b {
  align-self: end;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(40px, 6vw, 86px);
  line-height: 1;
  letter-spacing: -.08em;
}
.level-columns span i {
  align-self: end;
  padding-bottom: 12px;
  font: 700 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .08em;
}
.levels-scale {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 51px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: var(--muted);
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.levels-scale i { font-style: normal; text-align: center; }
.levels-scan {
  position: absolute;
  z-index: 2;
  top: 36px;
  bottom: 76px;
  left: 4%;
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold);
  animation: level-scan 4.2s steps(5,end) infinite;
}
.demo-html-caption {
  position: absolute;
  left: 4%;
  bottom: 12px;
  color: var(--muted);
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}

@keyframes image-outline-on { 0%, 12% { stroke-dashoffset: 1280; } 58%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1280; } }
@keyframes image-shadow-on { 0%, 48% { transform: translate(0,0); opacity: 0; } 62%, 88% { transform: translate(14px,16px); opacity: .72; } 100% { opacity: 0; } }
@keyframes outline-node-on { 0%, 16% { opacity: 0; } 24%, 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes search-boundary { 0%, 8% { opacity: 0; transform: scale(1.08); transform-origin: center; } 16%, 32% { opacity: .75; transform: scale(1); } 42%, 100% { opacity: 0; } }
@keyframes snap-point { 0%, 15% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.7); } 25% { opacity: 1; } 42%, 88% { opacity: 1; transform: translate(0,0) scale(1); filter: drop-shadow(0 0 8px var(--gold)); } 100% { opacity: 0; transform: translate(0,0); } }
@keyframes snap-line { 0%, 20% { opacity: 0; } 28%, 41% { opacity: .85; } 48%, 100% { opacity: 0; } }
@keyframes automask-wrap { 0%, 35% { stroke-dashoffset: 930; } 72%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -930; } }
@keyframes automask-fill { 0%, 68% { opacity: 0; } 76%, 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes duang-letter {
  0%, 12% { transform: translateY(-150px) scale(.82,1.18); }
  38% { transform: translateY(0) scale(1.2,.68); }
  49% { transform: translateY(-48px) scale(.92,1.08); }
  61% { transform: translateY(-8px) scale(1.04,.96); }
  72%, 100% { transform: translateY(0) scale(1); }
}
@keyframes impact-ring { 0%, 34% { transform: translateX(-50%) scale(.1); opacity: 0; } 39% { opacity: .9; } 68%, 100% { transform: translateX(-50%) scale(1.45); opacity: 0; } }
@keyframes complete-fill { 0%, 10% { transform: scaleY(.02); } 55%, 78% { transform: scaleY(1); } 100% { transform: scaleY(.02); } }
@keyframes audio-svg-bar { from { transform: scaleY(.22); } to { transform: scaleY(var(--bar)); } }
@keyframes level-scan { 0% { left: 4%; } 100% { left: 96%; } }
@keyframes color-map-cycle {
  0%, 24% { color: var(--violet); background: rgba(78,188,231,.08); }
  25%, 49% { color: var(--gold); background: rgba(216,229,236,.1); }
  50%, 74% { color: var(--aqua); background: rgba(150,234,220,.09); }
  75%, 100% { color: #f27ab6; background: rgba(242,122,182,.09); }
}
@keyframes stack-row {
  0%, 12% { opacity: .2; }
  18%, 78% { opacity: 1; }
  92%, 100% { opacity: .2; }
}
@keyframes ms-inner-layer {
  0%, 16% { stroke-dashoffset: 1400; opacity: 0; }
  42%, 88% { stroke-dashoffset: 0; opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ms-shadow-layer {
  0%, 30% { opacity: 0; transform: translate(0,0); }
  43%, 88% { opacity: .78; transform: translate(14px,16px); }
  100% { opacity: 0; }
}
@keyframes ms-outer-layer {
  0%, 45% { stroke-dashoffset: 1500; opacity: 0; }
  66%, 88% { stroke-dashoffset: 0; opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ms-material-layer {
  0%, 60% { opacity: .12; }
  75%, 88% { opacity: 1; }
  100% { opacity: .12; }
}
@keyframes auto-drag {
  0%, 6% { opacity: 0; transform: scale(.08,.12); }
  20%, 36% { opacity: 1; transform: scale(1); }
  44%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes alpha-contour {
  0%, 35% { stroke-dashoffset: 900; opacity: 0; }
  44% { opacity: 1; }
  72%, 91% { stroke-dashoffset: 0; opacity: 1; }
  100% { opacity: 0; }
}
@keyframes mask-result {
  0%, 66% { opacity: 0; transform: translateY(5px); }
  74%, 91% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@keyframes stage-label {
  0%, 4% { opacity: 0; transform: translateY(4px); }
  8%, 18% { opacity: 1; transform: none; }
  22%, 100% { opacity: 0; }
}

#archives { color: var(--ink); background: var(--violet); }
#archives .section > .container, #archives > .container { border-color: var(--ink); }
#archives .section-head { border-color: var(--ink); }
#archives .section-note { color: var(--ink); border-color: var(--ink); }
#archives .eyebrow { color: var(--ink); }
.archive-grid { gap: 0; border: 1px solid var(--ink); }
.archive-card {
  min-height: 460px;
  border: 0;
  border-right: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--violet);
}
.archive-card::after {
  position: absolute;
  top: -34px;
  right: 10px;
  z-index: 0;
  color: rgba(20, 13, 27, .14);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(150px, 20vw, 310px);
  line-height: 1;
}
.archive-card:nth-child(1)::after { content: "01"; }
.archive-card:nth-child(2)::after { content: "02"; }
.archive-card:nth-child(3)::after { content: "03"; }
.archive-card::before { transition: transform .5s cubic-bezier(.2,.72,.25,1), opacity .5s ease; }
.archive-card h3 { transition: transform .35s ease; }
.archive-card:hover::before { transform: scale(1.035); opacity: .75; }
.archive-card:hover h3 { transform: translateX(8px); }
.archive-card:last-child { border-right: 0; }
.archive-card::before { background: repeating-linear-gradient(105deg, transparent 0 18px, rgba(20, 13, 27, .17) 19px 20px); }
.archive-card:nth-child(2)::before { transform: none; background: radial-gradient(circle at center, transparent 0 22%, rgba(20, 13, 27, .18) 22.5% 23%, transparent 23.5% 35%, rgba(20, 13, 27, .18) 35.5% 36%, transparent 36.5%); }
.archive-card:nth-child(3)::before { background: linear-gradient(var(--ink) 1px, transparent 1px), linear-gradient(90deg, var(--ink) 1px, transparent 1px); background-size: 32px 32px; opacity: .16; }
.archive-card .work-no { color: var(--ink); }
.archive-card h3 { font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: 38px; text-transform: uppercase; }
.archive-card p { color: var(--ink); font-family: Inter, "Microsoft YaHei", sans-serif; }
.work-tags {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(20,13,27,.42);
  color: var(--ink);
  font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}

#about { color: var(--violet); background: var(--night); }
.about-grid { gap: 0; border: 1px solid var(--line); }
.about-copy, .manifesto {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.about-copy { border-right: 1px solid var(--line); }
.about-copy p { color: var(--violet); font-family: Inter, "Microsoft YaHei", sans-serif; font-weight: 400; letter-spacing: .015em; }
.manifesto { background: var(--violet); color: var(--ink); }
.manifesto div { border-color: var(--ink); }
.manifesto strong, .manifesto span { color: var(--ink); }

footer { color: var(--violet); border-color: var(--line); background: #061522; }
.footer-inner { min-height: 240px; padding: 34px 0; }
.footer-title { font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(64px, 10vw, 150px); text-transform: uppercase; }
.footer-meta { color: var(--muted); }
footer .eyebrow { color: var(--aqua); }
.back-top {
  display: inline-block;
  margin-top: 15px;
  color: var(--violet);
  font: 700 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-decoration: none;
}
.back-top:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Glass refinement: restrained translucent surfaces over the cold-blue system. */
body {
  background:
    radial-gradient(circle at 18% 12%, rgba(25, 112, 163, .16), transparent 31rem),
    radial-gradient(circle at 86% 58%, rgba(16, 93, 145, .12), transparent 36rem),
    var(--night);
}

.site-header {
  color: var(--violet);
  background: rgba(3, 16, 28, .7);
  border-color: rgba(156, 226, 255, .2);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
  backdrop-filter: blur(22px) saturate(112%);
  box-shadow: inset 0 -1px rgba(222, 247, 255, .08);
}
.site-header.scrolled {
  background: rgba(3, 16, 28, .84);
  box-shadow: 0 14px 42px rgba(0, 8, 17, .28), inset 0 -1px rgba(222, 247, 255, .1);
}
.nav { border-color: var(--line); }
.brand { border-color: var(--line); }
.brand-mark { color: var(--ink); background: var(--aqua); }
.nav-links a,
.domain,
.menu-toggle { color: var(--violet); border-color: var(--line); }
.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: #fff;
  background: rgba(105, 211, 251, .11);
}
.domain::before { border-color: var(--aqua); background: var(--aqua); }

.container.hero {
  color: var(--violet);
  background: transparent;
}
.hero > div:first-child {
  position: relative;
  z-index: 6;
  width: min(calc(100% - 64px), calc(var(--max) - 32px));
  margin: -54px auto 34px;
  padding: 34px 32px 38px;
  border: 1px solid rgba(157, 225, 255, .25);
  border-radius: 20px;
  color: var(--violet);
  background:
    linear-gradient(135deg, rgba(223, 245, 255, .09), transparent 38%),
    rgba(4, 19, 32, .68);
  -webkit-backdrop-filter: blur(26px) saturate(108%);
  backdrop-filter: blur(26px) saturate(108%);
  box-shadow:
    0 28px 80px rgba(0, 7, 16, .36),
    inset 0 1px rgba(240, 252, 255, .13),
    inset 0 -1px rgba(28, 137, 187, .1);
}
.hero .eyebrow,
.hero h1,
.hero h1 span,
.hero-copy,
.hero-meta,
.scroll-cue { color: var(--violet); }
.hero h1 span { -webkit-text-stroke-color: var(--violet); }
.scroll-cue { border-color: rgba(177, 229, 250, .22); }
.hero .button.primary {
  color: var(--ink);
  border-color: rgba(223, 245, 255, .8);
  background: rgba(223, 245, 255, .92);
}
.hero .button:not(.primary) { background: rgba(223, 245, 255, .035); }

.button {
  border-color: rgba(172, 226, 249, .34);
  border-radius: 999px;
  background: rgba(223, 245, 255, .045);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
}
.button:hover {
  transform: translateY(-2px);
  border-color: rgba(213, 245, 255, .72);
  background: rgba(118, 216, 255, .1);
  box-shadow: 0 10px 28px rgba(0, 9, 19, .2), inset 0 1px rgba(255,255,255,.12);
}

.ticker {
  border-color: var(--line);
  background: rgba(6, 24, 39, .68);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.section-head {
  overflow: hidden;
  border: 1px solid rgba(150, 195, 214, .18);
  border-radius: 16px;
  background: rgba(8, 29, 46, .38);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px rgba(238, 250, 255, .07);
}

.spell-layout {
  gap: 14px;
  border: 0;
}
.spell-list,
.spell-panel {
  overflow: hidden;
  border: 1px solid rgba(150, 195, 214, .2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(223, 245, 255, .055), transparent 38%),
    rgba(6, 23, 37, .62);
  -webkit-backdrop-filter: blur(22px) saturate(106%);
  backdrop-filter: blur(22px) saturate(106%);
  box-shadow: 0 24px 70px rgba(0, 8, 18, .24), inset 0 1px rgba(238, 250, 255, .08);
}
.spell-list { border-right: 1px solid rgba(150, 195, 214, .2); }
.spell-tab.active {
  color: #effaff;
  border-color: rgba(145, 193, 213, .26);
  background: linear-gradient(90deg, rgba(104, 163, 188, .16), rgba(112, 174, 198, .055));
  box-shadow: inset 3px 0 var(--aqua);
}
.spell-tab.active .num { color: var(--aqua); }
.spell-info { border-color: rgba(150, 195, 214, .16); }
.spell-info .button.primary {
  color: var(--ink);
  border-color: rgba(223, 245, 255, .8);
  background: rgba(223, 245, 255, .92);
}
.demo {
  background:
    linear-gradient(rgba(110, 203, 241, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 203, 241, .065) 1px, transparent 1px),
    rgba(3, 16, 28, .4);
  background-size: 42px 42px;
}

#archives {
  color: var(--violet);
  background: transparent;
}
#archives .section > .container,
#archives > .container,
#archives .section-head { border-color: rgba(150, 195, 214, .18); }
#archives .section-note,
#archives .eyebrow { color: var(--muted); border-color: rgba(150, 195, 214, .18); }
.archive-grid {
  gap: 14px;
  border: 0;
}
.archive-card {
  border: 1px solid rgba(150, 195, 214, .2);
  border-radius: 18px;
  color: var(--violet);
  background:
    linear-gradient(145deg, rgba(223, 245, 255, .075), transparent 45%),
    rgba(7, 27, 43, .57);
  -webkit-backdrop-filter: blur(20px) saturate(106%);
  backdrop-filter: blur(20px) saturate(106%);
  box-shadow: 0 22px 60px rgba(0, 8, 17, .22), inset 0 1px rgba(240, 252, 255, .08);
}
.archive-card:last-child { border-right: 1px solid rgba(150, 195, 214, .2); }
.archive-card::after { color: rgba(146, 219, 249, .08); }
.archive-card::before { opacity: .18; }
.archive-card .work-no,
.archive-card h3,
.archive-card p,
.work-tags { color: var(--violet); }
.work-tags { border-color: rgba(150, 195, 214, .18); }

.about-grid {
  gap: 14px;
  border: 0;
}
.about-copy,
.manifesto {
  border: 1px solid rgba(150, 195, 214, .2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(223, 245, 255, .06), transparent 42%),
    rgba(7, 27, 43, .56);
  -webkit-backdrop-filter: blur(20px) saturate(106%);
  backdrop-filter: blur(20px) saturate(106%);
  box-shadow: 0 22px 60px rgba(0, 8, 17, .2), inset 0 1px rgba(240, 252, 255, .08);
}
.about-copy { border-right: 1px solid rgba(150, 195, 214, .2); }
.manifesto { color: var(--violet); }
.manifesto div { border-color: rgba(150, 195, 214, .16); }
.manifesto strong { color: var(--aqua); }
.manifesto span { color: var(--muted); }

footer {
  background:
    linear-gradient(145deg, rgba(223,245,255,.035), transparent 42%),
    rgba(4, 18, 30, .9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header,
  .hero > div:first-child,
  .spell-list,
  .spell-panel,
  .archive-card,
  .about-copy,
  .manifesto { background-color: rgba(5, 22, 36, .96); }
}

/* Editorial typography and collision-safe hierarchy. */
:root {
  --font-display-cn: "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-display-latin: "Bodoni MT", Didot, "Times New Roman", serif;
  --font-ui: Inter, "Source Han Sans CN", "Microsoft YaHei", sans-serif;
}

body { font-family: var(--font-ui); }
.brand,
.footer-title { font-family: var(--font-display-latin); }
.brand {
  font-weight: 700;
  letter-spacing: .09em;
}

.hero-art::after {
  z-index: 1;
  bottom: -1.5vw;
  color: rgba(222, 247, 255, .24);
  font-family: var(--font-display-latin);
  font-weight: 700;
  letter-spacing: .015em;
  opacity: .72;
  mix-blend-mode: soft-light;
  text-shadow: none;
}
.hero-art::before { z-index: 5; }

.hero > div:first-child {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
}
.hero > div:first-child > * { min-width: 0; }
.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 100%;
  font-family: var(--font-display-cn);
  font-weight: 600;
  font-size: clamp(56px, 7.6vw, 116px);
  line-height: 1.01;
  letter-spacing: .015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 10px 34px rgba(0, 10, 22, .22);
}
.hero h1 span {
  display: inline-block;
  max-width: 100%;
  color: transparent;
  -webkit-text-stroke: 1px rgba(223, 245, 255, .88);
}
.hero .eyebrow,
.hero-copy,
.hero .actions,
.hero-meta,
.scroll-cue {
  position: relative;
  z-index: 2;
}

.section-head > div,
.section-note { min-width: 0; }
.section h2 {
  max-width: 100%;
  font-family: var(--font-display-cn);
  font-weight: 600;
  font-size: clamp(48px, 6.6vw, 104px);
  line-height: 1.04;
  letter-spacing: .02em;
  text-transform: none;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.spell-tab {
  font-family: var(--font-display-latin);
  font-weight: 700;
  letter-spacing: .01em;
}
.spell-tab > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.spell-info { overflow: hidden; }
.spell-panel h3 {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin-right: 14px;
  font-family: var(--font-display-latin);
  font-weight: 700;
  font-size: clamp(38px, 4.6vw, 72px);
  line-height: .98;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  word-break: normal;
}
.spell-description,
.spell-tags,
.spell-info .actions {
  position: relative;
  z-index: 2;
}
.spell-panel::before { opacity: .55; }
.spell-panel::after { opacity: .36; }

.archive-card { isolation: isolate; }
.archive-card::after {
  z-index: -1;
  top: -18px;
  opacity: .72;
  pointer-events: none;
}
.archive-card > * { z-index: 2; }
.archive-card h3 {
  max-width: 88%;
  font-family: var(--font-display-cn);
  font-weight: 600;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.12;
  letter-spacing: .025em;
  text-transform: none;
  overflow-wrap: break-word;
}
.about-copy p {
  font-family: var(--font-display-cn);
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: .035em;
}
.footer-title {
  max-width: min(100%, 1040px);
  font-weight: 700;
  font-size: clamp(52px, 8vw, 118px);
  line-height: .94;
  letter-spacing: -.015em;
  overflow-wrap: break-word;
}

@media (max-width: 960px) {
  .hero > div:first-child { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(54px, 11vw, 94px); }
  .section h2 { font-size: clamp(46px, 9vw, 82px); }
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: clamp(42px, 13vw, 66px);
    line-height: 1.06;
    letter-spacing: .01em;
  }
  .section h2 {
    font-size: clamp(39px, 11vw, 60px);
    line-height: 1.08;
  }
  .spell-panel h3 {
    margin-right: 0;
    font-size: clamp(34px, 12vw, 56px);
  }
  .archive-card h3 { max-width: 100%; }
  .footer-title { font-size: clamp(44px, 15vw, 76px); }
}

@keyframes module-in {
  0% { opacity: .15; transform: translateY(12px) scale(.985); filter: blur(5px); }
  100% { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 960px) {
  .hero > div:first-child { grid-template-columns: 1fr; }
  .hero .eyebrow, .hero h1, .hero-copy, .hero .actions, .hero-meta { grid-column: 1; grid-row: auto; }
  .scroll-cue { grid-column: 1; }
  .hero h1 { margin-top: 12px; }
  .spell-layout { grid-template-columns: 1fr; }
  .spell-list { grid-template-columns: 1fr 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .spell-tab { border-right: 1px solid var(--line); }
  .spell-tab:nth-child(2n) { border-right: 0; }
  .spell-panel { grid-template-columns: 1fr; }
  .spell-info { border-right: 0; border-bottom: 1px solid var(--line); }
  .demo { min-height: 430px; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 20px), var(--max)); }
  .nav { width: calc(100% - 20px); }
  .brand { min-width: 0; border-right: 0; padding: 0 12px; }
  .menu-toggle { display: block; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    border: 1px solid var(--line);
    background: rgba(3, 16, 28, .91);
    -webkit-backdrop-filter: blur(22px) saturate(110%);
    backdrop-filter: blur(22px) saturate(110%);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .nav-links.open { visibility: visible; opacity: 1; transform: none; }
  .nav-links a { min-width: 0; min-height: 58px; border-left: 0; border-right: 1px solid var(--line); }
  .nav-links a:last-child { border-right: 0; }
  .container.hero { width: 100%; }
  .hero-art {
    min-height: 390px;
  }
  .scene-backdrop { background-position: 66% center; }
  .hero-art::after { font-size: 25vw; bottom: -1vw; }
  .orbit, .orbit::before, .orbit::after { width: 280px; height: 280px; }
  .orbit::before { width: 205px; height: 205px; }
  .orbit::after { width: 330px; height: 170px; }
  .runes { width: 310px; height: 310px; }
  .witch { width: 205px; }
  .art-meta-b { display: none; }
  .hero > div:first-child {
    width: calc(100% - 20px);
    margin: -26px auto 24px;
    padding: 24px 16px 28px;
    border-radius: 15px;
  }
  .section > .container { width: calc(100% - 20px); padding: 68px 10px; }
  .section-head { grid-template-columns: 1fr; margin: 0 -10px 34px; }
  .section-note { border-top: 1px solid var(--line); border-left: 0; }
  .spell-list { grid-template-columns: 1fr; }
  .spell-tab { border-right: 0; }
  .spell-info { padding: 26px 22px; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card { min-height: 340px; border-right: 1px solid rgba(150, 195, 214, .2); border-bottom: 1px solid rgba(150, 195, 214, .2); }
  .archive-card:last-child { border-bottom: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .about-copy { border-right: 1px solid rgba(150, 195, 214, .2); border-bottom: 1px solid rgba(150, 195, 214, .2); }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .magic-cursor-layer { display: none; }
}
