/* ============================================================
   TCV4 — NEW HERO (slideshow) · ISOLATED ADD-ON
   ------------------------------------------------------------
   • Everything here is prefixed with .tcv4- so it never clashes
     with the existing design and is easy to migrate later.
   • Replaces the old #home .threds-hero-premium block.
   • Effects copied 1:1 from milknetwork-v4:
       - left half-size video that scales to fullscreen on scroll
       - split / fade / moveUp text reveals
       - typewriter + blinking caret
       - parallax background video
       - click-to-play fullscreen modal
   ============================================================ */

.tcv4-hero,
.tcv4-modal {
  --tcv4-aubergine: #4a3148;
  --tcv4-gold: #d8b56e;
  --tcv4-accent: #b17a3b;
  --tcv4-cream: #d6d4ca;
  --tcv4-ink60: rgba(214, 212, 202, .72);
  --tcv4-pad: clamp(20px, 5vw, 72px);
  --tcv4-header-h: 96px;
}

/* ---- intro logo loader ---- */
.tcv4-intro {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: #4a3148;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tcv4-intro__logo {
  width: clamp(150px, 30vw, 360px);
  height: auto;
  will-change: transform;
}

.tcv4-intro__logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

body.tcv4-intro-done .tcv4-intro {
  pointer-events: none;
}

/* hide the site header logo until the intro logo lands on it */
.threds-header__logo {
  opacity: 0;
  transition: opacity .3s;
}

body.tcv4-intro-done .threds-header__logo {
  opacity: 1;
}

/* ---- shell ---- */
.tcv4-hero {
  position: relative;
  background: var(--tcv4-aubergine);
  height: 250vh;
  color: var(--tcv4-cream);
  font-family: 'Graphik Arabic', sans-serif;
  overflow: clip;
}

.tcv4-hero * {
  box-sizing: border-box;
}

.tcv4-hero__divider {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 40px;
  width: 1px;
  background: var(--tcv4-accent);
  opacity: .25;
  transform-origin: 50% 0;
  transform: scaleY(1);
  z-index: 5;
  pointer-events: none;
}

/* ---- text layer (sticky) ---- */
.tcv4-hero__textlayer {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: var(--tcv4-pad);
  padding-top: calc(var(--tcv4-header-h) + 4vh);
  pointer-events: none;
}

.tcv4-hero__textinner {
  pointer-events: auto;
  max-width: 18ch;
}

.tcv4-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: clamp(14px, 1.3vw, 18px);
  color: var(--tcv4-gold);
  margin-bottom: 18px;
}

.tcv4-hero__eyebrow svg {
  color: var(--tcv4-gold);
}

.tcv4-hero__h1 {
  font-size: clamp(40px, 7.5vw, 132px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.01em;
  width: max-content;
  max-width: 92vw;
  margin: 0;
  color: var(--tcv4-cream);
}

.tcv4-hero__linew {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  padding: .22em 0;
  margin: -.22em 0;
}

.tcv4-hero__line {
  display: block;
  white-space: nowrap;
}

.tcv4-hero__rot {
  display: block;
  color: var(--tcv4-gold);
  min-height: 1.25em;
}

.tcv4-hero__blink {
  color: var(--tcv4-accent);
}

.tcv4-hero__typer {
  display: inline-block;
  white-space: nowrap;
}

.tcv4-hero__bottom {
  position: absolute;
  inset-inline: var(--tcv4-pad);
  bottom: calc(var(--tcv4-pad) + 2vh);
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: auto;
}

.tcv4-hero__desccol {
  grid-column: 1;
}

.tcv4-hero__desc {
  font-size: clamp(17px, 1.6vw, 24px);
  font-weight: 400;
  max-width: 34ch;
  line-height: 1.4;
  margin-bottom: 22px;
  color: var(--tcv4-ink60);
}

.tcv4-hero__more {
  font-size: 15px;
  color: var(--tcv4-gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.tcv4-hero__arrow {
  width: 24px;
  height: 14px;
  fill: var(--tcv4-gold);
}

/* ---- media layer (scales on scroll, parallax bg) ---- */
.tcv4-hero__videolayer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tcv4-hero__videosticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding-inline-end: 20px;
}

.tcv4-hero__videobox {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  border-radius: 22px;
  transform: scale(.375);
  transform-origin: left center;
  pointer-events: auto;
  will-change: transform, border-radius;
  cursor: pointer;
}

.tcv4-hero__videobox::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(58, 38, 57, .34);
  z-index: 1;
}

.tcv4-hero__bgparallax {
  position: absolute;
  inset: -8% 0;
  height: 116%;
}

.tcv4-hero__bgparallax video,
.tcv4-hero__bgparallax img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tcv4-hero__videooverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  padding-bottom: 8vh;
}

.tcv4-hero__playlabel {
  color: #fff;
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 500;
  letter-spacing: .04em;
}

.tcv4-hero__scrollhint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  color: var(--tcv4-gold);
}

.tcv4-hero__scrollhint svg {
  width: 26px;
  height: 26px;
}

/* ---- data-tcv4-anim initial states (JS reveals them) ---- */
.tcv4-hero [data-tcv4-anim="fade"] {
  opacity: 0;
}

.tcv4-hero [data-tcv4-anim="moveUp"] {
  opacity: 0;
  transform: translateY(40px);
}

.tcv4-hero [data-tcv4-anim="split"] .tcv4-split-line-inner {
  display: inline-block;
  will-change: transform;
}

.tcv4-hero [data-tcv4-anim="split"] .tcv4-split-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: .22em 0;
  margin: -.22em 0;
}

.tcv4-hero .tcv4-is-in {
  opacity: 1 !important;
  transform: none !important;
}

/* ---- fullscreen video modal ---- */
.tcv4-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(30, 18, 30, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vw;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
}

.tcv4-modal.tcv4-open {
  opacity: 1;
  visibility: visible;
}

.tcv4-modal__video {
  width: min(1100px, 100%);
  max-height: 84vh;
  border-radius: 12px;
  background: #000;
}

.tcv4-modal__close {
  position: absolute;
  top: 24px;
  inset-inline-end: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.tcv4-hero__videosticky {
  transition: padding-inline-start .25s ease, padding-inline-end .25s ease;
}

.tcv4-hero.tcv4-video-is-full .tcv4-hero__videosticky {
  padding-inline-start: 0 !important;
  padding-inline-end: 0 !important;
}

.tcv4-hero.tcv4-video-is-full .tcv4-hero__videobox {
  border-radius: 0 !important;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .tcv4-hero {
    height: auto;
  }

  .tcv4-hero__divider {
    display: none;
  }

  .tcv4-hero__textlayer {
    position: relative;
    height: auto;
    min-height: 56vh;
  }

  .tcv4-hero__textinner {
    max-width: none;
  }

  .tcv4-hero__videolayer {
    position: relative;
  }

  .tcv4-hero__videosticky {
    position: relative;
    height: 64vh;
    padding: 0;
  }

  .tcv4-hero__videobox {
    transform: none !important;
    border-radius: 14px;
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
  }

  .tcv4-hero__bottom {
    position: static;
    inset-inline: auto;
    bottom: auto;
    margin-top: 32px;
    grid-template-columns: 1fr;
  }

  .tcv4-hero__desccol {
    grid-column: 1;
  }
}

@media (max-width: 500px) {
  .tcv4-hero {
    height: 100vh;
  }

  .tcv4-hero__textlayer {
    position: relative;
    height: auto;
    min-height: 40vh;
    padding-top: calc(var(--tcv4-header-h) + 1vh);
  }

  .tcv4-hero__videooverlay {
    padding-bottom: 5vh;
  }
}

.tcv4-hero__loader {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -27px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .28);
  border-top-color: var(--tcv4-gold);
  animation: tcv4Spin .85s linear infinite;
  pointer-events: none;
  opacity: 1;
  transition: opacity .25s ease, visibility .25s ease;
}

.tcv4-hero__videobox.tcv4-video-loaded .tcv4-hero__loader {
  opacity: 0;
  visibility: hidden;
}

@keyframes tcv4Spin {
  to {
    transform: rotate(360deg);
  }
}