/* Gregg Global — homepage carousel (Earth hero + promotional banners). Loaded on index.html only.
   The Earth <section class="hero hero-video"> keeps every existing rule in site.css; this file only stacks slides
   in the same footprint and styles the controls. Banner artwork is never overlaid: on desktop the image is
   contained above a 64 px control strip; at ≤900 px it sits full-width with its verbatim headline + CTA below. */

.hc { position: relative; background: var(--navy-ink); overflow: hidden; }   /* clips the 14 px slide drift so it never adds page width */
.hc-track { display: grid; }
.hc-track > .hc-slide { grid-area: 1 / 1; min-width: 0; }

/* ---------- slide transitions: ~600 ms crossfade + slight lateral drift ---------- */
.hc-slide {
  --hc-x: 0px;
  transition: opacity .6s ease, transform .6s cubic-bezier(.3,.6,.3,1), visibility 0s linear .6s;
}
.hc-slide:not(.is-active) { opacity: 0; transform: translateX(var(--hc-x)); pointer-events: none; z-index: 1; }
.hc-slide.is-active { opacity: 1; transform: none; z-index: 2; visibility: visible; transition-delay: 0s; }
.hc-banner:not(.is-active) { visibility: hidden; }
.hc-slide.hc-instant { transition: none; }

/* ---------- promotional banner (desktop) ---------- */
.hc-banner { position: relative; overflow: hidden; background: #0b1030; }
.hc-backdrop {
  position: absolute; inset: -60px; z-index: 0;
  background: #0b1030 center / cover no-repeat;
  filter: blur(34px) brightness(.45) saturate(1.1);
}
.hc-link { position: absolute; inset: 20px 24px 64px; z-index: 1; display: block; }
.hc-link picture { display: block; width: 100%; height: 100%; }
.hc-img { width: 100%; height: 100%; object-fit: contain; }
.hc-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hc-cap { display: none; }

/* ---------- controls ---------- */
.hc-controls {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 2px; padding: 3px 6px; border-radius: 999px;
  background: rgba(11,16,48,.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12);
}
.hc-btn {
  width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--paper); cursor: pointer;
  transition: background .2s ease;
}
.hc-btn:hover { background: rgba(255,255,255,.12); }
.hc-btn svg { width: 16px; height: 16px; display: block; }
.hc-dots { display: flex; align-items: center; }
.hc-dot { width: 28px; height: 38px; padding: 0 4px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.hc-dot::before { content: ""; width: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.34); transition: background .3s ease; }
.hc-dot:hover::before { background: rgba(255,255,255,.7); }
.hc-dot[aria-current="true"]::before { background: var(--accent); }
.hc-count {
  min-width: 40px; text-align: center; color: rgba(255,255,255,.82);
  font: 600 12px/1 var(--sans); letter-spacing: .08em; font-variant-numeric: tabular-nums;
}
.hc-btn:focus-visible, .hc-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.hc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- stacked layout: tablet + phone ---------- */
@media (max-width: 900px) {
  .hc-backdrop { display: none; }
  .hc-link {
    inset: 0 0 72px; display: flex; flex-direction: column; justify-content: flex-start;
    padding-top: clamp(40px, 9vw, 96px); color: var(--paper);
  }
  .hc-link picture { height: auto; flex: none; }
  .hc-img { height: auto; aspect-ratio: 1672 / 941; }
  .hc-link:focus-visible { outline-offset: -3px; }
  .hc-cap { display: block; padding: 22px 24px 0; }
  .hc-eyebrow {
    display: block; font: 600 12px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  }
  .hc-headline {
    display: block; margin-top: 10px; font-family: var(--serif); font-weight: 500;
    font-size: clamp(24px, 4.6vw, 34px); line-height: 1.18; color: var(--paper);
  }
  .hc-detail { display: block; margin-top: 10px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.78); }
  .hc-cta { margin-top: 18px; text-transform: uppercase; letter-spacing: .06em; font-size: 13.5px; padding: 12px 20px; }
  .hc-link:hover .hc-cta { background: #dbb52f; }
}
@media (max-width: 420px) {
  .hc-dot { width: 20px; padding: 0 3px; }
  .hc-count { min-width: 34px; }
}

/* ---------- reduced motion: no drift, near-instant change, no autoplay (set in JS) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hc-slide { transition: opacity .15s linear, visibility 0s linear .15s; transform: none !important; }
  .hc-slide.is-active { transition-delay: 0s; }
}
