/* NOVA — v0.4 page styles · rules live in DESIGN.md (black cinema + cursor-bound dream aurora) */

/* Geist — vendored from the geist package, weight 400 only */
@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-void);
  color: var(--color-white);
  font-family: var(--font-cjk);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-body);
  line-height: var(--leading-body-zh);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; font-weight: var(--font-weight-regular); }
svg, img { display: block; }

:focus-visible {
  outline: 1px solid var(--color-hairline-strong);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Latin voice — Geist, uppercase micro-labels */
.en {
  font-family: var(--font-latin);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

/* ---------- Dream Aurora — light only where the cursor touches ---------- */

.lens {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1400ms var(--ease-out-soft);
}

.lens-on .lens { opacity: 1; }

.lens i {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  will-change: transform;
}

/* teal — closest to the hand */
.lens i:nth-child(1) {
  width: 340px; height: 340px;
  background: radial-gradient(closest-side, rgba(110, 231, 210, 0.42), transparent 72%);
  filter: blur(56px);
}

/* green — trailing */
.lens i:nth-child(2) {
  width: 540px; height: 540px;
  background: radial-gradient(closest-side, rgba(87, 230, 164, 0.30), transparent 74%);
  filter: blur(84px);
}

/* blue — the slow deep current */
.lens i:nth-child(3) {
  width: 820px; height: 820px;
  background: radial-gradient(closest-side, rgba(110, 168, 255, 0.26), transparent 76%);
  filter: blur(110px);
}

/* touch devices / reduced motion — a still, faint breath of light center-frame */
.lens-still .lens { opacity: 0.55; }

.lens-still .lens i {
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
}

/* ---------- Cinema frame — vignette below content, grain above everything ---------- */

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 95% at 50% 45%, transparent 52%, rgba(0, 0, 0, 0.6) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- Structure ---------- */

.page { position: relative; z-index: 1; }

.wrap {
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.section { margin-block: var(--section-gap); }

/* ---------- Hero — black, a star, a name ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(32px, 5vh, 56px);
}

/* the page's heartbeat */
.cluster {
  width: clamp(84px, 9vw, 112px);
  height: auto;
  animation: cluster-pulse 9s ease-in-out infinite alternate;
}

@keyframes cluster-pulse {
  from { opacity: 1; }
  to   { opacity: 0.6; }
}

/* sharp against the haze — never blurred, never colored */
.wordmark {
  width: min(58vw, 460px);
  height: auto;
}

.hero-bottom {
  position: absolute;
  bottom: var(--space-8);
  left: 0;
  right: 0;
  text-align: center;
}

.tagline {
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.6;
}

.tagline-en {
  margin-top: var(--space-2);
  font-size: 11px;
  color: var(--color-white-60);
}

/* ---------- Section label ---------- */

.section-label {
  font-size: var(--text-label);
  color: var(--color-white-60);
  margin-bottom: var(--space-12);
}

/* ---------- Glass material ---------- */

.glass {
  background: var(--color-glass);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-card);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(120%);
  backdrop-filter: blur(var(--blur-glass)) saturate(120%);
}

/* ---------- World / prose ---------- */

.prose p {
  max-width: 34em;
  color: rgba(255, 255, 255, 0.85);
}

.prose p + p { margin-top: var(--space-4); }

/* ---------- Faction diagram — the only home of faction colors ---------- */

.diagram {
  margin-top: var(--space-12);
  max-width: 680px;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.faction {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.faction .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.faction .dot-blue { background: var(--color-faction-blue); }
.faction .dot-red { background: var(--color-faction-red); }

.faction .name { font-size: var(--text-body); }

.faction .en { font-size: var(--text-label); color: var(--color-white-60); }

.faction .family {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--color-white-60);
}

.diagram-caption {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Season cards — frosted glass that rises ---------- */

.seasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.season {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 230px;
  padding: var(--card-padding);
  transition:
    background var(--duration-ui) var(--ease-out-soft),
    border-color var(--duration-ui) var(--ease-out-soft),
    transform var(--duration-ui) var(--ease-out-soft);
}

/* in Nova, things rise */
.season:hover {
  background: var(--color-glass-raised);
  border-color: var(--color-hairline-strong);
  transform: translateY(-6px);
}

.season .badge {
  align-self: flex-start;
  padding: 5px 12px;
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--radius-pill);
  font-family: var(--font-latin);
  font-size: 12px;
  letter-spacing: var(--tracking-label);
}

/* the only gradient-clipped text in the system */
.season .badge span {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.season h3 { font-size: 24px; line-height: 1.3; }

.season .sub { font-size: var(--text-label); color: var(--color-white-60); }

.season .note { font-size: 15px; color: var(--color-white-60); }

.season .line {
  margin-top: auto;
  width: 0;
  height: 1px;
  background: var(--gradient-aurora);
  transition: width var(--duration-ui) var(--ease-out-soft);
}

.season:hover .line { width: 96px; }

/* ---------- 星轨 — the orbit menu ---------- */

.orbit {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  width: 56px;
  height: 56px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 500ms var(--ease-out-soft),
    transform 500ms var(--ease-out-soft);
}

.orbit.orbit-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.orbit-fab {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(11, 11, 11, 0.82);
  cursor: pointer;
  transition: border-color var(--duration-ui) var(--ease-out-soft);
}

.orbit-fab:hover { border-color: rgba(255, 255, 255, 0.7); }

.orbit-fab svg {
  width: 22px;
  height: 22px;
  transition: transform 450ms var(--ease-out-soft);
}

.orbit.open .orbit-fab svg { transform: rotate(45deg); }

/* the ring — its bottom-right corner sits on the button's center */
.orbit-menu {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 230px;
  height: 230px;
  overflow: visible;
  visibility: hidden;
}

.orbit.open .orbit-menu { visibility: visible; }

.orbit-menu .sector {
  opacity: 0;
  transform: rotate(9deg) scale(0.94);
  transform-origin: 230px 230px;
  transform-box: view-box;
  transition:
    opacity 300ms var(--ease-out-soft),
    transform 300ms var(--ease-out-soft);
}

.orbit.open .sector { opacity: 1; transform: none; }
.orbit.open .sector:nth-child(3) { transition-delay: 40ms; }
.orbit.open .sector:nth-child(4) { transition-delay: 80ms; }

.orbit-menu .arc {
  fill: rgba(13, 13, 13, 0.92);
  stroke: rgba(255, 255, 255, 0.14);
  transition: stroke var(--duration-ui) var(--ease-out-soft);
}

.orbit-menu a:hover .arc,
.orbit-menu a:focus-visible .arc { stroke: rgba(255, 255, 255, 0.4); }

/* the aurora caught in the ring — lit only where the cursor is (orbit.js) */
.orbit-menu .lit {
  fill: url(#orbit-light);
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms var(--ease-out-soft);
}

.orbit.open .lit { opacity: 1; }

.orbit-menu text {
  fill: var(--color-white);
  font-family: var(--font-cjk);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */

.site-foot {
  margin-top: var(--space-35);
  border-top: 1px solid var(--color-hairline);
  padding-block: var(--space-12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.foot-ct {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-white-60);
  transition: color var(--duration-ui) var(--ease-out-soft);
}

.foot-ct:hover { color: var(--color-white); }

/* the CT prism mark's dark-page form */
.foot-ct svg { width: 18px; height: 18px; }

.foot-ct span { font-size: var(--text-label); }

.foot-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-white-60);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .seasons { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wordmark { width: 72vw; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cluster { animation: none; }
  .lens { transition: none; }
  .season, .season .line, .foot-ct { transition: none; }
  .orbit, .orbit-fab, .orbit-fab svg, .orbit-menu .sector, .orbit-menu .lit, .orbit-menu .arc { transition: none; }
}
