:root {
  --paper: #f3efe8;
  --paper-deep: #e9e3d9;
  --ink: #181714;
  --muted: #68635c;
  --line: rgba(24, 23, 20, 0.16);
  --accent: #c9694a;
  --dark: #1b1a17;
  --radius: 18px;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(24, 23, 20, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 72px;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 2px; pointer-events: none; }
.scroll-progress i { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px);
}
.wordmark { display: inline-flex; align-items: center; gap: .7rem; width: fit-content; text-decoration: none; font-weight: 650; letter-spacing: -.02em; }
.wordmark-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 50%; font: 500 .67rem/1 "DM Mono", monospace; }
.desktop-nav { display: flex; gap: 2rem; }
.desktop-nav a, .header-cta { position: relative; text-decoration: none; font-size: .78rem; font-weight: 600; }
.desktop-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.5rem; height: 1px; background: var(--ink); transition: right .25s ease; }
.desktop-nav a:hover::after, .desktop-nav a[aria-current="true"]::after { right: 0; }
.header-cta { justify-self: end; }
.menu-button { display: none; justify-self: end; align-items: center; gap: .65rem; padding: .55rem 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: .72rem; font-weight: 650; }
.menu-button i, .menu-button i::before { display: block; width: 19px; height: 1px; background: currentColor; transition: transform .2s ease; }
.menu-button i { position: relative; }.menu-button i::before { content: ""; position: absolute; transform: translateY(-5px); }
.menu-button[aria-expanded="true"] i { transform: rotate(45deg); }.menu-button[aria-expanded="true"] i::before { transform: rotate(90deg); }
.mobile-menu { position: fixed; inset: 72px 0 0; z-index: 19; padding: 3rem var(--pad); background: var(--paper); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { display: grid; grid-template-columns: 45px 1fr; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: clamp(1.6rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -.04em; }
.mobile-menu a span { color: var(--accent); font: 400 .62rem/1 "DM Mono", monospace; letter-spacing: 0; }
body.menu-open { overflow: hidden; }

.hero { min-height: calc(100svh - 72px); display: flex; flex-direction: column; padding: clamp(2rem, 5vw, 5rem) var(--pad) 1.5rem; }
.hero-kicker { display: flex; align-items: center; gap: .55rem; color: var(--muted); font: 400 .7rem/1.4 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .05em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4f7b5b; box-shadow: 0 0 0 5px rgba(79,123,91,.12); }
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); align-items: center; gap: clamp(3rem, 8vw, 9rem); max-width: 1500px; width: 100%; margin: 0 auto; padding: 3rem 0; }
.eyebrow, .section-index { margin: 0 0 1rem; color: var(--accent); font: 500 .7rem/1.3 "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 880px; margin-bottom: 1.5rem; font-size: clamp(3.3rem, 7.6vw, 7.6rem); line-height: .94; letter-spacing: -.075em; font-weight: 500; }
.hero-summary { max-width: 690px; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; min-width: 190px; padding: .85rem 1rem; border-radius: 999px; text-decoration: none; font-size: .78rem; font-weight: 650; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--paper); background: var(--ink); }
.text-link { font-size: .8rem; text-underline-offset: .28rem; }

.proof-card { align-self: center; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.22); box-shadow: 0 30px 80px rgba(65, 49, 35, .08); }
.proof-card-head { display: flex; justify-content: space-between; padding-bottom: 1rem; color: var(--muted); font: 400 .65rem/1 "DM Mono", monospace; text-transform: uppercase; }
.live-label { display: flex; align-items: center; gap: .35rem; color: #3d6848; }
.live-label i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.proof-primary { padding: 2.4rem 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-primary strong { display: block; font-size: clamp(3rem, 5vw, 5rem); line-height: 1; letter-spacing: -.07em; font-weight: 500; }
.proof-primary span { color: var(--muted); font-size: .78rem; }
.proof-grid { display: grid; grid-template-columns: 1fr 1fr; }
.proof-grid div { padding: 1rem; border-bottom: 1px solid var(--line); }
.proof-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.proof-grid strong, .proof-grid span { display: block; }
.proof-grid strong { font-size: 1.1rem; }
.proof-grid span { color: var(--muted); font-size: .65rem; }
.proof-card > p { margin: 1rem 1rem 0; color: var(--muted); font-size: .72rem; }
.hero-foot { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font: 400 .62rem/1 "DM Mono", monospace; text-transform: uppercase; }
.now-strip { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 2rem; padding: 1.1rem var(--pad); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.now-strip p { margin: 0; color: var(--muted); font-size: .72rem; }
.now-strip span { margin-right: .65rem; color: var(--accent); font: 500 .62rem/1 "DM Mono", monospace; text-transform: uppercase; }

.section-pad { padding: clamp(5rem, 10vw, 10rem) var(--pad); }
.statement { display: grid; grid-template-columns: 1fr 4fr; gap: 3rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-deep); }
.statement blockquote { max-width: 1100px; margin: 0; font-size: clamp(2rem, 4.6vw, 5rem); line-height: 1.08; letter-spacing: -.055em; font-weight: 500; }
.statement em { color: var(--accent); font-style: normal; }
.section-heading { display: grid; grid-template-columns: 1.6fr .7fr; gap: 4rem; align-items: end; margin-bottom: clamp(3rem, 7vw, 6rem); }
.section-heading h2, .approach > h2, .about h2 { margin-bottom: 0; font-size: clamp(2.5rem, 5.2vw, 5.5rem); line-height: 1; letter-spacing: -.06em; font-weight: 500; }
.section-heading > p { margin-bottom: .5rem; color: var(--muted); font-size: .9rem; }

.case { border-top: 1px solid var(--line); }
.case-featured { display: grid; grid-template-columns: 50px minmax(0, 1.1fr) minmax(320px, .8fr); gap: clamp(1rem, 4vw, 4rem); padding: 1.3rem 0 5rem; }
.case-number, .case-meta { color: var(--muted); font: 400 .65rem/1.4 "DM Mono", monospace; text-transform: uppercase; }
.case-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.case h3 { max-width: 780px; margin-bottom: 1.3rem; font-size: clamp(1.7rem, 3vw, 3.1rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 500; }
.case-content > p, .case-compact > p { max-width: 680px; color: var(--muted); }
.case-facts { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 2.5rem 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-facts li { padding: 1rem 0; }
.case-facts li + li { padding-left: 1rem; border-left: 1px solid var(--line); }
.case-facts strong, .case-facts span { display: block; }
.case-facts strong { font-size: .95rem; }
.case-facts span { color: var(--muted); font-size: .65rem; }
.case-toggle { display: flex; justify-content: space-between; width: 100%; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; font-size: .76rem; font-weight: 650; text-align: left; }
.case-toggle span { font-size: 1rem; transition: transform .2s ease; }
.case-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.case-detail { padding: 1.2rem 0 0; }
.case-detail > div { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.case-detail span { color: var(--accent); font: 400 .62rem/1.5 "DM Mono", monospace; text-transform: uppercase; }
.case-detail p { margin: 0; color: var(--muted); font-size: .8rem; }

.case-visual { position: relative; min-height: 460px; overflow: hidden; border-radius: var(--radius); background: var(--dark); color: #f1ece4; }
.architecture-visual::before { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.arch-core, .arch-node { position: absolute; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; font: 400 .62rem/1 "DM Mono", monospace; }
.arch-core { inset: 50% auto auto 50%; width: 124px; height: 124px; transform: translate(-50%,-50%); background: var(--accent); border-color: transparent; }
.arch-node { width: 74px; height: 74px; background: #292722; }
.arch-a { top: 13%; left: 17%; }.arch-b { top: 15%; right: 15%; }.arch-c { bottom: 13%; left: 18%; }.arch-d { right: 14%; bottom: 16%; }
.arch-orbit { position: absolute; inset: 31%; border: 1px dashed rgba(255,255,255,.24); border-radius: 50%; animation: orbit 24s linear infinite; }

.case-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case-compact { padding: clamp(1.5rem, 4vw, 3.5rem); border: 0; background: var(--paper); }
.case-compact h3 { margin-top: 4rem; }
.case-dark { color: #f0ebe3; background: var(--dark); }
.case-dark .case-meta, .case-dark > p, .case-dark .case-detail p { color: #aaa49b; }
.case-dark .case-toggle { color: #f0ebe3; border-color: #f0ebe3; }
.case-dark .case-detail > div { border-color: rgba(255,255,255,.14); }
.signal-line { display: flex; align-items: end; gap: 5px; height: 54px; margin: 3rem 0; }
.signal-line i { width: 5px; border-radius: 5px; background: var(--accent); animation: signal 1.8s ease-in-out infinite alternate; }
.signal-line i:nth-child(1) { height: 24%; }.signal-line i:nth-child(2) { height: 66%; animation-delay: -.6s; }.signal-line i:nth-child(3) { height: 42%; animation-delay: -.2s; }.signal-line i:nth-child(4) { height: 92%; animation-delay: -.9s; }.signal-line i:nth-child(5) { height: 56%; animation-delay: -.4s; }
.ledger { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: .7rem; margin: 3rem 0; color: #aaa49b; font: 400 .62rem/1 "DM Mono", monospace; text-transform: uppercase; }
.ledger b { display: block; height: 1px; background: linear-gradient(90deg, var(--accent), rgba(255,255,255,.12)); }

.systems { background: #ddd7ce; }
.systems-console { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 520px; border: 1px solid rgba(24,23,20,.2); border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.18); }
.systems-map { position: relative; display: grid; align-content: center; gap: .7rem; padding: clamp(1.5rem, 5vw, 5rem); border-right: 1px solid rgba(24,23,20,.16); }
.system-node { position: relative; z-index: 2; display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1rem; border: 1px solid rgba(24,23,20,.18); border-radius: 10px; background: #e8e2d9; color: var(--muted); cursor: pointer; text-align: left; transition: background .2s ease, color .2s ease, transform .2s ease; }
.system-node:hover { transform: translateX(4px); }
.system-node.is-active { color: #f4eee6; background: var(--ink); }
.system-node span { font: 400 .62rem/1 "DM Mono", monospace; }
.system-readout { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 7vw, 7rem); }
.readout-label { color: var(--accent); font: 400 .65rem/1 "DM Mono", monospace; text-transform: uppercase; }
.system-readout h3 { max-width: 650px; font-size: clamp(2rem, 4vw, 4.4rem); line-height: 1.05; letter-spacing: -.055em; font-weight: 500; }
.system-readout > p:not(.readout-label) { max-width: 620px; color: var(--muted); }
.readout-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.readout-tags span { padding: .45rem .65rem; border: 1px solid rgba(24,23,20,.2); border-radius: 999px; font: 400 .62rem/1 "DM Mono", monospace; }

.approach > h2 { max-width: 920px; margin-bottom: 5rem; }
.method-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.method-list li { display: grid; grid-template-columns: 70px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.method-list li > span { color: var(--accent); font: 400 .65rem/1 "DM Mono", monospace; }
.method-list h3 { margin-bottom: .25rem; font-size: clamp(1.25rem, 2vw, 2rem); font-weight: 500; letter-spacing: -.03em; }
.method-list p { margin-bottom: 0; color: var(--muted); }

.notes { border-top: 1px solid var(--line); background: var(--paper-deep); }
.notes-list { border-top: 1px solid var(--line); }
.note { border-bottom: 1px solid var(--line); }
.note summary { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 1.5rem; padding: 1.65rem 0; cursor: pointer; list-style: none; }
.note summary::-webkit-details-marker { display: none; }
.note summary > span, .note small { color: var(--accent); font: 400 .62rem/1.4 "DM Mono", monospace; text-transform: uppercase; }
.note h3 { margin: 0; font-size: clamp(1.35rem, 3vw, 2.75rem); line-height: 1.1; letter-spacing: -.04em; font-weight: 500; }
.note summary i { font-style: normal; font-size: 1.4rem; transition: transform .2s ease; }
.note[open] summary i { transform: rotate(45deg); }
.note > div { display: grid; grid-template-columns: 70px minmax(0, 660px) 1fr; gap: 1.5rem; padding: 0 0 2rem; }
.note > div p { grid-column: 2; margin: 0; color: var(--muted); }
.note small { grid-column: 3; align-self: end; justify-self: end; }

.about { color: #f0ebe3; background: var(--dark); }
.about .section-index { color: #d98568; }
.about-intro { display: grid; grid-template-columns: .6fr 1.5fr 1fr; gap: 3rem; align-items: start; margin-bottom: 5rem; }
.about-intro > p:last-child { color: #aaa49b; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.16); border-left: 1px solid rgba(255,255,255,.16); }
.about-card { min-height: 260px; padding: 1.5rem; border-right: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16); }
.about-card > span { color: #aaa49b; font: 400 .62rem/1 "DM Mono", monospace; text-transform: uppercase; }
.about-card ul { margin: 3.5rem 0 0; padding: 0; list-style: none; }
.about-card li { padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.09); font-size: .82rem; }
.about-card p { margin-top: 3.5rem; color: #d2ccc3; }

.contact { color: var(--paper); background: var(--accent); }
.contact .section-index { color: rgba(255,255,255,.75); }
.contact-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: clamp(3rem, 10vw, 10rem); align-items: end; }
.contact h2 { margin-bottom: 0; font-size: clamp(3.2rem, 7vw, 7.5rem); line-height: .94; letter-spacing: -.07em; font-weight: 500; }
.contact-grid > div p { color: rgba(255,255,255,.8); }
.button-light { margin-top: 1.5rem; color: var(--ink); background: var(--paper); }
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; min-height: 90px; padding: 0 var(--pad); border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.site-footer p { margin: 0; }.site-footer p:last-child { justify-self: end; }
.site-footer div { display: flex; gap: 1.5rem; }.site-footer a { text-underline-offset: .25rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.75,.25,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes signal { to { height: 18%; opacity: .45; } }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav, .header-cta { display: none; }
  .menu-button { display: flex; }
  .now-strip { grid-template-columns: 1fr; gap: .35rem; }
  .hero-grid, .section-heading, .statement, .systems-console, .about-intro, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-grid { gap: 3rem; }
  .proof-card { width: min(100%, 560px); }
  .hero-foot { flex-wrap: wrap; justify-content: flex-start; }
  .case-featured { grid-template-columns: 34px 1fr; }
  .case-visual { grid-column: 2; min-height: 400px; }
  .systems-map { border-right: 0; border-bottom: 1px solid var(--line); }
  .about-intro { gap: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .note > div { grid-template-columns: 45px 1fr; }.note small { grid-column: 2; justify-self: start; margin-top: .5rem; }
}

@media (max-width: 620px) {
  :root { --pad: 1.1rem; }
  body { background-size: 100% 60px; }
  .site-header { min-height: 64px; }
  .mobile-menu { top: 64px; }
  .wordmark > span:last-child { display: none; }
  .header-cta { font-size: .68rem; }
  .hero { padding-top: 2rem; }
  .hero-grid { padding-top: 2rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-foot { display: none; }
  .statement { gap: 1rem; }
  .section-heading { gap: 1.5rem; }
  .case-featured { grid-template-columns: 1fr; }
  .case-number { display: none; }
  .case-visual { grid-column: 1; min-height: 340px; }
  .case-facts { grid-template-columns: 1fr; }
  .case-facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .case-pair { grid-template-columns: 1fr; }
  .case-compact h3 { margin-top: 2rem; }
  .system-readout { min-height: 420px; }
  .method-list li { grid-template-columns: 40px 1fr; gap: 1rem; }
  .note summary { grid-template-columns: 38px 1fr auto; gap: .6rem; }
  .note > div { grid-template-columns: 38px 1fr; gap: .6rem; }
  .contact h2 { font-size: clamp(3rem, 15vw, 5rem); }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer div { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
