/* ==========================================================================
   Home — hero slider (the header above it is global: css/header.css)
   Markup: resources/views/frontend/partials/home-hero.blade.php
   Script: public/frontend/assets/js/home/hero.js
   Design: "Webase — Services Section Redesign" canvas, Home.dc.html (Hero)
   Loaded on the home page only.
   ========================================================================== */

.wb-hero {
  --wb-hero-bg: #0E0720;
  --wb-hero-accent: #ED194E;
  --wb-hero-navy: #202547;
  --wb-hero-ease: cubic-bezier(.2, .8, .2, 1);
  --wb-hero-duration: 7s;

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 900px;
  box-sizing: border-box;
  /* the global site header (layouts/partials/header.blade.php) overlays the top */
  padding-top: var(--wb-header-height, 108px);
  padding-bottom: 72px;
  overflow: hidden;
  background: var(--wb-hero-bg);
  color: #FFFFFF;
  font-family: 'Inter Tight', system-ui, sans-serif;
}

.wb-hero a {
  color: #FFFFFF;
  text-decoration: none;
}

.wb-hero a:hover {
  color: #FFD0DB;
}

/* ---------- Background ---------- */

.wb-hero__bg,
.wb-hero__shade,
.wb-hero__glow {
  position: absolute;
  z-index: 0;
}

.wb-hero__bg {
  inset: 0;
  background-color: var(--wb-hero-bg);
  background-size: cover;
  background-position: 70% center;
  filter: contrast(1.05);
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.4s ease, transform 1.4s ease;
  will-change: opacity, transform;
}

.wb-hero__bg.is-active {
  opacity: 1;
  transform: scale(1.08);
  transition: opacity 1.4s ease, transform 8s linear;
}

.wb-hero__shade {
  inset: 0;
}

.wb-hero__shade--side {
  background: linear-gradient(90deg, rgba(20, 8, 48, .96) 0%, rgba(28, 12, 66, .86) 38%, rgba(42, 18, 96, .55) 68%, rgba(52, 24, 120, .38) 100%);
}

.wb-hero__shade--vertical {
  background: linear-gradient(180deg, rgba(14, 7, 32, .55) 0%, rgba(14, 7, 32, 0) 22%, rgba(14, 7, 32, 0) 62%, rgba(14, 7, 32, .92) 100%);
}

.wb-hero__glow {
  left: -200px;
  bottom: -260px;
  width: 760px;
  height: 760px;
  border-radius: 50%;
  background: #8B5CF6;
  opacity: .22;
  filter: blur(160px);
}

/* ---------- Body ---------- */

.wb-hero__body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 64px;
  align-items: center;
  margin-top: 64px;
}

.wb-hero__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* the headline sizes itself from this column's width (cqi units below) */
  container-type: inline-size;
}

/* Both slides share one grid cell so the copy box keeps its height */
.wb-hero__slides {
  display: grid;
}

.wb-hero__slide {
  grid-area: 1 / 1;
  pointer-events: none;
}

.wb-hero__slide.is-active {
  pointer-events: auto;
}

.wb-hero__title {
  margin: 0;
  font-family: inherit;
  font-size: clamp(44px, 6.2vw, 96px);
  /* design size; fallback for browsers without container units */
  /* Design size, but never wider than the column: the longest line ("Build AI-Powered,")
     is ~7.4em wide, so 12.8% of the column keeps every line on one row. */
  font-size: min(clamp(44px, 6.2vw, 96px), 12.8cqi);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.055em;
  color: #FFFFFF;
}

.wb-hero__accent {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--wb-hero-accent);
}

.wb-hero__tagline {
  max-width: 600px;
  margin: 32px 0 0;
  font-family: 'Urbanist', system-ui, sans-serif;
  font-size: clamp(19px, 1.7vw, 25px);
  font-weight: 300;
  line-height: 1.45;
  color: #E6E8F4;
}

.wb-hero__tagline em {
  font-style: italic;
  font-weight: 400;
  color: #FFFFFF;
}

/* Line-by-line reveal: lines leave fast, the active slide's lines rise in one after another */
.wb-hero__mask {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  /* each headline line stays on one row (never "Build AI-" / "Powered,") */
  padding-bottom: .08em;
  margin-bottom: -.08em;
}

.wb-hero__rise {
  display: block;
  opacity: 0;
  transform: translateY(105%);
  transition: transform .45s ease, opacity .35s ease;
  will-change: transform, opacity;
}

.wb-hero__slide.is-active .wb-hero__rise {
  opacity: 1;
  transform: translateY(0);
  transition: transform .9s var(--wb-hero-ease) var(--wb-delay, 0s), opacity .7s ease var(--wb-delay, 0s);
}

.wb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin-top: 48px;
}

.wb-hero .wb-hero__button {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 50px;
  box-sizing: border-box;
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--wb-hero-accent);
  box-shadow: 0 16px 44px rgba(237, 25, 78, .35);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  transition: transform .2s, box-shadow .2s;
}

.wb-hero .wb-hero__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(237, 25, 78, .45);
}

/* ---------- Pager ---------- */

.wb-hero__pager {
  align-self: end;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 32px;
}

.wb-hero__tabs {
  display: flex;
  gap: 20px;
}

.wb-hero__tab {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 170px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.wb-hero__track {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
}

.wb-hero__bar {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--wb-hero-accent);
}

.wb-hero__tab.is-active .wb-hero__bar {
  animation: wb-hero-progress var(--wb-hero-duration) linear both;
}

.wb-hero__tab-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
}

.wb-hero__tab-num {
  font-weight: 700;
  color: rgba(255, 255, 255, .55);
  transition: color .4s;
}

.wb-hero__tab-name {
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
  transition: color .4s;
}

.wb-hero__tab.is-active .wb-hero__tab-num {
  color: var(--wb-hero-accent);
}

.wb-hero__tab.is-active .wb-hero__tab-name {
  color: #FFFFFF;
}

.wb-hero__arrows {
  display: flex;
  gap: 8px;
}

.wb-hero__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #FFFFFF;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.wb-hero__arrow:hover {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .14);
}

.wb-hero__tab:focus-visible,
.wb-hero__arrow:focus-visible,
.wb-hero a:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

@keyframes wb-hero-progress {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* ---------- Responsive ---------- */

/* Breakpoints follow Bootstrap's container steps (lg 992). */

/* Below lg: copy and pager stack */
@media (max-width: 991.98px) {
  .wb-hero__body {
    grid-template-columns: minmax(0, 1fr);
    /* rows hug their content and sit together, centred in the hero (no stretched rows) */
    align-content: center;
    margin-top: 0px;
  }

  .wb-hero__pager {
    align-self: start;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .wb-hero__tab {
    width: 130px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .wb-hero__tab.is-active .wb-hero__bar {
    animation: none;
    width: 100%;
  }

  .wb-hero__bg,
  .wb-hero__bg.is-active,
  .wb-hero__rise,
  .wb-hero__slide.is-active .wb-hero__rise {
    transform: none !important;
    transition: opacity .3s linear !important;
  }
}

/* Mobile: 50px section spacing (bottom only; the top is the header) */
@media (max-width: 767.98px) {
  .wb-hero {
    padding-top: 150px;
    padding-bottom: 50px;
    min-height: auto;
  }

  .wb-hero__actions {
    margin-top: 20px;
  }
}