/* ============================================================================
   HighZak — "What we do" interactive showcase  (ADDITIVE — new section only)
   The suit walks + raises both hands (scroll-scrubbed). At the end of the pin,
   three holographic windows ignite and become clickable, each opening a modal.
   Self-contained: its own video + sticky pin. Does not touch the master scrub.
   ========================================================================== */

/* The tall track gives the sticky stage room to pin while we scrub + hold. */
.showcase {
  position: relative;
  height: 280vh;            /* scrub region + hold region */
  z-index: 2;
}

/* The stage sticks to the viewport while the track scrolls past it. */
.showcase-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #02040a;      /* occludes the fixed master video behind */
}

.showcase-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.showcase-video.is-ready { opacity: 1; }

/* Poster shown until the blob video is decoded (and in reduced-motion). */
.showcase-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Legibility veil + vignette over the footage. */
.showcase-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 38%, rgba(2, 5, 12, 0.72) 100%),
    linear-gradient(to bottom, rgba(2, 5, 12, 0.7) 0%, transparent 22%, transparent 60%, rgba(2, 5, 12, 0.85) 100%);
}

/* Section eyebrow + heading, top of the stage. */
.showcase-head {
  position: absolute;
  top: 9vh;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 6vw;
  z-index: 3;
}
.showcase-head .index {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.85;
  margin-bottom: 0.8rem;
}
.showcase-head h2 {
  font-family: "Anybody", var(--font);
  font-weight: 800;
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}
.showcase-head .sub {
  margin-top: 0.9rem;
  color: var(--dim);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}

/* ----------------------------------------------------------------- windows */
/* Row of three holographic panels, sitting over his raised hands. */
.windows {
  position: absolute;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  width: min(1100px, 92vw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 26px);
  z-index: 4;
}

.window {
  position: relative;
  cursor: pointer;
  text-align: left;
  padding: clamp(14px, 1.6vw, 22px);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.66), rgba(4, 10, 22, 0.52));
  border: 1px solid rgba(0, 191, 255, 0.38);
  box-shadow:
    0 0 0 1px rgba(0, 191, 255, 0.06) inset,
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(0, 140, 255, 0.18);
  backdrop-filter: blur(9px) saturate(120%);
  -webkit-backdrop-filter: blur(9px) saturate(120%);
  color: var(--ink);
  /* hidden until the clip resolves */
  opacity: 0;
  transform: translateY(26px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  font: inherit;
}
/* staggered ignition */
.window:nth-child(1) { transition-delay: 0.00s; }
.window:nth-child(2) { transition-delay: 0.10s; }
.window:nth-child(3) { transition-delay: 0.20s; }

.windows.is-live .window {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.window:hover,
.window:focus-visible {
  border-color: rgba(0, 191, 255, 0.7);
  box-shadow:
    0 0 0 1px rgba(0, 191, 255, 0.12) inset,
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(0, 160, 255, 0.34);
  transform: translateY(-4px);
  outline: none;
}

.window__tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.8;
}
.window__label {
  display: block;
  margin-top: 0.5rem;
  font-family: "Anybody", var(--font);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.9vw, 1.5rem);
  line-height: 1.05;
}
.window__line {
  display: block;
  margin-top: 0.45rem;
  color: var(--dim);
  font-size: clamp(0.78rem, 1.2vw, 0.92rem);
  line-height: 1.35;
}
.window__cta {
  margin-top: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.window__cta i {
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--blue);
  border-bottom: 1.5px solid var(--blue);
  transform: rotate(-45deg);
  display: inline-block;
}

/* hint shown before ignition */
.showcase-hint {
  position: absolute;
  left: 50%;
  bottom: 4.5vh;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hud);
  opacity: 0.7;
  transition: opacity 0.5s ease;
}
.windows.is-live ~ .showcase-hint { opacity: 0; }

/* ------------------------------------------------------------------- modal */
.sc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 48px);
  background: rgba(2, 5, 11, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sc-modal.is-open { display: flex; }

.sc-modal__panel {
  position: relative;
  width: min(1180px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0a1322, #060b16);
  border: 1px solid rgba(0, 191, 255, 0.28);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 140, 255, 0.12);
  overflow: hidden;
  animation: scPop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes scPop {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.sc-modal__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(16px, 2.4vw, 26px);
  border-bottom: 1px solid rgba(0, 191, 255, 0.14);
}
.sc-modal__title {
  font-family: "Anybody", var(--font);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
}
.sc-modal__sub {
  margin-top: 0.3rem;
  color: var(--dim);
  font-size: 0.9rem;
}
.sc-modal__close {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 191, 255, 0.3);
  background: rgba(0, 191, 255, 0.06);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.sc-modal__close:hover { background: rgba(0, 191, 255, 0.16); border-color: rgba(0,191,255,0.6); }

.sc-modal__body {
  padding: clamp(16px, 2.4vw, 26px);
  overflow: auto;
}

/* web previews: live iframe in a browser-ish frame */
.sc-frame {
  border: 1px solid rgba(0, 191, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: #05080f;
}
.sc-frame__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 9px 12px;
  background: #0b1424;
  border-bottom: 1px solid rgba(0, 191, 255, 0.14);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dim);
}
.sc-frame__dots { display: flex; gap: 5px; }
.sc-frame__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(0,191,255,0.35); display: inline-block; }
.sc-frame__url { margin-left: auto; opacity: 0.7; }
.sc-frame iframe {
  display: block;
  width: 100%;
  height: min(64vh, 680px);
  border: 0;
  background: #05080f;
}

/* a row of selectable site/video chips */
.sc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sc-tab {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 191, 255, 0.28);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: all 0.2s ease;
}
.sc-tab:hover { color: var(--ink); border-color: rgba(0,191,255,0.5); }
.sc-tab.is-active { color: #03101f; background: var(--blue); border-color: var(--blue); }

.sc-video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 191, 255, 0.2);
  background: #05080f;
  display: block;
  max-height: 64vh;
}

.sc-openbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--blue);
  color: #03101f;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

/* empty / coming-soon state */
.sc-empty {
  text-align: center;
  padding: clamp(28px, 6vw, 64px) 1rem;
  color: var(--dim);
}
.sc-empty h4 {
  font-family: "Anybody", var(--font);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.sc-empty .sc-empty__note {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--blue);
  opacity: 0.8;
  margin-top: 0.8rem;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .showcase { height: 230vh; }
  .windows {
    bottom: 6vh;
    width: 94vw;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .window { padding: 13px 15px; }
  .window__line { display: none; }   /* keep the stack compact on phones */
  .showcase-head { top: 6vh; }
  .sc-frame iframe { height: 56vh; }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .showcase { height: auto; min-height: 100vh; }
  .showcase-stage { position: relative; height: auto; min-height: 100vh; }
  .showcase-video { display: none; }
  .windows .window {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
  .showcase-hint { display: none; }
}
