:root {
  /* Space Grotesk" (Google Fonts), Inter" (Google Fonts), JetBrains Mono" (Google Fonts). Interactive highlights use IntersectionObserver` with `threshold: 0.15` to trigger reveals. Stagger child elements within each section by 120ms intervals — headline first. */
  --midnight: #0B1120;
  --charcoal: #111827;
  --slate-ink: #1E293B;
  --frost: #E8EDF2;
  --muted: #94A3B8;
  --deep-slate: #6B7D90;
  --teal: #47D4B0;
  --chrome: #C0CCD6;
  --hover: #2D3F56;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--midnight);
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.7;
  letter-spacing: 0.005em;
}

body::-webkit-scrollbar {
  width: 6px;
}

body::-webkit-scrollbar-track {
  background: #0B1120;
}

body::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 3px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #2D3F56;
}

a {
  color: inherit;
  text-decoration: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  background: repeating-linear-gradient(90deg, transparent, transparent calc((100% - 13 * 2rem) / 12), rgba(192, 204, 218, 0.04) calc((100% - 13 * 2rem) / 12), rgba(192, 204, 218, 0.04) calc((100% - 13 * 2rem) / 12 + 1px));
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(2rem, 6vw, 12rem);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  color: #C0CCD6;
  border-bottom: 1px solid rgba(192, 204, 218, 0);
  transition: border-color 300ms ease;
}

.topbar.scrolled {
  border-bottom-color: rgba(192, 204, 218, 0.08);
}

.wordmark,
.inquire-link,
.section-label,
figcaption {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B7D90;
}

.wordmark {
  color: #C0CCD6;
}

.inquire-link {
  color: #C0CCD6;
  padding-bottom: 4px;
  background-image: linear-gradient(#47D4B0, #47D4B0);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: bottom left;
  transition: color 300ms ease, background-size 300ms ease;
}

.inquire-link:hover {
  color: #47D4B0;
  background-size: 100% 1px;
}

.chapter {
  width: 100vw;
  min-height: 100vh;
  position: relative;
  border-top: 1px solid rgba(192, 204, 218, 0.15);
  padding: clamp(4rem, 8vh, 8rem) clamp(2rem, 6vw, 12rem);
  display: flex;
  align-items: center;
  background-color: #0B1120;
  background-image: linear-gradient(rgba(192, 204, 218, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(192, 204, 218, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
}

.chapter:first-of-type {
  border-top: 0;
}

.alt-section {
  background-color: #111827;
}

.final-section {
  min-height: 92vh;
}

.chapter-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 3;
}

.hero-copy,
.section-heading,
.final-copy {
  grid-column: 2 / span 6;
}

.matrix-panel {
  grid-column: 8 / span 4;
  align-self: center;
}

h1,
h2 {
  margin: 0;
  color: #E8EDF2;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2.05rem, 4.4vw, 4rem);
}

p {
  margin: 0;
}

.lede {
  margin-top: 1.7rem;
  color: #C0CCD6;
  font-size: clamp(1.1rem, 1.45vw, 1.5rem);
  line-height: 1.55;
  max-width: 760px;
}

.body-copy,
.text-column p,
.clause-row p,
.scope-table p {
  color: #94A3B8;
}

.body-copy {
  margin-top: 1.5rem;
  max-width: 760px;
}

.accent-line {
  width: 120px;
  height: 2px;
  background: #47D4B0;
  margin-bottom: 2rem;
}

.mono-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(71, 212, 176, 0.16);
  border-radius: 999px;
  background: rgba(71, 212, 176, 0.06);
  color: #47D4B0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  line-height: 1.2;
}

.matrix-panel,
.article-frame,
.photo-frame {
  position: relative;
  border: 1px solid rgba(192, 204, 218, 0.1);
  padding: 2rem;
}

.matrix-panel::before,
.article-frame::before,
.photo-frame::before {
  content: attr(data-label);
  position: absolute;
  top: -0.65em;
  left: 1.5rem;
  background: #0B1120;
  padding: 0 0.5rem;
  color: #6B7D90;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.alt-section .matrix-panel::before,
.alt-section .article-frame::before,
.alt-section .photo-frame::before {
  background: #111827;
}

.matrix-svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.matrix-lines path {
  fill: none;
  stroke: rgba(71, 212, 176, 0.12);
  stroke-width: 1;
}

.matrix-dots circle {
  fill: #47D4B0;
  opacity: 0.45;
  transform-box: fill-box;
  transform-origin: center;
}

.matrix-dots circle:nth-child(2),
.matrix-dots circle:nth-child(5) {
  opacity: 0.8;
}

.matrix-dots circle:nth-child(3),
.matrix-dots circle:nth-child(7) {
  opacity: 0.3;
}

.matrix-panel:hover .matrix-dots circle {
  animation: pulse 2s ease-in-out infinite;
}

.matrix-panel:hover .matrix-dots circle:nth-child(2n) {
  animation-delay: 180ms;
}

.matrix-panel:hover .matrix-dots circle:nth-child(3n) {
  animation-delay: 320ms;
}

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

.wide-frame {
  grid-column: 2 / span 8;
}

.text-column {
  grid-column: 5 / span 5;
  display: grid;
  gap: 1.25rem;
}

.clause-list {
  grid-column: 2 / span 7;
  border-top: 1px solid rgba(192, 204, 218, 0.15);
}

.clause-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(192, 204, 218, 0.15);
}

.clause-row span,
.scope-table span {
  color: #C0CCD6;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.small-frame {
  grid-column: 9 / span 3;
  align-self: end;
}

.photo-frame {
  grid-column: 2 / span 6;
  margin: 0;
}

.archival-image {
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(192, 204, 218, 0.12);
  filter: grayscale(0.85) contrast(1.1) brightness(0.85);
  background-color: #1E293B;
  background-image: linear-gradient(rgba(11, 17, 32, 0.4), rgba(11, 17, 32, 0.4)), linear-gradient(90deg, rgba(192, 204, 218, 0.08) 1px, transparent 1px), linear-gradient(rgba(192, 204, 218, 0.08) 1px, transparent 1px), radial-gradient(circle at 24% 28%, rgba(192, 204, 218, 0.28), transparent 18%), linear-gradient(135deg, transparent 0 42%, rgba(192, 204, 218, 0.18) 42% 43%, transparent 43% 100%);
  background-size: auto, 42px 42px, 42px 42px, auto, auto;
  position: relative;
}

.archival-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0B1120;
  opacity: 0.4;
  mix-blend-mode: multiply;
}

figcaption {
  margin-top: 1rem;
}

.scope-table {
  grid-column: 3 / span 8;
  border-top: 1px solid rgba(192, 204, 218, 0.15);
}

.scope-table div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(192, 204, 218, 0.15);
}

.contact-frame {
  grid-column: 8 / span 3;
  align-self: center;
}

.contact-frame p {
  color: #E8EDF2;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.reveal-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.is-visible .reveal-item,
.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .chapter {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 5rem;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .section-heading,
  .final-copy,
  .matrix-panel,
  .wide-frame,
  .text-column,
  .clause-list,
  .small-frame,
  .photo-frame,
  .scope-table,
  .contact-frame {
    grid-column: 1;
  }

  .matrix-panel {
    max-width: 520px;
  }

  .scope-table div,
  .clause-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
