/* ── Carnival of the Commons case study ────────────────────────
   Rebuilt from the signed-off reference (vault:
   Marketing/Portfolio/COTC/Page/Build/reference.html), brief 27 Nov 2026.

   The page is set in Bricolage Grotesque only, at 400 and 800. The 400 is
   its own file, declared here and nowhere else, so the hub pages never
   load it. --font-body is pointed at the display face on this page, which
   takes the shared nav, footer and consent card with it: no DM Sans is
   requested from here.

   Layout: 12 columns, 24px gap, 1240px measure inside 5% side padding.
   Below 820px every grid child stacks to one column. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../assets/fonts/BricolageGrotesque-400-var.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.cotc-body {
  --font-body: var(--font-display);
  --cotc-poster-w: min(52vw, 620px);
  background-color: var(--cotc-page);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
}

.cotc-body b,
.cotc-body strong,
.cotc-body dt {
  font-weight: 800;
}

/* Page links only. :where() keeps this below the shared nav and footer. */
:where(.cotc-body main) a {
  color: inherit;
  transition: color 0.2s var(--ease-snap);
}

:where(.cotc-body main) a:hover {
  color: var(--color-orange);
}

/* ── Grid ─────────────────────────────────────────────────────── */
.cotc-wrap {
  box-sizing: content-box;
  max-width: var(--cotc-max);
  margin-inline: auto;
  padding-inline: var(--cotc-pad);
}

.cotc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--cotc-gap);
}

.cotc-grid img,
.cotc-grid video {
  width: 100%;
}

/* ── Type ─────────────────────────────────────────────────────── */
.cotc-h2,
.cotc-big {
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.cotc-h2 {
  font-size: clamp(40px, 5vw, 76px);
  margin-bottom: var(--cotc-gap);
}

/* Quotes that open on a quote mark hang it in the margin. Safari has the
   property; everywhere else a negative indent stands in for it. */
.cotc-hang {
  text-indent: -0.42em;
}

@supports (hanging-punctuation: first) {
  .cotc-hang {
    text-indent: 0;
    hanging-punctuation: first;
  }
}

/* ── Header band and nav ─────────────────────────────────────── */
.cotc-body .cs-nav {
  font-weight: 400;
}

.cotc-band {
  height: 64px;
  background-color: var(--color-ink);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.cotc-hero {
  position: relative;
  height: clamp(360px, 52.8vw, 760px);
  overflow: hidden;
  background-color: var(--color-ink);
}

.cotc-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.06);
}

.cotc-hero-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(62%, 760px);
  transform: translate(-50%, -50%);
}

/* ── Intro ────────────────────────────────────────────────────── */
.cotc-intro {
  padding-block: var(--space-lg);
  row-gap: 32px;
}

.cotc-intro-copy {
  grid-column: 1 / 8;
}

.cotc-lead {
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 28px;
}

.cotc-standfirst {
  font-size: 22px;
  line-height: 1.45;
}

.cotc-details {
  grid-column: 9 / 13;
  align-self: start;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--color-ink);
  font-size: 15px;
  line-height: 1.5;
}

.cotc-details dd {
  margin-bottom: 14px;
}

.cotc-details dd:last-child {
  margin-bottom: 0;
}

/* ── A bowler hat and a carnation ────────────────────────────── */
.cotc-brief {
  padding-bottom: var(--space-lg);
  align-items: start;
}

.cotc-brief-copy {
  grid-column: 1 / 6;
  padding-top: 40px;
}

.cotc-brief-copy .cotc-h2 {
  font-size: 36px;
  max-width: 580px;
}

.cotc-brief-copy p {
  max-width: 460px;
  margin-bottom: 20px;
}

.cotc-brief-copy p.cotc-brief-turn {
  margin-bottom: 56px;
}

.cotc-brief-copy p.cotc-big {
  font-size: 36px;
  max-width: none;
}

.cotc-brief-copy p:last-child {
  margin-bottom: 0;
}

.cotc-bowler {
  grid-column: 6 / span 7;
  grid-row: 1;
  height: 529px;
  overflow: hidden;
}

.cotc-bowler img {
  height: 100%;
  object-fit: cover;
  object-position: 96% 50%;
}

.cotc-carnation {
  grid-column: 1 / 6;
  grid-row: 2;
  align-self: end;
  margin-top: 48px;
}

.cotc-carnation img {
  max-width: 460px;
}

.cotc-pull {
  grid-column: 7 / 13;
  grid-row: 2;
  align-self: end;
  margin-top: 96px;
  font-size: clamp(34px, 3.8vw, 56px);
}

/* ── Not just a quirky night (dark, brain scans) ─────────────── */
.cotc-science {
  padding-block: var(--space-lg) var(--space-xl);
  color: var(--color-white);
  background:
    linear-gradient(
      180deg,
      var(--color-ink) 0%,
      var(--color-ink) 32%,
      rgb(36 36 36 / 0.55) 52%,
      rgb(36 36 36 / 0) 72%
    ),
    var(--color-ink) url('../assets/work/carnival-of-the-commons/brainscans-bg-1600.webp') center bottom / cover no-repeat;
}

.cotc-science .cotc-grid {
  row-gap: 48px;
}

.cotc-science-head {
  grid-column: 1 / 9;
}

.cotc-science-head p,
.cotc-reasons-lead {
  color: var(--cotc-mute-dark);
}

.cotc-science-head p {
  max-width: 640px;
}

.cotc-reasons-lead {
  grid-column: 1 / 13;
  margin-bottom: calc(var(--cotc-gap) * -1);
}

.cotc-reason {
  grid-column: span 3;
  font-size: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--cotc-rule-dark);
}

.cotc-science-line {
  grid-column: 1 / 11;
  margin-top: var(--space-lg);
  font-size: clamp(40px, 5.6vw, 72px);
}

/* ── Permission is a placebo (pink) ──────────────────────────── */
/* The poster hangs over the section's bottom edge into the next one:
   a negative margin of 30% of its width, the section raised above its
   neighbour, and the neighbour's top padding making room. */
.cotc-pink {
  position: relative;
  z-index: 2;
  padding-top: var(--space-lg);
  color: var(--color-white);
  background-color: var(--cotc-pink);
  background-image: url('../assets/work/carnival-of-the-commons/wordwave-pink-1300.webp');
  background-size: 1300px auto;
}

.cotc-pink .cotc-grid {
  row-gap: var(--cotc-gap);
}

.cotc-whisper {
  grid-column: 1 / 11;
  font-size: clamp(44px, 6.5vw, 100px);
}

.cotc-placebo {
  grid-column: 1 / 9;
  margin-top: 48px;
  font-size: clamp(32px, 4vw, 56px);
}

.cotc-placebo-copy {
  grid-column: 1 / 6;
  max-width: 426px;
}

.cotc-poster {
  grid-column: 1 / 13;
  display: flex;
  justify-content: center;
  margin-top: 72px;
}

.cotc-grid .cotc-poster img {
  width: var(--cotc-poster-w);
  margin-bottom: calc(var(--cotc-poster-w) * -0.3);
  transform: rotate(2deg);
  filter: var(--cotc-shadow-drop);
}

/* ── Rave flyers meet Victorian playbills ────────────────────── */
.cotc-identity-head {
  padding-top: calc(var(--cotc-poster-w) * 0.3 + var(--space-lg));
  padding-bottom: 56px;
  row-gap: var(--cotc-gap);
  align-items: start;
}

.cotc-identity-head .cotc-h2 {
  grid-column: 1 / 10;
}

.cotc-identity-head p {
  grid-column: 1 / 6;
}

.cotc-identity {
  padding-bottom: 64px;
  row-gap: var(--cotc-gap);
}

.cotc-id-bill {
  grid-column: 1 / 6;
}

.cotc-id-stamp {
  grid-column: 6 / 13;
}

.cotc-id-sticker {
  grid-column: 1 / 8;
  grid-row: 2;
  background-color: var(--cotc-deep);
}

.cotc-id-old {
  grid-column: 8 / 13;
  grid-row: 2;
}

.cotc-id-stamp,
.cotc-id-sticker {
  align-self: stretch;
  overflow: hidden;
}

.cotc-id-stamp img,
.cotc-id-sticker video {
  height: 100%;
  object-fit: cover;
}

/* ── Aside: where the cut-and-paste came from ────────────────── */
.cotc-aside {
  padding-bottom: var(--space-lg);
}

.cotc-aside-box {
  padding: 48px 4%;
  row-gap: var(--cotc-gap);
  align-items: center;
  background-color: var(--cotc-paper);
}

.cotc-aside-copy {
  grid-column: 1 / 4;
}

.cotc-aside-title {
  font-size: 26px;
  margin-bottom: 12px;
}

.cotc-aside-note {
  font-size: 15px;
  color: var(--cotc-mute);
}

.cotc-aside-box img {
  box-shadow: var(--cotc-shadow-sm);
}

.cotc-aside-box img:nth-of-type(1) {
  grid-column: 4 / 7;
  transform: rotate(-2deg);
}

.cotc-aside-box img:nth-of-type(2) {
  grid-column: 7 / 10;
  transform: rotate(1.5deg);
}

.cotc-aside-box img:nth-of-type(3) {
  grid-column: 10 / 13;
  transform: rotate(-1deg);
}

/* ── Owned by no one (Common Crowd blue) ─────────────────────── */
.cotc-crowd {
  padding-block: var(--space-lg);
  overflow: hidden;
  color: var(--color-white);
  background-color: var(--cotc-blue);
}

.cotc-crowd .cotc-grid {
  row-gap: 40px;
  align-items: center;
}

.cotc-crowd-copy {
  grid-column: 1 / 6;
  position: relative;
  z-index: 1;
}

.cotc-crowd-copy p {
  color: var(--cotc-mute-blue);
}

.cotc-grid .cotc-zoetrope {
  display: block;
  grid-column: 6 / 13;
  max-width: none;
  margin-left: -4%;
}

.cotc-crowd-banner {
  grid-column: 1 / 13;
}

/* ── In the room ──────────────────────────────────────────────── */
.cotc-room {
  padding-block: var(--space-lg);
  row-gap: var(--cotc-gap);
}

.cotc-room .cotc-h2 {
  grid-column: 1 / 13;
  margin-bottom: 0;
}

.cotc-room img {
  object-fit: cover;
  height: clamp(220px, 21vw, 300px);
  grid-column: span 4;
}

.cotc-grid .cotc-room-wide {
  grid-column: 1 / 13;
  height: clamp(300px, 47vw, 680px);
}

/* ── The website ──────────────────────────────────────────────── */
.cotc-web {
  padding-bottom: var(--space-lg);
  row-gap: var(--cotc-gap);
  align-items: start;
}

.cotc-web-copy {
  grid-column: 1 / 6;
}

.cotc-web video,
.cotc-web img {
  box-shadow: var(--cotc-shadow);
}

.cotc-web video {
  grid-column: 6 / 13;
}

.cotc-web-shot-a {
  grid-column: 2 / 7;
  margin-top: 40px;
}

.cotc-web-shot-b {
  grid-column: 7 / 13;
  margin-top: 96px;
}

/* ── What happened ────────────────────────────────────────────── */
.cotc-result {
  padding-bottom: var(--space-lg);
  row-gap: 48px;
}

.cotc-result-copy {
  grid-column: 1 / 8;
}

.cotc-result-copy p + p {
  margin-top: 20px;
}

.cotc-stat {
  grid-row: 2;
  padding-top: 16px;
  border-top: 1px solid var(--color-ink);
}

.cotc-stat:nth-of-type(2) { grid-column: 1 / 5; }
.cotc-stat:nth-of-type(3) { grid-column: 5 / 9; }
.cotc-stat:nth-of-type(4) { grid-column: 9 / 13; }

.cotc-stat-number {
  font-size: clamp(56px, 6vw, 88px);
}

.cotc-stat p:last-child {
  margin-top: 8px;
}

/* ── Quote ────────────────────────────────────────────────────── */
.cotc-quote {
  padding-block: var(--space-lg);
  color: var(--color-white);
  background-color: var(--color-ink);
}

.cotc-quote .cotc-grid {
  row-gap: var(--space-lg);
}

.cotc-quote figure {
  grid-column: 2 / 12;
}

.cotc-quote blockquote {
  margin: 0 0 var(--cotc-gap);
  font-size: clamp(30px, 3.8vw, 54px);
  line-height: 1.08;
}

.cotc-quote figcaption {
  font-size: 15px;
  color: var(--cotc-credit);
}

/* ── Close ────────────────────────────────────────────────────── */
.cotc-close {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: end;
  padding-block: var(--space-lg);
}

.cotc-close-line {
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
}

.cotc-close-cta,
.cotc-next {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-height: 44px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.cotc-close-cta {
  margin-top: 20px;
}

.cotc-close-cta .cta-arrow,
.cotc-next .cta-arrow {
  transition: transform 0.25s var(--ease-snap);
}

.cotc-close-cta:hover .cta-arrow,
.cotc-next:hover .cta-arrow {
  transform: translateX(0.3em);
}

/* ── Credit ───────────────────────────────────────────────────── */
.cotc-credit {
  padding-bottom: 48px;
  font-size: 14px;
  color: var(--cotc-mute);
}

/* ── Stack below 820px ────────────────────────────────────────── */
@media (max-width: 820px) {
  .cotc-body {
    --cotc-poster-w: 72vw;
  }

  /* Every placement above is more specific than this, so the stack wins
     by importance, as in the reference. Row gaps carry the spacing. */
  .cotc-grid > * {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    margin-top: 0 !important;
  }

  .cotc-grid .cotc-zoetrope {
    margin-left: 0;
  }

  .cotc-pink .cotc-grid {
    row-gap: 32px;
  }

  .cotc-aside-box img {
    max-width: 420px;
    justify-self: center;
  }

  .cotc-brief,
  .cotc-intro {
    row-gap: 40px;
  }

  .cotc-brief-copy {
    padding-top: 0;
  }

  .cotc-bowler {
    height: auto;
    aspect-ratio: 1;
  }

  .cotc-reason {
    font-size: 26px;
  }

  .cotc-room img {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .cotc-grid .cotc-room-wide {
    height: auto;
  }

  .cotc-web-shot-a,
  .cotc-web-shot-b {
    margin-top: 0;
  }

  .cotc-lead,
  .cotc-brief-copy .cotc-h2,
  .cotc-brief-copy p.cotc-big {
    font-size: 30px;
  }

  .cotc-standfirst {
    font-size: 20px;
  }

  .cotc-science {
    background-image:
      linear-gradient(
        180deg,
        var(--color-ink) 0%,
        var(--color-ink) 32%,
        rgb(36 36 36 / 0.55) 52%,
        rgb(36 36 36 / 0) 72%
      ),
      url('../assets/work/carnival-of-the-commons/brainscans-bg-800.webp');
  }
}

@media (min-width: 768px) {
  .cotc-band {
    height: 82px;
  }
}
