/* Reset */
html, body { margin: 0; padding: 0; background: var(--paper); }
*, *::before, *::after { box-sizing: border-box; }

/* Design tokens */
:root {
  --paper: #FAF7F1;
  --ink: #1A1816;
  --body: #57534B;
  --muted: #8A857C;
  --border: #E5E0D6;
  --border-tinted: #E0DACE;
  --border-input: #D8D3C9;
  --border-hover: #C9C3B7;
  --bronze: #9A7142;
  --bronze: oklch(0.55 0.09 60);
  --bronze-hover: oklch(0.5 0.09 60);
  --indigo: oklch(0.45 0.15 280);
  --indigo-hover: oklch(0.39 0.14 280);
  --indigo-band: oklch(0.29 0.10 280);
  --indigo-band-muted: oklch(0.74 0.045 280);
  --btn-hover: #3B362E;
  --btn-light-hover: #E5E0D6;
  --tinted-bg: #F3EFE6;
  --dark-muted: #B5AFA3;
  --error: oklch(0.5 0.16 30);
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --gutter: clamp(20px, 5vw, 56px);
  --section-py: clamp(48px, 7vw, 96px);
}

/* Base typography */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { transition: color 150ms ease, background 150ms ease, border-color 150ms ease; }

/* Page wrapper */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- NAV ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px clamp(16px, 2.5vw, 36px);
  font-size: 14px;
  font-weight: 500;
}
.nav-link {
  color: var(--body);
  text-decoration: none;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.btn-pill {
  display: inline-block;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}
.btn-pill-sm {
  padding: 11px 22px;
  font-size: 13.5px;
}
.btn-solid {
  background: var(--indigo);
  color: var(--paper);
}
.btn-solid:hover { background: var(--indigo-hover); }
.btn-outline {
  border: 1px solid var(--border-hover);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { border-color: var(--ink); }
.btn-light {
  background: var(--paper);
  color: var(--indigo-band);
}
.btn-light:hover { background: var(--btn-light-hover); }

/* ---- FOOTER ---- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}
.footer-copy {
  font-size: 12.5px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  color: var(--body);
}
.footer-link {
  color: var(--body);
  text-decoration: none;
}
.footer-link:hover { color: var(--ink); }
.footer-labs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}
.footer-labs:hover { color: var(--ink); }

/* ---- EYEBROW ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* ---- CTA BAND ---- */
.cta-band {
  background: var(--indigo-band);
  color: var(--paper);
  padding: clamp(56px, 8vw, 88px) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 46px);
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 640px;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
.cta-band p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--indigo-band-muted);
  max-width: 480px;
  text-wrap: pretty;
  margin: 0;
}
.cta-band-about {
  padding: clamp(48px, 7vw, 72px) var(--gutter);
  margin-top: auto;
}
.cta-band-about h2 {
  font-size: clamp(30px, 3.5vw, 40px);
}

/* ---- HERO (Home) ---- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.hero-text {
  flex: 1 1 480px;
  padding: var(--section-py) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  margin: 0;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--indigo);
}
.hero-cursor {
  display: inline-block;
  width: 2px;
  height: 0.75em;
  background: var(--indigo);
  margin-left: 2px;
  vertical-align: baseline;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  max-width: 500px;
  text-wrap: pretty;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}
.hero-canvas {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 56px;
}
.hero-canvas canvas {
  width: min(440px, 80vw);
  aspect-ratio: 1 / 1;
}

/* ---- CAPABILITY STRIP ---- */
.capability-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.capability-cell {
  background: var(--paper);
  padding: 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (min-width: 920px) {
  .capability-cell:first-child {
    padding-left: var(--gutter);
  }
}
.capability-title {
  font-size: 14.5px;
  font-weight: 600;
}
.capability-caption {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- SECTION ---- */
.section {
  padding: clamp(56px, 8vw, 96px) var(--gutter);
}
.section-top {
  padding-top: 0;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--bronze-hover);
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { color: var(--ink); }

/* ---- CARDS ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FFFFFF;
  transition: border-color 150ms ease;
}
.card:hover { border-color: var(--border-hover); }
.card-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bronze);
}
.card-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
.card-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--body);
}

/* ---- HOW WE WORK ---- */
.how-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.how-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.how-intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  max-width: 560px;
  text-wrap: pretty;
  margin: 0;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0 36px;
  border-top: 1px solid var(--border);
}
.how-step {
  padding: 32px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.how-step-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.how-step-num {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--indigo);
}
.how-step-name {
  font-size: 16px;
  font-weight: 600;
}
.how-step-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--body);
}

/* ---- SERVICES PAGE ---- */
.services-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: clamp(48px, 7vw, 80px) var(--gutter) clamp(40px, 6vw, 64px);
  gap: 32px;
}
.services-header-text {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.services-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.015em;
  max-width: 640px;
  text-wrap: pretty;
  margin: 0;
}
.services-header-body {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--body);
  max-width: 560px;
  text-wrap: pretty;
}
.services-header canvas {
  width: min(260px, 60vw);
  aspect-ratio: 1 / 1;
}
.service-list {
  padding: 0 var(--gutter) clamp(48px, 7vw, 80px);
  display: flex;
  flex-direction: column;
}
.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.service-row:last-child {
  border-bottom: 1px solid var(--border);
}
.service-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bronze);
  padding-top: 8px;
  width: 48px;
}
.service-name {
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  flex: 1 1 240px;
}
.service-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
  flex: 1.3 1 320px;
}

/* Engagement model band */
.engagement-band {
  background: var(--tinted-bg);
  padding: clamp(48px, 7vw, 80px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.engagement-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.engagement-intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  max-width: 560px;
  text-wrap: pretty;
  margin: 0;
}
.engagement-card {
  background: #FFFFFF;
  border: 1px solid var(--border-tinted);
  border-radius: 14px;
  padding: 30px 30px 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.engagement-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.engagement-card-num {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--indigo);
}
.engagement-card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.engagement-card-title {
  font-size: 16px;
  font-weight: 600;
}
.engagement-card-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--body);
}
.engagement-band > .btn-pill {
  align-self: flex-start;
}

/* ---- ABOUT PAGE ---- */
.about-header {
  padding: clamp(48px, 7vw, 80px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
}
.about-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  margin: 0;
}
.about-story {
  padding: 48px var(--gutter) clamp(48px, 7vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(40px, 5vw, 72px);
}
.about-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--body);
  max-width: 600px;
}
.about-paragraphs p {
  text-wrap: pretty;
  margin: 0;
}
.principles {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.principles-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 6px;
}
.principle {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.principle:last-child {
  border-bottom: 1px solid var(--border);
}
.principle-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
}
.principle-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* Labs callout */
.labs-callout {
  margin: 0 var(--gutter) clamp(48px, 7vw, 80px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  background: var(--tinted-bg);
}
.labs-callout-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.labs-callout-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
  max-width: 560px;
}
.labs-callout-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--bronze-hover);
  text-decoration: none;
  white-space: nowrap;
}
.labs-callout-link:hover { color: var(--ink); }

/* ---- LABS PAGE ---- */
.labs-article {
  padding: clamp(48px, 7vw, 80px) var(--gutter) var(--section-py);
  display: flex;
  justify-content: center;
  flex: 1;
}
.labs-content {
  max-width: 660px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.labs-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 46px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  margin: 0;
}
.labs-body {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--body);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.labs-body p {
  text-wrap: pretty;
  margin: 0;
}
.labs-principles {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.labs-principle {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 20px;
}
.labs-principle:last-child {
  border-bottom: 1px solid var(--border);
}
.labs-principle-label {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
}
.labs-principle-desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--body);
}
.labs-note {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}
.labs-back {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--bronze-hover);
  text-decoration: none;
}
.labs-back:hover { color: var(--ink); }

/* ---- CONTACT PAGE ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(40px, 5vw, 72px);
  padding: clamp(48px, 7vw, 80px) var(--gutter) var(--section-py);
  flex: 1;
}
.contact-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 480px;
}
.contact-left h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.07;
  letter-spacing: -0.015em;
  text-wrap: pretty;
  margin: 0;
}
.contact-intro {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}
.contact-steps {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
}
.contact-step {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.contact-step:last-child {
  border-bottom: 1px solid var(--border);
}
.contact-step-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--indigo);
  min-width: 24px;
}
.contact-step-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
}
.contact-step-text strong {
  color: var(--ink);
  font-weight: 600;
}
.contact-email {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}
.contact-email canvas {
  width: 96px;
  height: 96px;
}
.contact-email-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.contact-email-link {
  color: var(--bronze-hover);
  text-decoration: none;
  font-weight: 500;
}
.contact-email-link:hover { color: var(--ink); }

/* Form card */
.form-card {
  background: #FFFFFF;
  border: 1px solid var(--border-tinted);
  border-radius: 16px;
  padding: clamp(24px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: 0 24px 48px -36px rgba(26,24,22,0.3);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
}
.form-label-optional {
  font-weight: 400;
  color: var(--muted);
}
.form-input,
.form-textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--border-input);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color 150ms ease, background 150ms ease;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--bronze);
  background: #FFFFFF;
}
.form-textarea {
  resize: vertical;
  line-height: 1.6;
}
.form-error {
  font-size: 13.5px;
  color: var(--error);
  line-height: 1.5;
}
.form-submit {
  font-family: var(--font-sans);
  background: var(--indigo);
  color: var(--paper);
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background 150ms ease;
}
.form-submit:hover { background: var(--indigo-hover); }

/* Success state */
.form-success {
  background: #FFFFFF;
  border: 1px solid var(--border-tinted);
  border-radius: 16px;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  box-shadow: 0 24px 48px -36px rgba(26,24,22,0.3);
}
.form-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.form-success h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  margin: 0;
}
.form-success p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
  max-width: 360px;
  margin: 0;
}
.form-reset-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--bronze-hover);
  cursor: pointer;
  margin-top: 8px;
  background: none;
  border: none;
  font-family: var(--font-sans);
}
.form-reset-link:hover { color: var(--ink); }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
