/*
  ARSABTECH — FINAL HOMEPAGE HERO (v2)
  Scope: homepage hero only. Loaded last so legacy hero patches cannot win.
  Other pages/sections are intentionally untouched.
*/

.home-page {
  overflow-x: hidden;
}

/* Disable the site-wide full-page fade-in on the home page only — it
   clashed with the hero's own picture → nav → text reveal sequence and
   made the page feel like it was reloading. */
html.mo-ready body.home-page {
  animation: none;
  opacity: 1;
}

.home-page .hero {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(1320px, calc(100% - 32px));
  height: auto;
  min-height: min(607px, calc(100svh - 32px));
  margin: 16px auto 0;
  padding: 120px 56px 40px 84px;
  display: block;
  overflow: hidden;
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(135deg, #0b0909 0%, #3f0c0f 45%, #5c1014 100%) !important;
}

/* Image layer: full-bleed, no layout contribution. */
.home-page .hero-media,
.home-page .hero-media picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.home-page .hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: 50% 23%;
  transform: scale(1.07);
  transform-origin: center center;
  filter: saturate(1.34) contrast(.89) brightness(1.25) !important;
  animation:
    heroImgSettle 1.6s cubic-bezier(.22,.9,.32,1) forwards,
    heroKenBurnsLoop 18s ease-in-out 1.6s infinite alternate;
}

/* Curtain wipe (js/motion.js adds .mo-hero-curtain to .hero-media) reveals
   this image while it settles in — then, once the settle finishes, the
   second animation below takes over as a slow continuous pan. Because the
   pan has the same 1.6s delay as the settle's duration, it picks up
   exactly where the settle left off — one sequenced flow, not two
   competing animations. */
@keyframes heroImgSettle {
  from { transform: scale(1.16); filter: saturate(1.34) contrast(.89) brightness(1.1); }
  to   { transform: scale(1.07); filter: saturate(1.34) contrast(.89) brightness(1.25); }
}

@keyframes heroKenBurnsLoop {
  0%   { transform: scale(1.07) translate(0%, 0%); }
  100% { transform: scale(1.15) translate(-1.5%, -1.5%); }
}

/* Controlled dark/red treatment. The image itself remains visible. */
.home-page .hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(58, 10, 12, .82) 0%,
      rgba(70, 13, 15, .67) 16%,
      rgba(75, 15, 16, .50) 34%,
      rgba(60, 12, 14, .46) 55%,
      rgba(30, 6, 8, .05) 75%,
      rgba(20, 4, 6, .15) 100%),
    linear-gradient(180deg,
      rgba(20, 4, 6, .12) 0%,
      rgba(20, 4, 6, .0) 20%,
      rgba(20, 4, 6, .0) 70%,
      rgba(15, 3, 5, .30) 100%);
}

/* extra soft vignette layer for depth */
.home-page .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 100px 30px rgba(20, 4, 6, .28);
}

/* Cursor-follow glow */
.home-page .hero .cursor-glow {
  position: absolute;
  top: 0; left: 0;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,80,60,.35) 0%, rgba(255,80,60,0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity .3s ease;
}
.home-page .hero:hover .cursor-glow { opacity: 1; }

/* Scroll indicator */
.home-page .hero .scroll-indicator {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: .55;
}
.home-page .hero .scroll-indicator span {
  width: 18px; height: 18px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: heroScrollBounce 1.8s ease-in-out infinite;
}
.home-page .hero .scroll-indicator span:nth-child(2) { animation-delay: .2s; opacity: .5; margin-top: -12px; }
@keyframes heroScrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: .3; }
  50% { transform: rotate(45deg) translate(6px,6px); opacity: 1; }
}
@media (max-width: 900px) { .home-page .hero .scroll-indicator { display: none; } }

.home-page .hero-text {
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  width: min(660px, 100%);
  min-width: 0;
  margin: 0;
  padding: 0;
}

/* Entrance animations — staggered fade-up */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.home-page .hero-text > * {
  opacity: 0;
  animation: heroFadeUp .8s cubic-bezier(.22,.9,.32,1) forwards;
}
.home-page .hero .wordmark  { animation-delay: 1.85s; }
.home-page .hero .headline  { animation-delay: 1.98s; }
.home-page .hero .hero-sub  { animation-delay: 2.14s; }
.home-page .hero .eyebrow   { animation-delay: 2.26s; }
.home-page .hero .hero-ctas { animation-delay: 2.38s; }

/* Display type supplied for this hero. */
.home-page .hero .wordmark,
.home-page .hero .wordmark span {
  font-family: "Fredoka", sans-serif !important;
  font-size: 23px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  letter-spacing: -.3px !important;
  color: rgba(255,255,255,.85) !important;
  margin: 0 0 10px !important;
  text-transform: uppercase;
}

.home-page .hero .headline {
  max-width: 660px;
  margin: 0 0 28px !important;
  padding: 0;
  font-family: "Fredoka", sans-serif !important;
  font-size: 54px !important;
  line-height: 1.05 !important;
  font-weight: 600 !important;
  letter-spacing: -1.5px !important;
  color: #fff !important;
  text-wrap: balance;
}

.home-page .hero .hero-sub {
  max-width: 555px;
  margin: 0 0 22px !important;
  padding: 0;
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-size: 17px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: rgba(255, 255, 255, .82) !important;
}

.home-page .hero .eyebrow {
  margin: 0 0 34px !important;
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .64) !important;
}

.home-page .hero .hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: 100%;
  flex-wrap: nowrap;
  margin: 0;
}

.home-page .hero .hero-ctas .btn {
  min-height: 54px;
  padding: 0 28px !important;
  border: 1px solid rgba(255, 255, 255, .60) !important;
  border-radius: 999px !important;
  background: rgba(15, 3, 5, .10) !important;
  color: #fff !important;
  box-shadow: none !important;
  font-family: "Bricolage Grotesque", sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease !important;
}

.home-page .hero .hero-ctas .btn-primary {
  background: #fff !important;
  color: #220608 !important;
  border: 1px solid #fff !important;
}

.home-page .hero .hero-ctas .btn:hover {
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .85) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 70, 70, .28) !important;
}
.home-page .hero .hero-ctas .btn-primary:hover {
  background: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(255, 255, 255, .35), 0 8px 24px rgba(255, 70, 70, .3) !important;
}
.home-page .hero .hero-ctas .btn:active { transform: translateY(-1px); }

/* Short-height laptop screens: reduce top padding only */
@media (max-height: 760px) {
  .home-page .hero { padding-top: 120px; }
}

/* Tablet / narrow desktop */
@media (max-width: 900px) {
  .home-page .hero {
    width: calc(100% - 24px);
    height: auto;
    min-height: calc(100svh - 24px);
    margin: 12px;
    padding: 93px 28px 40px;
    border-radius: 24px;
  }

  .home-page .hero-text {
    width: min(520px, 100%);
  }

  .home-page .hero .wordmark {
    font-size: 28px !important;
    margin-bottom: 10px !important;
  }

  .home-page .hero .headline {
    max-width: 520px;
    font-size: clamp(44px, 6.2vw, 52px) !important;
    line-height: 1.01 !important;
    letter-spacing: -1.2px !important;
  }

  .home-page .hero .hero-sub {
    max-width: 520px;
    font-size: 17px !important;
    line-height: 1.45 !important;
  }

  .home-page .hero-media img {
    object-position: 63% 27%;
    transform: scale(1.06);
  }

  .home-page .hero-media::before {
    background:
      linear-gradient(90deg,
        rgba(55, 6, 8, .76) 0%,
        rgba(55, 6, 8, .48) 38%,
        rgba(20, 3, 8, .12) 72%,
        rgba(7, 2, 9, .18) 100%),
      linear-gradient(180deg, rgba(10, 2, 4, .08), rgba(10, 2, 5, .55));
  }
}

/* Phone: keep the person visible on the right while text stays readable. */
@media (max-width: 600px) {
  .home-page .hero {
    min-height: max(620px, calc(100svh - 24px));
    padding: 88px 20px 30px;
    border-radius: 22px;
  }

  .home-page .hero-text {
    width: 100%;
  }

  .home-page .hero .wordmark {
    font-size: 25px !important;
    margin-bottom: 8px !important;
  }

  .home-page .hero .headline {
    max-width: 100%;
    font-size: clamp(35px, 10.7vw, 43px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.9px !important;
    margin-bottom: 20px !important;
  }

  .home-page .hero .hero-sub {
    max-width: 100%;
    font-size: 16px !important;
    line-height: 1.45 !important;
    margin-bottom: 18px !important;
  }

  .home-page .hero .eyebrow {
    font-size: 9px !important;
    line-height: 1.45 !important;
    letter-spacing: .10em !important;
    margin-bottom: 23px !important;
  }

  .home-page .hero .hero-ctas {
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
  }

  .home-page .hero .hero-ctas .btn {
    min-height: 50px;
    padding: 0 20px !important;
    font-size: 13px !important;
  }

  .home-page .hero-media img {
    object-position: 72% 24%;
    transform: scale(1.10);
  }

  .home-page .hero-media::before {
    background:
      linear-gradient(180deg,
        rgba(53, 6, 8, .16) 0%,
        rgba(53, 6, 8, .34) 40%,
        rgba(14, 2, 8, .72) 100%),
      linear-gradient(90deg,
        rgba(48, 5, 8, .62) 0%,
        rgba(48, 5, 8, .30) 48%,
        rgba(8, 2, 9, .10) 100%);
  }
}

/* Small phones: prevent clipping/overflow and preserve a usable CTA row. */
@media (max-width: 380px) {
  .home-page .hero {
    min-height: 560px;
    padding: 96px 16px 26px;
    border-radius: 18px;
  }

  .home-page .hero .wordmark {
    font-size: 21px !important;
    margin-bottom: 8px !important;
  }

  .home-page .hero .headline {
    font-size: 34px !important;
    line-height: 1.02 !important;
    letter-spacing: -.7px !important;
  }

  .home-page .hero .hero-sub {
    font-size: 15px !important;
    line-height: 1.43 !important;
  }

  .home-page .hero .eyebrow {
    font-size: 8.2px !important;
    letter-spacing: .08em !important;
  }

  .home-page .hero .hero-ctas .btn {
    min-height: 48px;
    padding: 0 16px !important;
  }

  .home-page .hero-media img {
    object-position: 73% 24%;
    transform: scale(1.13);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .hero .hero-ctas .btn { transition: none !important; transform: none !important; }
  .home-page .hero-text > *, .home-page .hero-media img { animation: none !important; opacity: 1 !important; }
}
