/* Home page composition. See DESIGN.md: one dominant element per section,
   and neighbouring sections differ in scale. Tokens come from site.css. */

.home2 section { padding: clamp(88px, 12vw, 176px) 0; }

/* 1. Hero: the team on set, full bleed, headline over the photo. */
.home2 .h2-hero {
  position: relative;
  padding: 0;
  margin: 8px clamp(8px, 1.2vw, 16px) 0;
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  min-height: min(86vh, 860px);
  display: flex;
  align-items: flex-end;
}
.h2-hero picture, .h2-hero img { position: absolute; inset: 0; width: 100%; height: 100%; }
.h2-hero img { object-fit: cover; object-position: 50% 40%; }
/* The hero film. It has no controls and no sound; the first frame is the
   poster, so nothing jumps when playback starts. */
.h2-hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; pointer-events: none; }
.h2-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.12) 38%, rgba(0,0,0,.78) 100%);
}
.h2-hero-copy {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: clamp(28px, 5vw, 72px) var(--pad);
  color: #fff;
}
.h2-hero-copy h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.5rem);
  line-height: 1.03; letter-spacing: -0.022em;
  max-width: 11em; color: #fff;
}
.h2-hero-copy p { margin: clamp(12px, 1.6vw, 20px) 0 clamp(20px, 2.6vw, 32px); font-size: clamp(1.1875rem, 2vw, 1.75rem); font-weight: 500; color: rgba(255,255,255,.86); }
.h2-hero-copy .btn { background: #fff; color: #1d1d1f; }

/* 2. Statement: very large type, nothing else. */
.h2-big {
  font-size: clamp(1.75rem, 4.4vw, 4rem);
  line-height: 1.12; letter-spacing: -0.02em; font-weight: 600;
  max-width: 20em; margin: 0;
  text-wrap: balance;
}
.h2-big .w { color: color-mix(in srgb, var(--ink) 20%, var(--bg)); transition: color .15s linear; }
.h2-big .w.on { color: var(--ink); }

/* 3. Results: three equal tiles, aligned to the page on both sides.
   On phones the row swipes, starting flush with the page margin. */
.home2 .h2-results { padding-top: 0; }
.h2-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(20px, 3vw, 36px); }
.h2-results-head .link-btn { padding: 10px 0; }
.h2-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.h2-tile {
  position: relative; display: block;
  aspect-ratio: 3 / 4;
  border-radius: 28px; overflow: hidden;
  color: #fff; text-decoration: none; background: #1d1d1f;
  transition: transform 100ms ease-out;
}
.h2-tile:active { transform: scale(0.99); }
.h2-tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.h2-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.78) 100%); }
/* With a mouse, the photo eases in to show the tile opens. No badge on it. */
.h2-tile img { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { .h2-tile:hover img { transform: scale(1.05); } }
.h2-tile:focus-visible { outline: 3px solid #0071e3; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .h2-tile img { transition: none; } .h2-tile:hover img { transform: none; } }
.h2-tile-copy { position: absolute; z-index: 1; left: clamp(18px, 2.2vw, 28px); right: clamp(18px, 2.2vw, 28px); bottom: clamp(18px, 2.2vw, 28px); display: grid; gap: 2px; }
.h2-tile-copy strong { font-size: clamp(2.5rem, 4.6vw, 4rem); line-height: 1; letter-spacing: -0.025em; font-weight: 600; font-variant-numeric: tabular-nums; }
.h2-tile-copy span { font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); font-weight: 500; }
.h2-tile-copy em { font-style: normal; margin-top: 8px; font-size: 0.9375rem; color: rgba(255,255,255,.78); }
@media (max-width: 760px) {
  .h2-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scroll-padding: 0 var(--pad);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .h2-grid::-webkit-scrollbar { display: none; }
  .h2-tile { flex: 0 0 78%; scroll-snap-align: start; }
}

/* The film row uses the same swipe behaviour at every width. */
.h2-rail {
  display: flex; gap: clamp(12px, 1.6vw, 20px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  scroll-padding: 0 max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.h2-rail::-webkit-scrollbar { display: none; }

/* 4. Signature: type beside a tall photo. No boxes. */
.h2-studio-grid { display: grid; gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (min-width: 900px) { .h2-studio-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.h2-studio .lede { margin-top: 16px; }
.h2-steps { list-style: none; counter-reset: s; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; gap: clamp(24px, 3vw, 36px); }
.h2-steps li { counter-increment: s; display: grid; grid-template-columns: 2.2em 1fr; column-gap: 8px; }
.h2-steps li::before { content: counter(s); grid-row: span 2; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.1; color: var(--muted); font-variant-numeric: tabular-nums; }
.h2-steps strong { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.h2-steps span { margin-top: 8px; font-size: 1.0625rem; color: var(--muted); max-width: 46ch; }
.h2-after { margin: clamp(28px, 4vw, 44px) 0 clamp(20px, 3vw, 28px); font-size: 1.1875rem; font-weight: 500; max-width: 30ch; }
.h2-studio-photo { width: 100%; height: auto; aspect-ratio: 6 / 7; object-fit: cover; border-radius: 28px; }

/* 5. Clients: real logos, rendered in one ink so they read as a set. */
/* Client marks in rows of four (rows of two on phones), with a short last
   row centered. Each mark sets its own optical height with --h, because
   equal heights look unequal. */
.h2-logos { --gx: clamp(24px, 4vw, 64px); list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(36px, 4.5vw, 64px) var(--gx); max-width: 1080px; }
.h2-logos li { flex: 0 0 calc((100% - var(--gx) * 3) / 4); display: flex; justify-content: center; }
.h2-logos img { display: block; height: calc(var(--h) * var(--k, 1)); width: auto; max-width: 100%; object-fit: contain; filter: brightness(0); opacity: 0.86; }
@media (max-width: 760px) { .h2-logos { --k: 0.7; } .h2-logos li { flex-basis: calc((100% - var(--gx)) / 2); } }
.h2-fit { margin: clamp(36px, 5vw, 64px) 0 0; font-size: clamp(1.5rem, 3.2vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; max-width: 22em; text-wrap: balance; }

/* 6. In their words: matching film tiles that open a player, then quotes in type. */
.h2-words h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.h2-filmtile {
  position: relative; flex: 0 0 min(68vw, 340px);
  aspect-ratio: 9 / 16;
  padding: 0; border: 0; border-radius: 28px; overflow: hidden;
  background: #1d1d1f; color: #fff; font: inherit; text-align: left; cursor: pointer;
  scroll-snap-align: start;
  transition: transform 100ms ease-out;
}
.h2-filmtile:active { transform: scale(0.985); }
.h2-filmtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h2-filmtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,.35) 100%); }
.h2-filmname { position: absolute; z-index: 1; left: 20px; right: 20px; top: 18px; display: grid; gap: 2px; }
.h2-filmname strong { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; }
.h2-filmname span { font-size: 0.9375rem; color: rgba(255,255,255,.82); }
.h2-play {
  position: absolute; z-index: 1; right: 16px; bottom: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.h2-play svg { width: 20px; height: 20px; fill: #fff; margin-left: 2px; }
.h2-filmtile:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.h2-lead { margin: clamp(56px, 8vw, 112px) 0 0; }
.h2-lead blockquote { margin: 0 0 20px; font-size: clamp(1.75rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; max-width: 18em; text-wrap: balance; }
.h2-lead figcaption, .h2-quotes span { font-size: 1.0625rem; color: var(--muted); }
.h2-lead strong, .h2-quotes strong { color: var(--ink); font-weight: 600; }
.h2-quotes { list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; display: grid; gap: clamp(32px, 4vw, 48px) clamp(32px, 6vw, 96px); }
@media (min-width: 760px) { .h2-quotes { grid-template-columns: 1fr 1fr; } }
.h2-quotes p { margin: 0 0 12px; font-size: clamp(1.1875rem, 1.9vw, 1.5rem); line-height: 1.3; font-weight: 500; max-width: 24em; }

/* The film player. */
.h2-player { position: fixed; inset: 0; z-index: 95; height: 100dvh; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 40px); }
.h2-player-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.72); opacity: 0; transition: opacity .25s ease; }
.h2-player-frame {
  position: relative; height: min(88dvh, 860px); max-width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 28px; overflow: hidden; background: #000;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  opacity: 0; transform: scale(.9);
  transition: opacity .2s ease, transform .38s cubic-bezier(.32, .72, 0, 1);
}
.h2-player-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.h2-player.shown .h2-player-scrim { opacity: 1; }
.h2-player.shown .h2-player-frame { opacity: 1; transform: none; }
.h2-player-close {
  position: absolute; right: 14px; top: 14px;
  width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(60,60,60,.6); color: #fff;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: transform 100ms ease-out;
}
.h2-player-close:active { transform: scale(.94); }
.h2-player-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) {
  .h2-player-frame { transform: none; transition: opacity .2s ease; }
  .h2-filmtile:active, .h2-player-close:active { transform: none; }
}

/* 8. Closing line. */
.home2 .h2-close { text-align: center; }
.h2-close h2 { font-size: clamp(2.5rem, 7vw, 6rem); line-height: 1.03; letter-spacing: -0.022em; max-width: 10em; margin: 0 auto clamp(24px, 3vw, 40px); }

@media (max-width: 760px) {
  .home2 .h2-hero { min-height: 88vh; }
  .h2-hero img { object-position: 50% 30%; }
}
@media (prefers-reduced-motion: reduce) { .h2-tile:active { transform: none; } }

/* A small headshot beside each written quote's credit. */
.h2-credit { display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; color: var(--muted); }
.h2-credit img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--fill); }
.h2-credit strong { color: var(--ink); font-weight: 600; }

/* On larger screens the three films fill the page width as equal tiles, so
   the row is centered in the window. The swipe row is for phones only. */
@media (min-width: 761px) {
  .h2-films {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  }
  .h2-filmtile { flex: none; width: 100%; aspect-ratio: 4 / 5; }
  .h2-filmtile img { object-position: 50% 30%; }
}

/* The film cuts between bright and dark rooms, so its scrim starts earlier
   than the photo's did and the headline stays readable on a white coat. */
.h2-hero--film::after {
  background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.16) 34%, rgba(0,0,0,.52) 62%, rgba(0,0,0,.84) 100%);
}

/* One proof link under the results. */
.h2-proof { margin: clamp(24px, 3vw, 40px) 0 0; max-width: none; font-size: clamp(1.1875rem, 2vw, 1.75rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.h2-proof a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; transition: opacity .2s ease; }
.h2-proof a:hover { opacity: 0.7; }
