/* ============================================================
   HOMEPAGE (theme D): hero, rotating proof card, results,
   what we run, founder, BTF band. Shared pieces are in theme-d.css.
   ============================================================ */

/* ---------- Hero ---------- */
.hd-hero { background: var(--night); color: #fff; padding: 160px 0 0; }
.hd-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.hd-hero h1 { color: #fff; font-size: clamp(2.8rem, 5.6vw, 5.6rem); line-height: 0.96; text-wrap: balance; }
.hd-hero h1 span { display: block; color: var(--night-accent); } /* second colour always starts its own line */
.hd-hero-sub { margin-top: 28px; font-size: 1.2rem; line-height: 1.55; color: var(--night-text); max-width: 31em; }

/* ---------- Rotating proof card ---------- */
.hd-proof {
  background: var(--night-panel);
  border: 1px solid var(--night-line);
  border-radius: 24px;
  padding: 28px 30px 22px;
  min-width: 0;
}
.hd-proof-slides { display: grid; }
.hd-slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease-out), visibility 0s linear 0.45s;
}
.hd-slide.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease-out), visibility 0s;
}
.hd-slide-who { display: flex; align-items: center; gap: 14px; }
.hd-slide-who .hd-avatar { width: 56px; height: 56px; background: #2A2A36; color: #fff; font-size: 1rem; }
.hd-avatars { display: flex; flex: none; }
.hd-avatars .hd-avatar { border: 2px solid var(--night-panel); }
.hd-avatars .hd-avatar + .hd-avatar { margin-left: -16px; }
.hd-big-was { color: #6E6E80; text-decoration: line-through; text-decoration-thickness: 4px; }
.hd-slide-name { flex: 1; min-width: 0; }
.hd-slide-name b { display: block; font-weight: 600; font-size: 1rem; color: #fff; }
.hd-slide-name span { display: block; font-size: 0.84rem; color: var(--night-text); }
.hd-slide-logo { flex: none; height: 30px; width: auto; max-width: 110px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.85; }
.hd-slide-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 26px; }
.hd-slide-nums.is-single { grid-template-columns: 1fr; }
.hd-big { display: block; font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; font-size: clamp(3rem, 5vw, 4.6rem); line-height: 1; color: #fff; }
.hd-big-lbl { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--night-text); }
.hd-slide p { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--night-line); font-size: 0.96rem; line-height: 1.55; color: var(--night-text); }
.hd-slide p q { font-family: var(--serif); font-size: 1.12rem; color: #fff; }
.hd-slide .hd-pending { color: var(--night-accent); }

.hd-proof-nav { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.hd-dot {
  position: relative; overflow: hidden;
  width: 22px; height: 4px; padding: 0; border: 0; border-radius: 4px;
  background: #3A3A48; cursor: pointer;
  transition: width 0.3s var(--ease-out);
}
.hd-dot::before { content: ''; position: absolute; inset: -12px -2px; } /* bigger tap target */
.hd-dot.is-active { width: 48px; }
.hd-dot i { position: absolute; inset: 0; background: var(--night-accent); transform-origin: left; transform: scaleX(0); }
.hd-dot.is-active i { transform: scaleX(1); }
.hd-proof.is-running .hd-dot.is-active i { animation: hd-fill var(--hd-dwell, 4.5s) linear forwards; }
.hd-proof.is-paused .hd-dot.is-active i { animation-play-state: paused; }
@keyframes hd-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .hd-slide, .hd-slide.is-active { transform: none; transition: none; }
}

.hd-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 88px; border-top: 1px solid var(--night-line); }
.hd-stats > div { padding: 32px 0 40px 28px; border-left: 1px solid var(--night-line); }
.hd-stats > div:first-child { padding-left: 0; border-left: 0; }
.hd-stat { display: block; font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; font-size: clamp(2.2rem, 3.6vw, 3.5rem); line-height: 1; color: #fff; }
.hd-stat-lbl { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--night-text); }

/* ---------- Client logo band (light, directly under the hero) ---------- */
.home-d .clients-band { background: var(--bg); padding: 48px 0 56px; border-bottom: 1px solid var(--line); }
.home-d .clients-roll { border: 0; background: transparent; }
.home-d .clients-also { color: var(--ink-soft); }
.home-d .clients-also > span { text-transform: none; letter-spacing: 0; font-size: 0.95rem; font-weight: 600; }
.home-d .clients-also i { color: var(--line-dark); }

/* ---------- Case studies ---------- */
.hd-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hd-case {
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); border-radius: 20px; padding: 32px;
  background: var(--surface);
}
.hd-case-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.84rem; font-weight: 600; color: var(--ink); }
.hd-case-big { font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; font-size: clamp(2.6rem, 3.8vw, 3.6rem); line-height: 1; margin-top: 8px; color: var(--ink); }
.hd-case-lbl { font-size: 0.95rem; color: var(--ink-soft); margin-top: -4px; }
.hd-case h3 { font-size: 1.2rem; margin-top: 10px; }
.hd-case p { font-size: 0.96rem; line-height: 1.6; }

/* ---------- What we run ---------- */
.hd-run { display: grid; grid-template-columns: 1fr 2fr; gap: 48px 96px; }
.hd-run-head h2 { font-size: clamp(2rem, 3.2vw, 2.9rem); max-width: 9em; }
.hd-run-head p { margin: 20px 0 22px; font-size: 1rem; line-height: 1.6; }
.hd-run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.hd-run-grid > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.hd-run-grid h3 { font-size: 1.12rem; }
.hd-run-grid p { margin-top: 8px; font-size: 1rem; line-height: 1.6; }

/* ---------- In practice (existing motion section) ---------- */
.home-d .mx-section { background: var(--bg-soft); }
.home-d .mx-card { box-shadow: 0 24px 60px rgba(18, 20, 26, 0.08); }

/* ---------- Founder ---------- */
.hd-founder { display: grid; grid-template-columns: 340px 1fr; gap: 48px 88px; align-items: center; }
.hd-founder img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; }
.hd-founder blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.2; color: var(--ink); }
.hd-founder-name { margin-top: 22px; font-size: 0.95rem; }
.hd-founder-name b { color: var(--ink); font-weight: 600; }
.hd-founder p:not(.hd-founder-name) { margin-top: 18px; font-size: 1.05rem; line-height: 1.65; max-width: 34em; }
.hd-founder-links { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; }

/* ---------- Behind the Funnel band ---------- */
.hd-btf-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 48px;
  padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.hd-btf-inner p { font-size: 1.08rem; max-width: 46em; }
.hd-btf-inner b { color: var(--ink); font-weight: 600; }

.home-d #resources { padding-bottom: 72px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hd-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hd-cases { grid-template-columns: 1fr; }
  .hd-run { grid-template-columns: 1fr; }
  .hd-founder { grid-template-columns: 1fr; }
  .hd-founder img { max-width: 360px; }
}
@media (max-width: 640px) {
  .hd-hero { padding-top: 124px; }
  .hd-hero-sub { font-size: 1.08rem; }
  .hd-proof { padding: 22px 20px 18px; }
  .hd-slide-logo { height: 24px; max-width: 80px; }
  .hd-stats { grid-template-columns: 1fr; margin-top: 56px; }
  .hd-stats > div, .hd-stats > div:first-child { padding: 22px 0; border-left: 0; border-top: 1px solid var(--night-line); }
  .hd-stats > div:first-child { border-top: 0; }
  .hd-run-grid { grid-template-columns: 1fr; gap: 28px; }
}
