:root {
  /* color */
  --bg: #0a0a0b;
  --ink: #f5f5f2;
  --muted: #8b8b90;
  --muted-2: #56565b;
  --line: rgba(245, 245, 242, 0.14);
  --line-strong: rgba(245, 245, 242, 0.28);
  --accent: #5b6cff;
  --invert-bg: #f5f5f2;
  --invert-ink: #0a0a0b;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-s: 220ms;
  --dur-m: 320ms;
  --dur-l: 420ms;

  /* spacing scale -- do not invent values outside this list */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 40px;
  --sp-7: 64px;
  --sp-8: 104px;
  --sp-9: 168px;

  /* type scale */
  --fs-micro: 0.6875rem;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.375rem;
  --fs-row: clamp(1.75rem, 4vw, 2.75rem);
  --fs-hero: clamp(3.25rem, 12vw, 9.5rem);

  --font-display: "Bricolage Grotesque", "Manrope", sans-serif;
  --font-body: "Manrope", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--invert-bg);
}

a { color: inherit; }

/* ---------- ambient background ---------- */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(245, 245, 242, 0.05), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(0, 0, 0, 0.5), transparent 60%);
}

/* ---------- custom cursor ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

.has-cursor .cursor { opacity: 1; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

.cursor-dot {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: opacity var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}

.cursor-trail {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  transition: opacity var(--dur-s) var(--ease);
}

.cursor-trail.t1 { width: 5px; height: 5px; top: -2.5px; left: -2.5px; opacity: 0.5; }
.cursor-trail.t2 { width: 4px; height: 4px; top: -2px; left: -2px; opacity: 0.28; }
.cursor-trail.t3 { width: 3px; height: 3px; top: -1.5px; left: -1.5px; opacity: 0.14; }

.cursor.is-active .cursor-trail { opacity: 0; }

.cursor-ring {
  position: absolute;
  top: -18px;
  left: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width var(--dur-m) var(--ease), height var(--dur-m) var(--ease),
    top var(--dur-m) var(--ease), left var(--dur-m) var(--ease),
    background var(--dur-m) var(--ease), border-color var(--dur-m) var(--ease);
}

.cursor-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0;
  color: var(--ink);
  white-space: nowrap;
  transition: font-size var(--dur-s) var(--ease);
}

.cursor.is-active .cursor-ring {
  width: 76px;
  height: 76px;
  top: -38px;
  left: -38px;
  background: var(--invert-ink);
  border-color: var(--invert-ink);
}

.cursor.is-active .cursor-dot { transform: scale(0); opacity: 0; }
.cursor.is-active .cursor-label { font-size: var(--fs-small); color: var(--ink); }

/* ---------- layout shell ---------- */

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--sp-8);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  transform: translateY(var(--parallax, 0px));
  opacity: var(--parallax-fade, 1);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 0 0 var(--sp-4);
}

.hero-mark {
  margin: 0;
  line-height: 0.94;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
}

body.loaded .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

.clip-wrap {
  display: inline-block;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 760ms var(--ease);
}

body.loaded .clip-wrap {
  clip-path: inset(0 0 0 0);
}

.clip-inner {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-hero);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ch {
  display: inline-block;
  transform: translateY(var(--ry, 0px));
  will-change: transform;
}

.accent-dot { color: var(--accent); }

.lead {
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--muted);
  max-width: 30ch;
  margin: var(--sp-5) 0 0;
  line-height: 1.4;
}

.scroll-cue {
  position: absolute;
  bottom: var(--sp-6);
  left: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.scroll-line {
  width: 1px;
  height: var(--sp-6);
  background: var(--accent);
  transform-origin: top center;
  animation: scroll-breathe 2.4s var(--ease) infinite;
}

.scroll-word {
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: 0.22em;
  color: var(--muted-2);
}

@keyframes scroll-breathe {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(0.55); opacity: 1; }
}

/* ---------- index list ---------- */

.index-list {
  position: relative;
  padding-bottom: var(--sp-9);
}

.index-rule {
  position: relative;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 640ms var(--ease);
  overflow: hidden;
}

.index-list.is-revealed .index-rule { transform: scaleX(1); }

.index-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.55;
  animation: rule-shimmer 7s linear infinite;
  animation-delay: 1.2s;
}

@keyframes rule-shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}

.row {
  position: relative;
  display: block;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-l) var(--ease), transform var(--dur-l) var(--ease);
  transition-delay: calc(var(--n) * 70ms);
}

.index-list.is-revealed .row {
  opacity: 1;
  transform: translateY(0);
}

.row-fill {
  position: absolute;
  inset: 0;
  background: var(--invert-bg);
  clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%));
  transition: clip-path var(--dur-l) var(--ease);
  pointer-events: none;
}

.row-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  opacity: calc(var(--proximity, 0) * 0.7);
  transition: opacity 120ms linear;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .row:not(.is-soon):hover .row-fill,
  .row:not(.is-soon):focus-visible .row-fill {
    clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%));
  }
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-6) 0;
  transition: color 130ms linear;
}

@media (hover: hover) and (pointer: fine) {
  .row:not(.is-soon):hover .content,
  .row:not(.is-soon):focus-visible .content {
    color: var(--invert-ink);
  }
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  transform: translate(var(--tx, 0), var(--ty, 0));
}

.row-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-row);
  letter-spacing: -0.01em;
}

.row-desc {
  font-size: var(--fs-body);
  color: var(--muted);
  transition: color 130ms linear;
}

@media (hover: hover) and (pointer: fine) {
  .row:not(.is-soon):hover .row-desc,
  .row:not(.is-soon):focus-visible .row-desc {
    color: var(--invert-ink);
    opacity: 0.65;
  }
}

.row-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  color: var(--muted-2);
  flex-shrink: 0;
}

.row-arrow {
  width: 20px;
  height: 20px;
  transition: transform var(--dur-m) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .row:hover .row-arrow, .row:focus-visible .row-arrow {
    transform: translate(3px, -3px);
  }
}

.soon-badge {
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
  color: var(--muted-2);
  border: 1px solid var(--line-strong);
  padding: var(--sp-2) var(--sp-4);
  border-radius: 999px;
}

.row.is-soon .row-title,
.row.is-soon .row-desc {
  color: var(--muted-2);
}

/* ---------- footer ---------- */

.site-footer {
  padding: var(--sp-6) 0 var(--sp-7);
  font-size: var(--fs-small);
  color: var(--muted-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.clock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: clock-pulse 2.6s var(--ease) infinite;
}

@keyframes clock-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  main { padding: 0 var(--sp-5); }
  .content { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .row-meta { align-self: flex-end; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .clip-wrap, .lead, .scroll-cue {
    opacity: 1 !important;
    transform: none !important;
  }
  .clip-wrap { overflow: visible; }
  .index-rule, .row {
    transform: none !important;
    opacity: 1 !important;
  }
  .index-rule { transform: scaleX(1) !important; }
  .scroll-line, .index-rule::after, .clock-dot { animation: none !important; }
  .ch { transform: none !important; }
  .hero-content { transform: none !important; opacity: 1 !important; }
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
