/* Shared styles for the inner pages. The homepage still carries its own inline copy. */

:root {
  color-scheme: light;
  --stone: #EDEDE7;
  --paper: #F6F6F2;
  --ink: #1C1C19;
  --graphite: #5A5C55;
  --mist: #D3D4CA;
  --navy: #093046;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font-family: 'Jost', 'Avenir Next', 'Helvetica Neue', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1.1em; max-width: 62ch; }

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

.shell { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 237, 231, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mist);
}

.masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.wordmark { font-family: 'Playfair Display', Georgia, serif; font-size: 21px; letter-spacing: 0.02em; }

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.nav-links a { padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color 0.25s ease; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------- Page structure ---------- */

section { padding: 96px 0; }

.page-head { padding: 132px 0 20px; }

.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 18ch; }

.lede { font-size: 19px; color: var(--graphite); }

.intro-copy { margin-top: 36px; max-width: 64ch; }

.rule { height: 1px; background: var(--mist); border: 0; margin: 0; }

.section-head { font-size: clamp(1.9rem, 3.6vw, 2.6rem); max-width: 20ch; margin-bottom: 30px; }

.inline-link {
  border-bottom: 1px solid var(--mist);
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
}

.inline-link:hover, .inline-link:focus-visible { border-bottom-color: var(--ink); }

/* Ruled two column rows, used for credentials, topics and contact details */
.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--mist);
  max-width: 760px;
}

.detail-list li {
  padding: 17px 0;
  border-bottom: 1px solid var(--mist);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 16px;
}

.detail-list li span:last-child { color: var(--graphite); text-align: right; }

.status-note { font-size: 15px; color: var(--graphite); margin-top: 34px; }

/* ---------- Two column blocks: The Group agencies, Founder Story chapters ---------- */

.agency-block, .story-block {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 64px;
  padding: 62px 0;
  border-bottom: 1px solid var(--mist);
  align-items: start;
}

.agency-block:first-of-type, .story-block:first-of-type { border-top: 1px solid var(--mist); }

.agency-block h2 { font-size: clamp(2rem, 4vw, 2.9rem); }

.story-block h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); max-width: 14ch; }

.agency-meta {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--graphite);
}

.agency-meta li { padding: 8px 0; border-bottom: 1px solid var(--mist); }

.agency-link {
  display: inline-block;
  margin-top: 26px;
  border-bottom: 1px solid var(--mist);
  padding-bottom: 3px;
  font-size: 15px;
  transition: border-color 0.25s ease;
}

.agency-link:hover, .agency-link:focus-visible { border-bottom-color: var(--ink); }

/* ---------- Case studies ---------- */

/* Each case sits open on the page, laid out like the proposal: compact head, one image
   row at a fixed height, copy beside the pull line and film, then the facts */
.case { padding: 72px 0; border-top: 1px solid var(--mist); }

.case.alt { background: var(--paper); }

.case-eyebrow {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
}

.case-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: end;
  margin-bottom: 30px;
}

.case-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); max-width: 18ch; }

.case-head .lede { margin: 0; font-size: 17px; }

/* Hero plus three frames in a single row, capped height, cropped without distortion */
.case-band { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 4px; margin-bottom: 36px; }

.case-frame { position: relative; overflow: hidden; margin: 0; height: 300px; background: var(--mist); }

.case-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s cubic-bezier(.19, 1, .22, 1); }

.case-frame:hover img { transform: scale(1.04); }

.case-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 8px 14px;
  background: rgba(28, 28, 25, 0.78);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.case-body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: start;
  margin-bottom: 36px;
}

.case-body p { font-size: 16px; }

.case-pull {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.4;
  border-left: 1px solid var(--navy);
  padding-left: 22px;
  margin: 0;
}

.case-aside .film { margin-top: 28px; }

/* A second image row of three, for projects with more photography */
.case-band + .case-band { margin-top: -32px; }

.case-band.row-three { grid-template-columns: repeat(3, 1fr); }

/* Cases with a vertical film: copy, pull line and the vertical film in three columns,
   centred on one axis so the block reads as balanced */
.case-body.has-vertical { grid-template-columns: 1.1fr 1fr 200px; gap: 48px; align-items: center; }

.case-reel .film.vertical { max-width: none; }

.film-label { margin: 10px 0 0; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite); }

.case-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); }

.fact { padding: 18px 20px 18px 0; }

.fact + .fact { padding-left: 20px; border-left: 1px solid var(--mist); }

.fact-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite); margin-bottom: 6px; }

.fact-value { font-family: 'Playfair Display', Georgia, serif; font-size: 17px; line-height: 1.3; }

.fact-value span { display: block; font-family: 'Jost', sans-serif; font-size: 13px; color: var(--graphite); margin-top: 3px; }

/* Video facade: a poster and play button that loads the player on click */
.film {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
}

.film.vertical { aspect-ratio: 9 / 16; max-width: 220px; }

.film img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s cubic-bezier(.19, 1, .22, 1), opacity 0.3s ease; }

.film:hover img, .film:focus-visible img { transform: scale(1.03); opacity: 0.88; }

.film .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(246, 246, 242, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.film .play svg { width: 18px; height: 18px; margin-left: 3px; fill: var(--ink); }

.film:hover .play, .film:focus-visible .play { transform: scale(1.08); }

.film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* More work grid beneath the case studies */
.more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.more-grid figure { margin: 0; }

.more-grid figcaption { margin-top: 12px; }

.more-grid .sector { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite); margin-bottom: 4px; }

.more-grid .title { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; line-height: 1.35; }

/* Draft case studies stay hidden unless the page is opened with ?preview */
.case[data-status="draft"], .preview-banner { display: none; }

.preview .case[data-status="draft"] { display: block; }

.preview .preview-banner {
  display: block;
  position: sticky;
  top: 78px;
  z-index: 40;
  padding: 10px 0;
  background: var(--navy);
  color: var(--paper);
  font-size: 14px;
  text-align: center;
}

/* Prompts in draft copy, marking what still needs supplying */
.todo { color: var(--navy); border-left: 2px solid var(--navy); padding-left: 14px; }

/* ---------- Photo viewer (lightbox.js) ---------- */

.case-frame { cursor: zoom-in; }

.case-frame:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.lb-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 18, 0.95);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox[hidden] { display: none; }

.lightbox.is-open { opacity: 1; }

.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 88vw; }

.lb-img {
  display: block;
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  transform: scale(0.97);
  transition: transform 0.6s cubic-bezier(.19, 1, .22, 1);
}

.lightbox.is-open .lb-img { transform: none; }

.lb-caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(246, 246, 242, 0.78);
}

.lb-count { white-space: nowrap; letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; }

.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(246, 246, 242, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.lb-btn:hover, .lb-btn:focus-visible { background: rgba(246, 246, 242, 0.12); border-color: rgba(246, 246, 242, 0.7); }

.lb-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.lb-btn svg { width: 20px; height: 20px; }

.lb-close { top: 24px; right: 24px; }

.lb-prev { left: 24px; top: 50%; margin-top: -24px; }

.lb-next { right: 24px; top: 50%; margin-top: -24px; }

@media (prefers-reduced-motion: reduce) { .lightbox, .lb-img { transition: none; } }

/* ---------- Contact: studio map ---------- */

.studio { padding-top: 0; }

.studio-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }

.studio-address { font-style: normal; font-size: 19px; line-height: 1.7; color: var(--graphite); }

.studio-links { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; font-size: 15px; }

.studio-map { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--mist); background: var(--mist); }

/* Greyscale keeps the map inside the site palette; the navy pin carries the only colour */
.studio-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(0.92) brightness(1.04); }

.studio-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -27px 0 0 -11px;
  border-radius: 50% 50% 50% 0;
  background: var(--navy);
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(28, 28, 25, 0.3);
  pointer-events: none;
}

.studio-pin::after { content: ''; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--paper); }

/* ---------- Closing band and buttons ---------- */

.note { background: var(--paper); }

.note h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); max-width: 20ch; margin-bottom: 30px; }

.actions { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }

.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 15px 34px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--paper);
  font-size: 15px;
  letter-spacing: 0.03em;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn:hover, .btn:focus-visible { background: transparent; color: var(--navy); }

.actions .btn { margin-top: 0; }

.btn-quiet { background: transparent; color: var(--ink); border-color: var(--mist); }

.btn-quiet:hover, .btn-quiet:focus-visible { background: var(--ink); color: var(--paper); border-color: var(--ink); }

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

footer { padding: 52px 0; font-size: 14px; color: var(--graphite); }

.footer-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }

a:focus-visible, .btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }

@media (max-width: 900px) {
  .shell { padding: 0 24px; }
  .nav-links { display: none; }
  .page-head { padding: 84px 0 12px; }
  section { padding: 66px 0; }
  .agency-block, .story-block { grid-template-columns: 1fr; gap: 26px; padding: 44px 0; }
  .detail-list li { flex-direction: column; gap: 4px; }
  .detail-list li span:last-child { text-align: left; }
  .case { padding: 56px 0; }
  .case-head, .case-body { grid-template-columns: 1fr; gap: 22px; }
  .case-band { grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }
  .case-frame { height: 140px; }
  .case-frame.hero { grid-column: 1 / -1; height: 230px; }
  .case-body.has-vertical { grid-template-columns: 1fr; }
  .case-reel { justify-self: center; width: 220px; }
  .case-band + .case-band { margin-top: -24px; }
  .case-facts { grid-template-columns: 1fr 1fr; }
  .fact, .fact + .fact { padding: 16px 14px 16px 0; border-left: 0; }
  .more-grid { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
  .studio-grid { grid-template-columns: 1fr; gap: 32px; }
  .lb-figure, .lb-img { max-width: 94vw; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .studio-map { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) { .case-frame img, .film img, .film .play { transition: none; } }
