/* Fonts (self-hosted, latin + latin-ext subsets) */
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/plex-mono-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/plex-mono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/plex-mono-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/plex-mono-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400 600; font-display: swap; src: url("/fonts/plex-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400 600; font-display: swap; src: url("/fonts/plex-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-weight: 500 700; font-display: swap; src: url("/fonts/space-grotesk-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-weight: 500 700; font-display: swap; src: url("/fonts/space-grotesk-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f3f1ec;
  --paper-2: #e9e6df;
  --ink: #15191d;
  --ink-2: #3d434a;
  --muted: #5b6168;
  --muted-dark: #7b8188;
  --line: #d9d5cc;
  --line-dark: #3a4046;
  --on-dark: #b9b4a8;
  --accent: #c9541e;
  --accent-hover: #b8471a;
  --danger: #ff8a80;

  --gutter: clamp(20px, 6.67vw, 96px);
  --section-y: clamp(72px, 7.8vw, 112px);
  --display: "Space Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 6px; }

.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.dark { background: var(--ink); color: var(--paper); }
.dark .lede { color: var(--on-dark); }
.dark a:hover { color: var(--paper); }

h2 { font-size: clamp(36px, 3.6vw, 52px); line-height: 1.05; font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 28px; border-radius: 6px;
  font: 600 16px/1 "IBM Plex Sans", sans-serif;
  border: 1.5px solid var(--ink); cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--paper); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 36px; font-size: 15px; font-weight: 500; }
.nav-links .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.nav-toggle { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; padding-top: 96px; padding-bottom: 88px; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-copy .kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(44px, 5vw, 72px); line-height: 1.02; font-weight: 700; }
.hero-copy > p { font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.hero-path { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 12px; }
.hero-art svg { width: 100%; height: auto; display: block; }

/* Section headers */
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: end; }
.section-head .title { display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 56px; }

/* Capabilities */
.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cap { padding: 32px; border: 1px solid var(--line-dark); border-radius: 10px; display: flex; flex-direction: column; gap: 16px; min-height: 236px; }
.cap h3 { font-size: 22px; font-weight: 600; color: var(--paper); }
.cap p { font-size: 16px; line-height: 1.55; color: var(--on-dark); }

/* Environments */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 96px; align-items: start; }
.two-col .copy { display: flex; flex-direction: column; gap: 24px; }
.env-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.env-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.env-list .name { font-family: var(--display); font-size: 22px; font-weight: 600; }
.env-list .desc { font-family: var(--mono); font-size: 13px; color: var(--muted); text-align: right; }

/* Process */
.process { background: var(--paper-2); }
.cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step { padding: 32px 28px; background: var(--paper); border-radius: 10px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.step .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.step h3 { font-size: 26px; font-weight: 600; }
.step p { font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* Experience */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fact { padding: 28px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; }
.fact.wide { grid-column: 1 / -1; }
.fact .label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fact .value { font-size: 17px; line-height: 1.5; font-weight: 500; }

/* Products */
.products-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-card { padding: 32px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 16px; background: var(--paper-2); }
.product-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.product-head h3 { font-size: 24px; font-weight: 600; }
.product-card > p { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.product-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.product-links .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.product-links a:not(.btn) { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.product-note { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 96px; align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 24px; }
.contact-copy h2 { color: var(--paper); }
.contact-note { font-family: var(--mono); font-size: 13px; color: var(--muted-dark); line-height: 1.6; }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark); }
.field label .opt { color: var(--muted-dark); text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  width: 100%;
  font: 400 16px/1.4 "IBM Plex Sans", sans-serif;
  color: var(--paper);
  background: #1d2227;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  padding: 14px 16px;
  transition: border-color .15s, background-color .15s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23b9b4a8' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field input::placeholder, .field textarea::placeholder { color: #6a7077; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #525a61; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #20262b; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); height: 56px; padding: 0 32px; font-size: 17px; }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn[disabled] { opacity: .6; cursor: progress; }
.form-status { font-family: var(--mono); font-size: 14px; line-height: 1.5; color: var(--on-dark); }
.form-status.ok { color: #9fd3a8; }
.form-status.err { color: var(--danger); }

.form-done { display: none; flex-direction: column; gap: 16px; padding: 40px; border: 1px solid var(--line-dark); border-radius: 10px; }
.form-done h3 { font-size: 28px; color: var(--paper); }
.form-done p { color: var(--on-dark); font-size: 17px; line-height: 1.55; }
.contact-form.sent .form { display: none; }
.contact-form.sent .form-done { display: flex; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-footer .footer-top { padding-top: 32px; padding-bottom: 20px; }
.site-footer .footer-bottom { padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 8px; }
.site-footer .brand { font-size: 17px; }
.site-footer .mono { font-size: 13px; color: var(--muted); }
.site-footer .mono a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .mono a:hover { color: var(--accent-hover); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--accent-hover); }

/* Responsive */
@media (max-width: 1100px) {
  .nav-links { gap: 24px; }
  .hero, .section-head, .two-col, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 64px; padding-bottom: 72px; }
  .hero-art { max-width: 640px; }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap, .step { min-height: 0; }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 6px;
    background: transparent; color: var(--ink); cursor: pointer;
  }
  .nav-links {
    display: none;
    position: absolute; top: 88px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-links .btn { margin-top: 16px; border: 1.5px solid var(--ink); height: 52px; }
  .site-nav.open .nav-links { display: flex; }
}

@media (max-width: 640px) {
  .site-nav .wrap { height: 72px; }
  .nav-links { top: 72px; }
  html { scroll-padding-top: 72px; }
  .cards-3, .cards-4, .facts, .form, .products-grid { grid-template-columns: 1fr; }
  .hero-copy > p { font-size: 18px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .env-list li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .env-list .desc { text-align: left; }
  .form-done { padding: 28px; }
  .site-footer .footer-top { flex-direction: column; align-items: flex-start; }
}
