/* =========================================================
   Brendan Whitaker — minimal 5-column grid
   Black on white · red #ED0C0C display · blue #1666C4 links
   Instrument Serif (display) · Inter 300 (body) · Overpass 800 (red)
   No cards · no borders around content · no shadows · square corners
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
ul { list-style: none; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  --ink: #0a0a0a;
  --ink-soft: rgba(0,0,0,0.851);
  --paper: #ffffff;
  --red: #ED0C0C;
  --blue: #1666C4;
  --hair: rgba(0,0,0,0.85);
  --hair-soft: rgba(0,0,0,0.16);
  --muted: rgba(0,0,0,0.55);

  --shell: 2400px;            /* full-width until truly extreme screens */
  --pad-x: clamp(1.25rem, 3vw, 4rem);
  --col-gap: clamp(1rem, 2.5vw, 2.5rem);
  --sec-y: clamp(4rem, 9vw, 8.5rem);

  /* vertical rhythm for copy stacks */
  --flow-label: 1.4rem;   /* kicker label → heading   */
  --flow-head:  1.55rem;  /* heading → lead/body      */
  --flow-lead:  1.3rem;   /* lead → body              */
  --flow-cta:   2.25rem;  /* body → button            */

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Overpass', var(--sans);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
html { color: var(--ink); }
body {
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
[id] { scroll-margin-top: 96px; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- Type ---------- */
.serif-display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  font-size: clamp(2.4rem, 5vw, 4rem);
  text-wrap: balance;
}
.serif-display em { font-style: italic; }

.red-display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.0;
  letter-spacing: 0.02em;
  color: var(--red);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
}

.serif-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.serif-lead em { font-style: italic; }

.serif-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  line-height: 1.1;
  color: var(--ink);
}

.body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  max-width: 46ch;
}
.body + .body { margin-top: 1.1rem; }

.label {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.175rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink);
}
.caption {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.role {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14rem;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---------- Button (1px square, invert on hover) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  font-size: 0.72rem;
  padding: 1.05rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .28s var(--ease), color .28s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.btn .arw { transition: transform .28s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

/* ---------- Icons ---------- */
.nav-social a, .contact-social a, .testi-icons a, .org-icons a {
  display: inline-flex;
  color: var(--ink);
  transition: opacity .2s var(--ease);
}
.nav-social a:hover, .contact-social a:hover,
.testi-icons a:hover, .org-icons a:hover { opacity: 0.55; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 200; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- Header (transparent; each zone inverts over dark backgrounds) ----------
   The nav has no background. A small script measures the content directly behind
   each zone (logo / links / icons / toggle) and adds .on-dark to invert just that
   zone to white — so a half-dark row (e.g. photo left, copy right) stays legible. */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: transparent;
}
.on-dark { --nav-fg: #fff; }             /* a zone sitting over a dark background */
.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.brand img {
  width: 40px; height: 40px;
  filter: invert(1);                     /* white monogram → black over light bg */
  transition: filter .35s var(--ease);
}
.brand.on-dark img { filter: invert(0); } /* → white over dark bg */
.nav-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 0.7rem;
}
.nav-center a {
  text-transform: uppercase; letter-spacing: 0.14rem;
  font-size: 0.72rem; font-weight: 500; text-decoration: none;
  color: var(--nav-fg, var(--ink));
  transition: color .35s var(--ease);
}
.nav-center a:hover { color: var(--red); }
.nav-center .dot { color: var(--nav-fg, var(--muted)); opacity: 0.55; }
.nav-social { display: flex; align-items: center; gap: 1.1rem; }
.nav-social a { color: var(--nav-fg, var(--ink)); transition: color .35s var(--ease); }

.nav-toggle {
  display: none; flex-direction: column; gap: 6px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--nav-fg, var(--ink)); transition: transform .3s var(--ease), opacity .3s var(--ease), background .35s var(--ease); }
.mobile-nav { display: none; }

/* ---------- Section grid (5 columns) ---------- */
.hero, .mission, .testimonials, .work, .contact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: var(--col-gap);
  align-items: start;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4rem) var(--sec-y); row-gap: clamp(2.5rem, 6vw, 5rem); }
.hero-media { grid-column: 2 / 5; }
.hero-media img { width: 100%; }
.hero-copy { grid-column: 1 / 5; }
.hero-copy .label { margin-bottom: var(--flow-label); }
.hero .serif-display {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.1;
  margin-bottom: var(--flow-head);
}
.hero-copy .body { margin-bottom: var(--flow-cta); max-width: 50ch; }

/* ---------- Mission ---------- */
.mission { padding-block: var(--sec-y); column-gap: clamp(1.5rem, 4vw, 4rem); }
.mission-media { grid-column: 1 / 4; }
.mission-media img { width: 100%; }
.mission-copy { grid-column: 4 / 6; }
.mission-copy .label { margin-bottom: var(--flow-label); }
.mission-copy .red-display {
  margin-bottom: var(--flow-head);
  font-size: clamp(3.25rem, 8vw, 7rem);      /* 2× the original scale */
  line-height: 0.9;                          /* tight stacked leading */
  letter-spacing: -0.015em;
  margin-left: -12vw;                         /* shift left, ~½ column over the image */
  position: relative;                        /* stack the layers, over the photo */
}
/* Printed effect isolated to the type: an ink layer multiplies into the photo,
   a partial solid-red layer on top lifts it back to a legible red. */
.mission-copy .red-display .rd-ink { display: block; mix-blend-mode: multiply; }
.mission-copy .red-display .rd-top {
  position: absolute; inset: 0;
  mix-blend-mode: normal;
  opacity: 0.5;
  pointer-events: none;
}
.mission-copy .serif-lead { margin-bottom: var(--flow-lead); }
.mission-copy .body { margin-bottom: var(--flow-cta); }

/* ---------- Shared section head ----------
   The label sits in the grid's first column; the heading + divider start at the
   grid's second column so the heading optically aligns with the section content
   below it. Within that band the heading hugs its content and the divider
   flex-grows to fill the rest — flexible widths, not fixed columns. */
.section-head {
  grid-column: 1 / -1; grid-row: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: var(--col-gap);
  align-items: center;
}
.sh-label { grid-column: 1 / 2; }
.sh-body {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: var(--col-gap);
}
.sh-main { flex: 0 1 auto; }
.sh-main .caption { margin-top: 0.85rem; }
.sh-rule { flex: 1 1 auto; display: flex; align-items: center; min-width: 4rem; }
.sh-rule .rule { width: 100%; height: 1px; background: var(--hair); }

/* ---------- Testimonials ---------- */
.testimonials { padding-block: var(--sec-y); row-gap: 0.9rem; }
.testi-grid {
  grid-column: 2 / 6; grid-row: 2;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  display: grid; grid-template-columns: repeat(2, 1fr);
  column-gap: var(--col-gap); row-gap: 3rem;
}
.testi img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.testi figcaption { margin-top: 1.5rem; }
.testi .serif-name { margin-bottom: 0.35rem; }
.testi-icons { display: flex; gap: 0.95rem; margin-top: 0.9rem; }
.testi blockquote {
  margin-top: 1.35rem;
  font-family: var(--sans); font-weight: 300;
  font-size: 0.94rem; line-height: 1.62; color: var(--ink);
  text-indent: -0.41em;            /* hang the opening quotation mark (Inter “ advance ≈ 0.407em) */
  max-width: 42ch;
}

/* ---------- Work ---------- */
.work { padding-block: var(--sec-y); row-gap: 0.9rem; }
.work-left { grid-column: 2 / 4; grid-row: 2; margin-top: clamp(2rem, 4vw, 3.5rem); }
.work-left .body + .body { margin-top: 1.1rem; }
.work-left .btn { margin-top: 2rem; }
.work-orgs { grid-column: 4 / 6; grid-row: 2; margin-top: clamp(2rem, 4vw, 3.5rem); }
.org { padding-block: 1.6rem; border-bottom: 1px solid var(--hair-soft); }
.org:first-child { padding-top: 0; }
.org .serif-name { margin-bottom: 0.35rem; }
.org .role { margin-bottom: 0.9rem; }
.org .body { margin-bottom: 1rem; max-width: 38ch; }
.org-icons { display: flex; gap: 0.9rem; margin-bottom: 1rem; }
.org-cta {
  display: inline-block;
  color: var(--blue);
  text-transform: uppercase; letter-spacing: 0.12rem;
  font-size: 0.72rem; font-weight: 500; text-decoration: none;
}
.org-cta:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact { padding-block: var(--sec-y); column-gap: clamp(1.5rem, 4vw, 4rem); }
.contact-copy { grid-column: 1 / 4; }
.contact-copy .serif-display { font-size: clamp(2.8rem, 6vw, 4.6rem); margin-bottom: var(--flow-head); }
.contact-copy .body { margin-bottom: var(--flow-cta); max-width: 52ch; }
.contact-media { grid-column: 4 / 6; }
.contact-media img { width: 100%; }

.contact-form { max-width: 40rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  padding: 1rem 1.1rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 1rem;
  transition: border-color .2s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form ::placeholder {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11rem;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 1;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--red); }
.check {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.4rem 0 1.6rem;
  cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--ink); border-radius: 0; flex: none; }
.check span {
  text-transform: uppercase; letter-spacing: 0.11rem;
  font-size: 0.72rem; font-weight: 500; color: var(--ink);
}
.form-note { min-height: 1.2rem; margin-top: 0.9rem; font-size: 0.85rem; color: var(--red); }
.contact-social { display: flex; gap: 1.3rem; margin-top: 2.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: #fff; padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-inner { display: flex; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.footer-brand img { width: 52px; height: 52px; }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a {
  text-transform: uppercase; letter-spacing: 0.175rem;
  font-size: 0.72rem; font-weight: 500; color: #fff; text-decoration: none;
}
.footer-nav a:hover { color: var(--red); }

/* ---------- Reveal (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .mission { row-gap: 2.5rem; }
  .mission-media { grid-column: 1 / 6; max-width: 640px; }
  .mission-copy { grid-column: 1 / 6; }
}

@media (max-width: 760px) {
  .nav-center, .nav-social { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav {
    display: none; flex-direction: column;
    padding: 0.5rem var(--pad-x) 1.4rem;
    background: var(--paper);
  }
  .mobile-nav.open { display: flex; }
  .mobile-nav a {
    padding: 0.9rem 0; border-bottom: 1px solid var(--hair-soft);
    text-transform: uppercase; letter-spacing: 0.14rem; font-size: 0.85rem;
    font-weight: 500; text-decoration: none;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

  /* Collapse all section grids to a single column */
  .hero, .mission, .testimonials, .work, .contact { grid-template-columns: 1fr; }
  .hero-media, .hero-copy,
  .mission-media, .mission-copy,
  .section-head,
  .testi-grid, .work-left, .work-orgs,
  .contact-copy, .contact-media {
    grid-column: 1 / -1; grid-row: auto;
  }
  .hero-media { max-width: 100%; }
  .mission-copy .red-display { margin-left: 0; }   /* no overlap when stacked */
  /* Section header stacks: label, then heading + caption; divider hidden */
  .section-head { display: block; }
  .sh-label { margin-bottom: 0.5rem; }
  .sh-body { display: block; }
  .sh-rule { display: none; }
  .testi-grid { grid-template-columns: 1fr; row-gap: 3.5rem; margin-top: 2rem; }
  .work-left, .work-orgs { margin-top: 2rem; }
  .contact-media { margin-top: 3rem; max-width: 520px; }
}

/* ---------- Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--paper); }
