/* Framesite launch film
   The full introduction is a visible Vimeo player beneath the hero prompt.
   It autoplays muted, loops, and keeps Vimeo's native controls available. */

.fs-hero-film-toggle {
  position: absolute;
  top: min(calc(100svh - 126px), 690px);
  left: clamp(16px, 3vw, 46px);
  z-index: 4;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(248, 241, 231, .22);
  border-radius: 999px;
  background: rgba(5, 8, 8, .66);
  color: #f8f1e7;
  box-shadow: inset 0 1px 0 rgba(248, 241, 231, .08), 0 10px 30px rgba(0, 0, 0, .2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition:
    border-color 180ms cubic-bezier(.22, 1, .36, 1),
    background-color 180ms cubic-bezier(.22, 1, .36, 1),
    transform 180ms cubic-bezier(.22, 1, .36, 1);
}

.fs-hero-film-toggle:hover {
  border-color: rgba(244, 86, 107, .54);
  background: rgba(13, 17, 16, .86);
  transform: translateY(-1px);
}

.fs-hero-film-toggle:focus-visible,
.fs-launch-film-external:focus-visible {
  outline: 2px solid #f4566b;
  outline-offset: 3px;
}

.fs-hero-film-toggle-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
}

.fs-hero-film-toggle-icon::before,
.fs-hero-film-toggle-icon::after {
  position: absolute;
  top: 2px;
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition:
    transform 180ms cubic-bezier(.22, 1, .36, 1),
    opacity 180ms cubic-bezier(.22, 1, .36, 1);
}

.fs-hero-film-toggle-icon::before { left: 3px; }
.fs-hero-film-toggle-icon::after { right: 3px; }

.fs-hero-film-toggle.is-paused .fs-hero-film-toggle-icon::before {
  top: 1px;
  left: 3px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
  border-radius: 1px;
  background: transparent;
}

.fs-hero-film-toggle.is-paused .fs-hero-film-toggle-icon::after { opacity: 0; }

.fs-launch-film-entry {
  width: min(100%, 680px);
  min-width: 0;
  max-width: 100%;
  margin: clamp(64px, 8vw, 112px) auto 20px;
  overflow: hidden;
  border: 1px solid rgba(248, 241, 231, .16);
  border-radius: 18px;
  background: #070b0a;
  color: #f8f1e7;
  box-shadow:
    inset 0 1px 0 rgba(248, 241, 231, .07),
    0 28px 80px rgba(1, 4, 3, .36);
  text-align: left;
}

.fs-launch-film-head {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(248, 241, 231, .1);
  background: linear-gradient(180deg, rgba(248, 241, 231, .045), rgba(248, 241, 231, .015));
}

.fs-launch-film-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.fs-launch-film-brand strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #f8f1e7;
  font: 680 clamp(1.22rem, 2vw, 1.55rem)/1.08 var(--font-sans);
  letter-spacing: -.02em;
  white-space: normal;
}

.fs-launch-film-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050807 url('/site/assets/framesite-intro-hero-poster.jpg') center / cover no-repeat;
}

.fs-launch-film-player {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050807;
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.22, 1, .36, 1);
}

.fs-launch-film-shell.is-player-loaded .fs-launch-film-player { opacity: 1; }
.fs-launch-film-shell.has-player-error .fs-launch-film-player { opacity: .18; }

.fs-launch-film-status,
.fs-launch-film-error {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(84%, 360px);
  margin: 0;
  transform: translate(-50%, -50%);
}

.fs-launch-film-status {
  padding: 11px 14px;
  border: 1px solid rgba(248, 241, 231, .18);
  border-radius: 999px;
  background: rgba(7, 12, 11, .78);
  color: #f8f1e7;
  font: 620 .82rem/1.3 var(--font-sans);
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fs-launch-film-error {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(244, 86, 107, .44);
  border-radius: 14px;
  background: rgba(18, 8, 10, .92);
  color: #f8f1e7;
  font: 620 .84rem/1.35 var(--font-sans);
  text-align: center;
}

.fs-launch-film-error[hidden] { display: none; }

.fs-launch-film-external {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid rgba(248, 241, 231, .24);
  border-radius: 999px;
  background: rgba(7, 12, 11, .88);
  color: #f8f1e7;
  font: 650 .8rem/1 var(--font-sans);
  text-decoration: none;
}

.fs-launch-film-external:hover { border-color: rgba(244, 86, 107, .62); }

@media (max-width: 720px) {
  .fs-hero-film-toggle { display: none; }

  #top.fs-hero > .hin {
    display: flex;
    flex-direction: column;
  }

  #top.fs-hero > .hin > .fs-hero-engines { order: 1; }
  #top.fs-hero > .hin > h1 { order: 2; }
  #top.fs-hero > .hin > .sub { order: 3; }
  #top.fs-hero > .hin > .fs-prompt-wrap { width: 100%; order: 4; }
  #top.fs-hero > .hin > .fs-prompt-wrap + div { order: 5; }
  #top.fs-hero > .hin > .fs-launch-film-entry { order: 6; }
  #top.fs-hero > .hin > .fs-demo { order: 7; }

  .fs-launch-film-entry {
    width: 100%;
    margin: 52px auto 20px;
    border-radius: 14px;
  }

  .fs-launch-film-head {
    min-height: 58px;
    padding: 12px 14px;
  }

  .fs-launch-film-brand strong { max-width: none; font-size: 1.1rem; }
}

@media (max-width: 720px) and (max-height: 720px) {
  #top.fs-hero .fs-prompt-in { min-height: 120px; }
}

@media (min-width: 721px) and (max-height: 800px) {
  #top.fs-hero > .hin { padding-top: 52px !important; }
  .fs-launch-film-entry {
    margin-top: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-hero-film-toggle { display: none; }

  .fs-hero-film,
  .fs-launch-film-player,
  .fs-launch-film-external {
    animation: none !important;
    transition: none !important;
  }
}
