:root {
  --ink: #102a2a;
  --ink-deep: #091d1d;
  --paper: #f3f1eb;
  --paper-warm: #e9e6dc;
  --white: #fffefb;
  --muted: #5b6966;
  --line: #cdd1c9;
  --accent: #0a7169;
  --accent-light: #b9e3d8;
  --signal: #d5e89c;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 1rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #168e83; outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 100; padding: .7rem 1rem; color: var(--ink-deep); background: var(--signal); font-weight: 800; }
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(243, 241, 235, .95); }
.nav-wrap { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; flex: 0 0 auto; font-size: .87rem; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--paper); background: var(--ink); font: 700 .68rem var(--mono); }
.brand strong { letter-spacing: -.02em; }
nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(.85rem, 2.2vw, 1.8rem); }
nav a { color: #465553; font-size: .78rem; font-weight: 700; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); }

/* Shared typography and actions */
.eyebrow, .section-label { margin: 0 0 1rem; color: var(--accent); font: 700 .7rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.button { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; padding: .7rem 1.05rem; font-size: .82rem; font-weight: 800; text-decoration: none; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.button-primary { color: var(--white); background: var(--ink); }
.button-primary:hover { background: var(--accent); }
.button-quiet { color: var(--accent); }
.button-quiet:hover { background: #e4e4dd; }
.button-light { color: var(--ink-deep); background: var(--signal); }
.button-light:hover { background: var(--white); }
.arrow-link { font-size: .83rem; font-weight: 800; text-decoration-color: var(--accent-light); }
.arrow-link span { color: var(--accent-light); }
.section-heading { display: grid; grid-template-columns: 1.12fr .88fr; align-items: end; gap: 4rem; margin-bottom: 3.5rem; }
.section-heading h2, .fieldwork h2, .connected-copy h2, .about-layout h2, .contact-copy h2, .systems-sidebar h2, .architecture-layout h2, .technology-layout h2, .cta-layout h2 { max-width: 760px; margin: 0; font-size: clamp(2.35rem, 4.8vw, 4.65rem); font-weight: 650; line-height: .98; letter-spacing: -.055em; }
.section-heading > p { max-width: 500px; margin: 0 0 .35rem; color: var(--muted); }

/* Home hero */
.hero { min-height: 610px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); align-items: end; gap: clamp(3rem, 8vw, 8rem); padding-block: clamp(5rem, 10vw, 8.5rem) 5.5rem; }
.hero h1 { max-width: 890px; margin-bottom: 1.8rem; font-size: clamp(3.6rem, 7.5vw, 7.2rem); font-weight: 650; line-height: .91; letter-spacing: -.072em; }
.hero h1 span, .systems-hero h1 span { color: var(--accent); }
.hero-intro { max-width: 720px; margin-bottom: 2rem; color: #43514f; font-size: clamp(1.08rem, 1.8vw, 1.35rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-brief { margin: 0; border-top: 2px solid var(--ink); }
.hero-brief div { display: grid; grid-template-columns: 68px 1fr; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.hero-brief dt { color: var(--accent); font: 700 .66rem var(--mono); text-transform: uppercase; }
.hero-brief dd { margin: 0; color: #475451; font-size: .82rem; font-weight: 650; line-height: 1.45; }

/* Fieldwork */
.fieldwork { display: grid; grid-template-columns: 1.18fr .82fr; align-items: stretch; padding-bottom: 8rem; }
.fieldwork-image { min-height: 560px; margin: 0; display: flex; flex-direction: column; color: var(--white); background: var(--ink-deep); }
.fieldwork-image img { width: 100%; min-height: 0; flex: 1; object-fit: cover; object-position: center 42%; }
.fieldwork-image figcaption { display: flex; justify-content: space-between; gap: 2rem; padding: 1rem 1.2rem; font-size: .72rem; }
.fieldwork-image figcaption span { color: #91a5a0; font-family: var(--mono); text-transform: uppercase; }
.fieldwork-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 5rem); background: var(--paper-warm); }
.fieldwork-copy h2 { font-size: clamp(2.25rem, 4.4vw, 4.1rem); }
.fieldwork-copy > p:not(.section-label) { margin: 1.8rem 0 2.5rem; color: var(--muted); }
.fieldwork-layers { margin: auto 0 0; padding: 0; border-top: 2px solid var(--ink); list-style: none; }
.fieldwork-layers li { display: flex; gap: 1.25rem; padding: .8rem 0; border-bottom: 1px solid #c4c8bf; font-size: .82rem; font-weight: 750; }
.fieldwork-layers span { color: var(--accent); font: .65rem var(--mono); }

/* Services */
.services-section { padding-block: 7.5rem; color: var(--white); background: var(--ink-deep); }
.services-section .section-label, .connected-section .section-label, .systems-problem .section-label, .architecture-section .section-label { color: var(--accent-light); }
.services-section .section-heading > p { color: #aebbb7; }
.service-list { border-top: 2px solid #dfe8e4; }
.service-list article { display: grid; grid-template-columns: 54px .65fr 1.15fr .65fr; align-items: baseline; gap: clamp(1rem, 3vw, 3rem); padding: 2rem 0; border-bottom: 1px solid #344a48; }
.service-list article > span { color: var(--accent-light); font: .67rem var(--mono); }
.service-list h3 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.8rem); letter-spacing: -.035em; }
.service-list p { margin: 0; color: #b9c7c3; font-size: .9rem; }
.service-list small { color: #80948f; font: .63rem/1.7 var(--mono); text-transform: uppercase; }

/* Connected system */
.connected-section { padding-block: 8rem; color: var(--white); background: #12302f; }
.connected-layout { display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(4rem, 9vw, 9rem); }
.connected-copy > p:not(.section-label) { max-width: 560px; margin: 1.8rem 0 2rem; color: #b7c6c2; }
.system-path { position: relative; display: grid; gap: .55rem; padding: 4.5rem 2rem 2rem 3rem; border: 1px solid #49615d; background: #0b2423; }
.system-path > p { position: absolute; top: 1.25rem; left: 1.4rem; color: #8ea09c; font: 700 .65rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.system-path > div { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #39504d; background: #12302f; }
.system-path > div:nth-of-type(3), .system-path > div:nth-of-type(4) { margin-left: 1.5rem; border-color: #438d84; background: #123b37; }
.system-path span { color: var(--accent-light); font: .65rem var(--mono); }
.system-path strong { font-size: .84rem; }
.system-path small { color: #8fa09d; font: .62rem var(--mono); }

/* Work */
.work-section { padding-block: 8rem; }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4rem 1.25rem; }
.project { grid-column: span 4; min-width: 0; align-self: start; }
.project-feature { grid-column: span 8; }
.project-portrait { grid-column: span 4; }
.project-feature-end { grid-column: span 8; }
.project img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: var(--paper-warm); }
.project-feature img { aspect-ratio: 16 / 10; }
.project-portrait img { aspect-ratio: 3 / 4; object-position: 50% 38%; }
.project-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding: 1rem .1rem; border-bottom: 1px solid var(--line); }
.project-meta p { margin: 0 0 .35rem; color: var(--accent); font: 700 .62rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.project-meta h3 { margin: 0; font-size: .95rem; letter-spacing: -.02em; }
.project-meta > span { color: #7f8b88; font: .65rem var(--mono); }

/* About and contact */
.about-section { padding-block: 8rem; background: var(--paper-warm); }
.about-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 9vw, 9rem); }
.about-copy > p { max-width: 680px; color: var(--ink); font-size: 1.2rem; font-weight: 550; }
.principles { margin: 2.5rem 0 0; border-top: 2px solid var(--ink); }
.principles div { display: grid; grid-template-columns: .65fr 1.35fr; gap: 2rem; padding: 1.25rem 0; border-bottom: 1px solid #c5c8c0; }
.principles dt { color: var(--accent); font: 700 .68rem var(--mono); text-transform: uppercase; }
.principles dd { margin: 0; color: var(--muted); font-size: .86rem; }
.contact-section { padding-block: 7rem; color: var(--white); background: var(--accent); }
.contact-section .section-label { color: #d6f7f0; }
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: clamp(4rem, 9vw, 9rem); }
.contact-copy > p:not(.section-label) { max-width: 500px; margin-top: 1.8rem; color: #e1f2ee; }
.contact-form { width: 100%; color-scheme: dark; }
.form-field { display: flex; min-width: 0; flex-direction: column; gap: .55rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.form-help + .form-field { margin-top: 1.25rem; }
.form-field label { color: #e7f3f0; font: 700 .65rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.form-field input, .form-field textarea { width: 100%; appearance: none; border: 1px solid rgba(255,255,255,.34); border-radius: 0; padding: .85rem .95rem; color: var(--white); background: rgba(9,29,29,.22); caret-color: var(--signal); font: inherit; font-size: 1rem; line-height: 1.5; transition: background-color .15s, border-color .15s; }
.form-field input { min-height: 52px; }
.form-field textarea { min-height: 180px; resize: vertical; }
.form-field input:hover, .form-field textarea:hover, .form-field input:focus, .form-field textarea:focus { border-color: var(--white); background: rgba(9,29,29,.35); }
.form-field input:-webkit-autofill, .form-field input:-webkit-autofill:hover, .form-field input:-webkit-autofill:focus { -webkit-text-fill-color: var(--white); box-shadow: 0 0 0 1000px #075f59 inset; caret-color: var(--signal); }
.form-help { margin: .55rem 0 0; color: #c6e1dc; font-size: .75rem; }
.form-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; pointer-events: none !important; }
.contact-submit { min-width: 190px; margin-top: 1.4rem; border-color: var(--signal); color: var(--ink-deep); background: var(--signal); cursor: pointer; font-family: inherit; }
.contact-submit:hover { border-color: var(--white); background: var(--white); }
.contact-submit:disabled { opacity: .65; cursor: wait; }
.form-status { min-height: 20px; margin: 1rem 0 0; border-left: 2px solid transparent; color: var(--white); font-size: .82rem; }
.form-status:not(:empty) { padding: .7rem .8rem; background: rgba(9,29,29,.3); }
.form-status.success { border-color: var(--signal); color: #edffd3; }
.form-status.validation, .form-status.rate-limit { border-color: #ffd09c; color: #fff0dc; }
.form-status.failure, .form-status.error { border-color: #ffaaa0; color: #ffe0dc; }

/* Systems page */
.systems-hero { padding-block: 3rem 5.5rem; }
.back-link { display: inline-block; margin-bottom: 4rem; color: var(--muted); font: .7rem var(--mono); text-decoration: none; }
.back-link:hover { color: var(--accent); }
.systems-title-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 5rem; }
.systems-hero h1 { max-width: 850px; margin: 0; font-size: clamp(3.6rem, 8vw, 7.5rem); font-weight: 650; line-height: .9; letter-spacing: -.072em; }
.systems-summary > p { margin-bottom: 1.8rem; color: #455451; font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.systems-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 4.5rem 0 0; border-block: 1px solid var(--line); }
.systems-meta div { padding: 1rem 1.2rem; border-right: 1px solid var(--line); }
.systems-meta div:first-child { padding-left: 0; }
.systems-meta div:last-child { border-right: 0; }
.systems-meta dt { color: var(--muted); font: .62rem var(--mono); text-transform: uppercase; }
.systems-meta dd { margin: .2rem 0 0; font-size: .82rem; font-weight: 700; }
.systems-problem { padding-block: 5rem; color: var(--white); background: var(--ink-deep); }
.problem-layout { display: grid; grid-template-columns: .65fr 1.35fr; gap: 5rem; }
.problem-layout h2 { margin: 0; font-size: 1.4rem; }
.problem-layout > p { max-width: 820px; margin: 0; color: #c7d2cf; font-size: clamp(1.18rem, 2.3vw, 1.6rem); line-height: 1.6; }
.systems-section { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(3rem, 8vw, 8rem); padding-block: 7.5rem; }
.systems-sidebar { align-self: start; position: sticky; top: 2rem; }
.systems-sidebar > p:not(.section-label) { margin-top: 1.5rem; color: var(--muted); }
.capability-list { border-top: 2px solid var(--ink); }
.capability-list article { display: grid; grid-template-columns: 44px 1fr; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.capability-list article > span { color: var(--accent); font: .68rem var(--mono); }
.capability-list h3 { margin: 0 0 .4rem; font-size: 1.08rem; }
.capability-list p { margin: 0; color: var(--muted); font-size: .88rem; }
.architecture-section { padding-block: 7.5rem; color: var(--white); background: #102b2a; }
.architecture-layout { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.architecture-layout > div:first-child > p:not(.section-label) { max-width: 520px; margin-top: 1.6rem; color: #aebfba; }
.architecture { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid #38514e; background-color: var(--ink-deep); background-image: radial-gradient(#2b4542 1px, transparent 1px); background-size: 20px 20px; }
.architecture > p { margin-bottom: 1.5rem; color: #81938f; font: .62rem var(--mono); text-transform: uppercase; }
.architecture-node { padding: .9rem 1rem; border: 1px solid #38514e; background: #102e2c; }
.architecture-node small, .architecture-node strong { display: block; }
.architecture-node small { margin-bottom: .25rem; color: #8da39e; font: .6rem var(--mono); text-transform: uppercase; }
.architecture-node strong { font-size: .78rem; }
.architecture-node.is-entry { width: min(330px, 100%); margin-inline: auto; }
.architecture-node.is-core { border-color: #3ea69a; background: #123b37; }
.architecture-arrow { display: block; height: 35px; color: #63c6ba; font: 1.1rem/35px var(--mono); text-align: center; }
.architecture-row { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.process-section { padding-block: 8rem; }
.process-list { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; border-block: 1px solid var(--line); list-style: none; }
.process-list li { min-width: 0; padding: 1.5rem; border-right: 1px solid var(--line); }
.process-list li:last-child { border: 0; }
.process-list span { display: block; margin-bottom: 3.5rem; color: var(--accent); font: .67rem var(--mono); }
.process-list strong { display: block; margin-bottom: .65rem; font-size: 1rem; }
.process-list p { margin: 0; color: var(--muted); font-size: .78rem; }
.technology-section { padding-block: 7rem; background: var(--paper-warm); }
.technology-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 9vw, 9rem); }
.technology-list { border-top: 2px solid var(--ink); }
.technology-list > div { display: grid; grid-template-columns: .55fr 1.45fr; gap: 2rem; padding: 1.2rem 0; border-bottom: 1px solid #c5c8c0; }
.technology-list strong { font-size: .84rem; }
.technology-list p { margin: 0; color: var(--muted); font: .72rem/1.7 var(--mono); }
.systems-cta { padding-block: 6.5rem; color: var(--white); background: var(--accent); }
.systems-cta .section-label { color: #d6f7f0; }
.cta-layout { display: grid; grid-template-columns: 1.08fr .92fr; align-items: end; gap: 5rem; }
.cta-layout > div:last-child > p { max-width: 540px; color: #e4f5f1; }

/* Footer */
.site-footer { color: #899a96; background: var(--ink-deep); }
.footer-inner { min-height: 90px; display: flex; align-items: center; gap: 2rem; font: .66rem var(--mono); }
.site-footer .brand { color: var(--white); font-family: var(--sans); }
.site-footer .brand-mark { color: var(--ink-deep); background: var(--signal); }
.footer-inner p { margin: 0; }
.footer-inner p:nth-of-type(1) { margin-left: auto; }

@media (max-width: 940px) {
  .hero, .section-heading, .fieldwork, .connected-layout, .about-layout, .contact-layout, .systems-title-grid, .problem-layout, .systems-section, .architecture-layout, .technology-layout, .cta-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; align-items: start; gap: 3.5rem; }
  .hero-brief { max-width: 660px; }
  .fieldwork-image { min-height: 500px; }
  .section-heading, .connected-layout, .about-layout, .contact-layout, .systems-title-grid, .problem-layout, .architecture-layout, .technology-layout, .cta-layout { gap: 2.5rem; }
  .service-list article { grid-template-columns: 44px .7fr 1.3fr; }
  .service-list small { grid-column: 2 / -1; }
  .project { grid-column: span 6; }
  .project-feature { grid-column: span 8; }
  .project-portrait { grid-column: span 4; }
  .project-feature-end { grid-column: span 8; }
  .project:last-child { grid-column: span 4; }
  .systems-summary { max-width: 700px; }
  .systems-meta { grid-template-columns: 1fr 1fr; }
  .systems-meta div:nth-child(2) { border-right: 0; }
  .systems-meta div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .systems-meta div:nth-child(3) { padding-left: 0; }
  .systems-sidebar { position: static; }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .process-list li { border-bottom: 1px solid var(--line); }
  .process-list li:nth-child(2n) { border-right: 0; }
  .process-list li:last-child { border-right: 1px solid var(--line); border-bottom: 0; }
}

@media (max-width: 700px) {
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .nav-wrap { min-height: auto; align-items: flex-start; flex-direction: column; gap: .75rem; padding-block: .8rem; }
  .brand strong { display: none; }
  nav { width: 100%; justify-content: flex-start; gap: 1.1rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
  nav a { flex: 0 0 auto; }
  .hero { padding-block: 4.5rem; }
  .hero h1 { font-size: clamp(3.2rem, 15vw, 4.8rem); }
  .hero h1 br { display: none; }
  .hero-actions .button-primary { flex: 1; }
  .fieldwork { width: 100%; padding-bottom: 0; }
  .fieldwork-image { min-height: 430px; }
  .fieldwork-copy { padding: 4rem 1rem; }
  .services-section, .connected-section, .work-section, .about-section, .contact-section, .systems-section, .architecture-section, .process-section, .technology-section { padding-block: 5.5rem; }
  .service-list article { grid-template-columns: 32px 1fr; gap: .8rem 1rem; }
  .service-list article > p, .service-list small { grid-column: 2; }
  .system-path { padding: 4rem 1rem 1rem; }
  .system-path > div, .system-path > div:nth-of-type(3), .system-path > div:nth-of-type(4) { grid-template-columns: 30px 1fr; margin-left: 0; }
  .system-path small { grid-column: 2; }
  .project-grid { gap: 3rem 0; }
  .project, .project-feature, .project-portrait, .project-feature-end, .project:last-child { grid-column: 1 / -1; }
  .project-portrait img { aspect-ratio: 4 / 3; }
  .principles div, .technology-list > div { grid-template-columns: 1fr; gap: .4rem; }
  .form-row { grid-template-columns: 1fr; }
  .contact-submit { width: 100%; }
  .systems-hero { padding-block: 3rem 4rem; }
  .back-link { margin-bottom: 3rem; }
  .systems-hero h1 { font-size: clamp(3.3rem, 16vw, 5.5rem); }
  .systems-meta { grid-template-columns: 1fr; }
  .systems-meta div, .systems-meta div:nth-child(3) { padding-left: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .systems-meta div:last-child { border-bottom: 0; }
  .architecture-row { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; }
  .process-list li, .process-list li:nth-child(2n), .process-list li:last-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .process-list li:last-child { border-bottom: 0; }
  .process-list span { margin-bottom: 1.5rem; }
  .footer-inner { min-height: auto; flex-wrap: wrap; padding-block: 1.4rem; gap: .7rem 1.3rem; }
  .footer-inner p:nth-of-type(1) { margin-left: auto; }
  .footer-inner p:nth-of-type(2) { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .site-header, .hero-actions, .contact-section, .systems-cta, .site-footer { display: none; }
  body, .services-section, .connected-section, .systems-problem, .architecture-section { color: #000; background: #fff; }
}
