:root {
  --ink: #f2efe7;
  --muted: #9b9a99;
  --line: rgba(242, 239, 231, 0.14);
  --violet: #9f8cff;
  --amber: #ffb86a;
  --graphite: #0b0c0f;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--graphite);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--graphite);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

::selection {
  background: rgba(159, 140, 255, 0.32);
  color: #fff;
}

.site-shell {
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  position: relative;
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
  background:
    radial-gradient(circle at 78% 34%, rgba(112, 84, 203, 0.09), transparent 27rem),
    radial-gradient(circle at 22% 90%, rgba(255, 184, 106, 0.055), transparent 25rem),
    linear-gradient(145deg, #0b0c0f 0%, #0c0d11 48%, #090a0d 100%);
}

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 88%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.032;
  background-image:
    radial-gradient(circle at 20% 30%, white 0 0.45px, transparent 0.65px),
    radial-gradient(circle at 72% 63%, white 0 0.35px, transparent 0.6px);
  background-size: 7px 7px, 11px 11px;
}

.ambient {
  position: fixed;
  z-index: -2;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  width: 22rem;
  height: 22rem;
  right: -12rem;
  top: 10%;
  border: 1px solid rgba(159, 140, 255, 0.12);
  box-shadow: 0 0 8rem rgba(159, 140, 255, 0.05);
}

.ambient-two {
  width: 9rem;
  height: 9rem;
  left: 8%;
  bottom: -5rem;
  background: rgba(255, 184, 106, 0.035);
}

.site-header {
  min-height: 5.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.wordmark-mark { font-size: 1rem; font-weight: 760; }
.wordmark-divider { height: 0.75rem; width: 1px; background: rgba(242, 239, 231, 0.34); }

.wordmark-name {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 560;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-pulse {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #a7d8b2;
  box-shadow: 0 0 0 0 rgba(167, 216, 178, 0.4);
  animation: pulse 3s ease-out infinite;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(21rem, 0.92fr);
  gap: clamp(2rem, 7vw, 8rem);
  min-height: min(46rem, calc(100svh - 5.75rem));
  align-items: center;
  padding: clamp(4rem, 8vh, 7.5rem) 0 clamp(4rem, 9vh, 7rem);
}

.hero-copy { position: relative; z-index: 1; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 clamp(1.6rem, 4vh, 3rem);
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow span { color: var(--violet); font-size: 0.75rem; }

.hero-title {
  display: flex;
  align-items: baseline;
  gap: 0.025em;
  margin: 0 0 0.6rem -0.035em;
  font-size: clamp(7.2rem, 18.5vw, 17rem);
  font-weight: 745;
  letter-spacing: -0.105em;
  line-height: 0.72;
}

.hero-title span {
  display: inline-block;
  background: linear-gradient(118deg, #f7f4ec 10%, #d7d2df 50%, #a999ff 82%, #ffb86a 124%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 2.5rem rgba(159, 140, 255, 0.07));
  animation: title-in 0.9s cubic-bezier(.2,.75,.2,1) both;
}

.hero-title span:nth-child(2) { animation-delay: 0.08s; }
.hero-title span:nth-child(3) { animation-delay: 0.16s; }

.hero-expansion {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.7em;
  margin: clamp(2.3rem, 5vh, 4rem) 0 1.6rem;
  color: #d8d5cf;
  font-size: clamp(1.25rem, 2.1vw, 1.9rem);
  font-weight: 430;
  letter-spacing: -0.03em;
}

.hero-expansion span:not(:last-child)::after {
  content: "/";
  margin-left: 0.7em;
  color: rgba(242, 239, 231, 0.22);
}

.hero-intro {
  max-width: 35rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.72;
}

.visual-wrap {
  width: min(100%, 35rem);
  justify-self: end;
  padding: 1rem;
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-radius: 1.6rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  box-shadow: 0 2rem 8rem rgba(0,0,0,0.25), inset 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  transform: rotate(1deg);
  animation: field-in 1.1s 0.12s cubic-bezier(.2,.75,.2,1) both;
}

.visual-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(242, 239, 231, 0.4);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.59rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visual-meta-top { padding: 0.15rem 0.35rem 0.85rem; }
.visual-meta-bottom { padding: 0.85rem 0.35rem 0.15rem; }

.decision-field {
  aspect-ratio: 1.05 / 1;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(242, 239, 231, 0.09);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 67% 36%, rgba(159, 140, 255, 0.12), transparent 32%),
    radial-gradient(circle at 33% 72%, rgba(255, 184, 106, 0.08), transparent 30%),
    #0b0c10;
}

.field-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 3.6rem 3.6rem;
  mask-image: radial-gradient(circle at center, black 26%, transparent 88%);
}

.field-glow {
  position: absolute;
  width: 52%;
  height: 52%;
  top: 23%;
  left: 25%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159,140,255,0.13), transparent 68%);
  animation: breathe 7s ease-in-out infinite;
}

.contour {
  position: absolute;
  border: 1px solid rgba(183, 171, 255, 0.2);
  border-radius: 48% 52% 56% 44% / 42% 55% 45% 58%;
  transform: rotate(-24deg);
}

.contour-one { inset: 16% 18% 18% 17%; }
.contour-two { inset: 25% 28% 27% 27%; border-color: rgba(255, 188, 113, 0.18); transform: rotate(-19deg); }
.contour-three { inset: 34% 37% 36% 36%; border-color: rgba(242, 239, 231, 0.14); transform: rotate(-12deg); }

.boundary {
  position: absolute;
  width: 135%;
  height: 38%;
  left: -18%;
  top: 34%;
  border-top: 1px solid rgba(255, 184, 106, 0.48);
  border-radius: 50%;
  transform: rotate(-22deg);
  filter: drop-shadow(0 -5px 12px rgba(255, 184, 106, 0.07));
}

.data-point {
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0.25rem rgba(242, 239, 231, 0.055);
}

.point-one { left: 19%; top: 27%; }
.point-two { left: 31%; top: 40%; background: var(--violet); }
.point-three { left: 61%; top: 20%; }
.point-four { left: 76%; top: 42%; background: var(--violet); }
.point-five { left: 18%; top: 73%; background: var(--amber); }
.point-six { left: 43%; top: 80%; }
.point-seven { left: 70%; top: 69%; background: var(--amber); }
.point-eight { left: 84%; top: 79%; }

.logit-node {
  position: absolute;
  top: 50%;
  left: 51%;
  width: 7.2rem;
  height: 7.2rem;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(242, 239, 231, 0.2);
  border-radius: 50%;
  background: rgba(12, 13, 17, 0.74);
  box-shadow: 0 0 4rem rgba(159, 140, 255, 0.13), inset 0 0 2rem rgba(255,255,255,0.025);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%);
}

.logit-node strong { margin: 0.1rem 0; font-size: 1.75rem; font-weight: 520; letter-spacing: -0.06em; }

.node-label,
.node-formula {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.node-rule {
  width: 2.2rem;
  height: 1px;
  margin: 0.12rem 0 0.3rem;
  background: linear-gradient(90deg, transparent, rgba(242,239,231,0.4), transparent);
}

.axis-label {
  position: absolute;
  color: rgba(242, 239, 231, 0.28);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.54rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.axis-x { right: 4%; bottom: 3%; }
.axis-y { left: 3%; top: 31%; transform: rotate(-90deg) translateX(-100%); transform-origin: left top; }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.focus-card {
  min-height: 10.5rem;
  display: grid;
  grid-template-columns: 2.7rem 1fr;
  gap: 0.9rem;
  padding: 2rem clamp(1rem, 2.5vw, 2.4rem);
}

.focus-card:first-child { padding-left: 0; }
.focus-card:not(:last-child) { border-right: 1px solid var(--line); }

.focus-index {
  padding-top: 0.2rem;
  color: rgba(242, 239, 231, 0.28);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
}

.focus-card h2 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 580;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus-card p { max-width: 18rem; margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.6; }

.site-footer {
  min-height: 6.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: rgba(242, 239, 231, 0.34);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer p { margin: 0; }

.not-found-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 4.5rem);
  background:
    radial-gradient(circle at 70% 40%, rgba(159, 140, 255, 0.1), transparent 28rem),
    var(--graphite);
}

.not-found-content {
  width: min(100%, 50rem);
  margin: auto 0;
  padding: 5rem 0;
}

.not-found-code {
  margin: 0;
  color: rgba(242, 239, 231, 0.16);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(5rem, 17vw, 12rem);
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.not-found-content h1 {
  margin: 2rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 540;
  letter-spacing: -0.06em;
}

.not-found-content > p:not(.eyebrow):not(.not-found-code) {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.return-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.2rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(242, 239, 231, 0.3);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@keyframes title-in {
  from { opacity: 0; transform: translateY(0.35em); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes field-in {
  from { opacity: 0; transform: translateY(1.4rem) rotate(2deg); }
  to { opacity: 1; transform: translateY(0) rotate(1deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.65; }
  50% { transform: scale(1.1); opacity: 1; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(167, 216, 178, 0.35); }
  55%, 100% { box-shadow: 0 0 0 0.5rem rgba(167, 216, 178, 0); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 4.5rem; padding-top: 4.5rem; }
  .hero-title { font-size: clamp(8rem, 31vw, 15rem); }
  .visual-wrap { width: min(100%, 39rem); justify-self: center; }
  .focus-grid { grid-template-columns: 1fr; }
  .focus-card { min-height: auto; padding: 1.6rem 0; }
  .focus-card:not(:last-child) { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .site-shell { padding-inline: 1.15rem; }
  .site-header { min-height: 4.75rem; }
  .header-status { font-size: 0; gap: 0; }
  .header-status::after { content: "Online"; font-size: 0.62rem; letter-spacing: 0.13em; }
  .status-pulse { margin-right: 0.55rem; }
  .hero { padding: 3.5rem 0 4.5rem; gap: 3.5rem; }
  .eyebrow { margin-bottom: 2.2rem; }
  .hero-title { font-size: clamp(6.8rem, 34vw, 10rem); }
  .hero-expansion { display: grid; gap: 0.25rem; margin-top: 2.7rem; font-size: 1.35rem; }
  .hero-expansion span:not(:last-child)::after { content: ""; margin: 0; }
  .visual-wrap { padding: 0.7rem; border-radius: 1.15rem; transform: none; }
  .decision-field { border-radius: 0.75rem; }
  .visual-meta-bottom span:last-child { display: none; }
  .logit-node { width: 6rem; height: 6rem; }
  .site-footer { min-height: 7rem; align-items: flex-start; flex-direction: column; justify-content: center; gap: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
