:root {
  color-scheme: light;
  --bg: #f7f1e8;
  --bg-strong: #efe2d1;
  --panel: #fffdf9;
  --panel-soft: #fbf6ee;
  --panel-warm: #f3eadf;
  --line: #e5d8c8;
  --line-strong: #c8b5a0;
  --ink: #2d241d;
  --muted: #74685e;
  --accent: #a35f45;
  --accent-hover: #874a35;
  --accent-soft: #f3ded2;
  --accent-ink: #fffaf5;
  --success: #047857;
  --danger: #b42318;
  --warning: #9a5b13;
  --code-bg: #211814;
  --code-ink: #f9efe6;
  --focus: 0 0 0 3px rgba(163, 95, 69, 0.18);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 0 rgba(45, 36, 29, 0.04);
  --shadow-sm: 0 8px 22px rgba(45, 36, 29, 0.07);
  --shadow-md: 0 18px 48px rgba(45, 36, 29, 0.1);
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  --font-display: Georgia, "Times New Roman", "Noto Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 250, 241, 0.9), transparent 34rem),
    radial-gradient(circle at 78% 8%, rgba(243, 222, 210, 0.72), transparent 25rem),
    linear-gradient(135deg, var(--bg) 0%, #faf6ee 48%, #f3e9dc 100%);
  font-family: var(--font-body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.landing-body {
  --landing-bg: oklch(0.973 0.014 18);
  --landing-bg-soft: oklch(0.93 0.035 23);
  --landing-ink: oklch(0.17 0.05 24);
  --landing-muted: oklch(0.42 0.046 28);
  --landing-line: oklch(0.79 0.055 30);
  --landing-line-strong: oklch(0.56 0.09 25);
  --landing-paper: oklch(0.992 0.008 28);
  --landing-paper-soft: oklch(0.935 0.028 45);
  --landing-accent: oklch(0.49 0.17 24);
  --landing-accent-deep: oklch(0.28 0.12 335);
  --landing-green: oklch(0.58 0.13 154);
  --landing-blue: oklch(0.5 0.11 230);
  --landing-gold: oklch(0.76 0.12 77);
  --landing-radius: 8px;
  position: relative;
  min-height: 100vh;
  color: var(--landing-ink);
  background:
    linear-gradient(115deg, transparent 0 16%, oklch(0.69 0.13 24 / 0.1) 16% 17%, transparent 17% 48%, oklch(0.61 0.11 168 / 0.12) 48% 49%, transparent 49%),
    linear-gradient(90deg, oklch(0.82 0.028 32 / 0.2) 1px, transparent 1px),
    linear-gradient(180deg, oklch(0.82 0.028 32 / 0.2) 1px, transparent 1px),
    linear-gradient(142deg, var(--landing-bg) 0%, oklch(0.952 0.035 355) 42%, oklch(0.91 0.04 154) 100%);
  background-size: auto, 52px 52px, 52px 52px, auto;
  overflow-x: hidden;
}

.landing-body a {
  color: inherit;
}

.landing-skip-link {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 12px;
  z-index: 100;
  border: 1px solid oklch(0.62 0.11 24 / 0.48);
  border-radius: 999px;
  padding: 10px 14px;
  background: oklch(0.995 0.006 28);
  color: var(--landing-ink);
  font-weight: 760;
  text-decoration: none;
  touch-action: manipulation;
  transform: translateY(calc(-100% - 24px));
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-skip-link:focus-visible {
  transform: translateY(0);
  box-shadow: 0 0 0 3px oklch(0.525 0.128 25 / 0.22);
}

#main-content,
.landing-section,
.landing-layers,
.landing-final {
  scroll-margin-top: calc(92px + env(safe-area-inset-top));
}

#main-content:focus {
  outline: none;
}

.landing-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.landing-thread {
  position: absolute;
  display: block;
  width: 58vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, oklch(0.5 0.16 24 / 0.2), oklch(0.58 0.13 154 / 0.22), transparent);
  transform-origin: center;
}

.landing-thread::before,
.landing-thread::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 10px;
  height: 10px;
  border: 1px solid oklch(0.44 0.12 24 / 0.32);
  border-radius: 2px;
  background: oklch(0.985 0.012 28 / 0.72);
}

.landing-thread::before {
  left: 18%;
}

.landing-thread::after {
  right: 24%;
}

.landing-thread-a {
  top: 16%;
  left: -18vw;
  transform: rotate(-18deg);
}

.landing-thread-b {
  top: 42%;
  right: -16vw;
  transform: rotate(24deg);
}

.landing-thread-c {
  bottom: 18%;
  left: 12vw;
  transform: rotate(8deg);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 0 12px;
  backdrop-filter: blur(18px);
}

.landing-wordmark,
.landing-nav-cta,
.landing-primary,
.landing-secondary,
.landing-links a {
  text-decoration: none;
}

.landing-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-weight: 700;
  letter-spacing: 0;
}

.landing-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid oklch(0.63 0.13 24 / 0.44);
  border-radius: 50%;
  background:
    linear-gradient(145deg, oklch(0.995 0.008 28), oklch(0.93 0.034 23));
  color: var(--landing-accent);
  font-size: 12px;
  font-weight: 800;
}

.landing-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  color: oklch(0.36 0.055 28);
  font-size: 14px;
}

.landing-links a,
.landing-nav-cta,
.landing-primary,
.landing-secondary {
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-links a:hover {
  color: var(--landing-accent);
}

.landing-links a,
.landing-nav-cta,
.landing-primary,
.landing-secondary {
  outline: none;
  touch-action: manipulation;
}

.landing-links a:focus-visible,
.landing-nav-cta:focus-visible,
.landing-primary:focus-visible,
.landing-secondary:focus-visible {
  box-shadow: 0 0 0 3px oklch(0.525 0.128 25 / 0.22);
}

.landing-nav-cta {
  justify-self: end;
  border: 1px solid oklch(0.62 0.11 24 / 0.48);
  border-radius: 999px;
  padding: 10px 16px;
  background: oklch(0.995 0.006 28 / 0.82);
  color: var(--landing-ink);
  font-weight: 650;
}

.landing-nav-cta:hover,
.landing-primary:hover,
.landing-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px oklch(0.33 0.07 24 / 0.16);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(380px, 1.07fr);
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(650px, 84vh, 840px);
  margin: 0 auto;
  padding: clamp(44px, 8vw, 94px) 0 clamp(44px, 7vw, 74px);
}

.landing-kicker {
  margin: 0 0 16px;
  color: var(--landing-accent);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.landing-hero h1 {
  margin: 0;
  max-width: 9ch;
  font-family: var(--font-body);
  font-size: clamp(76px, 11vw, 150px);
  line-height: 0.84;
  letter-spacing: 0;
  text-wrap: balance;
}

.landing-hero h1 span {
  display: block;
}

.landing-hero h1 span + span {
  margin-left: -0.04em;
}

.landing-lede {
  max-width: 22em;
  margin: 28px 0 0;
  color: oklch(0.42 0.045 25);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.landing-primary,
.landing-secondary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 760;
}

.landing-primary {
  background:
    linear-gradient(135deg, oklch(0.19 0.055 24), oklch(0.29 0.11 338));
  color: oklch(0.995 0.006 28);
}

body.landing-body a.landing-primary {
  color: oklch(0.995 0.006 28);
}

.landing-secondary {
  border: 1px solid oklch(0.62 0.11 24 / 0.34);
  background: oklch(0.995 0.006 28 / 0.7);
  color: var(--landing-ink);
}

.landing-atlas {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  display: grid;
  gap: 16px;
  margin: 0;
  border: 1px solid oklch(0.67 0.11 24 / 0.42);
  border-radius: 20px;
  padding: clamp(18px, 3vw, 26px);
  background:
    linear-gradient(135deg, oklch(0.995 0.006 28 / 0.96), oklch(0.925 0.036 350 / 0.88)),
    linear-gradient(180deg, var(--landing-paper), var(--landing-paper-soft));
  box-shadow:
    0 34px 80px oklch(0.3 0.06 24 / 0.18),
    inset 0 1px 0 oklch(1 0 0 / 0.8);
  transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.landing-atlas:hover {
  box-shadow:
    0 44px 98px oklch(0.3 0.06 24 / 0.22),
    inset 0 1px 0 oklch(1 0 0 / 0.82);
}

.landing-atlas::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed oklch(0.63 0.09 30 / 0.5);
  border-radius: 12px;
  pointer-events: none;
}

.landing-relation-path {
  position: absolute;
  inset: 8% 6%;
  z-index: 0;
  overflow: hidden;
  border-radius: 16px;
  pointer-events: none;
}

.landing-relation-path span {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, oklch(0.45 0.13 24 / 0.42), transparent);
  transform-origin: left center;
}

.landing-relation-path span:nth-child(1) {
  top: 25%;
  left: 12%;
  width: 68%;
  transform: rotate(18deg);
}

.landing-relation-path span:nth-child(2) {
  top: 58%;
  left: 3%;
  width: 76%;
  transform: rotate(-12deg);
}

.landing-relation-path span:nth-child(3) {
  top: 76%;
  left: 22%;
  width: 62%;
  transform: rotate(8deg);
}

.landing-atlas-topline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: var(--landing-muted);
  font-size: 12px;
  font-weight: 760;
}

.landing-atlas-topline span {
  border-bottom: 1px solid var(--landing-line);
  padding-bottom: 10px;
}

.landing-dialogue-paper,
.landing-memory-note {
  position: relative;
  z-index: 1;
  border: 1px solid oklch(0.7 0.09 28 / 0.42);
  border-radius: var(--landing-radius);
  background: var(--landing-paper);
}

.landing-dialogue-paper {
  padding: clamp(22px, 4vw, 38px);
  transform: translateZ(36px);
}

.landing-paper-label {
  margin: 0 0 18px;
  color: var(--landing-muted);
  font-size: 13px;
}

.landing-dialogue-paper blockquote {
  max-width: 22em;
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(26px, 3.8vw, 44px);
  line-height: 1.28;
}

.landing-state-brief {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.landing-state-row {
  border: 1px solid oklch(0.68 0.09 24 / 0.38);
  border-radius: var(--landing-radius);
  padding: 10px 12px;
  background: oklch(0.965 0.014 28);
}

.landing-state-row span {
  display: block;
  color: var(--landing-ink);
  font-size: 13px;
  font-weight: 720;
}

.landing-state-row p {
  margin: 4px 0 0;
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.45;
}

.landing-memory-note {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px;
  transform: translateZ(22px);
}

.landing-memory-note span {
  color: var(--landing-accent-deep);
  font-weight: 780;
}

.landing-memory-note p {
  margin: 0;
  color: var(--landing-muted);
}

.landing-floating-slip {
  position: absolute;
  z-index: 3;
  max-width: 220px;
  border: 1px solid oklch(0.65 0.1 24 / 0.38);
  border-radius: 10px;
  padding: 13px 14px;
  background: oklch(0.985 0.012 28 / 0.9);
  box-shadow: 0 22px 52px oklch(0.24 0.06 24 / 0.16);
  backdrop-filter: blur(12px);
}

.landing-floating-slip span {
  display: block;
  margin-bottom: 6px;
  color: var(--landing-accent);
  font-size: 12px;
  font-weight: 820;
}

.landing-floating-slip p {
  margin: 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.35;
}

.landing-floating-slip-a {
  right: 28px;
  top: -36px;
}

.landing-floating-slip-b {
  left: calc(clamp(18px, 3vw, 26px) - 100px);
  bottom: -20px;
  max-width: 220px;
  transform: translateZ(28px);
}

.landing-section,
.landing-layers,
.landing-final {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.landing-section {
  padding: clamp(64px, 10vw, 118px) 0;
}

.landing-section-split,
.landing-boundary {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 6vw, 76px);
  border-top: 1px solid var(--landing-line);
}

.landing-section h2,
.landing-layers h2,
.landing-final h2 {
  margin: 0;
  font-size: clamp(36px, 5.4vw, 76px);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

.landing-copy-stack {
  display: grid;
  gap: 22px;
  color: var(--landing-muted);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.48;
}

.landing-copy-stack p {
  margin: 0;
}

.landing-layers {
  padding: clamp(58px, 9vw, 110px) 0;
  border-top: 1px solid var(--landing-line);
}

.landing-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(20px, 5vw, 70px);
  align-items: end;
}

.landing-layer-list {
  display: grid;
  gap: 0;
  margin-top: clamp(34px, 5vw, 58px);
  border-top: 1px solid var(--landing-line-strong);
}

.landing-layer-list article {
  display: grid;
  grid-template-columns: 72px minmax(170px, 0.42fr) minmax(0, 1fr);
  gap: clamp(16px, 4vw, 46px);
  align-items: baseline;
  border-bottom: 1px solid var(--landing-line);
  padding: 24px 0;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-layer-list article:hover {
  transform: translateX(8px);
}

.landing-layer-list span {
  color: var(--landing-accent);
  font-weight: 820;
}

.landing-layer-list h3 {
  margin: 0;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.1;
}

.landing-layer-list p {
  max-width: 48ch;
  margin: 0;
  color: var(--landing-muted);
  font-size: 18px;
}

.landing-boundary-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--landing-muted);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.42;
}

.landing-boundary-list li {
  border-top: 1px solid var(--landing-line);
  padding-top: 16px;
}

.landing-final {
  display: grid;
  gap: 24px;
  justify-items: start;
  border-top: 1px solid var(--landing-line);
  padding: clamp(64px, 10vw, 118px) 0 clamp(54px, 8vw, 92px);
}

.landing-final h2 {
  max-width: 12em;
}

@media (prefers-reduced-motion: no-preference) {
  body.landing-motion-ready [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
  }

  body.landing-motion-ready [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .landing-hero h1 span {
    animation: landing-title-in 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .landing-hero h1 span + span {
    animation-delay: 80ms;
  }

  .landing-atlas {
    animation: landing-panel-in 860ms cubic-bezier(0.16, 1, 0.3, 1) both, landing-float 7s ease-in-out 900ms infinite;
  }

  .landing-floating-slip-a {
    animation: landing-slip-a 6.5s ease-in-out 500ms infinite;
  }

  .landing-floating-slip-b {
    animation: landing-slip-b 7.2s ease-in-out 700ms infinite;
  }

  .landing-thread-a {
    animation: landing-thread-drift-a 14s ease-in-out infinite;
  }

  .landing-thread-b {
    animation: landing-thread-drift-b 16s ease-in-out infinite;
  }

  .landing-thread-c {
    animation: landing-thread-drift-c 18s ease-in-out infinite;
  }
}

@keyframes landing-title-in {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(22px);
  }
  to {
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

@keyframes landing-panel-in {
  from {
    opacity: 0;
    transform: perspective(1100px) rotateX(5deg) rotateY(-8deg) translateY(24px);
  }
  to {
    opacity: 1;
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0);
  }
}

@keyframes landing-float {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@keyframes landing-slip-a {
  0%, 100% {
    transform: translate3d(0, 0, 44px);
  }
  50% {
    transform: translate3d(-10px, 8px, 44px);
  }
}

@keyframes landing-slip-b {
  0%, 100% {
    transform: translate3d(0, 0, 44px);
  }
  50% {
    transform: translate3d(12px, -8px, 44px);
  }
}

@keyframes landing-thread-drift-a {
  0%, 100% {
    transform: rotate(-18deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(-14deg) translate3d(34px, 18px, 0);
  }
}

@keyframes landing-thread-drift-b {
  0%, 100% {
    transform: rotate(24deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(19deg) translate3d(-28px, -14px, 0);
  }
}

@keyframes landing-thread-drift-c {
  0%, 100% {
    transform: rotate(8deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(12deg) translate3d(18px, -22px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-atlas,
  .landing-floating-slip,
  .landing-thread,
  .landing-hero h1 span {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
@media (max-width: 840px) {
  .landing-atmosphere {
    opacity: 0.65;
  }

  .landing-nav {
    grid-template-columns: 1fr auto;
    justify-items: start;
    row-gap: 12px;
    width: min(100% - 28px, 1180px);
    padding-top: calc(16px + env(safe-area-inset-top));
    backdrop-filter: none;
  }

  .landing-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 14px;
    font-size: 13px;
  }

  .landing-nav-cta {
    justify-self: end;
    padding: 9px 14px;
    font-size: 14px;
  }

  .landing-hero,
  .landing-section-split,
  .landing-boundary,
  .landing-section-heading {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    width: min(100% - 28px, 1180px);
    min-height: auto;
    gap: 28px;
    padding-top: 34px;
  }

  .landing-kicker {
    margin-bottom: 12px;
    font-size: 13px;
  }

  .landing-hero h1 {
    font-size: clamp(56px, 16vw, 68px);
    line-height: 0.9;
  }

  .landing-lede {
    max-width: 18em;
    margin-top: 22px;
    font-size: clamp(20px, 5.6vw, 25px);
    line-height: 1.28;
  }

  .landing-actions {
    gap: 10px;
    margin-top: 28px;
  }

  .landing-primary,
  .landing-secondary {
    min-height: 44px;
    padding: 11px 15px;
    font-size: 14px;
  }

  .landing-atlas {
    width: 100%;
    gap: 11px;
    border-radius: 14px;
    padding: 14px;
    transform: none;
  }

  .landing-atlas::before {
    inset: 10px;
  }

  .landing-atlas-topline {
    gap: 6px;
    font-size: 11px;
  }

  .landing-atlas-topline span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .landing-dialogue-paper {
    padding: 18px;
  }

  .landing-paper-label {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .landing-dialogue-paper blockquote {
    max-width: none;
    font-size: clamp(23px, 7vw, 30px);
    line-height: 1.34;
  }

  .landing-state-brief {
    gap: 7px;
  }

  .landing-state-row {
    padding: 9px 10px;
  }

  .landing-memory-note {
    gap: 8px;
    padding: 14px;
  }

  .landing-floating-slip {
    position: relative;
    inset: auto;
    max-width: none;
    padding: 12px 13px;
    transform: none;
  }

  .landing-floating-slip-b {
    justify-self: start;
  }

  .landing-memory-note,
  .landing-layer-list article {
    grid-template-columns: 1fr;
  }

  .landing-layer-list article {
    gap: 10px;
  }
}
