/**
 * Hero parallax section – 2026 home template
 * Reference: hero-parallax_img-text-08
 * Uses project font: Poppins
 */

/* Spacer reserves height so content flows below fixed hero */
.hero-spacer {
  height: 520px;
  pointer-events: none;
}

/* Main content area below hero – matches reference .content styling */
.content {
  position: relative;
  z-index: 1000;
  left: 0;
  right: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -2px 1px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero section – fixed for parallax scroll */
/* Roller-door: h1 span and h2 span each have their own vars below. Scroll-driven keyframes – no JS. */
.hero-parallax {
 
  /* h1 span */
  --hero-span-scroll-range: 350;   /* px over which roller-door runs (0 → this) */
  --hero-span-max-tilt: -66;        /* final rotateX in deg (negative = top recedes) */
  --hero-span-scale-min: 0.98;     /* scaleY at end of tilt */
  --hero-span-scale-x: 0.98;        /* scaleX (if used in keyframes) */
  --hero-span-perspective: 1100px;  /* perspective for 3D tilt */
  --hero-h1-span-move-mult: -0.005; /* rem per px scrolled (negative moves up) */
  --hero-h1-span-move-offset: 0;   /* rem */

  /* h2 span (tweak separately) */
  --hero-h2-span-scroll-range: 350;    /* unused when tilt uses 0% 100%; kept for fade/other refs */
  --hero-h2-span-tilt-start: 300;      /* px scroll before tilt-shift (only when using px range). Plateau % = (tilt-start/scroll-range)*100 */
  --hero-h2-span-max-tilt: 54deg;     /* final rotateX (positive = top recedes); use unit so keyframe needs no calc */
  --hero-h2-span-scale-min: 0.92;      /* scaleY at end of tilt */
  --hero-h2-span-perspective: 1100px;  /* perspective for 3D tilt */
  --hero-h2-span-fade-end: 950;        /* px scroll at which h2 span opacity reaches 0 */
  --hero-h2-span-move-mult: -0.01;     /* rem per px scrolled (negative moves up) */
  --hero-h2-span-move-offset-start: 2;   /* rem at scroll 0 */
  --hero-h2-span-move-offset-end: 0;    /* rem when scroll reaches move-range */
  --hero-h2-span-move-range: 400;        /* px over which offset goes from start to end */

  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
  padding-top: 2rem;
  background: #00ccff;
  background: #098df8;
  background: #23e2c7;
  background: #00fffc;
  background-size: cover;
  background-position: right;
}





.hero-parallax::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.8) 20%,
    rgba(0, 0, 0, 0.25) 100%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Background image layer – default image when none set via CMS */
.hero-parallax .hero__bg {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /*height: 520px;
   background-image: url("/pages/20260218-183947.jpg"); 
  background: linear-gradient(30deg, #00a085 0%, rgb(252, 34, 85) 100%);*/
  background-size: cover;
  background-position: right;
  /* background-color: #007972; */
}

.hero-parallax .hero__bg::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
   /* background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.01) 100%,
    rgba(0, 0, 0, 0) 100%
  );
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.01) 100%,
    rgba(0, 0, 0, 0) 100%
  ); 
  filter: blur(20px) brightness(0.7);
  mask-image: linear-gradient(to right, rgb(0, 0, 0), transparent);
*/

  /*min-height: 570px; */
}

/* Message and CTA – positioned above bg */
.hero-parallax .hero__message,
.hero-parallax .hero__cta {
  position: relative;
  z-index: 3;
  /* max-width: 520px; */
}

.hero-parallax .hero__message {
  /* min-height: 400px; */
  margin: 3rem;
  /* margin: 120px 20% 0; 
  border: 1px solid #fff;*/
  width: 1100px;
  
}

.hero-parallax .hero__cta {
  margin: 0 20% 0;
}

.hero-parallax .hero__message .note {
  color: #fff;
  font-size: 14px;
  display: block;
}

.hero-parallax .hero__message h1,
.hero-parallax .hero__message h2 {
  position: relative;
  z-index: 1;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.35);
  margin: 20px auto 20px;
}

.hero-parallax .hero__message h1 {
  color: #fff;
  font-size: 3.5rem;
  line-height: 4rem;
  font-weight: 600;
  /* margin: 20px 0 30px 0; */
}
/* Pivot at bottom: top rotates back. Perspective from top so receding top edge converges (top left/right get closer). */
.hero-parallax .hero__message h1 {
  perspective: var(--hero-span-perspective, 1200px);
  perspective-origin: 50% 0%;
}

@keyframes roller-door {
  0%   { transform: perspective(var(--hero-span-perspective)) rotateX(0deg) scaleY(1); }
  100% { transform: perspective(var(--hero-span-perspective)) rotateX(calc(var(--hero-span-max-tilt) * -1deg)) scaleY(var(--hero-span-scale-min)); }
}

.hero-parallax .hero__message h1 span {
  display: inline-block;
  position: relative;
  transform-origin: 50% 100%;
  will-change: top, opacity, transform;
  font-weight: 600;
  font-size: 6rem;
  line-height: 6rem;
  /* margin: 0 10px 35px 0; */
  background-color: #ffffff20;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  color: #ffffff;
  letter-spacing: -0.2rem;
}

@supports (animation-timeline: scroll()) {
  .hero-parallax .hero__message h1 span {
    animation: roller-door linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 calc(var(--hero-span-scroll-range) * 1px);
  }
}

/* h2 span – same roller-door effect, separate options (pivot bottom, top recedes) */
/* Plateau 0% → X% so transform stays at “no tilt” until scroll reaches --hero-h2-span-tilt-start; then tilt 100%. */
/* With range 0% 100%, X% = fraction of page scroll before tilt starts (22.86% ≈ first quarter of page). */
@keyframes roller-door-h2 {
  0%     { transform: perspective(var(--hero-h2-span-perspective)) rotateX(0deg) scaleY(1); }
  22.86% { transform: perspective(var(--hero-h2-span-perspective)) rotateX(0deg) scaleY(1); }
  100%   { transform: perspective(var(--hero-h2-span-perspective)) rotateX(var(--hero-h2-span-max-tilt)) scaleY(var(--hero-h2-span-scale-min)); }
}

@keyframes hero-h2-fade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

.hero-parallax .hero__message h2 {
  perspective: var(--hero-h2-span-perspective);
  perspective-origin: 50% 0%;
  font-size: 3.5rem;
  line-height: 4rem;
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  font-weight: 500;
  letter-spacing: -0.1rem;
}

.hero-parallax .hero__message h2 span {
  display: inline-block;
  position: relative;
  transform-origin: 50% 100%;
  will-change: top, opacity, transform;
}

@supports (animation-timeline: scroll()) {
  .hero-parallax .hero__message h2 span {
    animation: roller-door-h2 linear both, hero-h2-fade linear both;
    animation-timeline: scroll(root block), scroll(root block);
    /* Tilt spans full page scroll (0%→100%) so it keeps progressing; plateau holds no-tilt then tilts to end. Fade 0→fade-end px. */
    animation-range: 0% 100%, 0 calc(var(--hero-h2-span-fade-end) * 1px);
  }
}

.hero-parallax .hero__message h2 .lge {
  font-size: 140px;
  font-weight: 300;
  margin-right: 10px;
}



.hero-parallax .hero__message strong {
  display: contents;
}

/* CTA button styling – optional, can be overridden by main styles */
.hero-parallax .hero__cta .btn {
  background: #ffcd05;
  color: #000;
  padding: 7px 20px 7px 16px;
  display: inline-flex;
  flex-shrink: 0;
  margin-left: 10px;
  align-items: center;
  border: 1px solid #ffcd05;
  min-width: 2.7em;
  text-align: center;
  vertical-align: middle;
  border-radius: 4px;
  outline: 0;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: normal;
  font-family: 'Poppins', sans-serif;
}

.hero-parallax .hero__cta .btn:hover,
.hero-parallax .hero__cta .btn:focus {
  background-color: #ffe784;
}

.hero-parallax .hero__cta .btn.secondary {
  border: 1px solid #478081;
  color: #478081;
  background-color: #fff;
}

.hero-parallax .hero__cta .btn.secondary:hover,
.hero-parallax .hero__cta .btn.secondary:focus {
  color: #478081;
  background-color: #edf2f2;
}

.hero-parallax .hero__cta .btn.lge {
  padding: 15px;
}

/* Narrow viewports */
@media (max-width: 950px) {
  .hero-parallax .hero__cta {
    max-width: 100%;
    margin: 0 5% 0;
  }
}

@media (max-width: 700px) {
  .hero-parallax,
  .hero-parallax .hero__bg,
  .hero-parallax .hero__bg::before,
  .hero-spacer {
    min-height: 80vh;
  }

  .hero-parallax .hero__message {
    min-height: 400px;
  }
}
