@font-face {
  font-family: "PP Neue Montreal";
  src: local("PP Neue Montreal Text Regular"), local("PPNeueMontrealText-Regular"),
       url("fonts/PPNeueMontrealText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Neue Montreal";
  src: local("PP Neue Montreal Text Medium"), local("PPNeueMontrealText-Medium"),
       url("fonts/PPNeueMontrealText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }

/* Type scale — rem-based, 16px root
   display  clamp(1.375rem, 4vw, 1.75rem)  case titles (22–28px)
   section  1.125rem                         section labels (18px)
   body     1rem                             everything else
   meta     0.875rem                          case metadata
   caption  0.75rem                           media captions
*/
:root {
  --bg: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #343434;
  --muted: #767676;
  --measure: 680px;
  --pad-x: clamp(20px, 5vw, 40px);
  --pad-y: clamp(28px, 4vw, 48px);
  --f: "PP Neue Montreal", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --text-base: 1rem;
  --t-display: clamp(1.375rem, 4vw, 1.75rem);
  --t-section: 1.125rem;
  --t-body: var(--text-base);
  --t-meta: 0.875rem;
  --t-caption: 0.75rem;
  --lh-body: 1.5;
  --lh-tight: 1.35;
  --track: -.03em;
  --track-display: -.05em;
  --bp-sm: 480px;
  --bp-md: 640px;
  --bp-lg: 720px;
  --radius: 8px;
}

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

@keyframes caseFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.case {
  animation: caseFadeIn 0.5s ease-out both;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  letter-spacing: var(--track);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--ink); color: var(--bg); }

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

.wrap {
  max-width: calc(var(--measure) + var(--pad-x) * 2);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  padding-block: var(--pad-y);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ── Type tiers ── */
.case-body h2,
.work-heading {
  font-size: var(--t-section);
  font-weight: 500;
  color: var(--ink);
}

.work-heading {
  margin-bottom: 16px;
}


.work-title {
  font-weight: 500;
}

.site-head .identity .name {
  font-size: var(--t-body);
  font-weight: 500;
  line-height: inherit;
}

.case-body p,
.case-body li {
  color: var(--ink-2);
}

/* ── Header ── */
.site-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 32px;
  padding-bottom: 0;
  margin-bottom: var(--pad-y);
}

.identity {
  text-decoration: none;
}

.identity:hover {
  text-decoration: none;
}

.identity-text {
  line-height: var(--lh-tight);
}

.site-mark {
  width: 32px;
  height: 32px;
  display: block;
}

.site-foot {
  margin-top: clamp(16px, 3vw, 32px);
  padding-top: 16px;
  border-top: 1px solid rgba(10, 10, 10, 0.08);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.site-foot-mark {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
}

.site-foot-mark:hover {
  color: var(--ink);
  text-decoration: none;
}

.foot-start {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.foot-start a {
  color: inherit;
  font-weight: inherit;
}

.foot-start a:hover {
  color: var(--ink);
}

.foot-copy {
  color: var(--muted);
}

.site-head .identity .role {
  color: var(--muted);
}

.site-head nav {
  display: flex;
  gap: 16px;
  color: var(--muted);
}

.site-head nav a {
  color: inherit;
  font-weight: inherit;
}

.site-head nav a:hover {
  color: var(--ink);
}

/* ── Work table ── */
.work-list {
  list-style: none;
}

.work-entry {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-block: 16px;
  text-decoration: none;
}

a.work-entry:hover {
  text-decoration: none;
}

a.work-entry:hover .work-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.work-entry:hover .work-thumb img,
a.work-entry:focus-visible .work-thumb img {
  filter: none;
}

.work-entry--soon {
  opacity: .45;
  cursor: not-allowed;
}

.work-yr,
.foot-copy {
  font-variant-numeric: tabular-nums;
}

.work-yr {
  flex-shrink: 0;
  text-align: right;
  color: var(--muted);
}

.work-thumb {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(10, 10, 10, 0.08);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.7);
  transition: filter 0.2s ease;
}

.work-thumb--empty {
  background: #eeeeee;
  border-color: rgba(10, 10, 10, 0.06);
}

.work-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  row-gap: 2px;
}

.work-title {
  color: var(--ink);
}

.work-desc {
  color: var(--muted);
  max-width: 52ch;
  font-variant-numeric: tabular-nums;
}

/* ── Hero ── */
.hero {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.hero-intro-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-intro p {
  margin: 0;
}

.hero-intro-text p {
  color: var(--muted);
  max-width: 52ch;
}

.hero-intro p.hero-contact {
  font-weight: 500;
}

.hero-contact a {
  color: var(--ink-2);
}

.hero-contact a:hover {
  color: var(--ink);
}

/* ── Case study ── */
.case {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3.5vw, 40px);
}

.case-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-intro {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-title {
  font-size: var(--t-display);
  font-weight: 500;
  letter-spacing: var(--track-display);
  line-height: 1.15;
}

.case-lede {
  color: var(--muted);
}

.case-meta {
  font-size: var(--t-meta);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.case-meta dt {
  display: inline;
  font-weight: 500;
  color: var(--ink-2);
}

.case-meta dt::after {
  content: " · ";
  font-weight: normal;
  color: var(--muted);
}

.case-meta dd {
  display: inline;
}

.case-meta a {
  text-decoration: none;
}

.case-meta a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-meta-ext {
  font-size: 0.85em;
  color: var(--muted);
}

/* Desktop: stacked strip — Medium label over muted value */
@media (min-width: 641px) {
  .case-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .case-meta > div {
    display: flex;
    flex-direction: column;
  }

  .case-meta dt {
    display: block;
    font-size: var(--t-meta);
    font-weight: 500;
    color: var(--ink-2);
  }

  .case-meta dt::after {
    content: none;
  }

  .case-meta dd {
    display: block;
    font-size: var(--t-meta);
    color: var(--muted);
  }
}

.case-section {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.case-section > .case-gallery,
.case-section > .case-media {
  margin-top: 0.75rem;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.case-stat {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  background: #eeeeee;
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px);
}

.case-stat-value {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--track-display);
  color: var(--ink);
}

.case-stat-label {
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--ink-2);
}

.case-stat-sub {
  font-size: var(--t-meta);
  color: var(--muted);
  letter-spacing: -0.01em;
}

.case-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.case-body li {
  padding-left: 1.25em;
  position: relative;
}

.case-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.5em;
  height: 1px;
  background: var(--ink);
}

/* ── Locked section ── */
.case-locked {
  display: flex;
  flex-direction: column;
  background: #eeeeee;
  gap: 0.25em;
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px);
}

.case-locked h2 {
  font-size: var(--t-section);
  font-weight: 500;
  line-height: var(--lh-tight);
  color: var(--ink);
}

.case-locked p {
  font-size: var(--t-body);
  color: var(--muted);
}

.case-locked p a {
  color: var(--ink);
  font-weight: 500;
  text-underline-offset: 3px;
}

.case-locked-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5em;
  margin-top: 0.75rem;
}

.case-locked-form input {
  flex: 0 1 220px;
  min-width: 160px;
  font: inherit;
  letter-spacing: var(--track);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(10, 10, 10, 0.15);
  border-radius: var(--radius);
  padding: 8px 16px;
}

.case-locked-form input::placeholder {
  color: var(--muted);
}

.case-locked-form button {
  font: inherit;
  font-weight: 500;
  letter-spacing: var(--track);
  color: var(--bg);
  background: var(--ink);
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
}

.case-locked-form button:hover {
  background: var(--ink-2);
}

.case-locked-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

.case-locked-error {
  font-size: var(--t-meta);
  color: #d0312d;
}

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

.case-media {
  margin: 0;
}

.case-media img,
.case-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  /* border: 1px solid rgba(10, 10, 10, 0.08); */
  background: #eeeeee;
}

/* .case-media--hero img {
  background: #eeeeee;
  padding: clamp(16px, 3vw, 32px);
} */

.case-media figcaption {
  margin-top: 8px;
  font-size: var(--t-caption);
  color: var(--muted);
  letter-spacing: -.02em;
}

.case-gallery {
  display: grid;
  gap: 8px;
}

.case-gallery .case-media {
  min-width: 0;
}

.case-gallery img {
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .case {
    animation: none;
  }

  .work-thumb img {
    transition: none;
  }
}

/* ── Responsive ── */

@media (max-width: 640px) { /* --bp-md */
  .site-head {
    margin-bottom: clamp(48px, 8vw, 56px);
  }

  .case-intro {
    gap: 4px;
  }

  .case-head {
    gap: 16px;
  }

  .case-meta {
    font-size: var(--t-body);
    flex-direction: column;
    gap: 8px;
    line-height: 1.5;
  }

  .case-meta > div {
    display: block;
  }

  .case-meta dt,
  .case-meta dd {
    display: block;
  }

  .case-meta dt {
    margin-bottom: 2px;
  }

  .case-meta dd {
    margin: 0;
  }

  .case-meta dt::after {
    content: none;
  }

  .hero {
    margin-bottom: clamp(48px, 8vw, 56px);
  }

  .hero-intro-text {
    gap: 0.35em;
  }

  .work-yr {
    display: none;
  }
}

@media (max-width: 480px) { /* --bp-sm */
  .hero-intro {
    gap: 0.5em;
  }

  .work-list > li:first-child .work-entry {
    padding-top: 0;
  }

  .work-thumb {
    width: 56px;
    height: 56px;
  }
}

@media (min-width: 720px) { /* --bp-lg */
  .case-gallery {
    grid-template-columns: 1fr 1fr;
  }
}
