/* Babineau Media — portfolio redesign.
   Editorial and restrained: the work carries the page, the chrome gets out of
   the way. One typeface (Archivo) doing all the work through weight, size and
   tracking, a near-black ground, and a single orange accent carried over from
   the existing brand mark. */

:root {
  --ink:     #0a0a0b;
  --ink-2:   #111113;
  --paper:   #f4f3f1;
  --muted:   #8c8b87;
  --accent:  #fa8502;
  --line:    rgba(244, 243, 241, .13);
  --line-2:  rgba(244, 243, 241, .07);

  --shell: 1240px;
  --gutter: clamp(24px, 5vw, 64px);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Client logos: one shared cap, so a wide wordmark is limited by width and a
     square mark by height. --s then tunes individual marks up or down from
     that shared measure until the row reads level. */
  --logo-h: 44px;
  --logo-w: 190px;
}

* { box-sizing: border-box; }

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

/* A single element wider than the viewport makes the whole page pannable, and
   the left edge is what disappears. clip contains that without breaking
   position:sticky the way overflow-x:hidden would. */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

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

/* ---------- type scale ---------- */

.display {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: .96;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0;
}

.h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  font-weight: 600;
  margin: 0;
}

/* Small tracked label, numbered like an editorial section marker. */
.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}

.label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--muted);
  max-width: 54ch;
  margin: 0;
}

/* ---------- header ---------- */

.masthead {
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 92px;
}

.masthead__logo img { width: 237px; }   /* matches the original: it renders the mark at 237x47 */

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 4px 0;
  position: relative;
  transition: color .2s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transition: right .28s cubic-bezier(.2, .7, .3, 1);
}

.nav a:hover,
.nav a:focus-visible { color: var(--paper); }
.nav a:hover::after,
.nav a[aria-current='page']::after { right: 0; }
.nav a[aria-current='page'] { color: var(--paper); }

/* ---------- sections ---------- */

.section { padding: clamp(56px, 9vw, 116px) 0; }
.section--tight { padding: clamp(36px, 5vw, 60px) 0; }
.section + .section { border-top: 1px solid var(--line-2); }

/* ---------- hero ---------- */

.hero { padding: clamp(28px, 4vw, 52px) 0 0; }

.hero__video {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
}

.hero__video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero__sound {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(10, 10, 11, .62);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease;
}

.hero__sound:hover { background: rgba(10, 10, 11, .9); border-color: var(--accent); }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 26px;
}

.hero__meta p { margin: 0; }

.hero__place {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- client strip ---------- */

.clients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3vw, 34px) clamp(30px, 4.4vw, 58px);
}

.client {
  display: grid;
  place-items: center;
  height: 64px;
}

/* Capped on BOTH axes: a wide wordmark hits the width limit, a square mark
   hits the height limit, and neither can run away from the other. */
.client img {
  max-height: calc(var(--logo-h) * var(--s, 1));
  max-width:  calc(var(--logo-w) * var(--s, 1));
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: .92;
  transition: opacity .25s ease;
}

.client:hover img { opacity: 1; }

/* Good Neighbor is a circular badge rather than a wordmark: its cap covers the
   whole mark, where a wordmark's cap only covers its letterforms. It needs to
   run above the shared measure to carry equal weight, not below it. */
.client--badge { --s: 1.7; }

.client__text {
  font-size: 1.43rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--paper);
  white-space: nowrap;
}

.client__text--soft { color: var(--muted); font-weight: 500; }

/* ---------- work grid ---------- */

.work {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(20px, 2.6vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.work--featured { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.piece { margin: 0; }

.piece__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  padding: 0;
  cursor: pointer;
  transition: border-color .25s ease;
}

.piece__frame:hover { border-color: var(--line); }

.piece__frame > img,
.piece__frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1), opacity .3s ease;
}

.piece__frame:hover > img { transform: scale(1.035); }

.piece__frame iframe,
.piece iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* Self-hosted clips keep native controls, so they are a plain video element. */
.piece__frame--native { cursor: default; }
.piece__frame--native video { object-fit: contain; background: #000; }

.piece__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(10, 10, 11, .55), rgba(10, 10, 11, .05) 55%);
  transition: background .3s ease;
}

.piece__frame:hover .piece__play { background: linear-gradient(to top, rgba(10, 10, 11, .4), rgba(10, 10, 11, 0) 55%); }

.piece__play span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 243, 241, .7);
  border-radius: 50%;
  background: rgba(10, 10, 11, .35);
  backdrop-filter: blur(3px);
  transition: background .25s ease, border-color .25s ease, transform .3s ease;
}

.piece__frame:hover .piece__play span {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.piece__play svg { width: 15px; height: 17px; margin-left: 3px; fill: var(--paper); }
.piece__frame:hover .piece__play svg { fill: #0a0a0b; }

.piece__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}

.piece__title {
  font-size: .96rem;
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0;
}

.piece__client {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  margin: 0;
}

/* ---------- services ---------- */

.services {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-2);
}

.services li {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 34px);
  padding: clamp(15px, 2vw, 22px) 4px;
  border-bottom: 1px solid var(--line-2);
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -.02em;
  transition: padding-left .3s cubic-bezier(.2, .7, .3, 1), color .25s ease;
}

.services li:hover { padding-left: 18px; color: var(--accent); }

.services li span {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--muted);
  min-width: 2.4em;
  transition: color .25s ease;
}

.services li:hover span { color: var(--accent); }

/* ---------- contact ---------- */

.contact__grid {
  display: grid;
  gap: clamp(26px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: start;
}

.contact__item p { margin: 0; }

.contact__key {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px !important;
}

.contact__val {
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -.02em;
}

.contact__val a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .25s ease, color .25s ease; }
.contact__val a:hover { color: var(--accent); border-color: var(--accent); }

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

.footer {
  border-top: 1px solid var(--line-2);
  padding: 34px 0 44px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .04em;
}

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

/* ---------- entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: rise .8s cubic-bezier(.2, .7, .3, 1) forwards;
  }
  .reveal:nth-child(2) { animation-delay: .07s; }
  .reveal:nth-child(3) { animation-delay: .14s; }
  .reveal:nth-child(4) { animation-delay: .21s; }
}

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- mobile ---------- */

@media (max-width: 760px) {
  /* padding-block, NOT the padding shorthand: this element also carries
     .shell, and the shorthand's 0 for left/right silently wiped out
     .shell's padding-inline, so the header alone sat flush to both screen
     edges while every other section kept its gutter. */
  .masthead__inner { height: auto; padding-block: 16px 14px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .masthead__logo img { width: 215px; max-width: 100%; }
  /* wrap rather than overflow: four uppercase, letterspaced items do not fit
     one line on a narrow phone, and the overflow is what clipped the left. */
  .nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 10px 20px; }
  .nav a { font-size: .82rem; letter-spacing: .1em; }
  .hero__meta { flex-direction: column; gap: 10px; }
  .piece__play span { width: 44px; height: 44px; }
  .services li:hover { padding-left: 4px; }
  /* long titles beside a nowrap byline are the other overflow source */
  .piece__meta { flex-wrap: wrap; gap: 4px 14px; }
  .piece__client { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
