:root,
[data-theme="dark"] {
  --bg: #08090d;
  --bg-elevated: #12141c;
  --text: #f4f5f8;
  --muted: #9aa0ad;
  --faint: #6d7382;
  --accent: #7eb0ff;
  --accent-strong: #4c8dff;
  --accent-2: #c084fc;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(18, 20, 28, 0.72);
  --glow: rgba(126, 176, 255, 0.22);
  --glow-2: rgba(192, 132, 252, 0.16);
  --grid-dot: rgba(255, 255, 255, 0.45);
  --dock: rgba(16, 18, 26, 0.78);
  --dock-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  --spot: rgba(126, 176, 255, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --btn-primary: #f4f5f8;
  --btn-primary-text: #08090d;
  --tag: rgba(255, 255, 255, 0.08);
  --feature-bg: rgba(255, 255, 255, 0.03);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f1ea;
  --bg-elevated: #fffcf8;
  --text: #17181d;
  --muted: #5c6170;
  --faint: #7b8090;
  --accent: #1d4ed8;
  --accent-strong: #1e40af;
  --accent-2: #7c3aed;
  --line: rgba(23, 24, 29, 0.1);
  --line-strong: rgba(23, 24, 29, 0.18);
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 252, 248, 0.86);
  --glow: rgba(29, 78, 216, 0.14);
  --glow-2: rgba(124, 58, 237, 0.1);
  --grid-dot: rgba(23, 24, 29, 0.35);
  --dock: rgba(255, 252, 248, 0.82);
  --dock-shadow: 0 16px 40px rgba(40, 32, 20, 0.12);
  --spot: rgba(29, 78, 216, 0.16);
  --shadow: 0 24px 50px rgba(40, 32, 20, 0.08);
  --btn-primary: #17181d;
  --btn-primary-text: #f7f5f0;
  --tag: rgba(23, 24, 29, 0.06);
  --feature-bg: rgba(23, 24, 29, 0.03);
  color-scheme: light;
}

[data-theme="greyscale"] {
  --bg: #111111;
  --bg-elevated: #1c1c1c;
  --text: #f4f4f4;
  --muted: #b5b5b5;
  --faint: #8a8a8a;
  --accent: #e8e8e8;
  --accent-strong: #ffffff;
  --accent-2: #c2c2c2;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(28, 28, 28, 0.88);
  --glow: rgba(255, 255, 255, 0.1);
  --glow-2: rgba(255, 255, 255, 0.05);
  --grid-dot: rgba(255, 255, 255, 0.42);
  --dock: rgba(22, 22, 22, 0.9);
  --dock-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  --spot: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  --btn-primary: #f4f4f4;
  --btn-primary-text: #111111;
  --tag: rgba(255, 255, 255, 0.08);
  --feature-bg: rgba(255, 255, 255, 0.04);
  color-scheme: dark;
}

[data-theme="greyscale"] #prism-grad stop:first-child { stop-color: #f4f4f4; }
[data-theme="greyscale"] #prism-grad stop:last-child { stop-color: #8a8a8a; }
[data-theme="greyscale"] .card-index { color: #e8e8e8; }
[data-theme="greyscale"] .open:hover { background: #111111; color: #f4f4f4; }
[data-theme="greyscale"] ::selection { background: #f4f4f4; color: #111111; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.45s ease;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle 240px at var(--mx, 72%) var(--my, 18%), #000 0%, transparent 100%);
  opacity: 0.35;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, a, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection { background: var(--accent); color: #fff; }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 2000;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

.page-spot,
#cursor-trail,
.cursor { pointer-events: none; }
.page-spot {
  position: fixed;
  z-index: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, var(--glow-2) 38%, transparent 70%);
  transform: translate(-50%, -50%);
  left: var(--mx, 70%);
  top: var(--my, 16%);
  filter: blur(8px);
}
#cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 1200;
  width: 100%;
  height: 100%;
}
#fireworks,
#rockets {
  position: fixed;
  inset: 0;
  z-index: 1300;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}
#fireworks.is-active,
#rockets.is-active { display: block; }
.cursor {
  position: fixed;
  inset: 0;
  z-index: 1600;
  opacity: 0;
}
body.cursor-on .cursor { opacity: 1; }
body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }
.cursor-dot,
.cursor-ring {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  transform: translate(-100px, -100px);
}
.cursor-dot {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: var(--text);
  box-shadow: 0 0 12px var(--accent);
}
.cursor-ring {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 1px solid var(--text);
  opacity: 0.7;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}
body.cursor-hot .cursor-ring {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  opacity: 1;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 34px; height: 34px; }
.logo-facet { opacity: 0.45; animation: facet 3.2s ease-in-out infinite; }
.logo-facet.delay { animation-delay: -1.6s; opacity: 0.8; }
.logo-text { display: flex; align-items: baseline; gap: 7px; letter-spacing: 0.08em; }
.logo-text strong { font-family: Syne, Outfit, sans-serif; font-size: 1.05rem; font-weight: 800; }
.logo-text span { color: var(--muted); font-weight: 400; letter-spacing: 0; font-size: 0.98rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.rail {
  position: fixed;
  left: clamp(16px, 2.4vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rail-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.rail a.is-active { color: var(--text); }
.rail a.is-active .rail-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 4vw, 40px) 100px;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at var(--hx, 50%) var(--hy, 42%), #000 0%, transparent 68%);
  opacity: 0.55;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}
.orb-a {
  width: 460px;
  height: 460px;
  right: 6%;
  top: 12%;
  background: var(--glow);
}
.orb-b {
  width: 320px;
  height: 320px;
  left: 18%;
  bottom: 8%;
  background: var(--glow-2);
}
.orb-c {
  width: 180px;
  height: 180px;
  right: 28%;
  bottom: 18%;
  background: color-mix(in srgb, var(--accent-2) 50%, transparent);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  width: min(860px, 100%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
h1, h2, h3 { font-family: Syne, Outfit, sans-serif; letter-spacing: -0.045em; margin: 0; }
h1 {
  font-size: clamp(3.2rem, 8vw, 6.6rem);
  font-weight: 800;
  line-height: 0.92;
  max-width: 11ch;
}
.word { display: inline-block; margin-right: 0.24em; }
.char {
  display: inline-block;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * 28ms + 80ms);
}
.lede {
  max-width: 46ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary { background: var(--btn-primary); color: var(--btn-primary-text); }
.btn-primary:hover { box-shadow: 0 10px 30px var(--glow); }
.btn-ghost { border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); background: var(--surface); }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 48px 0 0;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both;
}
.hero-stats div { min-width: 120px; }
.hero-stats dt {
  color: var(--faint);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-stats dd { margin: 4px 0 0; font-weight: 600; }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 96px;
  width: 26px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: bob 1.8s ease-in-out infinite;
}

.section {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 130px) clamp(20px, 4vw, 40px) 40px;
}
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 0.98; }
.section-copy { color: var(--muted); margin: 16px 0 0; font-size: 1.05rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  border-radius: 24px;
  opacity: 0;
  transform: translateY(24px);
  outline: none;
}
.card.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-tilt {
  position: relative;
  height: 100%;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
}
.card-media { position: absolute; inset: 0; }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}
.card:hover img { transform: scale(1.08); filter: saturate(1.05) brightness(0.82); }
[data-theme="greyscale"] img { filter: grayscale(1); }
[data-theme="greyscale"] .card:hover img {
  filter: grayscale(1) brightness(0.82);
}
.card-copy {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 22px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.28) 55%, transparent 100%);
}
.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-index {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9ec2ff;
}
.card h3 { font-size: 1.45rem; line-height: 1.1; }
.card-desc {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 12px 0 0; margin: 0; }
.tags li {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}
.open {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  border: 1px solid rgba(17, 17, 17, 0.14);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.open:hover { background: var(--accent); color: #fff; }
.pill {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-2);
}
.card-spot {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 50%), var(--spot), transparent 42%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover .card-spot { opacity: 1; }

.card.is-featured { grid-column: 1 / -1; scroll-margin-top: 96px; }
.card.no-motion,
.card.no-motion.is-in {
  opacity: 1;
  transform: none;
  transition: none;
}
.card.is-featured .card-tilt {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  min-height: 460px;
}
.card.is-featured .card-media { position: relative; height: 100%; min-height: 280px; overflow: hidden; }
.card.is-featured .card-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.card.is-featured .card-copy {
  position: relative;
  inset: auto;
  color: var(--text);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 40px);
}
.card.is-featured .card-desc {
  color: var(--muted);
  -webkit-line-clamp: 4;
  font-size: 1rem;
}
.card.is-featured .tags li {
  background: var(--tag);
  color: var(--muted);
  border: 1px solid var(--line);
}
.card.is-featured h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.features {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 230px;
  overflow: auto;
}
.features li {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--feature-bg);
  border: 1px solid var(--line);
}
.features strong { display: block; font-size: 0.82rem; margin-bottom: 2px; }
.features span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.features::-webkit-scrollbar { width: 8px; }
.features::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }

.footer { position: relative; z-index: 2; padding-bottom: 120px; }
.gradient-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), var(--accent), var(--accent-2), var(--line-strong), transparent);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px clamp(20px, 4vw, 40px) 28px;
}
.footer-cta { text-align: center; }
.footer-cta h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.footer-cta p { color: var(--muted); margin: 14px 0 26px; }
.footer-cta a[href^="mailto"] { color: var(--accent); font-weight: 600; }
.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.socials { display: flex; gap: 14px; }
.socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.copyright { text-align: right; color: var(--faint); font-size: 0.82rem; }
.copyright p { margin: 0 0 6px; }
.copyright p:first-child { color: var(--muted); }

.theme-dock {
  position: fixed;
  z-index: 1400;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  border-radius: 999px;
  background: var(--dock);
  border: 1px solid var(--line-strong);
  box-shadow: var(--dock-shadow);
  backdrop-filter: blur(16px);
}
.theme-dock button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
}
.theme-dock button svg { width: 16px; height: 16px; }
.theme-dock button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}
.theme-dock button:hover:not([aria-pressed="true"]) { color: var(--text); }

.noscript {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 20px 80px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.4; }
}
@keyframes facet {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@media (max-width: 980px) {
  .rail { display: none; }
  .grid { grid-template-columns: 1fr; }
  .card.is-featured .card-tilt { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .copyright { text-align: left; }
}
@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  h1 { font-size: clamp(2.7rem, 14vw, 4rem); }
  .hero { padding-top: 110px; }
  .card-tilt { min-height: 280px; }
  .theme-dock button { padding: 0 12px; font-size: 0.8rem; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .card { opacity: 1; transform: none; }
}
