/* Scott Vasky, Design: site stylesheet. Source of truth: BRAND.md, tokens.css.
   Colour, spacing and layout variables come from tokens.css (loaded before this
   file). Type sizes here follow BRAND.md v2.0 §05 (Title/Sub/Body/Label) directly;
   tokens.css's own type variables predate that ladder and are not used here,
   see the build report for the reasoning. No colours are invented: every
   colour below is a var() reference into tokens.css. */

/* ---------- fonts ---------- */
@font-face {
  font-family: "Briller";
  src: url("/fonts/Briller-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Good Headline Pro";
  src: url("/fonts/goodheadlinepro-extdnews.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Good Headline Pro";
  src: url("/fonts/goodheadlinepro-extdnews-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Good Headline Pro";
  src: url("/fonts/goodheadlinepro-extd-black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.62 var(--font-text);
  position: relative;
}
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* page grain: fixed 3% over the whole page, per BRAND §07.6 / packet item 7 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/img/grain.png");
  background-repeat: repeat;
  opacity: .03;
  pointer-events: none;
  z-index: 1000;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 2000;
  transition: top var(--motion);
}
.skip-link:focus { top: 8px; }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--blue-deep);
  outline-offset: 2px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.seam__ink :focus-visible {
  outline-color: var(--blue);
}

/* ---------- type ---------- */
.t-title {
  font: 900 96px/0.98 var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.t-sub {
  font: 900 26px/1.3 var(--font-text);
  margin: 0;
}
.t-body {
  font: 400 17px/1.62 var(--font-text);
  margin: 0;
}
.t-label {
  font: 900 12px/1.2 var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0;
}
.t-caption {
  font: 400 13px/1.4 var(--font-text);
  color: var(--muted);
  margin: 0;
}
.t-body-small {
  font: 400 15px/1.62 var(--font-text);
  margin: 0;
}
.lead-in { font-weight: 900; }
em, i { font-style: italic; }
@media (max-width: 720px) {
  .t-title { font-size: 44px; }
  .t-sub { font-size: 21px; }
  .t-body { font-size: 16px; }
  .t-label { font-size: 11px; }
}

/* measure */
.measure { max-width: 680px; }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--margin-desktop));
  margin-inline: auto;
  padding-inline: var(--margin-desktop);
}
@media (max-width: 720px) {
  .wrap { padding-inline: var(--margin-mobile); }
}
main { display: block; }
.section { padding-top: var(--s-9); padding-bottom: var(--s-9); }
.section-tight { padding-top: var(--s-7); padding-bottom: var(--s-7); }
.stack > * + * { margin-top: var(--s-5); }
.stack-lg > * + * { margin-top: var(--s-9); }
.above-sub { margin-top: var(--s-7); }

/* ---------- arrival + state motion ---------- */
@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.arrive { animation: arrive 300ms ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .arrive { animation: none; }
}
a, button, .btn, .chip, .nav-list a {
  transition: color var(--motion), border-color var(--motion), background-color var(--motion);
}

/* ---------- header / nav ---------- */
.site-header { background: var(--ink); position: relative; }
.nav-bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.nav-mark { display: flex; align-items: center; width: 32px; height: 32px; flex: none; }
.nav-mark svg { width: 32px; height: 32px; }
.nav-list { display: flex; align-items: center; gap: var(--s-6); }
.nav-list a {
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-list a:hover { color: var(--blue); }
.nav-list a.current { color: var(--paper); }
.nav-list a.current .chevron { color: var(--blue); }
.chevron { width: 12px; height: 12px; flex: none; transform: rotate(-90deg); }
.nav-name { color: var(--paper); flex: none; }
.nav-toggle {
  display: none;
  color: var(--paper);
}
@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  #nav-menu {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 64px;
    background: var(--ink);
    padding: var(--s-4) var(--margin-mobile) var(--s-6);
    z-index: 500;
  }
  #nav-menu.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .nav-name { display: none; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  position: relative;
  padding-block: var(--s-8);
}
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/grain.png");
  background-repeat: repeat;
  opacity: .10;
  pointer-events: none;
}
.site-footer .wrap { position: relative; z-index: 1; }
.footer-design { color: var(--paper); margin-top: var(--s-2); }
.footer-line { color: var(--paper); margin-top: var(--s-5); }
.footer-line a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.footer-line a:hover { color: var(--paper); }
.footer-copy { margin-top: var(--s-3); color: var(--gray); }

/* ---------- seam ---------- */
.seam { position: relative; background: var(--paper); }
/* Fixed-height ink field so the seam line sits at a known offset from the
   title regardless of whether a page has an eyebrow (case studies) or not
   (home, contact) -- see the build report for the margin-top derivation. */
.seam__ink {
  background: var(--ink);
  position: relative;
  height: 172px;
  display: flex;
  align-items: flex-start;
  padding-top: var(--s-6);
}
.seam__ink::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/grain.png");
  background-repeat: repeat;
  opacity: .10;
  pointer-events: none;
}
.seam__eyebrow { position: relative; color: var(--blue); z-index: 1; }
.seam__title {
  color: var(--ink);
  margin-top: 0;
  position: relative;
  z-index: 1;
}
@supports (mix-blend-mode: difference) {
  .seam__title {
    color: #fff;
    mix-blend-mode: difference;
    /* Scott, 2026-09-17: the seam never crosses the middle of a line. The first
       line sits on Ink; the seam shaves only the top of the second line (about a
       fifth of its cap height, 20px at 96). One line: wholly on Ink, seam beneath.
       -(line box 96 * 0.98 = 94) - paper padding-top (24) - shave (20) */
    margin-top: -138px;
  }
}
@media (max-width: 720px) {
  .seam__ink { height: 100px; padding-top: var(--s-4); }
  @supports (mix-blend-mode: difference) {
    .seam__title { margin-top: -76px; } /* 44 * 0.98 = 43, plus 24, plus a 9px shave */
  }
}
.seam__paper { padding-top: var(--s-5); padding-bottom: var(--s-7); }
.seam__design { margin-top: var(--s-2); }
.seam__standfirst { margin-top: var(--s-5); max-width: 680px; }
.seam__pos { margin-top: var(--s-5); max-width: 680px; }
.seam__lede { margin-top: var(--s-4); max-width: 680px; }

/* facts row: case-study hero (4 pairs) */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  border-top: 1px solid var(--gray);
  border-bottom: 1px solid var(--gray);
  padding-block: var(--s-5);
  margin-top: var(--s-7);
}
.fact { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) {
  .facts { grid-template-columns: repeat(2, 1fr); row-gap: var(--s-4); }
}

/* proof list: home hero (Label // Body rows with a hairline between) */
.proof-list { margin-top: var(--s-7); max-width: 680px; }
.proof { padding-block: var(--s-3); display: flex; flex-direction: column; gap: 6px; }
.proof + .proof { border-top: 1px solid var(--gray); }
.proof .t-body { color: var(--graphite); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 900 14px/1 var(--font-text);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 14px 22px;
  border-radius: 0;
}
.btn-primary {
  background: var(--blue-deep);
  color: #fff;
  border: 1px solid var(--blue-deep);
}
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-primary:active { background: var(--ink); color: var(--blue); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

/* ---------- links in body ---------- */
.t-body a, .measure a {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.t-body a:hover, .measure a:hover { color: var(--ink); }
.on-ink a { color: var(--blue); }
.on-ink a:hover { color: var(--paper); }

/* ---------- filter chips (work index) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.chip {
  font: 900 12px/1.2 var(--font-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip:hover { border-color: var(--blue-deep); }

/* ---------- work index cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-7);
}
.card {
  border: 1px solid var(--gray);
  background: var(--white);
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--ink); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--white); padding: 16px; box-sizing: border-box; }
.card-body { padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.card-body .t-sub { font-size: 21px; }
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ---------- case-study copy ---------- */
.copy p { max-width: 680px; }
.copy p + p { margin-top: var(--s-5); }

/* ---------- artifacts ---------- */
.artifacts { margin-top: var(--s-9); }
.artifacts > * + * { margin-top: var(--s-7); }
figure { margin: 0; }
figcaption { margin-top: var(--s-2); }

.art-full img { width: 100%; }

.art-row { display: grid; gap: var(--s-5); }
.art-row.r2 { grid-template-columns: repeat(2, 1fr); }
.art-row.r3 { grid-template-columns: repeat(3, 1fr); }
.art-row.r4-3 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .art-row.r2, .art-row.r3 { grid-template-columns: 1fr; }
  .art-row.r4-3 { grid-template-columns: repeat(2, 1fr); }
}
.art-row img { width: 100%; }

/* light-ground pieces: shared White panel + hairline */
.art-row.is-light {
  background: var(--white);
  border: 1px solid var(--gray);
  padding: var(--s-6);
  align-items: center;
}
@media (max-width: 720px) {
  .art-row.is-light { padding: var(--s-4); }
}

/* pages: flat, hairline around each */
.art-row.is-page img,
.art-half.is-page img { border: 1px solid var(--gray); }

.art-half { max-width: 588px; }
.art-half img { width: 100%; }
.art-small { max-width: 384px; }
.art-small img { width: 100%; }

/* before/after */
.before-after { display: flex; gap: var(--s-5); align-items: flex-start; }
.before-after .col { flex: 1 1 0; min-width: 0; }
.before-after .divider { width: 1px; align-self: stretch; background: var(--gray); flex: none; }
.before-after .t-label { margin-bottom: var(--s-3); }
.before-after img { width: 100%; }
@media (max-width: 720px) {
  .before-after { flex-direction: column; }
  .before-after .divider { width: auto; height: 1px; align-self: stretch; }
}

/* merch caption group (A Defense for Catholicism) */
.merch-group > * + * { margin-top: var(--s-7); }
.merch-group + .t-caption { margin-top: var(--s-3); }

/* ---------- next / all work ---------- */
.case-foot {
  margin-top: var(--s-9);
  padding-top: var(--s-5);
  border-top: 1px solid var(--gray);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  align-items: center;
}
.case-foot .next-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.case-foot .next-link:hover { color: var(--blue-deep); }
.case-foot .next-link .chevron { color: var(--blue); }
.case-foot .all-work { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 2px; }
.case-foot .all-work:hover { color: var(--ink); }

/* ---------- about hero (photographic register) ---------- */
.about-hero {
  background: var(--blue);
  position: relative;
  min-height: 60vh;
  overflow: hidden;
}
.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/grain.png");
  background-repeat: repeat;
  opacity: .08;
  pointer-events: none;
}
.about-hero img {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: 70%;
  object-fit: contain;
  object-position: bottom right;
}
@media (max-width: 720px) {
  .about-hero { min-height: 70vw; }
  .about-hero img { max-width: 85%; }
}
.about-lines { margin-top: var(--s-7); display: flex; flex-direction: column; gap: var(--s-3); }
.about-lines .proof { padding-block: var(--s-3); }
.about-inline-mark { max-width: 160px; margin-top: var(--s-7); }
.about-inline-mark img { width: 100%; }

/* ---------- 404 ---------- */
.not-found { min-height: 50vh; display: flex; flex-direction: column; justify-content: center; }

/* ---------- utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
