.animated-hero__fluid span {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@layer normalize, base, demo, animation;

@layer animation {
:root {
  timeline-scope: --buffer;
}
.animated-hero__spacer {
  height: 100vh;
  margin-top: 120vh;
  view-timeline: --buffer;
}
video {
  --to: 0;
  translate: 0 50%;
}
video,
.animated-hero__header {
  animation: lift both linear;
  animation-timeline: scroll(root);
  animation-range: 0 100vh;
}
.animated-hero__header {
  --to: -100%;
}
video {
  --to: 0;
  translate: 0 50%;
}
.animated-hero__video-mask .animated-hero__svg-wrap,
.animated-hero__video-mask h1 {
  scale: var(--scale, 33);
  transform-origin: calc(var(--x, 39) * 1%) calc(var(--y, 50) * 1%);
  animation: shrink both ease-out;
  animation-timeline: --buffer;
  animation-range: entry;
}
@keyframes shrink {
  to {
    scale: 1;
  }
}
@property --active {
  inherits: true;
  initial-value: 0;
  syntax: '<number>';
}
.animated-hero__content > div {
  --to: 0;
  translate: 0 0.25lh;
  opacity: 0;
  animation: lift both ease-out, reveal both ease-out;
  animation-timeline: --buffer;
  animation-range: entry 94% entry 102%;
}
@keyframes reveal {
  to {
    opacity: var(--light, 1);
  }
}
@keyframes lift {
  to {
    translate: 0 var(--to, 0);
  }
}
}

@layer demo {
.animated-hero__header {
  height: 100vh;
  display: grid;
  inset: 0;
  align-content: center;
  place-items: center;
  background: black;
  position: fixed;
  z-index: 2;
}
.animated-hero__header::before {
  --size: 45px;
  --line: color-mix(in lch, canvasText, transparent 70%);
  content: '';
  height: 100vh;
  width: 100vw;
  position: fixed;
  background: url("https://devwizard.com.pl/wp-content/uploads/2025/03/pattern-bg.webp");
  mask: linear-gradient(340deg, transparent 50%, white);
  top: 0;
  transform-style: flat;
  pointer-events: none;
  z-index: -1;
  filter: contrast(0);
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.3;
}
.animated-hero__header h1 {
  --font-level: 7;
  position: relative;
  margin: 0;
}
.animated-hero__header h1 span {
  position: absolute;
  bottom: 100%;
  left: 50%;
  display: inline-block;
  translate: -50% 50%;
  font-size: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: hsl(6, 100%, 50%);
}
.animated-hero__header h2 {
  --font-level: 1;
  margin: 0;
  opacity: 0.5;
  text-transform: uppercase;
}
.animated-hero__svg-filter {
  width: 0;
  height: 0;
  position: absolute;
}
[contenteditable]:focus-visible {
  outline-color: red;
}
.animated-hero__video-container {
  --font-level: var(--font, 10);
  position: sticky;
  inset: 0;
  height: 100vh;
}
[data-svg='false'] .animated-hero__svg-wrap {
  display: none;
}
[data-svg='true'] .animated-hero__video-mask {
  filter: none;
  background: transparent;
}
.animated-hero__video-mask {
  height: 100vh;
  position: absolute;
  z-index: 2;
  background: black; /* Tło ustawione na czarne */
  color: white;
  display: grid;
  place-items: center;
  filter: url(#knockout-filter);
  inset: 0;
  overflow: hidden;
}
video {
  height: 100vh;
  width: 100vw;
  object-fit: cover;
}
.animated-hero__video-mask h1 {
  display: flex;
  text-align: center;
  margin: 0;
}
.animated-hero__video-mask h1 svg {
  width: 2ch;
}
.animated-hero__content {
  --font-level: var(--font, 10);
  position: relative;
  z-index: 2;
  margin-top: calc(-50vh + 0.5lh);
  background: linear-gradient(#0000, black calc(100% - 25vh), #0000);
}
.animated-hero__content > div {
  --font-level: var(--font, 10);
  width: 5ch;
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  padding-bottom: 25vh;
}
h2 {
  --font-level: 5;
  font-weight: 500;
  margin: 0;
}
p {
  color: #86868b;
}
.animated-hero__content p {
  --font-level: 2;
  width: 30ch;
  max-width: 100%;
  margin-block: 0.5rem;
}
}

@layer base {
:root {
  --font-size-min: 16;
  --font-size-max: 20;
  --font-ratio-min: 1.2;
  --font-ratio-max: 1.33;
  --font-width-min: 375;
  --font-width-max: 1500;
}

[data-theme='light'] {
  color-scheme: light only;
}
[data-theme='dark'] {
  color-scheme: dark only;
}
:where(.animated-hero__fluid) {
  --fluid-min: calc(
    var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0))
  );
  --fluid-max: calc(
    var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0))
  );
  --fluid-preferred: calc(
    (var(--fluid-max) - var(--fluid-min)) / (var(--font-width-max) - var(--font-width-min))
  );
  --fluid-type: clamp(
    (var(--fluid-min) / 16) * 1rem,
    ((var(--fluid-min) / 16) * 1rem) -
      (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) +
      (var(--fluid-preferred) * var(--variable-unit, 100vi)),
    (var(--fluid-max) / 16) * 1rem
  );
  font-size: var(--fluid-type) !important;
}
*,
*::after,
*::before {
  box-sizing: border-box;
}


}
.animated-hero__custom-heading-container {
  color: #e5e5e5;
  font-size: 2.26rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.animated-hero__custom-heading-paragraph {
  text-shadow: 0 0 7px rgba(255,255,255,.3), 0 0 3px rgba(255,255,255,.3);
  font-size: 2.5rem;
  font-weight: bold;
  margin: 0;
}

.animated-hero__custom-heading-animation {
  height: 50px;
  overflow: hidden;
  margin-left: 1rem;
}

.animated-hero__custom-heading-animation > div > div {
  padding: 0.25rem 0.75rem;
  height: 2.81rem;
  margin-bottom: 2.81rem;
  display: inline-flex;
  color: white;
  font-weight: bold;
  align-items: center;
}

.animated-hero__fluid{
  display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.animated-hero__subtext {
  font-size: calc(var(--subtext-scale, 20) * 10px);
  line-height: 1.2;
  margin: 0;
  padding: 12px;
  display: block;
  scale: 1 !important;
  transform: none !important;
  transform-origin: center;
  border: 8px solid #ffffff;
  position: absolute;
  bottom: -20%;
  user-select: none;
}

.animated-hero__video-container video {
  filter: contrast(1.4) hue-rotate(-140deg) brightness(0.8);
}
