/* ==========================================================================
   AIDH — hero sliders (Aurora + Split)
   --------------------------------------------------------------------------
   Kept in its own file rather than folded into aidh-sections.css so the
   hero can be re-uploaded, tweaked or rolled back on its own — it's the
   part of the page most likely to get iterated on.

   Colours/fonts come from the theme variables with fallbacks, same as
   the section widgets.
   ========================================================================== */

.aidh-hero {
  --aidh-accent:      var(--c-teal, #0F9B8E);
  --aidh-accent-dark: var(--c-teal-dark, #0B7A70);
  --aidh-ink:         var(--c-ink, #1B2430);
  --aidh-head:        var(--f-heading, "Raleway", sans-serif);
  --aidh-body:        var(--f-body, "Roboto", sans-serif);
  --aidh-ease:        cubic-bezier(.22, 1, .36, 1);
  --aidh-hero-h:      88vh;
  /* Clearance for the theme's transparent header, which sits absolutely
     positioned on top of this section (body.has-hero). Without it the
     eyebrow line ends up underneath the logo/nav row. */
  --aidh-hero-top:    clamp(130px, 13vh, 185px);

  position: relative;
  overflow: hidden;
  background: var(--aidh-ink);
  font-family: var(--aidh-body);
  color: #fff;
  isolation: isolate;
}
.aidh-hero *,
.aidh-hero *::before,
.aidh-hero *::after { box-sizing: border-box; }
.th-hero-wrapper.aidh-hero { overflow: hidden; }

.aidh-hero__container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--wrap-max, 1280px);   /* shared layout token — see aidh-sections.css */
  margin-inline: auto;
  padding-inline: var(--wrap-pad, 20px);
}
@media (min-width: 992px) { .th-hero-wrapper.aidh-hero { overflow: hidden; }

.aidh-hero__container { padding-inline: var(--wrap-pad, 32px); } }

/* ---------- Shared type ---------- */
.aidh-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--aidh-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--aidh-accent);
}
.aidh-hero__eyebrow::before {
  content: '';
  width: 34px; height: 2px;
  background: var(--aidh-accent);
  flex: none;
}
.aidh-hero__title {
  margin: 22px 0 0;
  font-family: var(--aidh-head);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  color: #fff;
}
.aidh-hero__title em {
  font-style: normal;
  color: var(--aidh-accent);
}
.aidh-hero__rule {
  display: block;
  margin-top: 26px;
  width: 74px; height: 3px;
  background: var(--aidh-accent);
}
.aidh-hero__lead {
  margin: 24px 0 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255,255,255,.76);
}
.aidh-hero__cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.aidh-hero .aidh-hbtn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 15px 28px;
  font-family: var(--aidh-head);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  transition: background .22s ease-out, border-color .22s ease-out, color .22s ease-out, transform .22s var(--aidh-ease);
}
.aidh-hero .aidh-hbtn--solid { background: var(--aidh-accent); color: #fff; }
.aidh-hero .aidh-hbtn--solid:hover { background: var(--aidh-accent-dark); color: #fff; transform: translateY(-2px); }
.aidh-hero .aidh-hbtn--outline { border-color: rgba(255,255,255,.4); color: #fff; }
.aidh-hero .aidh-hbtn--outline:hover { border-color: var(--aidh-accent); background: rgba(255,255,255,.08); color: #fff; transform: translateY(-2px); }
.aidh-hero .aidh-hbtn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: .7rem;
}
.aidh-hero .aidh-hbtn--solid i { border-color: rgba(255,255,255,.55); }

/* ---------- Controls (shared) ---------- */
.aidh-hero__dots { display: flex; gap: 8px; }
.aidh-hero__dot {
  width: 30px; height: 4px;
  border: 0; padding: 0;
  border-radius: 2px;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: width .3s var(--aidh-ease), background .3s ease-out;
}
.aidh-hero__dot.is-active { width: 58px; background: var(--aidh-accent); }

.aidh-hero__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .2s ease-out, border-color .2s ease-out, transform .2s var(--aidh-ease);
}
.aidh-hero__arrow:hover { border-color: var(--aidh-accent); background: rgba(255,255,255,.1); transform: scale(1.06); }

.aidh-hero__count {
  font-family: var(--aidh-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: rgba(255,255,255,.6);
}
.aidh-hero__count b { color: #fff; font-size: 1.05rem; }

.aidh-hero__progress {
  position: relative;
  height: 2px;
  width: 100%;
  background: rgba(255,255,255,.16);
  overflow: hidden;
}
.aidh-hero__progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--aidh-accent);
}
.aidh-hero.is-playing .aidh-hero__progress span { animation: aidh-hero-progress linear forwards; }
@keyframes aidh-hero-progress { from { width: 0; } to { width: 100%; } }

/* ==========================================================================
   1 · AURORA — full-bleed photo, dark gradient wash, text on the left
   ========================================================================== */
.aidh-hero--aurora {
  display: flex;
  align-items: center;
  min-height: var(--aidh-hero-h);
  padding-top: var(--aidh-hero-top);
  padding-bottom: 120px;
}
.aidh-hero--aurora .aidh-hero__stage { position: absolute; inset: 0; z-index: 0; }
.aidh-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--aidh-ease), visibility .9s;
}
.aidh-hero__slide.is-active { opacity: 1; visibility: visible; }
.aidh-hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  transition: transform 9s linear;
}
.aidh-hero__slide.is-active img { transform: scale(1); }

.aidh-hero__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(20,30,44,.97) 0%, rgba(20,30,44,.88) 34%, rgba(20,30,44,.45) 64%, rgba(20,30,44,.12) 100%),
    linear-gradient(to top, rgba(20,30,44,.65), transparent 45%);
}
.aidh-hero__grain {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  z-index: 2;
  width: 180px;
  opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to right, #000, transparent);
  -webkit-mask-image: linear-gradient(to right, #000, transparent);
  pointer-events: none;
}
.aidh-hero__arc {
  position: absolute;
  left: -160px; top: 50%;
  z-index: 2;
  width: 340px; height: 340px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.aidh-hero--aurora .aidh-hero__copy { max-width: 44rem; }
/* Stack every copy panel in the same grid cell (instead of display:
   none/block) so the outgoing text fades out while the incoming text
   fades in, over the SAME .9s the photo takes to crossfade — the panel
   used to swap instantly via display:none, so the caption landed on
   screen up to .9s before the photo had actually finished changing. */
.aidh-hero--aurora .aidh-hero__panels { display: grid; }
.aidh-hero--aurora .aidh-hero__panels > .aidh-hero__copy {
  grid-area: 1 / 1 / 2 / 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .9s var(--aidh-ease), visibility .9s, transform .9s var(--aidh-ease);
}
.aidh-hero--aurora .aidh-hero__panels > .aidh-hero__copy.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
@keyframes aidh-hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.aidh-hero--aurora .aidh-hero__bar {
  position: absolute;
  left: 0; right: 0; bottom: 34px;
  z-index: 4;
}
.aidh-hero__barinner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 992px) { .aidh-hero__barinner { padding-inline: 32px; } }
.aidh-hero__barinner .aidh-hero__progress { flex: 1; }
.aidh-hero__nav { display: flex; gap: 10px; }

@media (max-width: 991px) {
  .aidh-hero--aurora { min-height: 0; padding-top: var(--aidh-hero-top); padding-bottom: 150px; }
  .aidh-hero__wash { background: linear-gradient(180deg, rgba(20,30,44,.94), rgba(20,30,44,.86) 55%, rgba(20,30,44,.94)); }
  .aidh-hero__arc, .aidh-hero__grain { display: none; }
  .aidh-hero__nav { display: none; }
}

/* ==========================================================================
   2 · SPLIT — dark editorial panel beside a framed photo with thumbnails
   ========================================================================== */
.aidh-hero--split { padding: 0; }
.aidh-hero--split .aidh-hero__grid {
  display: grid;
  min-height: var(--aidh-hero-h);
  align-items: center;
  gap: 0;
}
@media (min-width: 992px) {
  .aidh-hero--split .aidh-hero__grid { grid-template-columns: 1.02fr .98fr; }
}
.aidh-hero--split .aidh-hero__left {
  position: relative;
  z-index: 3;
  padding: 130px 24px 90px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.07), transparent 60%),
    var(--aidh-ink);
}
@media (min-width: 992px) {
  .aidh-hero--split .aidh-hero__left { padding: var(--aidh-hero-top) 5vw 120px clamp(24px, 6vw, 96px); }
}
/* Same crossfade-stack fix as the Aurora hero above — see its comment. */
.aidh-hero--split .aidh-hero__panels { display: grid; }
.aidh-hero--split .aidh-hero__panels > .aidh-hero__copy {
  grid-area: 1 / 1 / 2 / 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .9s var(--aidh-ease), visibility .9s, transform .9s var(--aidh-ease);
}
.aidh-hero--split .aidh-hero__panels > .aidh-hero__copy.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.aidh-hero__stats {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 26px;
}
.aidh-hero__stat strong {
  display: block;
  font-family: var(--aidh-head);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--aidh-accent);
}
.aidh-hero__stat span {
  display: block;
  margin-top: 8px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}

.aidh-hero--split .aidh-hero__right {
  position: relative;
  min-height: 420px;
  padding: 0 0 0 0;
}
@media (min-width: 992px) {
  .aidh-hero--split .aidh-hero__right { min-height: var(--aidh-hero-h); }
}
.aidh-hero--split .aidh-hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
@media (min-width: 992px) {
  .aidh-hero--split .aidh-hero__stage {
    /* Top inset clears the overlaid header so the photo's rounded
       corner isn't cut in half by the nav row. */
    inset: calc(var(--aidh-hero-top) - 40px) 26px 26px 0;
    border-radius: 26px 0 0 26px;
  }
}
.aidh-hero--split .aidh-hero__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,30,44,.55), transparent 42%);
  pointer-events: none;
}

.aidh-hero__thumbs {
  position: absolute;
  right: 26px; bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 10px;
}
.aidh-hero__thumb {
  width: 72px; height: 52px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: .55;
  transition: opacity .22s ease-out, border-color .22s ease-out, transform .22s var(--aidh-ease);
}
.aidh-hero__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aidh-hero__thumb:hover { opacity: .85; transform: translateY(-3px); }
.aidh-hero__thumb.is-active { opacity: 1; border-color: var(--aidh-accent); }

.aidh-hero--split .aidh-hero__bar {
  position: relative;
  z-index: 4;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.aidh-hero--split .aidh-hero__progress { max-width: 160px; }

@media (max-width: 991px) {
  .aidh-hero--split .aidh-hero__grid { min-height: 0; }
  /* Photo first on mobile — the transparent header sits over it, so it
     needs the same clearance the text column gets on desktop. */
  .aidh-hero--split .aidh-hero__right { order: -1; min-height: calc(300px + var(--aidh-hero-top) * .4); }
  .aidh-hero--split .aidh-hero__left { padding-top: 56px; }
  .aidh-hero__thumbs { right: 16px; bottom: 16px; }
  .aidh-hero__thumb { width: 56px; height: 40px; }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .aidh-hero *, .aidh-hero *::before, .aidh-hero *::after {
    transition-duration: .01ms !important;
    animation: none !important;
  }
  .aidh-hero__slide img { transform: none; }
}
