/* Homepage hero slider (markup in pages/home.blade.php, timing in js/hero.js) */

.abj-hero {
  --abj-ease: cubic-bezier(0.77, 0, 0.18, 1);
  --abj-rise: cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0f0f0f;
  outline: none;
}

/* every slide is stacked; only current / leaving ones are painted */
.abj-hero .abj-hero__slide {
  display: block !important;
  position: absolute !important;
  inset: 0;
  height: 100%;
  visibility: hidden;
  z-index: 1;
}

.abj-hero .abj-hero__slide.is-current,
.abj-hero .abj-hero__slide.is-leaving {
  visibility: visible;
}

.abj-hero .abj-hero__slide.is-current {
  z-index: 2;
}

/* take the image out of the theme's own fade/slide-in */
.abj-hero .abj-hero__slide .hero__image-wrapper {
  opacity: 1;
  transform: none;
  transition: none;
  overflow: hidden;
}

.abj-hero .abj-hero__slide .hero__image {
  opacity: 1 !important;
  transition: none !important;
  will-change: transform;
}

/* ---- slide transitions ----
   Only opacity and transform are animated so the browser can run the whole
   change on the compositor (clip-path / filter repaint the full photo each frame). */

.abj-hero .abj-hero__slide {
  will-change: opacity;
}

.abj-hero .abj-hero__slide .hero__image-wrapper {
  will-change: transform;
  backface-visibility: hidden;
}

/* darkening layer for the outgoing photo (instead of animating filter) */
.abj-hero .abj-hero__slide .hero__image-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/* incoming slide fades in over the old one while its photo glides into place */
.abj-hero .abj-hero__slide.is-entering {
  animation: abj-fade-in 1.1s var(--abj-ease) both;
}

.abj-hero .abj-hero__slide.is-entering .hero__image-wrapper {
  animation: abj-glide-in 1.1s var(--abj-ease) both;
}

.abj-hero--back .abj-hero__slide.is-entering .hero__image-wrapper {
  animation-name: abj-glide-in-back;
}

/* outgoing photo drifts the other way and dims underneath */
.abj-hero .abj-hero__slide.is-leaving .hero__image-wrapper {
  animation: abj-drift-out 1.1s var(--abj-ease) both;
}

.abj-hero--back .abj-hero__slide.is-leaving .hero__image-wrapper {
  animation-name: abj-drift-out-back;
}

.abj-hero .abj-hero__slide.is-leaving .hero__image-wrapper::before {
  animation: abj-dim 1.1s var(--abj-ease) both;
}

/* slow Ken Burns zoom while a slide is on screen */
.abj-hero .abj-hero__slide.is-current .hero__image,
.abj-hero .abj-hero__slide.is-leaving .hero__image {
  animation: abj-ken calc(var(--abj-hero-duration, 6500ms) + 1500ms) linear both;
}

/* first paint: soft fade + zoom out */
.abj-hero .abj-hero__slide.is-intro .hero__image-wrapper {
  animation: abj-intro 1.4s var(--abj-rise) both;
}

@keyframes abj-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes abj-glide-in {
  from { transform: translate3d(6%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes abj-glide-in-back {
  from { transform: translate3d(-6%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

/* the slight zoom keeps the shifted photo covering the frame edge */
@keyframes abj-drift-out {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, 0, 0) scale(1.07); }
}

@keyframes abj-drift-out-back {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, 0, 0) scale(1.07); }
}

@keyframes abj-dim {
  from { opacity: 0; }
  to { opacity: 0.5; }
}

@keyframes abj-ken {
  from { transform: scale(1.1); }
  to { transform: scale(1); }
}

@keyframes abj-intro {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

/* ---- text: lines rise out of their masks, staggered ---- */
.abj-hero .animation-cropper {
  opacity: 1 !important;
}

.abj-hero .abj-hero__slide .animation-contents {
  opacity: 0;
  transform: translateY(110%);
  animation: none !important;
  transition: transform 0.9s var(--abj-rise), opacity 0.6s ease;
}

.abj-hero .abj-hero__slide .hero__link .btn {
  opacity: 0;
  transform: translateY(18px);
  animation: none !important;
  transition: transform 0.9s var(--abj-rise), opacity 0.6s ease, background-color 0.25s ease,
    color 0.25s ease;
}

.abj-hero .abj-hero__slide.is-current .animation-contents,
.abj-hero .abj-hero__slide.is-current .hero__link .btn {
  opacity: 1;
  transform: none;
}

/* the first slide is current in the server markup; with JS its copy waits
   below the masks until hero.js starts, so the reveal plays (no-js shows it) */
.js .abj-hero:not(.abj-hero--ready) .abj-hero__slide.is-current .animation-contents {
  opacity: 0;
  transform: translateY(110%);
}

.js .abj-hero:not(.abj-hero--ready) .abj-hero__slide.is-current .hero__link .btn {
  opacity: 0;
  transform: translateY(18px);
}

.abj-hero .abj-hero__slide.is-current .abj-hero__kicker .animation-contents { transition-delay: 0.45s; }
.abj-hero .abj-hero__slide.is-current .hero__title .animation-contents { transition-delay: 0.6s; }
.abj-hero .abj-hero__slide.is-current .hero__subtitle .animation-contents { transition-delay: 0.78s; }
.abj-hero .abj-hero__slide.is-current .hero__link .btn { transition-delay: 0.95s, 0.95s, 0s, 0s; }

.abj-hero .abj-hero__slide.is-leaving .animation-contents,
.abj-hero .abj-hero__slide.is-leaving .hero__link .btn {
  opacity: 0;
  transform: translateY(-60%);
  transition-duration: 0.45s;
  transition-delay: 0s;
}

/* ---- typography ---- */
.abj-hero__kicker {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.abj-hero__kicker .animation-contents {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.abj-hero__kicker .animation-contents::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.abj-hero .hero__title {
  font-size: clamp(28px, 4.2vw, 58px) !important;
  line-height: 1.02 !important;
  margin-bottom: 8px !important;
}

/* Hemi Head is italic and draws past its advance width. The reveal mask
   clips that ink, which slices the R in "FOR". */
.abj-hero .hero__title .animation-cropper {
  padding-right: 0.2em;
  margin-right: -0.2em;
}

.abj-hero .hero__subtitle {
  font-size: clamp(15px, 1.6vw, 22px);
}

.abj-hero .hero__link .btn {
  border-radius: 999px !important;
  padding: 15px 30px !important;
  letter-spacing: 0.18em;
}

.abj-hero .hero__link .btn:hover {
  background: #111 !important;
  color: #fff !important;
}

/* second slide: split layout. The photo sits on the right and fades into a
   panel of its own backdrop grey; the copy lives on that panel, clear of the hands */
.abj-hero__slide--left .hero__text-content {
  text-align: left !important;
  vertical-align: middle !important;
  padding: 0 0 40px clamp(8px, 2vw, 32px);
}

.abj-hero__slide--left .hero__text-shadow {
  display: inline-block;
  max-width: min(30%, 440px);
  text-shadow: none !important;
}

@media only screen and (min-width: 769px) {
  .abj-hero__slide--left {
    background: #b9bbc2;
  }

  .abj-hero__slide--left .hero__image-wrapper {
    left: 32% !important;
    right: 0 !important;
    width: auto !important;
  }

  .abj-hero__slide--left .hero__image {
    object-position: 15% 40% !important;
  }

  .abj-hero__slide--left .hero__image-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 10%;
    z-index: 2;
    background: linear-gradient(to right, #b9bbc2, rgba(185, 187, 194, 0));
    pointer-events: none;
  }
}

.abj-hero__slide--left .hero__text-shadow::after,
.abj-hero__slide--left .hero__text-shadow::before {
  display: none !important;
}

.abj-hero__slide--left .abj-hero__kicker,
.abj-hero__slide--left .hero__title,
.abj-hero__slide--left .hero__subtitle {
  color: #111 !important;
}

/* lines wrap inside their reveal masks instead of running off the slide */
.abj-hero__slide--left .animation-cropper,
.abj-hero__slide--left .animation-contents {
  white-space: normal !important;
}

.abj-hero__slide--left .hero__subtitle {
  font-size: clamp(15px, 1.25vw, 19px) !important;
  margin-bottom: 4px;
}

.abj-hero__slide--left .hero__link .btn {
  background: #111 !important;
  color: #fff !important;
  border: 1px solid #111 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}

.abj-hero__slide--left .hero__link .btn::after {
  content: "92";
  position: static !important;
  display: inline-block;
  width: auto !important;
  height: auto !important;
  background: none !important;
  animation: none !important;
  transform: none;
  transition: transform 0.25s ease;
}

.abj-hero__slide--left .hero__link .btn:hover {
  background: transparent !important;
  color: #111 !important;
}

.abj-hero__slide--left .hero__link .btn:hover::after {
  transform: translateX(4px);
}

/* progress bars / arrows switch to dark while a light slide is showing */
.abj-hero--dark-ui .abj-hero__ui {
  color: #111;
}

.abj-hero--dark-ui .abj-hero__bar::before {
  background: rgba(17, 17, 17, 0.25);
}

.abj-hero--dark-ui .abj-hero__bar span {
  background: #111;
}

.abj-hero--dark-ui .abj-hero__arrow {
  color: #111;
  border-color: rgba(17, 17, 17, 0.35);
  background: rgba(255, 255, 255, 0.55);
}

.abj-hero--dark-ui .abj-hero__arrow:hover {
  background: #111;
  color: #fff;
}

/* ---- controls ---- */
.abj-hero__ui {
  position: absolute;
  left: clamp(16px, 3vw, 40px);
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 2.4vw, 30px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  pointer-events: none;
}

.abj-hero__ui > * {
  pointer-events: auto;
}

.abj-hero__bars {
  display: flex;
  gap: 8px;
}

.abj-hero__bar {
  position: relative;
  width: clamp(44px, 6vw, 84px);
  height: 3px;
  padding: 10px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.abj-hero__bar::before,
.abj-hero__bar span {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
}

.abj-hero__bar::before {
  right: 0;
  background: rgba(255, 255, 255, 0.35);
}

.abj-hero__bar span {
  right: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

.abj-hero__bar.is-done span {
  transform: scaleX(1);
}

.abj-hero__bar.is-active span {
  animation: abj-fill var(--abj-hero-duration, 6500ms) linear forwards;
}

.abj-hero--paused .abj-hero__bar.is-active span {
  animation-play-state: paused;
}

@keyframes abj-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.abj-hero__count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.abj-hero__arrows {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.abj-hero__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.abj-hero__arrow:hover {
  background: #fff;
  color: #111;
}

.abj-hero__arrow:active {
  transform: scale(0.94);
}

.abj-hero__arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.abj-hero__ui,
.abj-hero__bar::before,
.abj-hero__bar span,
.abj-hero__arrow {
  transition-property: color, background-color, border-color, transform;
  transition-duration: 0.6s;
}

/* ---- mobile ---- */
@media only screen and (max-width: 768px) {
  .abj-hero__arrows {
    display: none;
  }

  .abj-hero .hero__title {
    font-size: 26px !important;
  }

  .abj-hero__kicker {
    font-size: 10px;
  }

  .abj-hero .hero__link .btn {
    padding: 12px 22px !important;
  }

  /* portrait crop: white copy over a soft bottom shade */
  .abj-hero__slide--left .hero__image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0) 55%);
  }

  .abj-hero__slide--left .hero__text-content {
    padding: 0 0 72px 0;
  }

  .abj-hero__slide--left .hero__text-shadow {
    max-width: 100%;
  }

  .abj-hero__slide--left .abj-hero__kicker,
  .abj-hero__slide--left .hero__title,
  .abj-hero__slide--left .hero__subtitle {
    color: #fff !important;
  }

  .abj-hero__slide--left .hero__link .btn {
    background: transparent !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
  }

  .abj-hero--dark-ui .abj-hero__ui {
    color: #fff;
  }

  .abj-hero--dark-ui .abj-hero__bar::before {
    background: rgba(255, 255, 255, 0.35);
  }

  .abj-hero--dark-ui .abj-hero__bar span {
    background: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .abj-hero .abj-hero__slide.is-entering {
    animation: abj-intro 0.6s ease both;
  }

  .abj-hero .abj-hero__slide.is-current .hero__image,
  .abj-hero .abj-hero__slide.is-leaving .hero__image,
  .abj-hero .abj-hero__slide.is-leaving .hero__image-wrapper {
    animation: none;
  }
}

/* ---------------------------------------------------------------------------
   OUR MISSION (pages/home.blade.php)
   --------------------------------------------------------------------------- */
.abj-mission-section {
  margin: clamp(24px, 4vw, 56px) 20px !important;
}

.abj-mission {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  color: #fff;
}

.abj-mission__media {
  min-height: 520px;
  background: #d9d9db;
}

.abj-mission__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.abj-mission__body {
  align-self: center;
  padding: clamp(40px, 5vw, 72px) clamp(28px, 4vw, 64px);
}

.abj-mission .abj-mission__title {
  margin: 0 0 20px;
  font-family: "Hemi", sans-serif !important;
  font-size: clamp(32px, 3.4vw, 45px) !important;
  line-height: 1;
  color: #fff;
}

.abj-mission__statement {
  margin: 0 0 32px;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.abj-mission__values {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.abj-mission__values li {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.abj-mission__values strong {
  display: block;
  font-weight: 700;
  color: #fff;
}

.abj-mission__link {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 5px;
}

.abj-mission__link:hover {
  opacity: 0.7;
}

@media only screen and (max-width: 768px) {
  .abj-mission-section {
    margin: 24px 10px !important;
  }

  .abj-mission {
    grid-template-columns: 1fr;
  }

  .abj-mission__media {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}
