:root {
  --ink: #102022;
  --muted: #637174;
  --paper: #f4f1e9;
  --warm: #e8dfcf;
  --acid: #d5f36a;
  --coral: #ff735c;
  --line: rgba(16, 32, 34, .16);
  --dark-line: rgba(244, 241, 233, .18);
  --surface-dark: #102022;
  --method-text: #f4f1e9;
  --mono: 'DM Mono', monospace;
  --sans: 'Manrope', sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f1e9;
  --muted: #a5b1ad;
  --paper: #101b1d;
  --warm: #1b2b2d;
  --line: rgba(244, 241, 233, .18);
  --dark-line: rgba(244, 241, 233, .2);
  --surface-dark: #0a1112;
}

html:not([data-theme="dark"]) { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; transition: background-color .25s ease, color .25s ease; }
a { color: inherit; text-decoration: none; }
.section-shell { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }
.site-header { align-items: center; display: flex; justify-content: space-between; margin: 0 auto; padding: 28px 0; width: min(1180px, calc(100% - 64px)); }
.brand { align-items: center; display: flex; font-size: 13px; font-weight: 800; gap: 11px; letter-spacing: -.02em; }
.brand-mark { align-items: center; background: var(--ink); color: var(--acid); display: inline-flex; font-family: var(--mono); font-size: 10px; height: 31px; justify-content: center; letter-spacing: -.08em; width: 31px; }
.main-nav { align-items: center; display: flex; font-size: 12px; font-weight: 700; gap: 30px; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover, .text-link:hover, .footer-links a:hover { color: var(--coral); }
.nav-contact { border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.theme-toggle { align-items: center; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: inline-flex; font-family: var(--mono); font-size: 9px; gap: 8px; letter-spacing: .08em; padding: 8px 10px; text-transform: uppercase; transition: border-color .2s ease, color .2s ease; }
.theme-toggle:hover { border-color: var(--coral); color: var(--coral); }
.theme-icon { color: var(--coral); font-size: 14px; line-height: 1; }
.menu-toggle { display: none; }
.hero { align-items: center; display: grid; gap: 8%; grid-template-columns: 1.02fr .98fr; min-height: 620px; padding: 52px 0 100px; }
.eyebrow, .section-label, .diagram-caption, .diagram-index, .service-number { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { align-items: center; display: flex; gap: 9px; margin: 0 0 28px; }
.eyebrow-dot { background: var(--coral); border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(54px, 7vw, 92px); font-weight: 700; letter-spacing: -.075em; line-height: .98; margin-bottom: 32px; max-width: 680px; }
h1 em, h2 span, .services-heading h2 span { color: var(--coral); font-style: normal; }
.hero-lede { color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 480px; }
.hero-actions { align-items: center; display: flex; gap: 27px; margin-top: 38px; }
.button { font-size: 12px; font-weight: 800; padding: 16px 20px; }
.button-primary { background: var(--ink); color: var(--paper); transition: background .2s ease, transform .2s ease; }
.button-primary:hover { background: var(--coral); transform: translateY(-3px); }
.button-primary span { color: var(--acid); margin-left: 17px; }
.text-link { border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 800; padding-bottom: 4px; }
.text-link span, .contact-link span, .service-card a span { color: var(--coral); margin-left: 8px; }
.hero-diagram { background: #183134; height: 470px; overflow: hidden; position: relative; }
.system-map { background: #183134; display: block; height: 100%; inset: 0; position: absolute; width: 100%; }
.map-background { fill: #183134; }
.map-caption, .map-index { fill: #d5f36a; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.map-flow { fill: none; stroke-width: 1.5; }
.map-flow-acid { stroke: #d5f36a; }
.map-flow-coral { stroke: #ff735c; }
.map-node { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-anchor: middle; text-transform: uppercase; }
.map-node circle, .map-node rect { vector-effect: non-scaling-stroke; }
.map-node text { dominant-baseline: middle; }
.map-node-edge circle, .map-node-data circle { fill: #d5f36a; }
.map-node-edge text, .map-node-data text { fill: #102022; }
.map-node-event circle { fill: transparent; stroke: #d5f36a; stroke-dasharray: 3 5; stroke-width: 1; }
.map-node-event text { fill: #d5f36a; }
.map-node-core circle { fill: #ff735c; }
.map-node-core text { fill: #102022; font-size: 9px; }
.map-node-cloud rect { fill: #ff735c; }
.map-node-cloud text, .map-node-knowledge text { fill: #102022; }
.map-node-knowledge circle { fill: #d5f36a; }
.map-note { fill: rgba(213,243,106,.68); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.signal-strip { background: var(--warm); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.signal-grid { align-items: center; display: grid; grid-template-columns: 1.8fr repeat(3, 1fr); min-height: 146px; }
.signal-intro { font-size: 13px; line-height: 1.55; margin: 0; }
.signal-intro strong { font-weight: 800; }
.signal-item { align-items: center; border-left: 1px solid var(--line); display: flex; gap: 15px; height: 57px; padding-left: 30px; }
.signal-item strong { font-size: 38px; font-weight: 700; letter-spacing: -.08em; }
.signal-item span { color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.5; text-transform: uppercase; }
.section-space { padding-bottom: 125px; padding-top: 125px; }
.section-label { display: flex; gap: 25px; }
.section-label span:first-child { color: var(--coral); }
.about { display: grid; gap: 8%; grid-template-columns: 1fr 3fr; }
.about-content { display: grid; gap: 13%; grid-template-columns: 1.35fr 1fr; }
.about h2, .services-heading h2, .stack h2 { font-size: clamp(35px, 4.5vw, 58px); font-weight: 600; letter-spacing: -.07em; line-height: 1.03; margin: -8px 0 0; }
.about-text { color: var(--muted); font-size: 14px; line-height: 1.75; padding-top: 4px; }
.about-text p + p { margin-top: 21px; }
.services { border-top: 1px solid var(--line); }
.services-heading { align-items: end; display: flex; justify-content: space-between; margin: 54px 0 53px; }
.services-heading p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 4px; max-width: 240px; }
.service-list { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.service-card { min-height: 370px; padding: 27px 31px 30px; position: relative; }
.service-card + .service-card { border-left: 1px solid var(--line); }
.service-number { color: var(--muted); }
.service-icon { color: var(--coral); font-size: 41px; font-weight: 400; line-height: 1; margin: 39px 0 23px; }
.service-card h3 { font-size: 20px; letter-spacing: -.045em; margin-bottom: 14px; }
.service-card p { color: var(--muted); font-size: 13px; line-height: 1.65; max-width: 280px; }
.service-card a { bottom: 30px; font-size: 11px; font-weight: 800; left: 31px; position: absolute; }
.service-card-featured { background: var(--coral); color: var(--ink); }
.service-card-featured .service-icon, .service-card-featured a span { color: var(--ink); }
.service-card-featured p { color: rgba(16,32,34,.72); }
.service-disclaimer { border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; line-height: 1.7; margin: 25px 0 0; max-width: 760px; }
.service-disclaimer span { color: var(--coral); display: block; font-weight: 500; letter-spacing: .08em; margin-bottom: 4px; text-transform: uppercase; }
.method { background: var(--surface-dark); color: var(--method-text); }
.method .section-label { color: var(--method-text); }
.method-intro { align-items: end; display: grid; gap: 15%; grid-template-columns: 1fr 1fr; margin: 55px 0 75px; }
.method-intro h2 { font-size: clamp(44px, 6vw, 77px); letter-spacing: -.08em; line-height: .97; margin: 0; }
.method-intro em { color: var(--acid); font-style: normal; }
.method-intro p { color: rgba(244,241,233,.66); font-size: 14px; line-height: 1.7; margin: 0; max-width: 340px; }
.method-steps { border-top: 1px solid var(--dark-line); display: grid; grid-template-columns: repeat(3, 1fr); }
.method-step { padding: 25px 30px 10px 0; }
.method-step + .method-step { border-left: 1px solid var(--dark-line); padding-left: 30px; }
.method-step span { color: var(--acid); font-family: var(--mono); font-size: 11px; }
.method-step h3 { font-size: 21px; margin: 62px 0 10px; }
.method-step p { color: rgba(244,241,233,.57); font-size: 12px; max-width: 170px; }
.stack { border-bottom: 1px solid var(--line); display: grid; gap: 8%; grid-template-columns: 1fr 3fr; }
.stack-layout { display: grid; gap: 14%; grid-template-columns: 1fr 1fr; }
.stack-cloud { align-content: start; display: flex; flex-wrap: wrap; gap: 9px; padding-top: 4px; }
.stack-cloud span { border: 1px solid var(--line); font-family: var(--mono); font-size: 10px; padding: 9px 11px; }
.stack-cloud .accent { background: var(--acid); border-color: var(--acid); color: #102022; }
.contact { align-items: end; background: var(--coral); display: flex; justify-content: space-between; margin-bottom: 100px; min-height: 330px; padding: 48px 55px; }
.contact .eyebrow { margin-bottom: 55px; }
.contact h2 { font-size: clamp(36px, 5vw, 65px); letter-spacing: -.075em; line-height: .98; margin: 0; }
.contact-link { border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 800; padding-bottom: 8px; }
.contact-link span { color: var(--ink); }
.site-footer { align-items: center; border-top: 1px solid var(--line); color: var(--muted); display: flex; font-family: var(--mono); font-size: 9px; justify-content: space-between; padding-bottom: 30px; padding-top: 24px; text-transform: uppercase; }
.footer-links { display: flex; gap: 20px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .section-shell, .site-header { width: min(100% - 40px, 600px); }
  .site-header { padding: 20px 0; }
  .theme-toggle { margin-left: auto; margin-right: 12px; }
  .menu-toggle { align-items: center; background: none; border: 0; color: var(--ink); display: flex; font-family: var(--mono); font-size: 10px; gap: 8px; text-transform: uppercase; }
  .menu-icon { font-size: 21px; line-height: .5; transition: transform .2s ease; }
  .menu-toggle[aria-expanded="true"] .menu-icon { transform: rotate(45deg); }
  .main-nav { background: var(--paper); border-bottom: 1px solid var(--line); display: none; flex-direction: column; gap: 20px; left: 0; padding: 23px 20px 27px; position: absolute; right: 0; top: 72px; z-index: 10; }
  .main-nav.is-open { display: flex; }
  .nav-contact { margin-top: 5px; }
  .hero { display: flex; flex-direction: column; min-height: 0; padding: 70px 0 70px; }
  h1 { font-size: clamp(49px, 14vw, 72px); }
  .hero-diagram { height: 355px; margin-top: 35px; width: 100%; }
  .signal-grid { gap: 22px; grid-template-columns: 1fr 1fr; padding: 27px 0; }
  .signal-intro { grid-column: 1 / -1; }
  .signal-item { border-left: 0; gap: 10px; height: auto; padding-left: 0; }
  .signal-item strong { font-size: 30px; }
  .section-space { padding-bottom: 82px; padding-top: 82px; }
  .about, .stack { display: block; }
  .about-content { display: block; margin-top: 47px; }
  .about-text { margin-top: 32px; }
  .services-heading { align-items: start; display: block; margin: 45px 0 38px; }
  .services-heading p { margin-top: 25px; }
  .service-list { display: block; }
  .service-card { min-height: 330px; }
  .service-card + .service-card { border-left: 0; border-top: 1px solid var(--line); }
  .method-intro { display: block; margin: 45px 0 60px; }
  .method-intro p { margin-top: 30px; }
  .method-steps { display: block; }
  .method-step { padding: 23px 0 12px; }
  .method-step + .method-step { border-left: 0; border-top: 1px solid var(--dark-line); padding-left: 0; }
  .method-step h3 { margin-top: 30px; }
  .stack-layout { display: block; margin-top: 45px; }
  .stack-cloud { margin-top: 32px; }
  .contact { align-items: start; display: block; margin-bottom: 60px; min-height: 360px; padding: 34px 28px; }
  .contact .eyebrow { margin-bottom: 80px; }
  .contact-link { display: inline-block; margin-top: 50px; }
  .site-footer { align-items: start; flex-direction: column; gap: 18px; padding-bottom: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
