/* ============================================================
   LuxNox — monochrome editorial / cybernetic system
   ============================================================ */

:root {
  /* Light & night palette */
  --paper:   #f4f2ed;   /* paper white */
  --ink:     #060708;   /* instrument black (faint cool cast) */
  --graphite:#3a3a38;
  --ash:     #8a8780;
  --hair:    rgba(10,10,10,0.14);   /* thin rule lines */
  --hair-strong: rgba(10,10,10,0.28);

  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--ash);
  --logo-bg: var(--paper);
  --line: var(--hair);
  --line-strong: var(--hair-strong);

  /* Type — dark-light tech-esoteric */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --font-zh: 'Noto Serif SC', 'Fraunces', serif;
  /* Fraunces optical axes: high contrast, slight softness for occult edge */
  --disp-settings: "opsz" 144, "SOFT" 0, "WONK" 1;

  /* Scale */
  --text-hero: clamp(2.8rem, 8vw, 6.2rem);
  --text-2xl: clamp(2rem, 4.5vw, 3.4rem);
  --text-xl: clamp(1.4rem, 2.6vw, 2rem);
  --text-lg: clamp(1.12rem, 1.6vw, 1.32rem);
  --text-base: 1.0625rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;

  /* Space */
  --space-section: clamp(5rem, 11vw, 9.5rem);
  --container: 1180px;
  --gutter: clamp(1.4rem, 5vw, 4rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="night"] {
  --bg: #060708;
  --fg: #e9e7e0;
  --muted: #6f7470;          /* cool, instrument-gray */
  --logo-bg: #060708;
  --line: rgba(190,200,198,0.12);
  --line-strong: rgba(190,200,198,0.24);
}
[data-theme="night"] body {
  background:
    radial-gradient(120% 80% at 78% 0%, rgba(120,140,150,0.05), transparent 60%),
    var(--bg);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.6s var(--ease);
}
.header--scrolled { border-bottom-color: var(--line); }
.header__inner {
  max-width: var(--container); margin-inline: auto;
  padding: 1.1rem var(--gutter);
  display: flex; align-items: center; gap: 2rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__emblem {
  display: inline-flex; align-items: center; flex: none;
  width: 2.5rem; color: var(--fg);
}
.brand__emblem svg { width: 100%; height: auto; display: block; transition: transform 0.6s var(--ease); }
.brand:hover .brand__emblem svg { transform: scale(1.04); }
.brand__lockup { display: flex; flex-direction: column; gap: 0.18rem; line-height: 1; }
.brand__word {
  font-family: var(--font-body);
  font-size: 1.16rem; font-weight: 600;
  letter-spacing: 0.26em; text-indent: 0.26em;
  color: var(--fg);
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: 0.56rem; font-weight: 400;
  letter-spacing: 0.34em; text-indent: 0.34em;
  text-transform: uppercase; color: var(--muted);
}
.header__controls { display: flex; align-items: center; gap: 0; margin-left: 1.6rem; order: 3; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0.28em;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--muted); padding: 0.2rem 0.1rem;
  transition: color 0.3s var(--ease);
}
.lang-toggle:hover { color: var(--fg); }
.lang-toggle__sep { opacity: 0.5; }
[data-lang="zh"] .lang-toggle__zh { color: var(--fg); }
[data-lang="zh"] .lang-toggle__en { opacity: 0.5; }
[data-lang="en"] .lang-toggle__en { color: var(--fg); }
[data-lang="en"] .lang-toggle__zh { opacity: 0.5; }
.inline-link {
  color: var(--fg); border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.inline-link:hover { border-color: var(--fg); }
.brand-toggle {
  margin-left: 0; padding-left: 0.7rem;
  border: 0; border-left: 1px solid var(--line-strong); border-radius: 0;
  width: auto; height: 24px;
  color: var(--muted);
}
.brand-toggle svg { transition: transform 0.5s var(--ease); }
.brand-toggle:hover { transform: none; color: var(--fg); border-color: var(--line-strong); }
.brand-toggle:hover svg { transform: rotate(180deg); }
.zh { font-family: var(--font-zh); font-weight: 400; }
.nav {
  margin-left: auto; order: 2;
  display: flex; gap: clamp(1rem, 2.4vw, 2.2rem);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}
.brand { order: 1; }
.nav a {
  color: var(--muted);
  position: relative; padding-bottom: 2px;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--fg);
  transition: width 0.35s var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { width: 100%; }

.theme-toggle {
  flex: none; width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: transparent; color: var(--fg); cursor: pointer;
  transition: transform 0.5s var(--ease), border-color 0.3s var(--ease);
}
.theme-toggle:hover { transform: rotate(180deg); border-color: var(--fg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  padding: clamp(4rem, 10vw, 7rem) 0 var(--space-section);
  overflow: hidden;
}
.hero__helix {
  position: absolute; inset: 0;
  display: grid; place-items: center end;
  pointer-events: none; overflow: hidden;
}
.helix {
  height: 86%; width: auto; max-width: 40vw;
  color: var(--fg); opacity: 0.5;
  margin-right: clamp(2.5rem, 9vw, 10rem);
}
.strand { stroke-dasharray: 1600; stroke-dashoffset: 1600; }
.strand.is-drawn { animation: helixDraw 2.4s var(--ease) forwards; }
.strand--b.is-drawn { animation-delay: 0.25s; }
@keyframes helixDraw { to { stroke-dashoffset: 0; } }
.helix__rungs, .helix__nodes, .helix__bits { opacity: 0; transition: opacity 1.2s var(--ease) 1.6s; }
.helix.is-drawn .helix__rungs { opacity: 0.6; }
.helix.is-drawn .helix__nodes, .helix.is-drawn .helix__bits { opacity: 1; }
.helix-label {
  font-family: var(--font-mono); font-size: 11px;
  fill: var(--fg); letter-spacing: 0.1em; opacity: 0.7;
}
.helix-label.lbl-r { text-anchor: end; }
.hero__content { position: relative; z-index: 2; max-width: 760px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: 0.28em;
  color: var(--muted); margin: 0 0 1.6rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero); font-weight: 400;
  line-height: 1.02; letter-spacing: -0.018em;
  margin: 0 0 1.8rem;
}
.hero__lede {
  font-size: var(--text-lg); line-height: 1.6;
  max-width: 60ch; color: var(--graphite);
  margin: 0 0 2.4rem;
}
[data-theme="night"] .hero__lede { color: #c9c6bd; }

.notice {
  display: flex; align-items: flex-start; gap: 1rem;
  max-width: 56ch; margin: 0 0 2.4rem;
}
.notice__rule { flex: none; width: 2px; align-self: stretch; background: var(--fg); opacity: 0.8; }
.notice p {
  margin: 0; font-size: var(--text-sm); line-height: 1.55;
  color: var(--muted); letter-spacing: 0.01em;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn {
  display: inline-flex; align-items: center;
  font-size: var(--text-sm); letter-spacing: 0.04em;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--fg);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: transparent; color: var(--fg); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--fg); transform: translateX(3px); }

/* ---------- Section scaffolding ---------- */
.section { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.section__head {
  display: flex; align-items: baseline; gap: 1.1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__index {
  font-family: var(--font-mono); font-size: var(--text-sm);
  color: var(--muted); letter-spacing: 0.1em;
}
.section__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-2xl); letter-spacing: -0.01em; margin: 0;
}

/* ---------- Philosophy ---------- */
.philosophy__body {
  max-width: 64ch; margin-left: auto;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.philosophy__body p { margin: 0; color: var(--graphite); }
[data-theme="night"] .philosophy__body p { color: #c9c6bd; }
.manifesto {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-xl); line-height: 1.35;
  color: var(--fg) !important; letter-spacing: -0.005em;
}
.pullquote {
  margin: 1.5rem 0 0; padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); line-height: 1.3;
  color: var(--fg);
}

/* ---------- Ethics / Techno-Daoism ---------- */
.ethics__grid {
  display: grid; grid-template-columns: 0.85fr 1fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.ethics__lead { position: sticky; top: 6rem; }
.ethics__big {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); line-height: 1.3; margin: 0;
  letter-spacing: -0.01em; color: var(--fg);
}
.ethics__zh {
  font-family: var(--font-zh); font-size: clamp(3rem, 7vw, 5rem);
  color: var(--fg); opacity: 0.1; margin: 2rem 0 0; line-height: 1;
  letter-spacing: 0.1em;
}
.ethics__body { display: flex; flex-direction: column; gap: 1.4rem; }
.ethics__body > p { margin: 0; color: var(--graphite); }
[data-theme="night"] .ethics__body > p { color: #c9c6bd; }
.ethics__body em { font-style: italic; }
.ethics__close {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-lg); line-height: 1.45;
  color: var(--fg) !important; padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.lem-note {
  border-left: 2px solid var(--fg);
  padding: 0.2rem 0 0.2rem 1.4rem; margin: 0.4rem 0;
}
.lem-note__tag {
  display: block; font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem;
}
.lem-note p { margin: 0; font-size: var(--text-sm); line-height: 1.6; color: var(--muted); }
.lem-note em { font-style: italic; color: var(--fg); }

/* ---------- Services ---------- */
.services__intro {
  font-family: var(--font-mono); font-size: var(--text-sm);
  letter-spacing: 0.03em; color: var(--muted);
  margin: -1.5rem 0 2.5rem; max-width: 50ch;
}
.services__list { list-style: none; margin: 0; padding: 0; }
.service {
  display: grid;
  grid-template-columns: 5rem minmax(0,1fr) minmax(0,1.1fr);
  gap: 1.5rem 2rem;
  align-items: baseline;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { padding-left: 0.6rem; }
.service__num { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); }
.service__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); margin: 0; letter-spacing: -0.01em;
}
.service__desc { margin: 0; color: var(--muted); font-size: var(--text-base); line-height: 1.55; }

/* ---------- Method (systems tree) ---------- */
.method__intro {
  max-width: 56ch; margin: -1.4rem 0 2.6rem;
  color: var(--muted); font-size: var(--text-base); line-height: 1.6;
}
.method__map { position: relative; }
.systree { width: 100%; height: auto; color: var(--fg); margin-bottom: 2.6rem; }
.systree__line { stroke-dasharray: 600; stroke-dashoffset: 600; }
.systree.is-drawn .systree__line { animation: treeDraw 1.8s var(--ease) forwards; }
.systree.is-drawn .systree__line:nth-child(n+2) { animation-delay: 0.18s; }
.systree.is-drawn .systree__line:nth-child(n+4) { animation-delay: 0.34s; }
.systree.is-drawn .systree__line:nth-child(n+8) { animation-delay: 0.5s; }
@keyframes treeDraw { to { stroke-dashoffset: 0; } }
.systree__root, .systree__nodes, .systree__bits, .systree__term { opacity: 0; transition: opacity 0.9s var(--ease) 1.0s; }
.systree.is-drawn .systree__root,
.systree.is-drawn .systree__nodes,
.systree.is-drawn .systree__bits,
.systree.is-drawn .systree__term { opacity: 1; }
.systree__label {
  font-family: var(--font-mono); font-size: 12px;
  fill: var(--muted); letter-spacing: 0.14em; text-transform: uppercase;
}
.systree__label.lbl-r { text-anchor: end; }
.method__steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem; position: relative; z-index: 2;
}
.method__step {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding-top: 1.1rem; border-top: 1px solid var(--line);
}
.method__step-num { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); }
.method__step-label {
  font-family: var(--font-display); font-size: var(--text-lg);
  line-height: 1.25; letter-spacing: -0.005em;
}

/* ---------- About ---------- */
.about__grid {
  display: grid; grid-template-columns: 0.72fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.about__portrait { margin: 0; }
.portrait__frame {
  position: relative; aspect-ratio: 4 / 5; width: 100%;
  overflow: visible;
}
.portrait__frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.6s var(--ease), transform 1.1s var(--ease);
  /* epic blend: dissolve edges into the page */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 72%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 72%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.portrait__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, transparent 45%, var(--bg) 100%);
}
.portrait__frame:hover img { transform: scale(1.015); }
[data-theme="night"] .portrait__frame img { filter: grayscale(1) contrast(1.08) brightness(1.0); }
[data-theme="day"] .portrait__frame img,
:root:not([data-theme="night"]) .portrait__frame img { filter: grayscale(1) contrast(1.04) brightness(1.06); }
.portrait__cap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.06em; color: var(--muted); margin-top: 0.9rem;
}
.portrait__link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.portrait__link svg { opacity: 0.8; }
.portrait__link:hover { color: var(--fg); border-color: var(--fg); }
.about__big {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); line-height: 1.35; margin: 0;
  letter-spacing: -0.008em;
}
.about__big em { font-style: italic; }
.about__body { display: flex; flex-direction: column; gap: 1.3rem; }
.about__body > p { margin: 0; color: var(--graphite); }
[data-theme="night"] .about__body > p { color: #c9c6bd; }
.facts { list-style: none; margin: 0.4rem 0; padding: 0; display: flex; flex-direction: column; }
.facts li {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1.2rem;
  padding: 0.7rem 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.facts__k { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts__v { font-size: var(--text-sm); color: var(--fg); line-height: 1.45; }
.about__note {
  font-family: var(--font-mono); font-size: var(--text-sm);
  color: var(--muted) !important; letter-spacing: 0.02em;
  padding-top: 0.5rem; border-top: 1px solid var(--line);
}

/* ---------- Contact ---------- */
.contact__body { max-width: 60ch; display: flex; flex-direction: column; gap: 1.4rem; }
.contact__statement { margin: 0; color: var(--graphite); font-size: var(--text-lg); line-height: 1.55; }
[data-theme="night"] .contact__statement { color: #c9c6bd; }
.contact__vision {
  margin: 0.6rem 0 0; padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-lg); line-height: 1.5; color: var(--fg);
  max-width: 52ch;
}
.contact__email {
  font-family: var(--font-display); font-size: var(--text-2xl);
  letter-spacing: -0.01em; margin-top: 0.8rem;
  width: max-content; max-width: 100%; position: relative;
  background-image: linear-gradient(var(--fg), var(--fg));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease);
  word-break: break-word;
}
.contact__email:hover { background-size: 100% 1px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 3rem; }
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.6rem 2rem;
}
.footer__word { font-family: var(--font-display); font-size: var(--text-lg); }
.footer__meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); letter-spacing: 0.04em; }
.footer__meta:last-child { margin-left: auto; }

/* ---------- Reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .systree__line { stroke-dashoffset: 0; }
  .systree__root, .systree__nodes, .systree__bits, .systree__term { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .hero__diagram { transform: translateX(0); opacity: 0.1; }
  .helix { max-width: 42vw; opacity: 0.22; }
  .service { grid-template-columns: 3.5rem 1fr; }
  .service__desc { grid-column: 1 / -1; padding-left: 5.5rem; }
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 280px; }
  .ethics__grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .ethics__lead { position: static; }
  .ethics__zh { display: none; }
  .method__steps { grid-template-columns: 1fr; gap: 0; }
  .systree { margin-bottom: 1.6rem; }
  .method__step { flex-direction: row; align-items: baseline; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
  .method__step:last-child { border-bottom: 1px solid var(--line); }
  .reticle__coord { display: none; }
  .footer__meta:last-child { margin-left: 0; }
}
@media (max-width: 480px) {
  .service { grid-template-columns: 3rem 1fr; }
  .service__desc { padding-left: 0; }
  .facts li { grid-template-columns: 5.5rem 1fr; gap: 0.8rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* ---------- Instrument layer: reticle + mandala ---------- */
.reticle { position: absolute; inset: clamp(0.8rem, 3vw, 2rem); pointer-events: none; z-index: 1; color: var(--fg); }
.reticle__c { position: absolute; width: 16px; height: 16px; opacity: 0.5; }
.reticle__c::before, .reticle__c::after { content: ""; position: absolute; background: currentColor; }
.reticle__c::before { width: 16px; height: 1px; top: 0; }
.reticle__c::after { width: 1px; height: 16px; left: 0; }
.reticle__tl { top: 0; left: 0; }
.reticle__tr { top: 0; right: 0; transform: scaleX(-1); }
.reticle__bl { bottom: 0; left: 0; transform: scaleY(-1); }
.reticle__br { bottom: 0; right: 0; transform: scale(-1); }
.reticle__coord {
  position: absolute; font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.18em; color: var(--muted); opacity: 0.75;
}
.reticle__coord--tl { top: -2px; left: 26px; }
.reticle__coord--br { bottom: -2px; right: 26px; }

.mandala {
  position: absolute; z-index: 0; pointer-events: none;
  top: 50%; right: clamp(2rem, 10vw, 11rem); transform: translateY(-50%);
  width: clamp(260px, 34vw, 520px); aspect-ratio: 1; color: var(--fg);
  opacity: 0.05; mix-blend-mode: normal;
}
[data-theme="night"] .mandala { opacity: 0.07; }
.mandala svg { width: 100%; height: 100%; animation: mandalaSpin 240s linear infinite; }
@keyframes mandalaSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mandala svg { animation: none; } }
@media (max-width: 860px) { .mandala { opacity: 0.04; right: -10%; } }

/* ---------- Section instrument frames ---------- */
.section { position: relative; }
.reticle--section { inset: clamp(0.6rem, 2vw, 1.4rem); opacity: 0.7; }
.reticle--section .reticle__c { width: 12px; height: 12px; opacity: 0.4; }
.reticle--section .reticle__c::before { width: 12px; }
.reticle--section .reticle__c::after { height: 12px; }
.reticle--section .reticle__coord { font-size: 0.6rem; opacity: 0.55; }

/* ---------- Refined mandala motion ---------- */
.mandala__ring { opacity: 0.9; }
.mandala__spokes { opacity: 0.6; }
.mandala__vajra { opacity: 1; }
.mandala__gates { opacity: 0.8; }
.mandala__bindu { opacity: 1; }
.mandala svg > g { transform-box: fill-box; transform-origin: center; }
.mandala .mandala__vajra { animation: mandalaSpin 300s linear infinite; transform-origin: 200px 200px; }
.mandala .mandala__spokes { animation: mandalaSpinR 420s linear infinite; transform-origin: 200px 200px; }
@keyframes mandalaSpinR { to { transform: rotate(-360deg); } }

/* ---------- Chinese typography ---------- */
[data-lang="zh"] body,
[data-lang="zh"] .hero__lede,
[data-lang="zh"] .service__desc,
[data-lang="zh"] .method__intro,
[data-lang="zh"] .services__intro,
[data-lang="zh"] .about__body p,
[data-lang="zh"] .contact__statement,
[data-lang="zh"] .facts__v { font-family: var(--font-zh); letter-spacing: 0.02em; }
[data-lang="zh"] .hero__title,
[data-lang="zh"] .section__title,
[data-lang="zh"] .manifesto,
[data-lang="zh"] .pullquote,
[data-lang="zh"] .about__big,
[data-lang="zh"] .service__name,
[data-lang="zh"] .method__step-label,
[data-lang="zh"] .contact__vision { font-family: var(--font-zh); font-weight: 500; letter-spacing: 0.04em; }
[data-lang="zh"] .hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.15; }
[data-lang="zh"] .brand__word { letter-spacing: 0.12em; }
[data-lang="zh"] .brand__tag { letter-spacing: 0.24em; text-indent: 0.24em; }

/* ---------- Sirius binary starfield ---------- */
.starfield {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  color: var(--fg); opacity: 0; transition: opacity 1.2s var(--ease);
}
[data-theme="night"] .starfield { opacity: 0.5; }
[data-theme="day"] .starfield,
:root:not([data-theme="night"]) .starfield { opacity: 0.12; }
.starfield__svg { width: 100%; height: 100%; display: block; }
.stars-dim circle { animation: twinkle 6s ease-in-out infinite; }
.stars-dim circle:nth-child(3n) { animation-delay: 2s; }
.stars-dim circle:nth-child(3n+1) { animation-delay: 4s; }
@keyframes twinkle { 0%,100% { opacity: 0.35; } 50% { opacity: 0.85; } }

.sirius__halo {
  filter: blur(14px); opacity: 0.28;
  animation: siriusPulse 8s ease-in-out infinite;
}
[data-theme="night"] .sirius__halo { opacity: 0.4; }
@keyframes siriusPulse { 0%,100% { opacity: 0.28; } 50% { opacity: 0.5; } }
.sirius__spikes { opacity: 0.45; }
.sirius__a { filter: drop-shadow(0 0 4px currentColor); }
.sirius__orbit { opacity: 0.35; }
.sirius__b { opacity: 0.8; animation: twinkle 5s ease-in-out infinite; }
.sirius__label {
  font-family: var(--font-mono); font-size: 9px;
  fill: currentColor; opacity: 0.4; letter-spacing: 0.14em;
}
.sirius__label--b { opacity: 0.55; }

/* keep hero/mandala above the starfield */
.hero, .section, .header, .footer { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .stars-dim circle, .sirius__halo, .sirius__b { animation: none; }
}
@media (max-width: 860px) {
  .starfield { opacity: 0; }
  [data-theme="night"] .starfield { opacity: 0.4; }
}

/* ---------- Dark-light tech-esoteric display type ---------- */
.hero__title, .section__title, .manifesto, .pullquote, .about__big,
.service__name, .method__step-label, .contact__vision, .contact__email {
  font-variation-settings: var(--disp-settings);
}
.hero__title {
  font-weight: 340; letter-spacing: -0.028em; line-height: 0.98;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
}
.section__title { font-weight: 380; letter-spacing: -0.02em; }
.manifesto { font-weight: 380; }
.pullquote { font-weight: 360; letter-spacing: -0.01em; }
.about__big { font-weight: 360; }
.service__name { font-weight: 400; font-variation-settings: "opsz" 40, "WONK" 1; }
.method__step-label { font-weight: 400; font-variation-settings: "opsz" 40, "WONK" 1; }
/* mono instrument type: a touch wider, cooler */
.eyebrow, .section__index, .reticle__coord, .sirius__label, .helix-label, .systree__label, .lang-toggle {
  font-feature-settings: "ss01" 1, "zero" 1;
}

/* ---------- Method: hidden hover-revealed cipher ---------- */
.method__map { position: relative; }
.method__cipher {
  position: absolute; inset: 0; z-index: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 clamp(1rem, 8vw, 8rem); text-align: center;
  font-family: var(--font-display); font-style: italic; font-weight: 340;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-size: clamp(1.5rem, 3.4vw, 2.9rem); line-height: 1.28;
  letter-spacing: -0.01em; color: var(--fg);
  opacity: 0; filter: blur(6px);
  transition: opacity 1s var(--ease), filter 1s var(--ease);
  pointer-events: none; user-select: none;
}
.systree { position: relative; z-index: 1; transition: opacity 0.9s var(--ease); }
.method__map:hover .method__cipher,
.method__map:focus-within .method__cipher { opacity: 0.14; filter: blur(0); }
.method__map:hover .systree { opacity: 0.28; }
[data-lang="zh"] .method__cipher { font-family: var(--font-zh); font-style: normal; font-weight: 400; }
@media (prefers-reduced-motion: reduce) {
  .method__cipher, .systree { transition: none; }
}
@media (hover: none), (max-width: 860px) {
  /* touch devices: keep the diagram clean, no hidden layer */
  .method__cipher { display: none; }
  .method__map:hover .systree { opacity: 1; }
}

/* ---------- Contact PhD note ---------- */
.contact__note {
  margin: 1.6rem 0 0; padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Sirius: more subtle ---------- */
[data-theme="night"] .starfield { opacity: 0.32; }
[data-theme="night"] .sirius__halo { opacity: 0.22; }
@keyframes siriusPulse { 0%,100% { opacity: 0.16; } 50% { opacity: 0.3; } }
.sirius__spikes { opacity: 0.24; }
.sirius__orbit { opacity: 0.2; }
.sirius__b { opacity: 0.55; }
.sirius__label { opacity: 0.28; }
.sirius__label--b { opacity: 0.4; }
