/* ==========================================
   Tonik Pitch Competition — ICE co-brand layer
   Scoped to the pitch-competition page only.
   White-only ICE marks per approved brief.
   ========================================== */

/* Inline ICE logo that replaces the word "ICE" inside the hero H1.
   Height is set relative to the headline's font size so the mark
   scales with the heading across breakpoints. */
.mission__title__ice-logo {
  display: inline-block;
  height: 2em;
  width: auto;
  vertical-align: middle;
  margin-inline-start: 0.12em;
  user-select: none;
  -webkit-user-drag: none;
}

/* ICE pulse-wave separator — split halves.
   The wave is rendered twice per seam: a "--bottom" half sitting at the
   bottom edge of the section above (peak + upper line), and a "--top"
   half at the top edge of the section below (lower line + V-dip). Each
   half lives in its own section's stacking context, so it paints above
   that section's background / bg-glow / overlays but below the section's
   content wrapper — giving a "behind content on both sides" effect. */
.pitch-ice__separator {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  /* Sits above section backgrounds, bg-glows, and any dark overlays
     (which use z-index: 1 inside the hero), but below the content
     wrappers which are promoted to z-index: 3 below. */
  z-index: 2;
  pointer-events: none;
  /* Vertical position of the wave's horizontal line within the PNG
     (measured as a percentage of the image height). Increasing this
     value moves the line UP on the seam; decreasing moves it DOWN.
     43% matches the pure pixel centre of the baseline stroke. */
  --wave-line-offset: 47%;
}

.pitch-ice__separator--top { top: 0; }
.pitch-ice__separator--bottom { bottom: 0; }

/* Each wave spans half the section width so two copies sit side by
   side. Halving the width also halves the aspect-driven height, so the
   wave reads smaller visually while the continuous horizontal line
   still stretches edge to edge (left copy + right mirrored copy). */
.pitch-ice__separator-wave {
  display: block;
  position: absolute;
  left: 0;
  width: 50%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Mirrored twin: pinned to the right edge, flipped horizontally so its
   horizontal line meets the left copy at the section's midpoint. */
.pitch-ice__separator-wave--mirrored {
  left: auto;
  right: 0;
}

/* Each half's clip is pulled back by a 1px bleed so the two halves
   overlap at the seam. Without this bleed the browser can leave a
   1px subpixel gap at the clip boundary that reads as a thin dark
   hairline cutting across the wave. */
.pitch-ice__separator {
  --wave-seam-bleed: 1px;
}

/* --top half sits at the top of a section and shows the portion BELOW
   the horizontal line (lower line + V-dip + circle). The line lands
   exactly on the section's top edge (the seam). */
.pitch-ice__separator--top .pitch-ice__separator-wave {
  top: 0;
  transform: translateY(calc(-1 * var(--wave-line-offset)));
  clip-path: inset(calc(var(--wave-line-offset) - var(--wave-seam-bleed)) 0 0 0);
}
.pitch-ice__separator--top .pitch-ice__separator-wave--mirrored {
  transform: translateY(calc(-1 * var(--wave-line-offset))) scaleX(-1);
}

/* --bottom half sits at the bottom of a section and shows the portion
   ABOVE the horizontal line (peak + upper line). The line lands exactly
   on the section's bottom edge (the seam). */
.pitch-ice__separator--bottom .pitch-ice__separator-wave {
  bottom: 0;
  transform: translateY(calc(100% - var(--wave-line-offset)));
  clip-path: inset(0 0 calc(100% - var(--wave-line-offset) - var(--wave-seam-bleed)) 0);
}
.pitch-ice__separator--bottom .pitch-ice__separator-wave--mirrored {
  transform: translateY(calc(100% - var(--wave-line-offset))) scaleX(-1);
}

/* Each section hosting a wave half needs its content wrapper promoted
   to z-index: 3 so content paints above the wave (z-index: 2) on both
   sides of the seam. Using a scoped selector keeps the globally-shared
   .section__content--relative (z-index: 1) unchanged for other pages. */
#pitch-hero > .container,
#pitch-prizes > .container,
.pitch-winners > .container,
.pitch-ice__host--promote-content > .container,
.partners--with-glow > .container,
.sponsor > .container {
  position: relative;
  z-index: 3;
}
