/* Format Strategics
   Monochrome, architectural. One typeface (Archivo, variable width + weight). */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f4f2;
  --white: #ffffff;
  --ink: #000000;
  --graphite: #2a2a2a;
  --steel: #5f5f5c;
  --rule: #d2d2ce;
  --line: #a9a9a4;
  --dark-text: #ffffff;
  --dark-muted: #a6a6a2;
  --dark-rule: #333333;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --max: 1240px;
  --header-h: 64px;
}

@media (min-width: 700px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; --header-h: 76px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 1100px) { body { font-size: 1.125rem; } }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.dark :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 8px; }

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

/* Type */
h1, h2 {
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
h3 { font-size: 1.1875rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.005em; }
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; max-width: 34em; }
p { max-width: 38em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: inherit; font-weight: 650; font-size: 1rem; letter-spacing: 0.005em;
  text-decoration: none; border: 2px solid var(--ink); border-radius: 0;
  cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.btn-solid { background: var(--ink); color: var(--white); }
.btn-solid:hover { background: var(--graphite); border-color: var(--graphite); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn-invert { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-invert:hover { background: transparent; color: var(--white); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 244, 242, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 30px; height: auto; }
.brand-word { width: 118px; height: auto; }
@media (min-width: 1100px) { .brand-mark { width: 34px; } .brand-word { width: 132px; } }

.site-nav ul { display: flex; gap: 28px; }
.site-nav a:not(.btn) {
  text-decoration: none; font-size: .9688rem; font-weight: 500; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--ink); }

.menu-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 4px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s ease, background-color .2s ease;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; gap: 36px; }
}
@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--paper); border-bottom: 1px solid var(--ink);
    padding: 8px var(--gutter) 24px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li a:not(.btn) { display: block; padding: 16px 0; font-size: 1.25rem; font-weight: 600; border-bottom: 1px solid var(--rule); }
  .site-nav .btn { margin-top: 20px; width: 100%; min-height: 52px; font-size: 1rem; }
}

/* Hero */
.hero { position: relative; border-bottom: 1px solid var(--ink); overflow: hidden; }
.hero-grid {
  position: relative;
  display: grid; gap: 40px;
  padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 72px);
}
/* drafting columns behind the hero */
.hero-grid::before {
  content: ""; position: absolute; inset: 0 var(--gutter); pointer-events: none; z-index: 0;
  background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  border-right: 1px solid var(--rule);
  opacity: .55;
}
@media (min-width: 900px) { .hero-grid::before { background-size: calc(100% / 12) 100%; } }
.hero-copy, .hero-figure { position: relative; z-index: 1; }
.hero-copy .lead { margin-top: 24px; }
.hero-copy .lead + .lead { margin-top: 14px; color: var(--graphite); }
.hero-copy h1 { max-width: 15ch; }
.hero-figure { display: flex; align-items: center; justify-content: center; }
.drawing { width: min(100%, 520px); height: auto; }
@media (max-width: 899px) { .drawing { width: min(78%, 360px); } }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 7fr 5fr; align-items: center; gap: 24px; }
}

.drawing .c { stroke: var(--line); stroke-width: 1; stroke-dasharray: .02 .015; fill: none; }
.drawing .d { stroke: var(--steel); stroke-width: 1.25; fill: none; }
.drawing .m { stroke: var(--ink); stroke-width: 14; fill: none; stroke-linejoin: miter; stroke-linecap: butt; }

/* One orchestrated moment: the mark is drafted on load */
@media (prefers-reduced-motion: no-preference) {
  .js .drawing .g-c > *, .js .drawing .g-d > * { opacity: 0; animation: fade-in .6s ease forwards; animation-delay: .1s; }
  .js .drawing .g-d > * { animation-delay: 1.5s; }
  .js .drawing .m { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw 1s cubic-bezier(.6,0,.2,1) forwards; }
  .js .drawing .g-m > :nth-child(1) { animation-delay: .25s; animation-duration: 1.2s; }
  .js .drawing .g-m > :nth-child(2) { animation-delay: .9s; }
  .js .drawing .g-m > :nth-child(3) { animation-delay: 1.1s; animation-duration: .6s; }
  .js .drawing .g-m > :nth-child(4) { animation-delay: 1.35s; animation-duration: .7s; }
  .js .drawing .g-m > :nth-child(5) { animation-delay: 1.6s; animation-duration: .4s; }
  .js .drawing .g-m > :nth-child(6) { animation-delay: 1.7s; animation-duration: .7s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }

.hero-foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding-top: 18px; padding-bottom: 18px;
  border-top: 1px solid var(--rule);
  font-size: .9375rem; color: var(--steel);
}
.hero-foot p:first-child { color: var(--ink); font-weight: 650; }

/* Sections */
section { padding: clamp(64px, 9vw, 128px) 0; }
.hero { padding: 0; }
.dark { background: var(--ink); color: var(--dark-text); }

.split { display: grid; gap: 32px; }
.split-head p { margin-top: 18px; color: var(--steel); max-width: 26em; }
@media (min-width: 900px) {
  .split { grid-template-columns: 4fr 8fr; gap: 48px; }
}

/* Problems */
.problem-grid { display: grid; border-top: 2px solid var(--ink); }
.problem-grid li { padding: 26px 0 30px; border-bottom: 1px solid var(--rule); }
.problem-grid h3 { margin-bottom: 8px; }
.problem-grid p { color: var(--graphite); }
@media (min-width: 640px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .problem-grid li { padding-right: 32px; }
  .problem-grid li:nth-child(2n) { padding-left: 32px; padding-right: 0; border-left: 1px solid var(--rule); }
}

/* Services */
.services h2 { margin-bottom: clamp(32px, 5vw, 64px); }
.service-list { border-top: 1px solid var(--dark-text); }
.service { display: grid; gap: 14px; padding: 32px 0 36px; border-bottom: 1px solid var(--dark-rule); }
.service h3 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 750; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.1; }
.service-body p { color: var(--dark-text); }
.service-body .example { margin-top: 14px; color: var(--dark-muted); font-size: .9688rem; }
@media (min-width: 900px) {
  .service { grid-template-columns: 5fr 7fr; gap: 48px; padding: 40px 0 44px; }
}

/* Process */
.process h2 { margin-bottom: clamp(36px, 5vw, 64px); }
.steps { display: grid; gap: 0; counter-reset: none; }
.steps li { position: relative; padding: 24px 0 28px; border-top: 2px solid var(--ink); }
.step-num {
  display: block; font-weight: 800; font-stretch: 125%; font-size: 1rem; letter-spacing: .02em;
  margin-bottom: 18px; font-variant-numeric: tabular-nums;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--graphite); }
@media (min-width: 700px) {
  .steps { grid-template-columns: 1fr 1fr; column-gap: 32px; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 0; }
  .steps li { padding-right: 28px; }
  .steps li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
  .steps li::before {
    content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px;
    background: var(--paper); border: 2px solid var(--ink); transform: rotate(45deg);
  }
  .steps li + li::before { left: -6px; }
}

/* Selected work */
.work { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.work-head { margin-bottom: clamp(36px, 5vw, 64px); }
.work-head p { margin-top: 16px; color: var(--steel); }
.project { display: grid; gap: 28px; padding: 36px 0; border-top: 2px solid var(--ink); }
.project:last-child { padding-bottom: 0; }
@media (min-width: 900px) {
  .project { grid-template-columns: 6fr 6fr; gap: 56px; padding: 48px 0; align-items: start; }
  .project:nth-of-type(even) .project-media { order: 2; }
}
.project-media img { width: 100%; height: auto; border: 1px solid var(--rule); }
.project-text h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 750; font-stretch: 112%; letter-spacing: -0.015em; margin-bottom: 18px; }
.project-text dl { display: grid; gap: 4px; }
.project-text dt { font-weight: 700; font-size: .9375rem; margin-top: 14px; }
.project-text dt:first-child { margin-top: 0; }
.project-text dd { color: var(--graphite); max-width: 36em; }


/* About */
.about-lead { font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; max-width: 24em; }
.about-body p + p { margin-top: 18px; }
.about-body p:not(.about-lead) { color: var(--graphite); }
.about-body .about-lead + p { margin-top: 28px; }

/* Contact */
.contact-grid { display: grid; gap: 48px; }
.contact h2 { font-size: clamp(2.125rem, 5vw, 4rem); max-width: 16ch; }
.contact .lead { margin-top: 24px; color: var(--dark-text); }
.contact-note { margin-top: 16px; color: var(--dark-text); font-size: 1rem; font-weight: 600; letter-spacing: .01em; }
.contact-direct { margin-top: 18px; color: var(--dark-muted); }
.contact-direct a { color: var(--dark-text); text-underline-offset: 3px; }
@media (min-width: 1000px) {
  .contact-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
}

.inquiry { border-top: 1px solid var(--dark-text); padding-top: 24px; }
.inquiry h3 { margin-bottom: 20px; }
.form-note { margin-top: 12px; color: var(--dark-muted); font-size: .9375rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--dark-text);
  background: transparent; border: 1px solid #5a5a58; border-radius: 0; padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--dark-text); box-shadow: inset 0 0 0 1px var(--dark-text); }
.field [aria-invalid="true"] { border-color: #ff8a80; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; min-height: 1.5em; color: var(--dark-muted); }
.form-status.error { color: #ffb4ab; }

/* Footer */
.site-footer { background: var(--ink); color: var(--dark-muted); border-top: 1px solid var(--dark-rule); padding: 40px 0 48px; font-size: .9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: flex-end; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img:first-child { width: 36px; height: auto; }
.footer-brand img:last-child { width: 140px; height: auto; }
.footer-meta { display: grid; gap: 6px; text-align: left; }
@media (min-width: 700px) { .footer-meta { text-align: right; } .social { justify-content: flex-end; } }
.footer-meta a { color: var(--dark-text); text-underline-offset: 3px; }
.social { display: flex; gap: 18px; }
.copy { color: #8a8a87; }

/* Utility pages (book, thanks, 404) */
.page-simple { min-height: 100vh; display: grid; place-items: center; padding: 48px var(--gutter); text-align: left; }
.page-simple .box { max-width: 560px; }
.page-simple img { width: 56px; height: auto; margin-bottom: 32px; }
.page-simple h1 { font-size: clamp(2rem, 6vw, 3.25rem); margin-bottom: 18px; }
.page-simple p { color: var(--graphite); }
.page-simple .actions { margin-top: 28px; }

.btn:disabled { opacity: .4; cursor: default; pointer-events: none; }

/* Signature details, borrowed from the hero drawing */
/* Section marks: sheet number plus a dimension line with slanted ticks */
.mark {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; color: var(--steel);
  font-variant-numeric: tabular-nums;
}
.mark::after {
  content: ""; width: 88px; height: 10px; transform: skewX(-32deg);
  border-left: 1.25px solid currentColor; border-right: 1.25px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.25px no-repeat;
}
.dark .mark { color: var(--dark-muted); }
.services .mark, .process .mark { margin-bottom: 18px; }

/* Project images: drafting registration marks at the corners */
.project-media { position: relative; }
.project-media::before {
  content: ""; position: absolute; inset: -9px; pointer-events: none; z-index: 1;
  --c: var(--line); --l: 14px; --w: 1.25px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l) no-repeat;
}
@media (max-width: 600px) { .project-media::before { inset: -6px; --l: 10px; } }

/* Selective pointer: a drafting crosshair over the hero drawing and project images (mouse only) */
@media (hover: hover) and (pointer: fine) {
  .hero .hero-figure, .project-media .media-open { cursor: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"%3E%3Cg fill="none" stroke-linecap="square"%3E%3Cpath d="M16 2v10M16 20v10M2 16h10M20 16h10" stroke="%23fff" stroke-width="3"/%3E%3Cpath d="M16 2v10M16 20v10M2 16h10M20 16h10" stroke="%23000" stroke-width="1.25"/%3E%3Crect x="14" y="14" width="4" height="4" stroke="%23fff" stroke-width="3"/%3E%3Crect x="14" y="14" width="4" height="4" stroke="%23000" stroke-width="1.25"/%3E%3C/g%3E%3C/svg%3E') 16 16, crosshair; }
}
