/* ===========================================================
   v2.1, Darkroom-style hero with tighter proportions,
   bg fade overlay, snap-text mid-transition so contrast holds,
   2-row brand marquee, YouTube auto-scroll rail.
   Loaded AFTER sections.css.
   =========================================================== */

/* ---------- Body theme ----------
   Body bg + text color are driven by JS in theme-scroll.js, they
   interpolate smoothly as the user scrolls between adjacent sections
   of different themes. Sections themselves are transparent so the
   body bg shows everywhere, giving a true viewport-wide fade.
   `body.theme-*` is still toggled (at the perceptual midpoint of any
   transition) for nav chrome / hardcoded element styles.              */
html { background: #0A0A0B; }
body { background: #0A0A0B; color: #F2EDE3; }

/* Sections: transparent so body bg drives them */
.hero-v2,
.clients,
.services,
.youtube,
.partners,
.footer { background: transparent; }

/* Text colors inherit so they snap with body color at midpoint */
.hero-v2-headline,
.hero-v2-sub strong,
.clients,
.clients .sect-head h2,
.clients .lede strong,
.services h2,
.youtube h2 { color: inherit; }

.hero-v2-sub,
.clients .lede,
.clients .eyebrow { color: inherit; opacity: 0.55; }
.clients .eyebrow .dot { background: var(--brand); }

/* Footer keeps an explicit ink bg so it doesn't pick up paper if the
   scroll engine ever lands on a paper theme at the very bottom. */
.footer { background: #0A0A0B; color: #F2EDE3; }

/* Featured-work card overrides, real-image bg + brand tint overlay */
.client {
  background: #1a1a1a;          /* fallback under image while it loads */
}
.client-bg {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.client-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity .4s ease;
}
.client-cat,
.client-logo,
.client-result,
.client-meta { z-index: 2; }
.client:hover .client-tint { opacity: 0.85; }
.client:hover .client-bg { filter: brightness(0.85) saturate(1.05); }

/* Featured-work section spacing tighter on home for fold */
.client-grid { gap: 14px; }

/* ============================================================
   NAV, adapts to theme via body class
   ============================================================ */
body.theme-ink .nav {
  background: linear-gradient(180deg, rgba(10,10,11,0.92), rgba(10,10,11,0.5) 70%, transparent);
}
body.theme-paper .nav {
  background: linear-gradient(180deg, rgba(242,237,227,0.95), rgba(242,237,227,0.6) 70%, transparent);
  color: var(--ink);
}
body.theme-paper .nav .brand .name em { color: var(--brand); }
body.theme-paper .nav .nav-links a { color: var(--ink); opacity: 0.78; }
body.theme-paper .nav .nav-links a:hover { opacity: 1; }
body.theme-paper .nav .audit { color: var(--ink); opacity: 0.7; }
body.theme-paper .nav .nav-burger { border-color: rgba(10,10,11,0.12); }
body.theme-paper .nav .nav-burger span { background: var(--ink); }
body.theme-paper .nav.scrolled { background: rgba(242,237,227,0.92); border-bottom: 1px solid var(--line-dark); }
.nav { transition: background-color 350ms ease, color 350ms ease; }

/* ============================================================
   HERO v2, tighter, Darkroom-like proportions
   ============================================================ */
.hero-v2 {
  position: relative;
  padding-top: 72px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.hero-pad {
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 56px);
}

/* Hero: two-column layout, left identity block, right copy + CTA */
.hv2-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.96fr);
  gap: clamp(28px, 3vw, 52px);
  align-items: stretch;
  padding-top: clamp(20px, 3vw, 40px);
  position: relative;
  inset: auto;
}
.hv2-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
  justify-content: space-between;
}
.hv2-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  justify-content: space-between;
}
.hv2-photo {
  margin: 0;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
}
.hv2-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-v2-headline {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(68px, 9vw, 140px);
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 16px 0 0;
}
.hero-v2-sub {
  font-family: var(--sans);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
}
.hero-v2-tagline {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 1.3vw, 20px);
  letter-spacing: -0.01em;
  color: #fff;
  margin-top: -4px;
}
/* Rotating word, spacer holds height, word sits absolute on top */
.rotate-wrap {
  display: block;
  position: relative;
}
.rotate-spacer {
  display: block;
  visibility: hidden;
  white-space: nowrap;
  line-height: 0.88;
  font-size: 1em; /* GROWTH size, tallest line, sets container height */
  pointer-events: none;
}
.word-rotate {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  white-space: nowrap;
  line-height: 0.88;
  transition: opacity .35s ease;
  color: var(--brand);
}

/* Bottom bar: stats + button on one row */
.hv2-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 60px);
  padding-top: clamp(20px, 2.5vw, 36px);
  padding-bottom: clamp(24px, 3vw, 44px);
}
.hv2-bottom-bar .hv2-stats { margin-top: 0; flex: 1; }
.hv2-bottom-bar .hero-v2-actions { flex-shrink: 0; width: auto; }

/* Restore white photo border */
.hv2-photo {
  margin: 0;
  width: 100%;
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5);
}
.hv2-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
.hv2-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
}
.word-rotate-out {
  opacity: 0;
  transform: translateY(0.18em);
}
.hero-v2-headline .it {
  font-style: normal;
  font-weight: 700;
  color: var(--brand);
}
.hero-v2-meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
}
.hero-v2-sub {
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.5;
  max-width: 46ch;
}
.hero-v2-sub strong { font-weight: 600; }
.hero-v2-actions { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
.hero-big-btn {
  width: 100%;
  padding: 22px 32px !important;
  font-size: clamp(16px, 1.4vw, 19px) !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  justify-content: center;
  gap: 10px;
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 12px 40px -12px rgba(42,111,219,0.55);
  transition: transform .25s ease, box-shadow .25s ease;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero-v2-actions .btn { justify-content: space-between; }
.hv2-cta-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  align-self: stretch;
}
.hero-big-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 70px -20px rgba(42, 111, 219, 0.7);
}
.hero-trust-line {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  letter-spacing: 0.04em;
  font-family: var(--sans);
}
.hero-big-btn .arr {
  background: none;
  width: auto;
  height: auto;
  font-size: 18px;
  flex-shrink: 0;
  border-radius: 0;
  line-height: 1;
}
.hero-v2-actions .btn { padding: 13px 18px 13px 20px; font-size: 13px; }
.hero-v2-actions .btn .arr { font-size: 14px; }

/* Trust rating row (Trustpilot-style green stars) */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trust-stars {
  display: inline-flex;
  gap: 3px;
  font-size: 19px;
  line-height: 1;
  color: #00B67A;
}
.trust-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(13px, 1vw, 15px);
  letter-spacing: 0.01em;
  color: #fff;
}

/* Hero tagline (bold positioning line) */
.hero-v2-tagline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 1.3vw, 20px);
  letter-spacing: -0.01em;
  color: #fff;
  margin-top: -4px;
}

/* Hero stat row */
.hv2-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  margin-top: clamp(14px, 1.8vw, 24px);
  gap: clamp(32px, 5vw, 80px);
  padding-top: 0;
}
  padding-top: clamp(24px, 3vw, 36px);
  gap: clamp(40px, 7vw, 100px);
  flex-wrap: wrap;
  border-top: none;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stat .hs-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero-stat .hs-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(13px, 1vw, 16px);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 900px) {
  .hv2-grid { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .hv2-right { padding-bottom: 0; }
  .hero-v2-copy { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .hero-v2-meta { padding-bottom: 0; }
  .hero-v2-headline { font-size: clamp(48px, 12vw, 96px); }
}

/* ============================================================
   BRAND STRIP, single row of slots, async crossfade per slot
   ============================================================ */
.brand-strip {
  padding-top: clamp(8px, 1vw, 16px);
}
.bs-slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 0 var(--gutter);
}
.bs-slot {
  position: relative;
  height: 56px;
  display: grid;
  place-items: center;
}
.bs-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 900ms cubic-bezier(.4,0,.2,1), transform 900ms cubic-bezier(.4,0,.2,1);
}
.bs-layer.is-on  { opacity: 0.72; transform: translateY(0)    scale(1); }
.bs-layer.is-off { opacity: 0;    transform: translateY(-6px) scale(0.95); }
.bs-layer img {
  height: calc(56px * var(--h, 0.7));
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.bs-slot:hover .bs-layer.is-on { opacity: 1; }

@media (max-width: 1100px) {
  .bs-slots { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .bs-slots { grid-template-columns: repeat(3, 1fr); }
  .bs-slot { height: 44px; }
  .bs-layer img { height: calc(44px * var(--h, 0.7)); }
}

/* Legacy 2-row marquee (kept for any cached references, hidden if present) */
.bs-row { display: none; }

/* ============================================================
   HERO ROWS, 2 horizontal carousels, opposite directions
   ============================================================ */
.hero-rows {
  margin-top: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(40px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.hero-row {
  display: flex;
  gap: 14px;
  width: max-content;
  will-change: transform;
}
.hero-row-l { animation: rowScrollL 90s linear infinite; }
.hero-row-r { animation: rowScrollR 90s linear infinite; }
/* No pause-on-hover, keep infinite motion */
@keyframes rowScrollL { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@keyframes rowScrollR { from { transform: translate3d(-50%,0,0); } to { transform: translate3d(0,0,0); } }

.hcc {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  isolation: isolate;
}

/* ============================================================
   TIGHTER SECTION SPACING, fade bands already provide visual breathing
   between sections, so internal padding can be much smaller.
   ============================================================ */
.sect      { padding: clamp(40px, 5vw, 64px) 0; }
.clients   { padding: clamp(40px, 5vw, 64px) 0 clamp(12px, 1.5vw, 20px); }
.services  { padding: clamp(12px, 1.5vw, 20px) 0 clamp(56px, 6vw, 80px); }
.youtube   { padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 6vw, 80px); }
.sect-head { margin-bottom: clamp(28px, 3.5vw, 48px); }

/* ============================================================
   YOUTUBE, text on LEFT, 2 vertical columns on RIGHT
   scrolling up/down infinitely.
   ============================================================ */
.youtube .wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.yt-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 8px;
}
.yt-copy h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: inherit;
  margin-bottom: 4px;
}
.yt-copy p {
  font-size: 15px;
  color: var(--mute);
  line-height: 1.55;
  max-width: 42ch;
}
.yt-copy .yt-handle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--mute);
}
.yt-copy .yt-mark {
  width: 26px; height: 18px;
  background: #ff0033;
  border-radius: 4px;
  position: relative;
}
.yt-copy .yt-mark::after {
  content: "";
  position: absolute;
  left: 9px; top: 4px;
  width: 0; height: 0;
  border-left: 8px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.yt-stage {
  position: relative;
  height: clamp(520px, 70vh, 720px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}
.yt-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.yt-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  will-change: transform;
}
.yt-col-up   { animation: ytColUp   55s linear infinite; }
.yt-col-down { animation: ytColDown 55s linear infinite; }
@keyframes ytColUp   { from { transform: translate3d(0,0,0); }       to { transform: translate3d(0,-50%,0); } }
@keyframes ytColDown { from { transform: translate3d(0,-50%,0); }    to { transform: translate3d(0,0,0); } }

.yt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  transition: transform .35s var(--ease-out);
}
.yt-card:hover { transform: translateY(-2px); }
.yt-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}
.yt-thumb .play-circle {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: background .25s ease, transform .35s var(--ease-out);
}
.yt-thumb .play-circle::after {
  content: "";
  width: 0; height: 0;
  margin-left: 4px;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.yt-card:hover .play-circle { background: var(--brand); transform: translate(-50%,-50%) scale(1.05); }
.yt-thumb .dur {
  position: absolute;
  right: 8px; bottom: 8px;
  padding: 3px 7px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
}
.yt-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--paper);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .youtube .wrap { grid-template-columns: 1fr; }
  .yt-stage { height: 600px; }
}
@media (max-width: 540px) {
  .yt-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CTA, fade-in from ink, then full blue
   ============================================================ */
.cta-wrap {
  position: relative;
  background: var(--brand);
  isolation: isolate;
}
.cta-fade-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 240px;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink) 6%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}
.cta {
  position: relative;
  background: transparent;
  padding: clamp(48px, 6vw, 84px) 0 clamp(48px, 6vw, 84px);
  color: #ffffff;
  overflow: visible;
}
.cta .wrap { position: relative; z-index: 3; }
.cta-fineprint { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cta-fineprint > div {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(10,10,11,0.7);
}
.cta-fineprint b { font-weight: 700; letter-spacing: -0.005em; }
@media (max-width: 800px) {
  .cta-fineprint { grid-template-columns: 1fr; gap: 16px; }
}

/* Featured work (light), heading colors against paper bg */
.clients .eyebrow .dot { background: var(--brand); }

/* Footer bg always ink */
.footer { background: var(--ink); color: var(--paper); }

/* Hide unused legacy parts */
.brands { display: none; }
.wall { display: none; }
.testimonials, .stats-strip, .insights, .nda { display: none; }

@media (max-width: 700px) {
  .bs-logo { height: 40px; }
  .bs-logo img { height: calc(40px * var(--h, 0.7)); }
}

body.theme-paper .nav.open .nav-links { background: rgba(242,237,227,0.96); }
body.theme-paper .nav.open .nav-links a { color: var(--ink); }

/* ----------------------------------------------------------------
   Header stays DARK on every theme (incl. the light sections) so the
   wordmark + nav links keep contrast. These come after the paper-nav
   rules above and override them at equal specificity.
   ---------------------------------------------------------------- */
body.theme-paper .nav {
  background: linear-gradient(180deg, rgba(10,10,11,0.92), rgba(10,10,11,0.5) 70%, transparent);
  color: var(--paper);
}
body.theme-paper .nav .nav-links a { color: var(--paper); opacity: 0.82; }
body.theme-paper .nav .nav-links a:hover { opacity: 1; }
body.theme-paper .nav .nav-links a.is-active { color: var(--ink); opacity: 1; }
body.theme-paper .nav .audit { color: var(--mute); }
body.theme-paper .nav .nav-burger { border-color: rgba(255,255,255,0.12); }
body.theme-paper .nav .nav-burger span { background: var(--paper); }
body.theme-paper .nav.scrolled { background: rgba(10,10,11,0.86); border-bottom: 1px solid var(--line); }
body.theme-paper .nav.open .nav-links { background: rgba(10,10,11,0.96); }
body.theme-paper .nav.open .nav-links a { color: var(--paper); }
