:root {
  --paper: #f3f0e9;
  --paper-light: #fbfaf6;
  --ink: #12212b;
  --muted: #66727a;
  --line: #d8d5cd;
  --teal: #0e7490;
  --teal-light: #b9eee8;
  --orange: #ef633d;
  --dark: #12212b;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  color: var(--paper-light);
  background: var(--teal);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 83% 7%, rgba(185, 238, 232, .65), transparent 27rem),
    radial-gradient(circle at 8% 41%, rgba(239, 99, 61, .10), transparent 22rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 5;
  content: "";
  pointer-events: none;
  opacity: .28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

/* Content links (no utility class) pick up the accent so they read as links */
main p a:not([class]),
main li a:not([class]),
main td a:not([class]) {
  color: var(--orange);
  font-weight: 600;
  transition: color .2s ease;
}

main p a:not([class]):hover,
main li a:not([class]):hover,
main td a:not([class]):hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10;
  padding: 10px 16px;
  color: var(--paper-light);
  background: var(--ink);
  font-size: .8rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
  font-size: .8rem;
}

.brand,
.top-link,
.desktop-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--paper-light);
  background: var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: .68rem;
}

.brand-muted,
.top-link {
  color: var(--muted);
  font-weight: 500;
}

.desktop-nav {
  gap: 32px;
  margin-left: 7rem;
  color: var(--muted);
}

.desktop-nav a {
  position: relative;
  padding: 4px 0;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--orange);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.desktop-nav a,
.top-link,
.text-link,
.card-link,
.footer a {
  transition: color .2s ease, transform .2s ease;
}

.desktop-nav a:hover,
.top-link:hover,
.text-link:hover,
.card-link:hover,
.footer a:hover {
  color: var(--orange);
}

.top-link {
  gap: 8px;
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
  gap: 7vw;
  align-items: center;
  min-height: 650px;
  padding: 90px 0 110px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 23px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .14em;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(239, 99, 61, .14);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(239, 99, 61, .18); }
  50% { box-shadow: 0 0 0 8px rgba(239, 99, 61, .06); }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 24px;
  font-weight: 600;
  letter-spacing: -.065em;
  line-height: .98;
}

h1 {
  max-width: 710px;
  font-size: clamp(3.5rem, 7vw, 6.65rem);
}

h2 {
  font-size: clamp(2.45rem, 4.5vw, 4.6rem);
}

h1 em,
h2 em {
  color: var(--teal);
  font-style: normal;
}

.lede {
  max-width: 520px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 14px 18px 14px 20px;
  border: 1px solid transparent;
  font-size: .8rem;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}

.button span[aria-hidden] {
  transition: transform .25s ease;
}

.button:hover span[aria-hidden] {
  transform: translateX(4px);
}

.button:hover {
  transform: translateY(-3px);
}

.button-dark {
  color: var(--paper-light);
  background: var(--ink);
}

.button-dark:hover {
  background: var(--teal);
}

.button-light {
  color: var(--ink);
  background: var(--teal-light);
}

.text-link {
  color: var(--ink);
  font-size: .8rem;
  font-weight: 600;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 80px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .67rem;
}

.note-rule {
  width: 42px;
  height: 1px;
  background: var(--orange);
}

.signal-board {
  position: relative;
  min-height: 425px;
  padding: 22px;
  overflow: hidden;
  color: var(--paper-light);
  background:
    linear-gradient(135deg, rgba(14, 116, 144, .15), transparent 45%),
    var(--dark);
  box-shadow: 22px 22px 0 rgba(14, 116, 144, .15);
}

.signal-board::after {
  position: absolute;
  right: -80px;
  bottom: -105px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(185, 238, 232, .24);
  border-radius: 50%;
  content: "";
}

.board-topline,
.board-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(243, 240, 233, .6);
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.board-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-light);
}

.board-live .pulse-dot {
  width: 5px;
  height: 5px;
  background: var(--teal-light);
  box-shadow: none;
}

.board-core {
  position: relative;
  height: 300px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(185, 238, 232, .23);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.orbit-large {
  width: 245px;
  height: 245px;
  animation: spin 22s linear infinite;
}

.orbit-small {
  width: 155px;
  height: 155px;
  border-color: rgba(185, 238, 232, .4);
  animation: spin-reverse 16s linear infinite;
}

.core-node {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 100px;
  height: 100px;
  place-content: center;
  text-align: center;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(14, 116, 144, .17), 0 0 55px rgba(185, 238, 232, .22);
  transform: translate(-50%, -50%);
}

.core-symbol {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.core-node small {
  margin-top: 5px;
  color: var(--teal-light);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .15em;
}

.orbit-label {
  position: absolute;
  color: var(--teal-light);
  font-family: var(--mono);
  font-size: .61rem;
  letter-spacing: .13em;
}

.label-one {
  top: 24px;
  left: 20%;
}

.label-two {
  right: 12%;
  bottom: 45px;
}

.label-three {
  bottom: 20px;
  left: 18%;
}

.board-footer {
  gap: 14px;
}

.board-line {
  flex: 1;
  height: 1px;
  background: rgba(185, 238, 232, .25);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-strip div {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.signal-strip strong {
  color: var(--orange);
  font-family: var(--mono);
  font-size: .7rem;
}

.signal-strip span {
  color: var(--muted);
  font-size: .78rem;
}

.section {
  padding: 145px 0;
}

.section-heading {
  margin-bottom: 54px;
}

.section-heading .eyebrow {
  margin-bottom: 25px;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.system-card {
  position: relative;
  display: flex;
  min-height: 405px;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.system-card:hover {
  box-shadow: 12px 12px 0 rgba(18, 33, 43, .12);
  transform: translateY(-8px);
}

.system-card-dark {
  color: var(--paper-light);
  background: var(--dark);
}

.system-card-teal {
  color: var(--paper-light);
  background: var(--teal);
}

.system-card-orange {
  color: var(--ink);
  background: var(--orange);
}

.system-card::after {
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 170px;
  height: 170px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: .17;
}

.card-index,
.method-number {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .1em;
}

.card-index {
  opacity: .62;
}

.card-icon {
  margin: 70px 0 18px;
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 500;
}

.system-card h3 {
  max-width: 260px;
  margin-bottom: 14px;
  font-size: 1.55rem;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.system-card p {
  max-width: 300px;
  margin-bottom: 30px;
  font-size: .86rem;
  opacity: .76;
}

.card-link {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.focus-band {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 80px;
  align-items: center;
  margin: 0 calc(50% - 50vw);
  padding: 115px max(24px, calc((100vw - 1180px) / 2));
  color: var(--paper-light);
  background: var(--dark);
}

.focus-intro .eyebrow {
  color: var(--teal-light);
}

.focus-intro h2 {
  color: var(--paper-light);
}

.focus-intro h2 em {
  color: var(--teal-light);
}

.focus-intro > p:not(.eyebrow) {
  max-width: 400px;
  color: rgba(243, 240, 233, .65);
  font-size: .95rem;
}

.text-link-light {
  color: var(--teal-light);
}

.pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 190px;
  padding: 28px;
  border: 1px solid rgba(185, 238, 232, .24);
  background: rgba(255, 255, 255, .035);
}

.pipeline-step {
  display: flex;
  min-width: 88px;
  flex-direction: column;
  gap: 5px;
}

.step-number {
  color: var(--orange);
  font-family: var(--mono);
  font-size: .65rem;
}

.pipeline-step strong {
  font-size: .95rem;
}

.pipeline-step small {
  color: rgba(243, 240, 233, .55);
  font-family: var(--mono);
  font-size: .62rem;
}

.pipeline-arrow {
  color: var(--teal-light);
  font-size: 1.5rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.method-item {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.method-number {
  color: var(--orange);
}

.method-item h3 {
  margin: 50px 0 12px;
  font-size: 1.25rem;
}

.method-item p {
  color: var(--muted);
  font-size: .85rem;
}

.stack-section {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 80px;
  padding: 100px 0 150px;
  border-top: 1px solid var(--line);
}

.stack-heading h2 {
  font-size: clamp(2rem, 3.5vw, 3.4rem);
}

.stack-heading h2 em {
  color: var(--orange);
}

.stack-list {
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-list span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, .35);
  font-family: var(--mono);
  font-size: .68rem;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.stack-list span:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-3px);
}

.contact-panel {
  position: relative;
  padding: 80px;
  overflow: hidden;
  color: var(--paper-light);
  background:
    linear-gradient(120deg, rgba(14, 116, 144, .9), rgba(14, 116, 144, .55)),
    var(--teal);
}

.contact-panel::after,
.contact-panel::before {
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(185, 238, 232, .3);
  border-radius: 50%;
  content: "";
}

.contact-panel::before {
  right: -15px;
  bottom: -95px;
  width: 330px;
  height: 330px;
}

.contact-panel .eyebrow {
  color: var(--teal-light);
}

.contact-panel h2 {
  position: relative;
  z-index: 1;
  color: var(--paper-light);
}

.contact-panel h2 em {
  color: var(--teal-light);
}

.contact-panel > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  color: rgba(243, 240, 233, .72);
}

.contact-actions {
  position: relative;
  z-index: 1;
  margin-top: 33px;
}

/* Content subpages (ai.html, projects.html, ...) */
.subpage {
  max-width: 780px;
  padding: 70px 0 110px;
}

.subpage-header {
  margin-bottom: 60px;
}

.subpage h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  margin-bottom: 18px;
}

.subpage-lede {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.08rem;
}

.subpage h2 {
  margin-top: 80px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.subpage h3 {
  margin: 40px 0 10px;
  font-size: 1.2rem;
  letter-spacing: -.03em;
}

.subpage p,
.subpage li {
  color: var(--muted);
  font-size: .96rem;
}

.subpage ul {
  padding-left: 20px;
}

.subpage li {
  margin-bottom: 8px;
}

.subpage li::marker {
  color: var(--orange);
}

.subpage strong {
  color: var(--ink);
}

.subpage table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  font-size: .88rem;
}

.subpage th {
  color: var(--ink);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
}

.subpage th,
.subpage td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.subpage td:first-child {
  color: var(--ink);
  font-weight: 600;
}

.subpage blockquote {
  margin: 0 0 40px;
  padding-left: 22px;
  border-left: 2px solid var(--orange);
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: -.02em;
}

.subpage-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 30px 0;
  padding: 26px 28px;
  color: var(--paper-light);
  background: var(--dark);
}

.subpage-flow div {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
}

.subpage-flow div + div {
  border-top: 1px solid rgba(185, 238, 232, .16);
}

.subpage-flow .step-number {
  min-width: 22px;
}

.subpage-flow small {
  color: rgba(243, 240, 233, .55);
  font-family: var(--mono);
  font-size: .64rem;
}

.subpage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.subpage-nav a {
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, .35);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .2s ease, border-color .2s ease;
}

.subpage-nav a:hover,
.subpage-nav a[aria-current] {
  border-color: var(--teal);
  color: var(--teal);
}

.footer-wordmark {
  display: block;
  padding-top: 90px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  color: rgba(18, 33, 43, .08);
  font-size: clamp(3rem, 11.5vw, 9.5rem);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .82;
  text-align: center;
  user-select: none;
}

@supports (-webkit-text-stroke: 1px black) {
  .footer-wordmark {
    color: transparent;
    -webkit-text-stroke: 1px rgba(18, 33, 43, .22);
    transition: -webkit-text-stroke-color .4s ease;
  }

  .footer-wordmark:hover {
    -webkit-text-stroke-color: var(--teal);
  }
}

.footer .footer-tagline {
  color: var(--muted);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
}

.footer a {
  color: var(--ink);
}

.reveal {
  animation: reveal .75s both;
}

.reveal-delay {
  animation-delay: .12s;
}

.reveal-delay-two {
  animation-delay: .24s;
}

/* When JS runs, below-the-fold reveals switch to scroll-triggered transitions */
.js .reveal {
  animation: none;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}

.js .reveal-delay {
  transition-delay: .12s;
}

.js .reveal-delay-two {
  transition-delay: .24s;
}

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

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes spin-reverse {
  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 75px 0 90px;
  }

  .signal-board {
    max-width: 620px;
  }

  .focus-band,
  .stack-section {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .focus-band {
    padding-top: 90px;
    padding-bottom: 90px;
  }

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

  .system-card:last-child {
    grid-column: span 2;
  }

  .method-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 26px;
  }

  .section {
    padding: 100px 0;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 32px, 560px);
  }

  .topbar {
    min-height: 72px;
  }

  .desktop-nav {
    display: none;
  }

  .brand-muted {
    display: none;
  }

  h1 {
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .signal-strip,
  .system-grid,
  .method-grid {
    grid-template-columns: 1fr 1fr;
  }

  .signal-strip {
    gap: 20px 10px;
  }

  .signal-strip div {
    gap: 9px;
  }

  .signal-strip span {
    font-size: .7rem;
  }

  .system-card {
    min-height: 350px;
    padding: 22px;
  }

  .system-card:last-child {
    grid-column: span 2;
  }

  .card-icon {
    margin-top: 50px;
  }

  .pipeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px 12px;
  }

  .pipeline-arrow {
    display: none;
  }

  .contact-panel {
    padding: 55px 28px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
