@font-face {
    font-family: 'MyFont';
    src: url('./fonts/HomeVideo.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
    margin: 0;
    font-family: 'MyFont', sans-serif;
}

.hero {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.hero__video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero__poster {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.hero__poster[hidden] {
  display: none;
}

/* Mask the actual picture bounds, including when the viewport has black bars. */
.hero__video,
.hero__poster {
  width: var(--video-width, 100%);
  height: var(--video-height, 100%);
  --edge-fade: clamp(12px, 3vmin, 40px);
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent),
    linear-gradient(to bottom, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
  mask-composite: intersect;
}

.hero__glow {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  filter: blur(clamp(20px, 3.5vw, 64px)) saturate(1.65) brightness(1.3);
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 65%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side, #000 65%, transparent 100%);
  transition: opacity 600ms ease;
}

.hero__glow.is-ready {
  opacity: 0.85;
}

.hero__intro {
  visibility: hidden;
  position: absolute;
  z-index: 2;
  top: calc(var(--video-top, 0px) + clamp(12px, 2vw, 32px));
  left: calc(var(--video-left, 0px) + clamp(12px, 2vw, 32px));
  margin: 0;
  color: #fff;
  font-family: 'MyFont', sans-serif;
  font-size: clamp(12px, calc(var(--video-width, 100vw) * 0.028), 36px);
  font-weight: normal;
  line-height: 1.45;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  opacity: 1;
  transition: opacity 1000ms linear;
}

.hero.has-video-layout .hero__intro {
  visibility: visible;
}

.hero__intro.is-hidden {
  opacity: 0;
}

.hero__play {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(88px, 20vw, 124px);
  height: clamp(88px, 20vw, 124px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  opacity: 0.45;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}

.hero__play svg {
  width: clamp(60px, 14vw, 80px);
  height: clamp(60px, 14vw, 80px);
}

.hero__play.is-idle {
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease-out, transform 120ms ease;
}

.hero__icon-play {
  transform: translateX(1px);
}

@media (hover: hover) {
  .hero__play:hover:not(.is-idle) {
    opacity: 0.65;
    transform: scale(1.06);
  }
}

.hero__status {
  position: absolute;
  z-index: 3;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  margin: 0;
  color: #fff;
  font: 14px/1.5 sans-serif;
  text-align: center;
  text-shadow: 0 1px 6px #000;
  pointer-events: none;
}

.hero__play:active {
  transform: scale(0.96);
}

.hero__play:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}

.hero__play[hidden],
.hero__play svg[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero__play,
  .hero__play.is-idle {
    transition: none;
  }
}

/* Raw sludge: dark mineral stains and a fine, static grain. */
.hero {
  isolation: isolate;
  background-color: #000;
  background-image:
    radial-gradient(ellipse at 8% 24%, rgba(30, 33, 25, 0.28), transparent 42%),
    radial-gradient(ellipse at 94% 78%, rgba(31, 27, 21, 0.22), transparent 38%),
    radial-gradient(ellipse at 48% 105%, rgba(23, 29, 24, 0.20), transparent 50%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.065;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640' viewBox='0 0 640 640' preserveAspectRatio='none'%3E%3Cfilter id='sludge'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .018' numOctaves='3' seed='17'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath fill='%23242720' d='M0 0h640v640H0z' filter='url(%23sludge)'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  mix-blend-mode: normal;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180' preserveAspectRatio='none'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath fill='%23fff' d='M0 0h180v180H0z' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}



