:root {
  --ink: #14201f;
  --ink-soft: #40514e;
  --paper: #f7f6f1;
  --paper-deep: #efeee8;
  --line: #d4d6cf;
  --accent: #3d6ef7;
  --accent-strong: #2e5fd6;
  --accent-light: #91aeff;
  --accent-ink: #244db1;
  --dark: #101817;
  --dark-soft: #1d2d2a;
  --white: #ffffff;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max-width: 1180px;
  --shadow: 0 16px 45px rgba(20, 32, 31, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible {
  outline: 3px solid #5289e0;
  outline-offset: 4px;
}

.container { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; }

.section { padding: 110px 0; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--accent-strong);
  color: var(--white);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(247, 246, 241, 0.93);
  backdrop-filter: blur(10px);
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; min-height: 78px; justify-content: space-between; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 10px; letter-spacing: 0.1em; line-height: 1.15; text-transform: uppercase; }
.wordmark svg { width: 31px; height: 31px; flex: 0 0 auto; }
.wordmark strong { font-size: 11px; font-weight: 750; letter-spacing: 0.05em; }

.site-nav { display: flex; align-items: center; gap: 28px; font-size: 13px; font-weight: 600; }
.site-nav > a:not(.nav-cta) { color: var(--ink-soft); text-decoration: none; }
.site-nav > a:not(.nav-cta):hover { color: var(--ink); }

.nav-cta { padding: 11px 16px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; transition: background 160ms ease, color 160ms ease; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.menu-toggle { display: none; padding: 8px 0 8px 12px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.menu-toggle span:not(.visually-hidden) { display: block; width: 22px; height: 1.5px; margin: 5px 0; background: currentColor; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.hero { position: relative; padding-top: 88px; padding-bottom: 102px; overflow: hidden; }
.hero::before { position: absolute; top: 0; right: -15%; width: 61%; height: 100%; border-left: 1px solid var(--line); background-image: linear-gradient(rgba(20, 32, 31, 0.026) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 32, 31, 0.026) 1px, transparent 1px); background-size: 32px 32px; content: ""; pointer-events: none; }

.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(410px, 0.98fr); align-items: center; gap: 70px; }
.hero-copy { position: relative; z-index: 1; padding-bottom: 8px; }

.eyebrow, .section-label, .card-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--ink-soft); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.09em; line-height: 1.3; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; background: var(--accent-ink); border-radius: 50%; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.045em; line-height: 1.04; }
h1 { max-width: 650px; margin-bottom: 27px; font-size: clamp(3rem, 5.2vw, 5.2rem); }
h2 { margin-bottom: 24px; font-size: clamp(2.05rem, 3.7vw, 3.65rem); }
h3 { margin-bottom: 13px; font-size: 1.35rem; }

.hero-intro { max-width: 590px; margin-bottom: 32px; color: var(--ink-soft); font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.53; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 23px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 19px; border: 1px solid transparent; font-size: 14px; font-weight: 720; line-height: 1.25; text-align: center; text-decoration: none; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button svg { width: 17px; height: 17px; }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: #283a37; }
.button-light { background: var(--accent-strong); color: var(--white); }
.button-light:hover { background: var(--accent-ink); }
.button-secondary { border-color: var(--ink); background: transparent; color: var(--ink); }
.button-secondary:hover { background: var(--ink); color: var(--paper); }
.text-link { border-bottom: 1px solid var(--ink); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.text-link span { margin-left: 5px; }
.microcopy { margin: 28px 0 0; color: var(--ink-soft); font-size: 12px; }

.hero-diagram, .trust-graphic { margin: 0; background: #f4f2ea; }

.figma-hero-diagram {
  display: grid;
  min-height: 430px;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  padding: 29px 32px 25px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.diagram-kicker, .figma-card-label, .figma-match-criteria > span, .figma-hero-footer > span, .figma-match-footer {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.diagram-title {
  max-width: 540px;
  margin: 0;
  font-size: clamp(1.45rem, 2.25vw, 1.72rem);
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.figma-hero-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1.05fr) 34px minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
}

.figma-diagram-card {
  display: grid;
  min-height: 155px;
  align-content: start;
  gap: 13px;
  padding: 17px 16px;
  border: 1px solid #c7cdc9;
  background: rgba(255, 255, 255, 0.34);
}

.figma-project-card, .figma-engineer-card { border-color: var(--accent); }
.figma-project-card .figma-card-label { color: var(--accent-strong); }
.figma-diagram-card strong, .figma-match-card strong { font-size: 1.08rem; letter-spacing: -0.035em; line-height: 1.12; }
.figma-diagram-card > span:last-child { color: var(--ink-soft); font-size: 11px; line-height: 1.32; }

.figma-flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.figma-flow-arrow { display: block; width: 100%; height: auto; color: var(--ink-soft); }

.figma-hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid #c7cdc9;
}

.figma-skill-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; list-style: none; }
.figma-skill-list li, .figma-match-criteria li {
  padding: 7px 9px;
  border: 1px solid #c7cdc9;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.figma-hero-footer > span {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
  text-transform: none;
}

.context-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-deep); }
.intro-grid { display: grid; grid-template-columns: 0.8fr 2fr; gap: 65px; align-items: start; }
.context-graphic { width: min(100%, 440px); margin: 0; }
.context-graphic img { display: block; width: 100%; height: auto; }
.intro-grid h2 { max-width: 820px; }
.intro-grid p:not(.section-label) { max-width: 745px; color: var(--ink-soft); font-size: 17px; }
.intro-grid p:last-child { margin-bottom: 0; }

.section-heading { margin-bottom: 49px; }
.split-heading { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 75px; align-items: end; }
.split-heading h2 { max-width: 700px; margin-bottom: 0; }
.split-heading > p { max-width: 340px; margin: 0 0 4px; color: var(--ink-soft); font-size: 15px; }

.work-section { background: var(--paper); }
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.work-card { min-height: 250px; padding: 26px 25px; background: var(--paper); }
.work-card:hover { background: #fcfdf7; }
.work-card h3 { margin: 52px 0 13px; font-size: 1.35rem; }
.work-card p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.card-number { color: var(--accent-ink); font-family: var(--mono); font-size: 11px; font-weight: 700; }

.model-section { background: var(--dark); color: var(--paper); }
.model-section .section-label, .model-section .section-intro { color: #bdc9c5; }
.model-grid { display: grid; grid-template-columns: 0.8fr 1.25fr; gap: 90px; }
.model-grid h2 { max-width: 450px; }
.section-intro { max-width: 470px; font-size: 16px; }
.engagements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.engagement-card { padding: 31px 28px 25px; border-top: 3px solid var(--accent); background: var(--dark-soft); }
.engagement-card .card-kicker { color: var(--accent-light); }
.engagement-card h3 { font-size: 1.52rem; }
.engagement-card p { color: #c5cecb; font-size: 14px; }
.engagement-card ul { padding: 14px 0 0; margin: 25px 0 0; border-top: 1px solid #40504d; list-style: none; }
.engagement-card li { position: relative; padding: 5px 0 5px 17px; color: #e7eae8; font-size: 13px; }
.engagement-card li::before { position: absolute; top: 12px; left: 0; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; content: ""; }

.process-section { background: var(--paper); }
.process-heading { display: grid; grid-template-columns: 0.8fr 1.5fr; gap: 65px; align-items: end; }
.process-heading h2 { max-width: 630px; margin-bottom: 0; }
.process-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 45px; padding: 0; margin: 0; list-style: none; }
.process-list li { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding-top: 23px; border-top: 1px solid var(--ink); }
.process-number { color: var(--ink-soft); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.process-list h3 { margin-bottom: 11px; font-size: 1.25rem; }
.process-list p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.trust-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-deep); }
.trust-grid { display: grid; grid-template-columns: 0.85fr 1.1fr; gap: 106px; align-items: center; }
.figma-match-diagram {
  display: grid;
  min-height: 430px;
  grid-template-rows: auto auto 1fr auto;
  gap: 15px;
  padding: 29px 34px 29px;
  border: 1px solid var(--line);
}

.figma-match-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(84px, 0.48fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.figma-match-card {
  min-height: 224px;
  padding: 19px 17px;
  border: 1px solid #c7cdc9;
  background: rgba(255, 255, 255, 0.34);
}

.figma-match-card .figma-card-label { display: block; margin-bottom: 16px; }
.figma-match-card strong { display: block; margin-bottom: 16px; }
.figma-match-card ul { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; }
.figma-match-card li { position: relative; padding-left: 16px; color: var(--ink); font-size: 11px; line-height: 1.2; }
.figma-match-card li::before { position: absolute; top: 0.34em; left: 0; width: 7px; height: 7px; background: var(--accent); content: ""; }
.figma-strong-match { border-color: var(--accent); }
.figma-strong-match li::before { border-radius: 50%; }

.figma-match-criteria {
  position: relative;
  display: grid;
  justify-items: stretch;
  gap: 15px;
  padding: 0 7px;
}

.figma-match-criteria > span { text-align: left; }
.figma-match-criteria ul { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.figma-match-criteria li { padding: 8px 9px; text-transform: none; }
.figma-match-arrow {
  position: absolute;
  top: 52%;
  width: 13px;
  height: 1px;
  background: var(--ink-soft);
}

.figma-match-arrow::after {
  position: absolute;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--ink-soft);
  border-right: 1px solid var(--ink-soft);
  content: "";
  transform: rotate(45deg);
}

.figma-match-arrow-left { right: 100%; }
.figma-match-arrow-left::after { right: 0; }
.figma-match-arrow-right { left: 100%; }
.figma-match-arrow-right::after { right: 0; }

.figma-match-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.figma-match-footer span:first-child { color: var(--ink); font-weight: 700; }
.trust-grid h2 { max-width: 640px; }
.trust-grid p:not(.section-label) { max-width: 620px; color: var(--ink-soft); font-size: 16px; }
.trust-notes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.trust-notes span { padding: 7px 9px; border: 1px solid #b9c0ba; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.company-cta { padding: 82px 0; background: var(--accent-strong); color: var(--white); }
.company-cta-inner { display: flex; align-items: end; justify-content: space-between; gap: 50px; }
.company-cta .section-label { color: var(--white); }
.company-cta h2 { max-width: 730px; margin-bottom: 15px; }
.company-cta p:not(.section-label) { max-width: 690px; margin-bottom: 0; font-size: 16px; }
.company-cta .button { flex: 0 0 auto; background: var(--white); color: var(--accent-ink); }
.company-cta .button:hover { background: var(--paper); }

.engineer-section { padding: 72px 0; background: var(--paper); }
.engineer-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; padding: 0 0 6px; }
.engineer-inner h2 { margin-bottom: 13px; font-size: clamp(1.85rem, 3.2vw, 2.8rem); }
.engineer-inner p:not(.section-label) { max-width: 630px; margin-bottom: 0; color: var(--ink-soft); }
.engineer-inner .section-label { margin-bottom: 15px; }
.engineer-inner .button { flex: 0 0 auto; }

.site-footer { border-top: 1px solid var(--line); padding: 25px 0; background: var(--paper-deep); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-wordmark { font-size: 8px; }
.footer-wordmark strong { font-size: 9px; }
.footer-wordmark svg { width: 25px; height: 25px; }
.site-footer p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.footer-note { white-space: nowrap; }

.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: min(350px, calc(100% - 48px)); padding: 14px 17px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .section { padding: 86px 0; }
  .site-nav { gap: 18px; }
  .hero { padding-top: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 55px; }
  .hero-diagram { max-width: 640px; width: 100%; }
  .intro-grid, .model-grid, .trust-grid { grid-template-columns: 1fr; gap: 45px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .split-heading { grid-template-columns: 1.1fr 0.8fr; gap: 35px; }
  .process-heading { grid-template-columns: 0.6fr 1.3fr; gap: 35px; }
  .company-cta-inner { align-items: start; flex-direction: column; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 36px), var(--max-width)); }
  .section { padding: 70px 0; }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; align-items: stretch; gap: 0; padding: 8px 18px 19px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 15px 22px rgba(20, 32, 31, 0.06); }
  .site-nav.is-open { display: flex; flex-direction: column; }
  .site-nav > a:not(.nav-cta) { padding: 12px 0; }
  .nav-cta { margin-top: 9px; text-align: center; }
  .hero { padding-top: 54px; padding-bottom: 70px; }
  .hero::before { right: -30%; width: 100%; opacity: 0.55; }
  h1 { font-size: clamp(2.65rem, 12vw, 4.1rem); }
  h2 { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-intro { font-size: 1.07rem; }
  .figma-hero-diagram { min-height: 0; gap: 14px; padding: 25px 20px 20px; }
  .diagram-title { font-size: 1.42rem; }
  .figma-hero-flow { grid-template-columns: 1fr; gap: 8px; }
  .figma-diagram-card { min-height: 0; gap: 9px; padding: 14px; }
  .figma-diagram-card strong, .figma-match-card strong { font-size: 1.06rem; }
  .figma-flow-connector { min-height: 48px; gap: 6px; }
  .figma-flow-arrow { width: 100px; height: 20px; transform: rotate(90deg) scale(0.3); }
  .figma-hero-footer { align-items: flex-start; flex-direction: column; gap: 13px; padding-top: 18px; }
  .figma-skill-list { gap: 5px; }
  .figma-skill-list li { padding: 6px 7px; font-size: 8px; }
  .figma-hero-footer > span { font-size: 8px; text-align: left; }
  .intro-grid, .split-heading, .process-heading { grid-template-columns: 1fr; gap: 18px; }
  .split-heading > p { max-width: 520px; }
  .section-heading { margin-bottom: 36px; }
  .work-grid, .engagements, .process-list { grid-template-columns: 1fr; }
  .work-card { min-height: 0; padding: 24px 22px 27px; }
  .work-card h3 { margin-top: 38px; }
  .model-grid { gap: 35px; }
  .engagement-card { padding: 27px 23px 21px; }
  .process-list { gap: 31px; }
  .process-list li { padding-top: 18px; }
  .figma-match-diagram { min-height: 0; gap: 14px; padding: 25px 20px 21px; }
  .figma-match-flow { grid-template-columns: 1fr; gap: 16px; }
  .figma-match-card { min-height: 0; padding: 16px 14px; }
  .figma-match-card .figma-card-label { margin-bottom: 12px; }
  .figma-match-card strong { margin-bottom: 13px; }
  .figma-match-card ul { gap: 10px; }
  .figma-match-criteria { gap: 10px; padding: 0; }
  .figma-match-criteria > span { text-align: center; }
  .figma-match-criteria ul { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .figma-match-criteria li { padding: 8px 7px; font-size: 8px; text-align: center; }
  .figma-match-arrow { display: none; }
  .figma-match-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 11px; }
  .company-cta { padding: 62px 0; }
  .company-cta .button, .engineer-inner .button { width: 100%; }
  .engineer-inner { align-items: stretch; flex-direction: column; gap: 27px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 13px; }
}

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