/* bcltl — one stylesheet for the whole site. */

:root {
  --paper: #f6f5f1;
  --paper-2: #eeece6;
  --ink: #151513;
  --ink-2: #3c3b37;
  --muted: #6b6a64;
  --rule: #dcd9d1;
  --accent: #2346c8;
  --accent-ink: #ffffff;
  --plate: #e6e3db;
  --plate-line: #c9c5bb;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11110f;
    --paper-2: #181816;
    --ink: #edebe5;
    --ink-2: #c9c7c0;
    --muted: #8f8d86;
    --rule: #2c2b28;
    --accent: #8ea5ff;
    --accent-ink: #0d1330;
    --plate: #1c1c19;
    --plate-line: #3a3935;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

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

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */

.display {
  font-family: var(--serif);
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1.0;
  letter-spacing: -0.015em;
}
.display em { font-style: italic; color: var(--muted); }

.h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }

.lede { font-size: clamp(19px, 2vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 40ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.wordmark {
  font-weight: 600; font-size: 22px; letter-spacing: -0.03em; text-decoration: none;
}
.wordmark span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]:not(.nav-cta) { box-shadow: inset 0 -1px 0 currentColor; }

.nav-toggle { display: none; }

.nav-cta, .button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper) !important;
  font-weight: 500; text-decoration: none; font-size: 15px;
  transition: background .15s ease;
}
.nav-cta:hover, .button:hover { background: var(--accent); color: var(--accent-ink) !important; }

.button-ghost {
  background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--rule);
}
.button-ghost:hover { background: var(--paper-2); color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink); }

.arrow::after { content: "→"; transition: transform .15s ease; }
a:hover .arrow::after, .arrow:hover::after { transform: translateX(3px); }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block; font: inherit; font-size: 15px; font-weight: 500;
    background: none; border: 1px solid var(--rule); color: var(--ink);
    padding: 7px 14px; border-radius: 999px; cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .site-nav a[aria-current="page"]:not(.nav-cta) { box-shadow: none; }
  .site-nav .nav-cta { margin-top: 16px; justify-content: center; border-bottom: 0; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 128px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }

.hero { padding: clamp(72px, 12vw, 160px) 0 clamp(56px, 8vw, 104px); }
.hero .display { max-width: 15ch; margin: 22px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.page-head { padding: clamp(64px, 10vw, 128px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--rule); }
.page-head .display { margin: 20px 0 24px; max-width: 16ch; }

/* ---------- Capabilities strip ---------- */

.strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}
.strip > div { padding: 22px 22px 0 0; }
.strip > div + div { padding-left: 22px; border-left: 1px solid var(--rule); }
.strip strong { display: block; font-weight: 600; margin-bottom: 4px; }
.strip span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .strip > div { padding-bottom: 22px; }
}
@media (max-width: 480px) {
  .strip { grid-template-columns: 1fr; }
  .strip > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- Work grid ---------- */

.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.work-card { text-decoration: none; display: grid; gap: 16px; }
.work-card .plate { transition: transform .25s ease; }
.work-card:hover .plate { transform: translateY(-3px); }
.work-card .meta { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.work-card h3 { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.work-card p { color: var(--muted); margin: 0; max-width: 46ch; }
.tag { font-size: 13px; color: var(--muted); white-space: nowrap; }

.plate {
  aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: var(--plate); border: 1px solid var(--rule);
  color: var(--plate-line);
}
.plate svg { width: 100%; height: 100%; }
.plate .hi { color: var(--accent); }
.plate .ink { color: var(--ink-2); }

/* ---------- Lists: services, steps ---------- */

.rows { border-top: 1px solid var(--rule); }
.row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px;
  padding: 30px 0; border-bottom: 1px solid var(--rule);
}
.row h3 { font-family: var(--serif); font-size: 30px; line-height: 1.15; }
.row p { color: var(--ink-2); margin: 0; }
.row ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.row li { font-size: 14px; padding: 4px 11px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.steps > div { border-top: 1px solid var(--ink); padding-top: 18px; counter-increment: step; }
.steps > div::before {
  content: counter(step, decimal-leading-zero); display: block;
  font-size: 13px; color: var(--muted); margin-bottom: 26px; letter-spacing: .06em;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 16px; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.prose { max-width: 64ch; color: var(--ink-2); }
.prose h2 { font-family: var(--serif); font-size: 32px; color: var(--ink); margin: 56px 0 14px; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--muted); }

/* ---------- Case study ---------- */

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule); margin-top: 48px;
}
.facts > div { padding: 18px 20px 0 0; }
.facts dt { font-size: 13px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 16px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; row-gap: 8px; } }

.case-plate { margin-top: clamp(40px, 6vw, 72px); }
.case-plate .plate { aspect-ratio: 21 / 9; }
@media (max-width: 600px) { .case-plate .plate { aspect-ratio: 4 / 3; } }

.case-body { padding: clamp(56px, 8vw, 104px) 0; }
.aside { font-size: 15px; color: var(--muted); }
.aside .h3 { color: var(--ink); margin-bottom: 10px; }
.aside ul { list-style: none; padding: 0; margin: 0 0 32px; }
.aside li { padding: 8px 0; border-bottom: 1px solid var(--rule); }

.next-case {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 40px 0; border-top: 1px solid var(--rule); text-decoration: none;
}
.next-case strong { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 44px); }

/* ---------- CTA band ---------- */

.cta-band { background: var(--ink); color: var(--paper); padding: clamp(64px, 9vw, 112px) 0; }
.cta-band .h2 { max-width: 18ch; }
.cta-band p { color: color-mix(in srgb, var(--paper) 70%, transparent); max-width: 46ch; margin: 18px 0 32px; }
.cta-band .button { background: var(--paper); color: var(--ink) !important; }
.cta-band .button:hover { background: var(--accent); color: var(--accent-ink) !important; }
@media (prefers-color-scheme: dark) {
  .cta-band { background: var(--paper-2); color: var(--ink); border-top: 1px solid var(--rule); }
  .cta-band p { color: var(--muted); }
  .cta-band .button { background: var(--ink); color: var(--paper) !important; }
}

/* ---------- Contact ---------- */

.contact-mail {
  font-family: var(--serif); font-size: clamp(32px, 6vw, 64px); line-height: 1.1;
  text-decoration: none; border-bottom: 1px solid var(--rule); word-break: break-word;
}
.contact-mail:hover { border-color: currentColor; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); padding: 48px 0 56px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid nav { display: grid; gap: 6px; align-content: start; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid p { margin: 6px 0 0; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
