/* ============================================================
   HERO - ported from the production index
   (content-flash loader to full-to-box to phone to So What reveal).
   Main changes: silver/Playfair theming + v2 image paths.
   ============================================================ */

.intro {
  position: relative;
  min-height: 130dvh;
  overflow: visible;
  text-align: center;
  z-index: 1;
}

.intro-scroll-spacer { height: 30vh; width: 100%; }

.intro-trigger {
  margin-top: 105px;
  height: 100px;
  width: 100%;
  pointer-events: none;
  user-select: none;
}

.intro-title {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  translate: 0px 5vh;
  line-height: 1em;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(46px, min(5.5vw, 8vh), 80px);
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.intro-title em { font-style: italic; }
.intro-understand {
  display: inline-block;
  margin-top: 0.1em;
  font-size: 0.74em;
}

/* the title that remains after the flash - silver metal */
.intro > .intro-title {
  top: 50dvh;
  z-index: 1;
  animation: move-up cubic-bezier(0.83, 0, 0.17, 1) 1s 5s forwards;
  background: linear-gradient(176deg, #FCFDFD 0%, #E2E8EA 30%, #A7B2B8 58%, #EDF1F2 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.content-flash {
  position: absolute;
  top: 50dvh; left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  z-index: 3;
  background-color: #0b1a14;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  animation:
    full-to-box 5s ease-in-out forwards,
    content-flash 5s step-end infinite,
    flash-hide 0.01s 5s forwards;
}

@media (max-width: 920px) {
  .content-flash {
    animation: full-to-box-920 5s ease-in-out forwards, content-flash 5s step-end infinite, flash-hide 0.01s 5s forwards;
  }
}
@media (max-width: 480px) {
  .content-flash {
    animation: full-to-box-480 5s ease-in-out forwards, content-flash 5s step-end infinite, flash-hide 0.01s 5s forwards;
  }
}

.content-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.32);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* the title shown over the flashing images - keep white for contrast */
.content-flash .intro-title {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
  z-index: 2;
  animation: move-up-box cubic-bezier(0.83, 0, 0.17, 1) 1s 5s forwards;
}

.phone-wrap {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  translate: 0 0;
  opacity: 1;
  z-index: 6;
  pointer-events: none;
  animation: none;
}

.phone-wrap .framer-clone-wrap {
  --phone-start-offset: clamp(360px, calc(260px + 15vh), 440px);
  --phone-end-offset: clamp(320px, calc(220px + 15vh), 400px);
  margin: 0;
  padding: 0;
  width: auto;
  background: transparent;
  translate: 0 var(--phone-start-offset);
  opacity: 0;
  animation:
    phone-show 1s 5s cubic-bezier(0.83, 0, 0.17, 1) forwards,
    move-down 1s 5s cubic-bezier(0.83, 0, 0.17, 1) forwards;
}

@media (max-width: 820px) {
  .phone-wrap .framer-clone-wrap {
    --phone-start-offset: clamp(380px, calc(290px + 12vmin), 460px);
    --phone-end-offset: clamp(330px, calc(245px + 9vmin), 380px);
  }
}
@media (max-width: 480px) {
  .intro-title { translate: 0px 3vh; }
  .intro > .intro-title { animation-name: move-up-mobile; }
  .content-flash .intro-title { animation-name: move-up-box-mobile; }
  .phone-wrap .framer-clone-wrap {
    --phone-start-offset: clamp(320px, calc(260px + 12vmin), 380px);
    --phone-end-offset: clamp(250px, calc(210px + 9vmin), 320px);
    animation-name: phone-show, move-down-mobile;
  }
}

/* the framer reveal title - silver / Playfair */
.framer-clone-wrap .framer-reveal-title {
  font-family: 'Playfair Display', Georgia, serif;
  background: linear-gradient(176deg, #FCFDFD 0%, #E2E8EA 30%, #A7B2B8 58%, #EDF1F2 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

@keyframes full-to-box {
  from { height: 100dvh; width: 100vw; border-radius: 0px; }
  to   { height: 330px; width: 309px; border-radius: 44px; }
}
@keyframes full-to-box-920 {
  from { height: 100dvh; width: 100vw; border-radius: 0px; }
  to   { height: 35vw; width: 34vw; border-radius: 44px; }
}
@keyframes full-to-box-480 {
  from { height: 100dvh; width: 100vw; border-radius: 0px; }
  to   { height: 300px; width: 260px; border-radius: 38px; }
}

@keyframes content-flash {
  0%   { background-image: url("../img/cinema/new_york_stock_exchange.jpg"); }
  30%  { background-image: url("../img/cinema/new_york_stock_exchange.jpg"); }
  42%  { background-image: url("../img/cinema/oil_shipping_getty.jpg"); }
  54%  { background-image: url("../img/cinema/BSE_getty.jpg"); }
  66%  { background-image: url("../img/cinema/ai.jpg"); }
  78%  { background-image: url("../img/cinema/private_equity.jpg"); }
  89%  { background-image: url("../img/cinema/lng_oil.jpg"); }
}

@keyframes move-up { to { translate: 0px -20vh; } }
@keyframes move-up-mobile { to { translate: 0px -18vh; } }
@keyframes move-up-box { to { translate: 0px -25vh; } }
@keyframes move-up-box-mobile { to { translate: 0px -22vh; } }
@keyframes move-down { to { translate: 0 var(--phone-end-offset); } }
@keyframes move-down-mobile { to { translate: 0 var(--phone-end-offset); } }
@keyframes flash-hide { to { visibility: hidden; opacity: 0; } }
@keyframes phone-show { from { opacity: 0; } to { opacity: 1; } }

/* accessibility: skip the cinematic flash for reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  .content-flash { animation: none !important; opacity: 0 !important; visibility: hidden !important; }
  .intro > .intro-title { animation: none !important; translate: 0 -18vh !important; }
  .phone-wrap .framer-clone-wrap { animation: none !important; opacity: 1 !important; translate: 0 var(--phone-end-offset) !important; }
}
