/* ============================================================
   Brendan Wilkerson — Portfolio
   Minimal gallery design system
   Edit colors and type in :root below to restyle the whole site.
   ============================================================ */

:root {
  --paper:      #FBFAF8;
  --ink:        #16161A;
  --ink-soft:   #5A5A63;
  --ink-faint:  #9A9AA3;
  --rule:       #E4E2DD;
  --accent:     #16161A;

  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body:    "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max:      1160px;
  --gutter:   clamp(1.5rem, 5vw, 4rem);
  --section:  clamp(4.5rem, 10vw, 9rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.narrow { max-width: 720px; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.25em; }

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
  font-weight: 500;
}

.muted { color: var(--ink-soft); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.25rem);
  align-items: center;
}

.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

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

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

section { padding-block: var(--section); }
section + section { padding-top: 0; }

.hero { padding-block: clamp(5rem, 14vw, 11rem) clamp(3.5rem, 8vw, 6rem); }

.hero h1 { max-width: 16ch; }
.hero .lede { max-width: 52ch; color: var(--ink-soft); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.75rem;
  margin-bottom: 3rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
}

.section-head h2 { margin: 0; }

/* ---------- Full-bleed reel band ---------- */

.reel-band {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 1;           /* banner strip under the nav */
  background: #EDEBE6;
  overflow: hidden;
}

.reel-band video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* On phones a 4:1 strip is only ~95px tall, so crop the sides instead */
@media (max-width: 720px) {
  .reel-band { aspect-ratio: 16 / 9; }
}

/* Equal breathing room above and below the band */
.reel-band { margin-top: 1.5rem; }
.reel-band + .hero { padding-top: 1.5rem; }

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.card {
  text-decoration: none;
  display: block;
  color: inherit;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #EDEBE6;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.card-media img,
.card-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  transition: transform 0.5s cubic-bezier(.2,.6,.2,1);
}

a.card:hover .card-media img { transform: scale(1.035); }

/* Cards whose media is a video embed can't wrap the whole tile in a link,
   so the heading and the "more" link carry the click instead. */
.card h3 a { text-decoration: none; }
.card h3 a:hover { border-bottom: 1px solid var(--ink); }
.card a.more { text-decoration: none; }
.card a.more:hover { border-bottom-color: var(--ink); }

/* Placeholder shown when no image file is present yet */
.card-media .ph,
.media-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, #E9E7E2 0 12px, #EDEBE6 12px 24px);
  color: var(--ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

/* Sized and styled to match the nav links — sentence case, no letterspacing */
.card-meta {
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-faint);
  margin-bottom: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card h3 { margin: 0 0 0.4rem; }

.card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.card .more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.18s ease;
}

.card:hover .more { border-bottom-color: var(--ink); }

/* ---------- Work page bands ---------- */

.band {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  scroll-margin-top: 96px;   /* clears the sticky header on anchor jumps */
}

.band:first-of-type { margin-top: 0; }

/* Horizontal index of campaign titles, jumps to each band */
.band-index {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.band-index li { display: flex; align-items: baseline; }

.band-index li + li::before {
  content: "";
  width: 1px;
  height: 0.85em;
  background: var(--rule);
  margin: 0 clamp(0.7rem, 1.6vw, 1.15rem);
  align-self: center;
}

.band-index a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.band-index a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Video library sections */
.lib { scroll-margin-top: 96px; }

.lib + .lib { margin-top: clamp(3.5rem, 8vw, 5.5rem); }

.lib-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  margin-bottom: 0.75rem;
}

.lib-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

.lib-copy {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0 0 1.75rem;
}

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.band-head h2 { margin: 0; font-size: clamp(1.4rem, 2.8vw, 2rem); }

.band-head .textlink {
  font-size: 0.88rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.band-head .textlink:hover { color: var(--ink); }

.band-copy {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 2rem;
}

/* Featured band — full-width hero + supporting strip */
.band-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #EDEBE6;
  overflow: hidden;
  margin-bottom: 1rem;
}

.band-hero img,
.band-hero iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

/* Split band — media beside copy */
.band-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 820px) {
  .band-split { grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); }
  .band-split.flip { grid-template-columns: 1fr 2fr; }
  .band-split.flip .band-split-media { order: 2; }
}

.band-split-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #EDEBE6;
  overflow: hidden;
}

.band-split-media.wide { aspect-ratio: 1200 / 584; }

.band-split-media img,
.band-split-media video,
.band-split-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.band-split-copy h3 { margin: 0 0 0.6rem; font-size: 1.25rem; }
.band-split-copy p { color: var(--ink-soft); font-size: 0.96rem; }

/* Asset rows — keep one aspect ratio per row */
.row-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.tile {
  position: relative;
  background: #EDEBE6;
  overflow: hidden;
  display: block;
}

.tile img,
.tile video,
.tile iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  transition: transform 0.5s cubic-bezier(.2,.6,.2,1);
}

a.tile:hover img { transform: scale(1.035); }

/* Motion tile — silent looping clip. Use ONE per row; the rest stay stills. */
.tile.motion::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  z-index: 1;
}

.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-5  { aspect-ratio: 4 / 5; }
.ratio-4-3  { aspect-ratio: 4 / 3; }
.ratio-3-2  { aspect-ratio: 3 / 2; }
.ratio-2-3  { aspect-ratio: 2 / 3; }
.ratio-1-1  { aspect-ratio: 1 / 1; }
.ratio-9-16 { aspect-ratio: 9 / 16; }
.ratio-story { aspect-ratio: 512 / 1071; }   /* vertical story ad unit */

/* Vertical / Shorts row — narrower columns so tall tiles don't dominate */
.row-vert {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  max-width: 780px;
}
.ratio-pano { aspect-ratio: 1200 / 552; }

/* Two-up row — pairs of stills at a shared ratio */
.row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.tile-cap {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
  line-height: 1.5;
}

/* Padded tile — for phone screenshots and anything that must not be cropped.
   Letterboxes on a soft tint instead of filling the frame. */
.tile.pad { background: #F1EFEA; }

.tile.pad img {
  object-fit: contain;
  padding: 6% 12%;
}

a.tile.pad:hover img { transform: none; }

/* Gallery subhead inside a case study */
.gal-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 3rem 0 1rem;
}

.gal-label:first-child { margin-top: 0; }

/* Play badge for video thumbnails */
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.play::after {
  content: "";
  border-left: 13px solid var(--ink);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 4px;
}

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

.case-hero { padding-block: clamp(3.5rem, 8vw, 6rem) 2.5rem; }
.case-hero h1 { max-width: 20ch; }

.case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.75rem 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 1.75rem;
  margin-block: 2.5rem;
}

.fact dt {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.fact dd { margin: 0; font-size: 0.95rem; }

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #E9E7E2;
  margin-block: 0 3rem;
  overflow: hidden;
}

/* For hero assets that aren't 16:9 — screen recordings, panoramic captures */
.video.wide { aspect-ratio: 1200 / 584; }

/* Landing-page capture — matches the cropped browser viewport */
.video.pano { aspect-ratio: 1200 / 536; }

.video iframe,
.video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.case-body { max-width: 680px; }
.case-body h2 { margin-top: 3rem; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.case-body h2:first-child { margin-top: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin-block: 2.5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat .n {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
}

/* Three tiers so the eye separates them: number → what it measures → how it compares */
.stat .l {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.45;
}

.stat .cmp {
  display: block;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  font-style: italic;
  color: var(--ink-faint);
  line-height: 1.4;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-block: 3rem;
}

.gallery figure { margin: 0; }

.gallery .shot {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #EDEBE6;
  overflow: hidden;
}

.gallery figcaption {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 0.5rem;
}

/* ---------- About ---------- */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
}

@media (min-width: 880px) {
  .about-layout { grid-template-columns: 320px minmax(0, 1fr); }
}

.portrait {
  position: relative;
  aspect-ratio: 3 / 4;   /* matches the headshot's native ratio — no crop */
  background: #EDEBE6;
  overflow: hidden;
}

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

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

.cv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
  margin-bottom: 0.9rem;
}

.cv-head h2 { margin: 0; font-size: 1.3rem; }
.cv-head .textlink { font-size: 0.88rem; color: var(--ink-soft); white-space: nowrap; }
.cv-head .textlink:hover { color: var(--ink); }

.cv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem 2rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 700px) {
  .cv-row { grid-template-columns: 160px minmax(0, 1fr); }
}

.cv-row .when {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.25rem;
}

.cv-row h3 { margin: 0 0 0.15rem; }
.cv-row p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

.cv-row .org {
  font-size: 0.94rem;
  color: var(--ink);
  margin-bottom: 0.7rem;
}

.cv-row ul {
  margin: 0;
  padding-left: 1.05rem;
  list-style: none;
}

.cv-row ul li {
  position: relative;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.cv-row ul li::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 0.62em;
  width: 4px;
  height: 1px;
  background: var(--ink-faint);
}

.cv-row ul li:last-child { margin-bottom: 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.tags li {
  font-size: 0.82rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
}

/* ---------- Buttons / links ---------- */

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: opacity 0.18s ease;
}

.btn:hover { opacity: 0.82; }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); opacity: 1; }

.textlink {
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 1px;
  transition: border-color 0.18s ease;
}

.textlink:hover { border-bottom-color: var(--ink); }

.back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 2rem;
}

.back:hover { color: var(--ink); }

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

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: var(--section);
  padding-block: 3.5rem 4rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: flex-start;
  justify-content: space-between;
}

.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.9rem; }

.colophon { font-size: 0.8rem; color: var(--ink-faint); }

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

.cta {
  border-top: 1px solid var(--rule);
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.cta h2 { max-width: 16ch; }

/* ---------- Utility ---------- */

.hidden { display: none !important; }

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