/* Kinnear Architects — site.css
   Single stylesheet. No framework, no preprocessor, no JavaScript.
   Order per plan.md: font-face, tokens, reset, base, primitives,
   components, page overrides, motion/print. */

/* ---------- 1. Font ---------- */

@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/InterTight-latin.woff2') format('woff2');
  font-weight: 100 900;          /* variable: one file covers the range */
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Tokens ---------- */

:root {
  --ink: #111111;
  --ink-mute: #6b6b6b;
  --rule: #e0e0e0;
  --paper: #ffffff;
  --paper-alt: #f4f3f1;

  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --display: clamp(2.5rem, 7vw, 5.5rem);
  --h2: clamp(1.5rem, 3vw, 2.25rem);
  --h3: clamp(1.125rem, 1.6vw, 1.375rem);
  --body: 1.0625rem;
  --meta: 0.8125rem;

  --gutter: 24px;
  --maxw: 1600px;
  --section: clamp(4rem, 10vw, 9rem);

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
}

/* ---------- 3. Reset ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }

/* ---------- 4. Base ---------- */

body {
  font-family: var(--font);
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 400;              /* restraint reads as confidence */
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--display); letter-spacing: -0.03em; line-height: 1.02; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); letter-spacing: -0.01em; }

a { text-decoration: none; }

a:focus-visible,
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s2) var(--s3);
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- 5. Layout primitives ---------- */

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: 62ch;
}

.section { padding-block: var(--section); }

.section--alt { background: var(--paper-alt); }

.bleed {
  width: 100%;
}
.bleed img { width: 100%; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5) var(--gutter);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- 6. Components ---------- */

.meta {
  font-size: var(--meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Header */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: var(--s4);
}

.nav a {
  font-size: var(--meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-block: 2px;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Header variant sitting over the hero image */

.site-header--over {
  border-bottom: 0;
  position: relative;
  z-index: 2;
  color: var(--paper);
}
.site-header--over .nav a { color: rgba(255, 255, 255, 0.78); }
.site-header--over .nav a:hover,
.site-header--over .nav a[aria-current='page'] {
  color: var(--paper);
  border-bottom-color: var(--paper);
}
.site-header--over :focus-visible { outline-color: var(--paper); }

/* Hero */

.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  overflow: hidden;
}

/* Flex children shrink-wrap, which would defeat the auto margins in .wrap and
   centre the header instead of taking it out to the gutters. */
.hero > * { width: 100%; }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim: the header and title sit on white type, and a photograph cannot be
   relied on to be dark where they land. */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.46) 0%,
    rgba(0, 0, 0, 0.10) 32%,
    rgba(0, 0, 0, 0.28) 62%,
    rgba(0, 0, 0, 0.68) 100%
  );
}

.hero__body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-bottom: var(--s5);
  color: var(--paper);
}

.hero__title {
  max-width: 18ch;
}

.hero__lede {
  margin-top: var(--s3);
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.85);
}

/* Feature blocks (home) */

.feature { display: block; }

.feature + .feature { margin-top: var(--section); }

.feature__media { overflow: hidden; }

.feature__media img {
  width: 100%;
  transition: transform 600ms cubic-bezier(0.2, 0, 0.1, 1);
}

.feature:hover .feature__media img { transform: scale(1.02); }

.feature__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1px solid var(--rule);
}

.feature__title { font-size: var(--h3); }

.feature--half .feature__media img { aspect-ratio: 4 / 5; object-fit: cover; }

/* Project cards (index + grid) */

.project-card { display: block; }

.project-card__media { overflow: hidden; }

.project-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0, 0.1, 1);
}

.project-card:hover .project-card__media img { transform: scale(1.03); }

.project-card__caption {
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--rule);
}

.project-card__title { font-size: var(--h3); margin-bottom: 4px; }

/* Taxonomy labels — display only, not filters (spec §3) */

.taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  margin-top: var(--s3);
}

/* Page head */

.page-head {
  padding-top: var(--s5);
  padding-bottom: var(--s4);
}

.page-head__count { margin-top: var(--s2); }

/* Definition-list metadata block */

.factlist {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2) var(--gutter);
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

.factlist div > dt { margin-bottom: 4px; }
.factlist dd { font-size: var(--body); }

/* Prose blocks */

.prose p + p { margin-top: var(--s3); }

.lede {
  font-size: var(--h3);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 34ch;
}

/* People / awards lists */

.stack > li {
  padding-block: var(--s3);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--s3);
  justify-content: space-between;
}

/* Prev / next */

.pagenav {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding-block: var(--s4);
  border-top: 1px solid var(--rule);
}

/* Stub notice */

.stub-note {
  margin-top: var(--s4);
  padding: var(--s3);
  background: var(--paper-alt);
  color: var(--ink-mute);
  max-width: 62ch;
}

/* Placeholder-photography disclosure */

.disclosure {
  background: var(--paper-alt);
  border-top: 1px solid var(--rule);
  padding-block: var(--s3);
  font-size: var(--meta);
  color: var(--ink-mute);
  line-height: 1.5;
}
.disclosure a { text-decoration: underline; }

/* Footer */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--s5);
}

.site-footer a:hover { color: var(--paper); }
.site-footer :focus-visible { outline-color: var(--paper); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4) var(--gutter);
}

.site-footer h2 {
  font-size: var(--meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--s2);
}

.site-footer__colophon {
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: var(--meta);
  color: rgba(255, 255, 255, 0.5);
}

/* Image sequence on detail pages */

.seq > * + * { margin-top: var(--gutter); }

/* Derivatives are narrower than the column; without this they render at their
   intrinsic width and leave a ragged right edge. */
.seq img { width: 100%; }

.seq figcaption {
  margin-top: var(--s1);
  font-size: var(--meta);
  color: var(--ink-mute);
}

/* ---------- 7. Breakpoints ---------- */

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .factlist { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
  .seq--pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gutter);
  }
  .seq--pair > * + * { margin-top: 0; }
}

@media (min-width: 1024px) {
  .factlist { grid-template-columns: repeat(4, 1fr); }
  .site-footer__grid { grid-template-columns: repeat(4, 1fr); }
  .feature--half { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
  .feature--half .feature__caption { align-self: end; border-top: 0; }
  .hero__body { padding-bottom: var(--section); }
}

/* ---------- 8. Motion and print ---------- */

/* Only two selectors animate, so they can be disabled by name. This avoids the
   usual `* { ... !important }` nuke and keeps the no-!important rule in plan.md
   step 3 honest. */
@media (prefers-reduced-motion: reduce) {
  .feature__media img,
  .project-card__media img {
    transition: none;
  }
  .feature:hover .feature__media img,
  .project-card:hover .project-card__media img {
    transform: none;
  }
}

@media print {
  .site-header, .site-footer, .pagenav, .disclosure { display: none; }
  body { color: #000; background: #fff; }
}
