@import url("../fonts/fonts.css");

/* ============================================================
   josephsherlock.com
   Near-black + electric lime. Space Grotesk / Inter Tight.
   Lime is a signal, never a surface, never text on white.
   ============================================================ */

:root {
  --paper:   #FFFFFF;
  --ink:     #101010;
  --ink-2:   #171717;
  --ink-3:   #242424;
  --muted:   #6E6E6E;
  --muted-d: #A8A8A8;          /* muted on dark grounds */
  --rule:    #E6E6E6;
  --rule-d:  #333333;
  /* the green from the existing site. --accent is the surface/fill value;
     --accent-ink is a half-step darker so green TEXT on white clears AA. */
  --accent:     #617E64;
  --accent-ink: #4E6851;
  --accent-lt:  #A3BFA6;   /* green on near-black grounds */
  --accent-wash:#EFF3EF;

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --sans:    "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --t-hero:  clamp(2.6rem, 6.4vw, 5rem);
  --t-h1:    clamp(2.1rem, 4.4vw, 3.1rem);
  --t-h2:    clamp(1.35rem, 2.2vw, 1.7rem);
  --t-h3:    1.0625rem;
  --t-body:  1rem;
  --t-meta:  0.875rem;
  --t-small: 0.75rem;

  --wide:    1200px;
  --measure: 66ch;
  --gap:     clamp(1.25rem, 2.6vw, 2rem);
  --section: clamp(3.5rem, 7vw, 6rem);

  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::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(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

a.link {
  color: var(--accent-ink);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 280ms var(--ease);
  padding-bottom: 2px;
}
a.link:hover { background-size: 100% 2px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--accent-lt); }
.on-dark a.link { color: var(--accent-lt); }

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

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
.section { padding-block: var(--section); }

.on-dark { background: var(--ink); color: #fff; }
.on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }
/* Section label: small uppercase, rule beneath. No decorative dot. */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}
.on-dark .eyebrow { color: var(--muted-d); border-color: var(--rule-d); }
.on-dark 
/* ---------- masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.95rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.wordmark::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
  transition: transform 350ms var(--ease);
}
.wordmark:hover::before { transform: rotate(135deg); }

.head-right { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav { display: flex; gap: clamp(0.9rem, 2.4vw, 2rem); }
.btn-sm { padding: 0.48rem 0.48rem 0.48rem 1.1rem; font-size: var(--t-small); letter-spacing: .04em; }
.btn-sm .ico { width: 24px; height: 24px; font-size: .8rem; }
.nav a {
  position: relative;
  font-size: var(--t-meta);
  font-weight: 450;
  color: var(--muted);
  padding-block: 0.5rem;
  transition: color 180ms var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0.15rem;
  height: 2px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 300ms var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.85rem;
  font-family: var(--sans);
  font-size: var(--t-meta); font-weight: 500;
  color: #fff; background: var(--accent-ink);
  border: 1px solid var(--accent-ink);
  border-radius: 999px;
  padding: 0.6rem 0.6rem 0.6rem 1.4rem;
  transition: background 260ms var(--ease), color 260ms var(--ease), border-color 260ms var(--ease);
}
.btn .ico {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  color: #fff;
  display: grid; place-items: center;
  font-size: 0.95rem; line-height: 1;
  transition: transform 300ms var(--ease);
}
.btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn:hover .ico { background: var(--accent-lt); color: var(--ink); transform: translateX(3px); }

.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light .ico { background: var(--accent); color: #fff; }
.btn-light:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-light:hover .ico { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- page header (shared by Research, Consulting, Resume) ---------- */

.page-title {
  font-size: var(--t-hero);
  font-weight: 600;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.page-lede {
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  color: var(--muted);
  max-width: 46ch;
  margin: 1.5rem 0 2rem;
}
.page-lede:last-child { margin-bottom: 0; }

/* ---------- banner ---------- */

.banner {
  position: relative; background: var(--ink); overflow: hidden;
  aspect-ratio: 4 / 3;              /* the source photo's own ratio, so it is never cropped */
  display: flex; align-items: center;
}
.banner-media { position: absolute; inset: 0; }
.banner-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  filter: grayscale(1) contrast(1.1) brightness(0.78);
  transition: filter 700ms var(--ease), transform 900ms var(--ease);
  transform: scale(1.02);
}
.banner:hover .banner-media img { filter: grayscale(0) contrast(1.02) brightness(0.88); transform: scale(1); }
.banner-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(16,16,16,.90) 0%, rgba(16,16,16,.58) 42%, rgba(16,16,16,.20) 78%, rgba(16,16,16,.10) 100%),
    linear-gradient(to top, rgba(16,16,16,.45) 0%, rgba(16,16,16,0) 32%);
}

.banner .wrap { position: relative; z-index: 2; }
.banner .wrap { width: 100%; }
.banner-inner {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(2rem, 4vw, 3.5rem);
  color: #fff;
}
.banner h1 {
  font-size: var(--t-hero);
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
  max-width: 14ch;
}
.banner-lede {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #EDEDED;
  /* fixed two-line box so the rotating word never reflows the page */
  min-height: calc(2 * 1.25em);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .36em;
}
.tw-slot { display: inline-flex; align-items: baseline; min-width: 11ch; }
.tw {
  color: #fff; font-weight: 500; white-space: nowrap;
  background: var(--accent-ink);
  box-shadow: 0 0 0 .18em var(--accent-ink);
  border-radius: 2px;
}
.tw-caret {
  display: inline-block; width: 2px; height: 1.05em;
  background: #fff; margin-left: 4px;
  vertical-align: -0.16em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* engagements: three static columns on white */
.eng-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-top: 1px solid var(--rule);
}
.engagement {
  display: flex; flex-direction: column; gap: .95rem;
  padding: 1.75rem clamp(1.25rem, 2.4vw, 2rem) 0;
  border-right: 1px solid var(--rule);
}
.engagement:first-child { padding-left: 0; }
.engagement:last-child { border-right: 0; padding-right: 0; }
.engagement img {
  height: 30px; width: auto; max-width: 118px;
  object-fit: contain; object-position: left center;
  filter: grayscale(1); opacity: .85;
  transition: filter 340ms var(--ease), opacity 340ms var(--ease);
}
.engagement:hover img { filter: grayscale(0); opacity: 1; }
.engagement h3 { font-size: var(--t-h3); font-weight: 500; letter-spacing: -.01em; }
.engagement p { font-size: var(--t-meta); color: var(--muted); line-height: 1.45; margin: 0; }
.engagement p span { display: block; }

/* ---------- focus cards ---------- */

.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.focus-item {
  position: relative;
  padding-top: 1.2rem;
}
.focus-item::before {
  content: ""; position: absolute; top: 0; left: 0;
  height: 3px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 420ms var(--ease);
}
.focus-item:hover::before,
.focus-item:focus-within::before { transform: scaleX(1); }
.focus-item h3 { font-size: var(--t-h2); margin-bottom: 0.7rem; }
.focus-item p { font-size: var(--t-meta); color: var(--muted); }

/* ---------- media cards (projects, videos, news) ---------- */

.cards { display: grid; gap: var(--gap); align-items: stretch; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card { display: flex; flex-direction: column; height: 100%; }
.card-media {
  position: relative; overflow: hidden;
  background: var(--ink-2);
  aspect-ratio: 16 / 9;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1);
  transition: filter 450ms var(--ease), transform 700ms var(--ease);
}
.card:hover .card-media img { filter: grayscale(0); transform: scale(1.04); }
.card h3 { font-size: var(--t-h3); margin: 1rem 0 0.4rem; font-weight: 500; text-wrap: balance; }
.card p { font-size: var(--t-meta); color: var(--muted); }
.card .kicker {
  font-size: var(--t-small); letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); margin-top: auto; padding-top: 0.75rem;
}
.on-dark .card p, .on-dark .card .kicker { color: var(--muted-d); }

/* video facade */
.video { width: 100%; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.video .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(1);
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff; color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: 1.15rem; padding-left: 4px;
  transition: transform 320ms var(--ease);
  z-index: 2;
}
.video:hover .play { transform: translate(-50%,-50%) scale(1.1); }
.video iframe { width: 100%; height: 100%; border: 0; position: absolute; inset: 0; }

/* news card */
.news-card {
  display: flex; flex-direction: column; gap: .9rem;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 1.35rem 1.4rem 1.5rem;
  height: 100%;
  transition: border-color 280ms var(--ease), transform 280ms var(--ease), background 280ms var(--ease);
}
.news-card:hover { border-color: var(--accent); background: var(--accent-wash); transform: translateY(-3px); }
.news-logo {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  overflow: hidden;
}
.news-logo img {
  width: 26px; height: 26px; object-fit: contain;
  filter: grayscale(1); opacity: .78;
  transition: filter 320ms var(--ease), opacity 320ms var(--ease);
}
.news-card:hover .news-logo img { filter: grayscale(0); opacity: 1; }
.news-card .outlet {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: var(--t-small); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: .35rem;
}
.news-card .headline {
  font-size: var(--t-meta); color: var(--ink); line-height: 1.45;
  text-wrap: balance; display: block;
}
.news-card .go {
  margin-top: auto; padding-top: .9rem;
  font-size: var(--t-small); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; gap: .45rem; align-items: center;
}
.news-card:hover .go { color: var(--accent-ink); }
.news-card .go .ar { transition: transform 300ms var(--ease); }
.news-card:hover .go .ar { transform: translateX(4px); }

/* ---------- featured case studies: one full-width banner at a time ---------- */

.stage { position: relative; }
.slides { position: relative; }
.slide {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  border: 1px solid var(--rule);
  background: #fff;
  opacity: 0; visibility: hidden;
  position: absolute; inset: 0;
  transition: opacity 620ms var(--ease);
}
.slide.is-on { opacity: 1; visibility: visible; position: relative; }
.slide-media {
  overflow: hidden; background: var(--accent-wash);
  display: grid; place-items: center;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  min-height: 100%;
}
.slide-media img {
  width: 100%; height: 100%; max-height: 420px;
  object-fit: contain;            /* these are cutouts/mockups, not photographs */
  filter: grayscale(1);
  transition: filter 520ms var(--ease), transform 900ms var(--ease);
}
.slide:hover .slide-media img { filter: grayscale(0); transform: scale(1.035); }
.slide-body {
  padding: clamp(1.75rem, 3.4vw, 3rem);
  display: flex; flex-direction: column; justify-content: center;
}
.slide-theme {
  font-size: var(--t-small); font-weight: 500; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: .6rem;
}
.slide-body h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.028em;
  margin-bottom: .4rem; text-wrap: balance;
}
.slide-kicker { font-size: var(--t-meta); color: var(--muted); margin-bottom: 1.5rem; }
.slide-body dl { margin: 0 0 1.75rem; }
.slide-body dt {
  font-size: var(--t-small); font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; color: var(--ink); margin-bottom: .18rem;
}
.slide-body dd { margin: 0 0 .9rem; font-size: var(--t-meta); color: var(--muted); line-height: 1.55; }
.slide-body dd:last-child { margin-bottom: 0; }
.slide-cta { align-self: flex-start; }

/* stage controls */
.stage-bar {
  display: flex; align-items: center; gap: 1.25rem;
  margin-top: 1.5rem;
}
.dots { display: flex; gap: .55rem; margin-block: -20px; }
.dot {
  box-sizing: content-box;        /* so padding adds to the 4px bar */
  width: 30px; height: 4px; border: 0; cursor: pointer;
  padding: 20px 0;                /* 44px tap target, 4px visible bar */
  background: var(--rule);
  background-clip: content-box;
  position: relative; overflow: hidden;
  transition: background 260ms var(--ease);
}
.dot::after {
  content: ""; position: absolute; left: 0; right: 0; top: 20px; height: 4px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}
.dot:hover { background: #CFCFCF; }
.dot[aria-current="true"]::after { animation: dotfill var(--slide-dur, 7s) linear forwards; }
.dot[aria-current="true"].paused::after { animation-play-state: paused; }
@keyframes dotfill { to { transform: scaleX(1); } }
.stage-count { font-size: var(--t-meta); color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.stage-nav { display: flex; gap: .4rem; }
.stage-nav button {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--rule); background: #fff; color: var(--ink);
  display: grid; place-items: center; font-size: .95rem;
  transition: background 240ms var(--ease), border-color 240ms var(--ease), color 240ms var(--ease);
}
.stage-nav button:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* ---------- full-bleed image break ---------- */

.break {
  aspect-ratio: 16 / 9;             /* the source photo's own ratio, so it is never cropped */
  overflow: hidden; background: var(--ink);
}
.break img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  filter: grayscale(1) brightness(.92);
  transition: filter 700ms var(--ease), transform 1200ms var(--ease);
}
.break:hover img { filter: grayscale(0) brightness(1); transform: scale(1.03); }

/* ---------- ideas in motion ---------- */

.ideas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.ideas-col h3 {
  font-size: var(--t-h3); font-weight: 500;
  padding-bottom: .7rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule-d);
  color: #fff;
}
.ideas-list { list-style: none; margin: 0; padding: 0; }
.ideas-list li {
  padding: .95rem 0 .95rem 1.4rem;
  position: relative;
  font-size: var(--t-meta); color: #E4E4E4; line-height: 1.55;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ideas-list li::before {
  content: ""; position: absolute; left: 0; top: 1.5em;
  width: 8px; height: 1px; background: var(--accent-lt);
}
.ideas-list li:last-child { border-bottom: 0; }
.ideas-list .st { display: block; color: var(--muted-d); margin-top: .3rem; }
.ideas-list .note { color: var(--muted-d); }

/* ---------- research: filters + rows ---------- */

.filters {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.chip {
  font-family: var(--sans); font-size: var(--t-meta); font-weight: 450;
  color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.5rem 1rem; cursor: pointer;
  white-space: nowrap;
  transition: background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
}
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; font-weight: 500;
}
.chip[aria-pressed="true"] .n { color: #fff; opacity: .7; }

.pubs { list-style: none; margin: 0; padding: 0; }
.pub { border-top: 1px solid var(--rule); }
.pubs .pub:last-child { border-bottom: 1px solid var(--rule); }
.pub[hidden] { display: none; }

.pub-head {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  display: block;
  transition: opacity 200ms var(--ease);
}
.pub-head:hover { opacity: .62; }
.pub-title {
  font-family: var(--display); font-weight: 500;
  font-size: 1.02rem; line-height: 1.3; letter-spacing: -0.015em;
  display: block; margin-bottom: 0.35rem;
  text-wrap: balance;
  max-width: 62ch;
}
.pub-meta { font-size: var(--t-meta); color: var(--muted); line-height: 1.45; display: block; text-wrap: pretty; max-width: 72ch; }
.pub-tag {
  display: inline-block; font-size: var(--t-small); font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 0.4rem;
}
.pub-head .plus {
  position: absolute; right: 0; top: 1.3rem;
  width: 18px; height: 18px; flex: none;
}
.pub-head .plus::before, .pub-head .plus::after {
  content: ""; position: absolute; background: var(--ink);
  left: 50%; top: 50%;
}
.pub-head .plus::before { width: 13px; height: 1.5px; transform: translate(-50%,-50%); }
.pub-head .plus::after  { width: 1.5px; height: 13px; transform: translate(-50%,-50%); transition: transform 300ms var(--ease); }
.pub-head[aria-expanded="true"] .plus::after { transform: translate(-50%,-50%) scaleY(0); }

.pub-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 340ms var(--ease);
}
.pub-head[aria-expanded="true"] + .pub-body { grid-template-rows: 1fr; }
.pub-body > div { overflow: hidden; }
.pub-body .inner { padding: 0 2.5rem 1.35rem 0; font-size: var(--t-meta); color: var(--muted); }
.pub-body .authors { display: block; margin-bottom: 0.6rem; }

.showall {
  margin-top: 1.5rem;
  font-family: var(--sans); font-size: var(--t-meta); font-weight: 500;
  background: none; border: 0; padding: 0.4rem 0; cursor: pointer; color: var(--ink);
  border-bottom: 2px solid var(--accent);
}
.empty { padding: 2.5rem 0; color: var(--muted); font-size: var(--t-meta); }

/* ---------- about ---------- */

.about { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about p { font-size: 1.05rem; line-height: 1.65; max-width: 62ch; }
.about-side { border-left: 2px solid var(--accent); padding-left: clamp(1.25rem, 2.5vw, 2rem); }
.about-side h3 { font-size: var(--t-h3); margin-bottom: .5rem; }
.about-side p { font-size: var(--t-meta); color: var(--muted); margin-bottom: 1.1rem; }

/* ---------- resume ---------- */

.doc-frame { width: 100%; height: min(1100px, 130vh); border: 1px solid var(--rule); background: #fff; }
.doc-fallback { padding: 2rem; border: 1px solid var(--rule); font-size: var(--t-meta); color: var(--muted); }

/* ---------- footer ---------- */

.foot { background: var(--ink); color: #fff; border-top: 1px solid var(--rule-d); }
.foot .wrap {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem;
  align-items: baseline; justify-content: space-between;
  padding-block: 2.75rem;
}
.foot p { font-size: var(--t-meta); color: var(--muted-d); margin: 0; }
.foot-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.foot-links a { font-size: var(--t-meta); color: #fff; }

/* ---------- reveal ---------- */

.rv { opacity: 0; transform: translateY(12px); }
.rv.in {
  opacity: 1; transform: none;
  transition: opacity 560ms var(--ease), transform 560ms var(--ease);
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .slide { grid-template-columns: 1fr; }
  .slide-media { aspect-ratio: 16/9; min-height: 0; }
  .ideas-grid { grid-template-columns: 1fr; }
  .eng-grid { grid-template-columns: 1fr; }
  .engagement {
    border-right: 0; border-bottom: 1px solid var(--rule);
    padding: 1.5rem 0; flex-direction: row; align-items: center; gap: 1.25rem;
  }
  .engagement:last-child { border-bottom: 0; }
  .focus-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 860px) {
  /* Stack on small screens: the photo keeps its own 4:3 ratio (never cropped)
     and the type sits beneath it on the dark ground instead of over it. */
  .banner { aspect-ratio: auto; display: block; }
  .banner-media { position: relative; inset: auto; aspect-ratio: 4 / 3; }
  .banner-media img { filter: grayscale(1) contrast(1.1) brightness(0.9); transform: none; }
  .banner-media::after {
    background: linear-gradient(to top, rgba(16,16,16,.35) 0%, rgba(16,16,16,0) 45%);
  }
  .banner-inner { padding-block: clamp(1.75rem, 6vw, 2.5rem) clamp(2rem, 7vw, 3rem); }
  .banner h1 { max-width: none; }
  .page-title { max-width: none; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --t-body: 1.0625rem; --t-meta: 0.9375rem; }
  .filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(clamp(1.25rem, 5vw, 3rem) * -1);
    padding-inline: clamp(1.25rem, 5vw, 3rem);
    padding-bottom: 0.25rem;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip { padding: 0.72rem 1rem; min-height: 44px; }
  .stage-nav button { width: 44px; height: 44px; }
  .showall { min-height: 44px; }

  /* masthead: wordmark + CTA on the first row, nav on its own row beneath */
  .masthead .wrap {
    display: grid; grid-template-columns: 1fr auto;
    align-items: center; gap: 0.5rem 1rem; padding-block: 0.7rem;
  }
  .wordmark { min-height: 44px; display: inline-flex; }
  .head-right { display: contents; }
  .masthead .btn-sm { grid-column: 2; grid-row: 1; justify-self: end; }
  .nav {
    grid-column: 1 / -1; grid-row: 2;
    gap: 1.35rem;
    overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(clamp(1.25rem, 5vw, 3rem) * -1);
    padding-inline: clamp(1.25rem, 5vw, 3rem);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding-block: 0.7rem; min-height: 44px; display: flex; align-items: center; white-space: nowrap; }
  .foot .wrap { flex-direction: column; gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
  .banner-media img { filter: grayscale(1) brightness(.62); }
}

@media print { .masthead, .foot, .btn, .filters { display: none; } body { background: #fff; } }
