/* =========================================================
   AAC Hero — animated, CMS-driven landing hero
   ========================================================= */
.aac-hero {
  --hero-green: #007d45;
  --hero-green-deep: #04361f;
  --hero-gold: #ffcd00;
  --hero-ease: cubic-bezier(.22, 1, .36, 1);
  --hero-duration: 7000ms;
  --mx: 0;          /* mouse x  (-1 … 1) */
  --my: 0;          /* mouse y  (-1 … 1) */
  --scroll: 0;      /* 0 … 1 as hero scrolls away */

  position: relative;
  height: min(100svh, 880px);
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--hero-green-deep);
  color: #fff;
}

/* ---------- Slides ---------- */
.aac-hero__slides,
.aac-hero__slide {
  position: absolute;
  inset: 0;
}

.aac-hero__slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.4s var(--hero-ease), visibility 0s linear 1.4s;
  z-index: 0;
}

.aac-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.4s var(--hero-ease), visibility 0s;
  z-index: 1;
}

/* Background: parallax wrapper (mouse + scroll) → image (Ken Burns) */
.aac-hero__parallax {
  position: absolute;
  inset: -40px;
  transform:
    translate3d(calc(var(--mx) * -14px), calc(var(--my) * -10px + var(--scroll) * 160px), 0);
  transition: transform .6s var(--hero-ease);
  will-change: transform;
}

.aac-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.18);
  will-change: transform;
}

.aac-hero__slide.is-active .aac-hero__bg {
  animation: aacKenBurnsA calc(var(--hero-duration) + 2000ms) linear forwards;
}

.aac-hero__slide:nth-child(even).is-active .aac-hero__bg {
  animation-name: aacKenBurnsB;
}

@keyframes aacKenBurnsA {
  from { transform: scale(1.18) translate3d(-1.5%, 1%, 0); }
  to   { transform: scale(1.04) translate3d(1.5%, -1%, 0); }
}

@keyframes aacKenBurnsB {
  from { transform: scale(1.04) translate3d(1.5%, 0, 0); }
  to   { transform: scale(1.18) translate3d(-1.5%, -1.5%, 0); }
}

/* Brand overlay: deep green on the text side, warm gold glow on the right */
.aac-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, rgba(255, 196, 0, .32), transparent 70%),
    linear-gradient(100deg, rgba(4, 54, 31, .92) 0%, rgba(0, 125, 69, .62) 45%, rgba(0, 0, 0, .12) 80%),
    linear-gradient(to top, rgba(2, 30, 17, .85) 0%, transparent 35%);
}

/* ---------- Content ---------- */
.aac-hero__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 70px;        /* room for the transparent navbar on top */
  padding-bottom: 110px;
  transform: translate3d(calc(var(--mx) * 8px), calc(var(--my) * 6px + var(--scroll) * -60px), 0);
  opacity: calc(1 - var(--scroll) * 1.4);
  transition: transform .6s var(--hero-ease);
}

.aac-hero__content > * { max-width: 760px; }

.aac-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--hero-gold);
}

.aac-hero__eyebrow-line {
  display: inline-block;
  width: 48px;
  height: 2px;
  background: var(--hero-gold);
  transform-origin: left;
}

.aac-hero__title {
  margin: 0 0 22px;
  font-family: var(--font-righteous, "Righteous", sans-serif);
  font-size: clamp(2.4rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .12);
}

.aac-hero__text {
  margin: 0 0 36px;
  font-family: var(--font-primary, "Inter", sans-serif);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, .88);
  max-width: 600px;
}

.aac-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Buttons ---------- */
.aac-hero__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  overflow: hidden;
  transition: transform .35s var(--hero-ease), box-shadow .35s var(--hero-ease), color .35s, background-color .35s;
}

.aac-hero__btn--primary {
  background: var(--hero-gold);
  color: #1d2b12 !important;
  box-shadow: 0 10px 30px -8px rgba(255, 205, 0, .6);
}

.aac-hero__btn--primary::before {           /* shine sweep */
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg);
  animation: aacShine 4.5s ease-in-out infinite 2.5s;
}

.aac-hero__btn--primary i { transition: transform .35s var(--hero-ease); }

.aac-hero__btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(255, 205, 0, .75);
  color: #1d2b12 !important;
}

.aac-hero__btn--primary:hover i { transform: translateX(5px); }

.aac-hero__btn--ghost {
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
}

.aac-hero__btn--ghost:hover {
  transform: translateY(-3px);
  background: #fff;
  color: var(--hero-green) !important;
  border-color: #fff;
}

@keyframes aacShine {
  0%, 70% { left: -120%; }
  100%    { left: 160%; }
}

/* ---------- Text entrance (only once JS is ready, so no-JS still shows text) ---------- */
.aac-hero.is-ready .aac-hero__title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}

.aac-hero.is-ready .aac-hero__title .w-in {
  display: inline-block;
  transform: translate3d(0, 110%, 0) rotate(4deg);
  transition: transform .9s var(--hero-ease);
}

.aac-hero.is-ready .aac-hero__eyebrow,
.aac-hero.is-ready .aac-hero__text,
.aac-hero.is-ready .aac-hero__actions {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .9s var(--hero-ease), transform .9s var(--hero-ease);
}

.aac-hero.is-ready .aac-hero__eyebrow-line {
  transform: scaleX(0);
  transition: transform .9s var(--hero-ease);
}

/* Active slide: play in */
.aac-hero.is-ready .is-active .aac-hero__eyebrow       { opacity: 1; transform: none; transition-delay: .35s; }
.aac-hero.is-ready .is-active .aac-hero__eyebrow-line  { transform: scaleX(1); transition-delay: .5s; }
.aac-hero.is-ready .is-active .aac-hero__title .w-in   { transform: none; transition-delay: calc(.55s + var(--i) * 70ms); }
.aac-hero.is-ready .is-active .aac-hero__text          { opacity: 1; transform: none; transition-delay: calc(.85s + var(--words, 3) * 70ms); }
.aac-hero.is-ready .is-active .aac-hero__actions       { opacity: 1; transform: none; transition-delay: calc(1.05s + var(--words, 3) * 70ms); }

/* Leaving slide: text exits quickly upward */
.aac-hero.is-ready .is-leaving .aac-hero__title .w-in  { transform: translate3d(0, -110%, 0); transition-duration: .5s; transition-delay: calc(var(--i) * 30ms); }
.aac-hero.is-ready .is-leaving .aac-hero__eyebrow,
.aac-hero.is-ready .is-leaving .aac-hero__text,
.aac-hero.is-ready .is-leaving .aac-hero__actions      { opacity: 0; transform: translate3d(0, -16px, 0); transition-duration: .45s; }

/* ---------- Particles ---------- */
.aac-hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ---------- Arrows ---------- */
.aac-hero__arrows {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aac-hero__arrow {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.6rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .35s var(--hero-ease), background-color .35s, border-color .35s, color .35s;
}

.aac-hero__arrow:hover {
  background: var(--hero-gold);
  border-color: var(--hero-gold);
  color: #1d2b12;
  transform: scale(1.08);
}

.aac-hero__arrow:focus-visible,
.aac-hero__nav-item:focus-visible,
.aac-hero__btn:focus-visible,
.aac-hero__scroll:focus-visible {
  outline: 2px solid var(--hero-gold);
  outline-offset: 4px;
}

/* ---------- Counter ---------- */
.aac-hero__counter {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  bottom: 118px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-righteous, "Righteous", sans-serif);
  color: rgba(255, 255, 255, .6);
  font-size: 1rem;
}

.aac-hero__counter-current {
  font-size: 2.6rem;
  color: #fff;
  line-height: 1;
  display: inline-block;
}

.aac-hero__counter-current.is-ticking { animation: aacTick .7s var(--hero-ease); }

.aac-hero__counter-sep {
  width: 34px;
  height: 1.5px;
  background: rgba(255, 255, 255, .5);
}

@keyframes aacTick {
  0%   { transform: translateY(0); opacity: 1; }
  45%  { transform: translateY(-60%); opacity: 0; }
  55%  { transform: translateY(60%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ---------- Progress navigation ---------- */
.aac-hero__nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 4;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 18px;
}

.aac-hero__nav-item {
  background: none;
  border: 0;
  padding: 10px 0 0;
  text-align: left;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: .82rem;
  transition: color .35s;
}

.aac-hero__nav-item:hover,
.aac-hero__nav-item.is-active { color: #fff; }

.aac-hero__nav-bar {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .25);
  overflow: hidden;
  margin-bottom: 10px;
}

.aac-hero__nav-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--hero-gold);
  transform-origin: left;
  transform: scaleX(0);
}

.aac-hero__nav-item.is-done .aac-hero__nav-fill { transform: scaleX(1); opacity: .45; }

.aac-hero__nav-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aac-hero__nav-label em {
  font-style: normal;
  color: var(--hero-gold);
  margin-right: 6px;
  font-weight: 600;
}

/* ---------- Scroll cue ---------- */
.aac-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  z-index: 4;
  opacity: calc(1 - var(--scroll) * 4);
}

.aac-hero__mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  position: relative;
}

.aac-hero__wheel {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--hero-gold);
  animation: aacWheel 1.8s ease-in-out infinite;
}

@keyframes aacWheel {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .aac-hero__arrows { top: auto; bottom: 108px; transform: none; flex-direction: row; }
  .aac-hero__counter,
  .aac-hero__scroll { display: none; }
  .aac-hero__nav-label { display: none; }
  .aac-hero__nav { gap: 8px; bottom: 26px; }
}

@media (max-width: 575.98px) {
  .aac-hero { height: 88svh; min-height: 540px; }
  .aac-hero__content { padding-bottom: 150px; }
  .aac-hero__eyebrow { font-size: .7rem; letter-spacing: .2em; }
  .aac-hero__btn { padding: 13px 22px; font-size: .9rem; }
  .aac-hero__arrow { width: 46px; height: 46px; font-size: 1.35rem; }
  .aac-hero__arrows { left: 16px; right: auto; }
}

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .aac-hero *,
  .aac-hero *::before { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .aac-hero__parallax,
  .aac-hero__content { transform: none !important; }
  .aac-hero__bg { transform: scale(1.05); }
  .aac-hero__particles { display: none; }
}
