/* ================================================================
   SOCIAL PROOF — "The Testimony Pad"
   Outer section is a 400vh scroll track. The inner .hs-sp__sticky
   pins at 100vh via GSAP (ScrollTrigger + pinSpacing: false).
   As the user scrolls, notes peel off one by one. Trust indicators
   reveal on the cleared stage after the final peel.
   Mobile (<= 768px) collapses to a horizontal flex slider.
================================================================ */


/* ── Section shell — scroll track ──────────────────────────── */

.hs-social-proof {
  background-color: var(--hs-color-bg-page);
  height: 650vh;
}


/* ── Sticky stage — pinned 100vh cinema ─────────────────────── */

.hs-sp__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--hs-space-10);
  gap: var(--hs-space-6);
}


/* ── Section header ─────────────────────────────────────────── */

.hs-sp__header {
  flex-shrink: 0;
  text-align: center;
  max-width: var(--hs-container-md);
  width: 100%;
  padding-inline: var(--hs-container-pad-x);
}

.hs-sp__eyebrow {
  display: block;
  margin-bottom: var(--hs-space-4);
  color: var(--hs-color-text-accent);
  letter-spacing: var(--hs-tracking-wider);
}

.hs-sp__headline {
  font-family:    var(--hs-font-display);
  font-size:      var(--hs-text-section-h);
  font-weight:    var(--hs-font-extrabold);
  line-height:    var(--hs-leading-heading);
  letter-spacing: var(--hs-tracking-tight);
  color:          var(--hs-color-text-brand);
  margin-bottom:  var(--hs-space-4);
}

.hs-sp__sub {
  font-family:   var(--hs-font-body);
  font-size:     var(--hs-text-base);
  line-height:   var(--hs-leading-relaxed);
  color:         var(--hs-color-text-secondary);
  max-width:     52ch;
  margin-inline: auto;
}


/* ── Stage — holds pad and trust overlay ────────────────────── */

.hs-sp__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}


/* ── Pad — outer box reserves layout space for peeking notes ── */

.hs-sp__pad {
  padding-right:  calc(var(--hs-note-stack-offset-x) * 2);
  padding-bottom: calc(var(--hs-note-stack-offset-y) * 2);
}

.hs-sp__pad-inner {
  position:    relative;
  width:       var(--hs-note-width);
  perspective: 1400px;
}

/* Navigation buttons (Hidden on Desktop) */
.hs-sp__nav {
  display: none;
}


/* ── Sticky notes ───────────────────────────────────────────── */

.hs-sp__note {
  width:         var(--hs-note-width);
  min-height:    var(--hs-note-min-height);
  padding:       var(--hs-note-pad-y) var(--hs-note-pad-x);
  border-radius: var(--hs-note-radius);
  box-shadow:    var(--hs-note-shadow);

  display:        flex;
  flex-direction: column;
  gap:            var(--hs-space-8);

  backface-visibility:    hidden;
  -webkit-font-smoothing: antialiased;
}

/* Note 1 — in flow, sets pad-inner height, rendered on top */
.hs-sp__note[data-note="1"] {
  position:   relative;
  z-index:    6;
  background: var(--hs-note-bg-1);
  will-change: transform;
}

/* Notes 2–6 — absolutely stacked behind note 1 */
.hs-sp__note[data-note="2"],
.hs-sp__note[data-note="3"],
.hs-sp__note[data-note="4"],
.hs-sp__note[data-note="5"],
.hs-sp__note[data-note="6"] {
  position: absolute;
  top:  0;
  left: 0;
  will-change: transform;
}

.hs-sp__note[data-note="2"] {
  z-index:    5;
  background: var(--hs-note-bg-2);
  transform:  translate(
    var(--hs-note-stack-offset-x),
    var(--hs-note-stack-offset-y)
  );
}

.hs-sp__note[data-note="3"] {
  z-index:    4;
  background: var(--hs-note-bg-3);
  transform:  translate(
    calc(var(--hs-note-stack-offset-x) * 2),
    calc(var(--hs-note-stack-offset-y) * 2)
  );
}

/* Notes 4–6 — hidden behind note 3 initially, revealed by GSAP */
.hs-sp__note[data-note="4"] {
  z-index:    3;
  background: var(--hs-note-bg-1);
  transform:  translate(
    calc(var(--hs-note-stack-offset-x) * 2),
    calc(var(--hs-note-stack-offset-y) * 2)
  );
  opacity: 0;
}

.hs-sp__note[data-note="5"] {
  z-index:    2;
  background: var(--hs-note-bg-2);
  transform:  translate(
    calc(var(--hs-note-stack-offset-x) * 2),
    calc(var(--hs-note-stack-offset-y) * 2)
  );
  opacity: 0;
}

.hs-sp__note[data-note="6"] {
  z-index:    1;
  background: var(--hs-note-bg-3);
  transform:  translate(
    calc(var(--hs-note-stack-offset-x) * 2),
    calc(var(--hs-note-stack-offset-y) * 2)
  );
  opacity: 0;
}

/* Adhesive strip at the top of each note */
.hs-sp__note::before {
  content:       '';
  position:      absolute;
  top:           0;
  left:          50%;
  transform:     translateX(-50%);
  width:         56px;
  height:        var(--hs-space-2-5);
  background:    rgba(10, 31, 68, 0.06);
  border-radius: 0 0 var(--hs-radius-xs) var(--hs-radius-xs);
}

/* Bottom-edge lift hint on the active (top) note */
.hs-sp__note[data-note="1"]::after {
  content:        '';
  position:       absolute;
  bottom:         0;
  left:           var(--hs-space-6);
  right:          var(--hs-space-6);
  height:         var(--hs-space-3);
  background:     transparent;
  box-shadow:
    0 12px 20px rgba(10, 31, 68, 0.14),
    0  6px 10px rgba(10, 31, 68, 0.08);
  border-radius:  var(--hs-radius-full);
  pointer-events: none;
}


/* ── Note body: the quote ───────────────────────────────────── */

.hs-sp__note-body {
  flex: 1;
}

.hs-sp__note-quote {
  font-family: var(--hs-font-body);
  font-size:   var(--hs-text-lg);
  font-weight: var(--hs-font-normal);
  font-style:  italic;
  line-height: var(--hs-leading-relaxed);
  color:       var(--hs-color-text-primary);
  quotes:      '\201C' '\201D';
}

.hs-sp__note-quote::before {
  content:        open-quote;
  font-family:    var(--hs-font-display);
  font-size:      var(--hs-text-4xl);
  font-style:     normal;
  font-weight:    var(--hs-font-extrabold);
  line-height:    0.6;
  vertical-align: -0.35em;
  margin-right:   var(--hs-space-1);
  color:          var(--hs-color-text-accent);
  opacity:        0.6;
}


/* ── Note footer: author + verified badge ───────────────────── */

.hs-sp__note-footer {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             var(--hs-space-4);
  padding-top:     var(--hs-space-6);
  border-top:      var(--hs-border-1) solid rgba(10, 31, 68, 0.08);
  margin-top:      auto;
}

.hs-sp__note-author {
  display:     flex;
  align-items: center;
  gap:         var(--hs-space-3);
  min-width:   0;
}

.hs-sp__note-photo {
  width:         44px;
  height:        44px;
  border-radius: var(--hs-radius-full);
  object-fit:    cover;
  flex-shrink:   0;
  box-shadow:    var(--hs-shadow-sm);
  border:        var(--hs-border-2) solid rgba(10, 31, 68, 0.08);
}

.hs-sp__note-info {
  display:        flex;
  flex-direction: column;
  gap:            var(--hs-space-0-5);
  min-width:      0;
}

.hs-sp__note-name {
  font-family:   var(--hs-font-display);
  font-size:     var(--hs-text-base);
  font-style:    normal;
  font-weight:   var(--hs-font-semibold);
  color:         var(--hs-color-text-brand);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.hs-sp__note-role {
  font-family: var(--hs-font-body);
  font-size:   var(--hs-text-sm);
  color:       var(--hs-color-text-secondary);
  white-space: nowrap;
}

.hs-sp__note-location {
  font-family: var(--hs-font-body);
  font-size:   var(--hs-text-xs);
  color:       var(--hs-color-text-tertiary);
  white-space: nowrap;
}

.hs-sp__note-badge {
  display:     flex;
  align-items: center;
  gap:         var(--hs-space-1-5);
  flex-shrink: 0;
  color:       var(--hs-color-text-success);
}

.hs-sp__note-badge-label {
  font-family:    var(--hs-font-body);
  font-size:      var(--hs-text-xs);
  font-weight:    var(--hs-font-medium);
  letter-spacing: var(--hs-tracking-wide);
  white-space:    nowrap;
}


/* ── Trust indicators — absolute overlay, revealed last ─────── */

.hs-sp__trust {
  position:       absolute;
  inset:          0;
  display:        flex;
  flex-wrap:      wrap;
  align-items:    center;
  justify-content: center;
  align-content:  center;
  gap:            var(--hs-space-6) var(--hs-space-10);
  padding-inline: var(--hs-container-pad-x);
  opacity:        0;
  pointer-events: none;
}

.hs-sp__trust-item {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            var(--hs-space-1);
  text-align:     center;
  min-width:      120px;
}

.hs-sp__trust-value {
  font-family:    var(--hs-font-display);
  font-size:      var(--hs-text-3xl);
  font-weight:    var(--hs-font-extrabold);
  line-height:    1;
  letter-spacing: var(--hs-tracking-tight);
  color:          var(--hs-color-text-brand);
}

.hs-sp__trust-label {
  font-family: var(--hs-font-body);
  font-size:   var(--hs-text-sm);
  line-height: var(--hs-leading-snug);
  color:       var(--hs-color-text-secondary);
  max-width:   14ch;
}


/* ── Verified badge pulse ────────────────────────────────────── */

@keyframes hs-sp-badge-pulse {
  0%, 100% { transform: scale(1);    opacity: 1;    }
  50%       { transform: scale(1.15); opacity: 0.68; }
}

.hs-sp__note-badge .hs-icon {
  animation:        hs-sp-badge-pulse 2.8s ease-in-out infinite;
  transform-origin: center;
}


/* ── Mobile Slider Navigation ───────────────────────────────── */

@media (max-width: 768px) {
  .hs-social-proof {
    height: auto;
  }

  .hs-sp__sticky {
    position:      static;
    height:        auto;
    overflow:      visible;
    padding-block: var(--hs-section-pad-y-sm);
    gap:           var(--hs-space-12);
  }

  .hs-sp__stage {
    position:       static;
    flex:           none;
    flex-direction: column;
    gap:            var(--hs-space-10);
    align-items:    center;
  }

  .hs-sp__pad {
    width:          100%;
    max-width:      var(--hs-container-lg);
    padding-inline: 0;
    padding-right:  0;
    padding-bottom: 0;
  }

  .hs-sp__pad-inner {
    display: flex;
    gap: var(--hs-space-6);
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-inline: var(--hs-container-pad-x);
    padding-bottom: var(--hs-space-4);
  }

  .hs-sp__pad-inner::-webkit-scrollbar {
    display: none;
  }

  .hs-sp__nav {
    display: flex;
    justify-content: center;
    gap: var(--hs-space-4);
    margin-top: var(--hs-space-8);
  }

  .hs-sp__nav-btn {
    background: var(--hs-color-bg-page);
    border: var(--hs-border-2) solid var(--hs-color-border-default);
    border-radius: var(--hs-radius-full);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--hs-color-text-secondary);
    transition: all 0.2s ease;
  }

  .hs-sp__nav-btn:hover {
    border-color: var(--hs-color-border-accent);
    color: var(--hs-color-text-accent);
  }

  .hs-sp__nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .hs-sp__note {
    width: 100%;
    max-width: 480px;
    min-height: auto;
    flex-shrink: 0;
    scroll-snap-align: center;
  }

  /* Override absolute positioning and hidden states on mobile */
  .hs-sp__note[data-note="2"],
  .hs-sp__note[data-note="3"],
  .hs-sp__note[data-note="4"],
  .hs-sp__note[data-note="5"],
  .hs-sp__note[data-note="6"] {
    position: relative;
    transform: none;
    opacity: 1;
  }

  .hs-sp__note-quote {
    font-size: var(--hs-text-base);
  }

  .hs-sp__note-badge-label {
    display: none;
  }

  .hs-sp__trust {
    position:       static;
    opacity:        1;
    pointer-events: auto;
    gap:            var(--hs-space-6);
    padding-inline: var(--hs-container-pad-x);
  }

  .hs-sp__trust-item {
    min-width: 100px;
  }

  .hs-sp__trust-value {
    font-size: var(--hs-text-2xl);
  }
}


/* ── Reduced motion — same as mobile static layout ──────────── */

@media (prefers-reduced-motion: reduce) {
  .hs-sp__note-badge .hs-icon {
    animation: none;
  }

  .hs-social-proof {
    height: auto;
  }

  .hs-sp__sticky {
    position:      static;
    height:        auto;
    overflow:      visible;
    padding-block: var(--hs-section-pad-y);
    gap:           var(--hs-space-12);
  }

  .hs-sp__stage {
    position:  static;
    flex:      none;
    flex-wrap: wrap;
    gap:       var(--hs-space-10);
  }

  .hs-sp__trust {
    position:       static;
    opacity:        1;
    pointer-events: auto;
  }

  .hs-sp__note[data-note="2"],
  .hs-sp__note[data-note="3"],
  .hs-sp__note[data-note="4"],
  .hs-sp__note[data-note="5"],
  .hs-sp__note[data-note="6"] {
    display: none;
  }
}
