/* ============================================
   Institutional Text Hero — full-width photo + large white title
   Same mechanics as the INST Hero with KPIs: the stage is position:fixed and
   the section clips it (clip-path), so the photo stays put while the page
   scrolls over it. The rounded lip at the bottom joins the next section.
   ============================================ */

.inst-ht {
  --inst-ease: cubic-bezier(.22, 1, .36, 1);
  --inst-ht-ease: cubic-bezier(.22, .61, .36, 1);
  --inst-ht-h: min(886px, calc(100vh - var(--inst-ht-above, 0px)));
  --inst-ht-min: 620px;
  --inst-ht-lip: 40px;
  --inst-ht-sheet: #f6f6f9;
  --inst-ht-copy-b: calc(var(--inst-ht-lip) + 56px);
  --inst-ht-cue-b: calc(var(--inst-ht-lip) + 62px);

  position: relative;
  z-index: 0;
  height: var(--inst-ht-h);
  min-height: var(--inst-ht-min);
  /* slide up under the fixed global header (value set by JS) */
  margin-top: calc(-1 * var(--inst-ht-pull, 0px));
  overflow: hidden;
  clip-path: inset(0);
  background: #2a3020;
  color: #fff;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.inst-ht, .inst-ht *, .inst-ht *::before, .inst-ht *::after { box-sizing: border-box; }

.inst-ht--sheet-white { --inst-ht-sheet: #fff; }

/* the theme caps drag-and-drop rows — let the hero run full width */
.dnd-section:has([data-inst-ht]) > .row-fluid { max-width: none; }

.inst-ht__stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--inst-ht-h);
  min-height: var(--inst-ht-min);
  overflow: hidden;
}

.inst-ht__bg {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.inst-ht .inst-ht__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--inst-ht-pos);
  transform-origin: var(--inst-ht-pos);
}

.inst-ht__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .42) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}

/* ---------- copy ---------- */
.inst-ht__in {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: var(--inst-ht-copy-b);
  width: min(1200px, 100% - 32px);
  margin: 0 auto;
  padding-right: 80px; /* keep clear of the scroll button */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  will-change: transform, opacity;
}

.inst-ht__tag {
  display: inline-block;
  margin-bottom: 28px;
  padding: 4px 15px;
  border: 1.5px solid #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
}

.inst-ht .inst-ht__title {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: 88px;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-transform: none;
  color: #fff;
}
.inst-ht__w { display: inline-block; }
.inst-ht__w--accent { color: inherit; }

/* entrance (only once JS runs) */
.inst-ht.is-ready .inst-ht__w,
.inst-ht.is-ready .inst-ht__tag {
  opacity: 0;
  transform: translateY(.45em);
  transition: opacity .9s var(--inst-ease), transform .9s var(--inst-ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.inst-ht.is-ready .inst-ht__tag { transform: translateY(12px); }
.inst-ht.is-ready.is-in .inst-ht__w,
.inst-ht.is-ready.is-in .inst-ht__tag { opacity: 1; transform: none; }

/* ---------- scroll cue ---------- */
.inst-ht__cue {
  position: absolute;
  z-index: 2;
  right: max(16px, calc((100% - 1200px) / 2));
  bottom: var(--inst-ht-cue-b);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  transition: opacity .3s, background .25s;
}
.inst-ht .inst-ht__cue:hover,
.inst-ht .inst-ht__cue:focus { color: #fff; background: rgba(255, 255, 255, .15); text-decoration: none !important; }
.inst-ht__cue:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.inst-ht__cue svg { display: block; }
.inst-ht__cue-arrow { animation: inst-ht-cue 2.2s var(--inst-ht-ease) infinite; }
.inst-ht.is-scrolled .inst-ht__cue { opacity: 0; pointer-events: none; }

@keyframes inst-ht-cue {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(4px); }
}

/* ---------- sheet lip: the next section's rounded top edge ---------- */
.inst-ht__lip {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: -1px;
  height: calc(var(--inst-ht-lip) + 1px);
  border-radius: var(--inst-ht-lip) var(--inst-ht-lip) 0 0;
  background: var(--inst-ht-sheet);
  pointer-events: none;
}

/* the scroll button lands right where the sheet starts */
.inst-ht__end { position: absolute; bottom: var(--inst-ht-lip); left: 0; width: 1px; height: 1px; }

/* ---------- editor: plain static hero ---------- */
.inst-ht--editor { margin-top: 0; clip-path: none; }
.inst-ht--editor .inst-ht__stage { position: absolute; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .inst-ht .inst-ht__title { font-size: clamp(44px, 8.6vw, 88px); }
}

@media (max-width: 760px) {
  .inst-ht {
    --inst-ht-h: clamp(500px, 135vw, 600px);
    --inst-ht-min: 0px;
    --inst-ht-lip: 28px;
    --inst-ht-copy-b: calc(var(--inst-ht-lip) + 44px);
  }
  /* whole pixels, so the photo never peeks out under the sheet edge */
  @supports (width: round(down, 1.5px, 1px)) {
    .inst-ht { --inst-ht-h: round(down, clamp(500px, 135vw, 600px), 1px); }
  }
  .inst-ht .inst-ht__img { object-position: var(--inst-ht-pos-m); transform-origin: var(--inst-ht-pos-m); }
  .inst-ht__in { padding-right: 0; }
  .inst-ht__tag { margin-bottom: 18px; font-size: 12px; }
  .inst-ht .inst-ht__title { font-size: clamp(36px, 10.4vw, 56px); line-height: 1.05; }
  .inst-ht__cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .inst-ht *,
  .inst-ht *::before,
  .inst-ht *::after { animation: none !important; }
  .inst-ht.is-ready .inst-ht__w,
  .inst-ht.is-ready .inst-ht__tag { opacity: 1; transform: none; transition: none; }
}
