/* ==========================================================================
   Homepage hero carousel. Markup: app/Views/hero/carousel.php
   Content: app/Views/hero/slides.php.  Behaviour: /assets/js/rg-hero.js
   Loaded by landing.php only. Uses the site's own tokens (app.css), so the
   light and dark themes both follow automatically.

   Without JS the slides form a horizontal strip that snaps slide by slide
   (swipe / scroll). Every slide sits in the same strip, so the strip is as
   tall as the tallest slide: changing slides never moves the page (no CLS).
   ========================================================================== */

.rg-hc{position:relative;isolation:isolate;overflow:hidden;padding:44px 0 72px}
.rg-hc .wrap{position:relative}

/* ---------- the strip ---------- */
.rg-hc__track{
  display:flex;
  overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  outline:none;
  transition:opacity .22s ease;
}
.rg-hc__track::-webkit-scrollbar{display:none}
.rg-hc:not(.is-js) .rg-hc__track{scrollbar-width:thin;padding-bottom:10px}
.rg-hc:not(.is-js) .rg-hc__track::-webkit-scrollbar{display:block;height:6px}
.rg-hc__track.is-jumping{opacity:0}

.rg-hc__slide{
  flex:0 0 100%;min-width:0;
  scroll-snap-align:start;scroll-snap-stop:always;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:center;
  gap:56px;
  padding:8px 6px 30px;
}

/* ---------- left: picture ---------- */
.rg-hc__media{
  position:relative;
  aspect-ratio:4 / 3;
  border-radius:var(--r-xl, 22px);
  overflow:hidden;
  background:var(--paper-3);
  box-shadow:0 1px 2px rgba(10,30,60,.05),0 20px 34px -22px rgba(10,30,60,.38); /* tight: the strip clips anything wider */
  border:1px solid var(--line);
}
.rg-hc__media picture,.rg-hc__media img{display:block;width:100%;height:100%}
.rg-hc__media img{object-fit:cover;object-position:center}

/* The KIPX orbit: no box around it, centred in the same 4:3 space. */
.rg-hc__media--kipx{
  background:none;border:0;box-shadow:none;overflow:visible;
  display:flex;align-items:center;justify-content:center;
}
.rg-hc__media--kipx .kx-promo{max-width:560px;margin:0 auto}

/* ---------- right: words ---------- */
.rg-hc__body{text-align:left;max-width:560px}
.rg-hc__eyebrow{margin-bottom:18px}
.rg-hc .rg-hc__title{
  font-size:clamp(1.85rem,1.25rem + 1.9vw,2.85rem);
  line-height:1.14;letter-spacing:-.028em;
  margin:0 0 .45em;
  text-wrap:balance;
}
.rg-hc__text{
  font-size:clamp(1.02rem,.96rem + .3vw,1.15rem);
  color:var(--ink-3);
  margin:0 0 28px;max-width:52ch;
}
.rg-hc__actions{display:flex;flex-wrap:wrap;gap:12px}
.rg-hc a.btn{white-space:normal;text-align:left;line-height:1.3;gap:10px}
.rg-hc a.btn svg{flex:none;transition:transform .2s ease}
.rg-hc a.btn:hover svg{transform:translateX(3px)}
.rg-hc a.btn.btn-primary{box-shadow:0 1px 0 rgba(255,255,255,.14) inset,0 12px 26px -10px rgba(10,30,60,.55)}
.rg-hc a.btn.lp-btn-ghost{background:color-mix(in srgb,var(--paper) 70%,transparent)}
.rg-hc a.btn.rg-hc__btn-gold{
  background:linear-gradient(180deg,#ecd38a,#d9b55a);color:#1a1405;border-color:transparent;font-weight:700;
  box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 14px 30px -12px rgba(217,181,90,.65);
}
.rg-hc a.btn.rg-hc__btn-gold:hover{color:#1a1405;filter:brightness(1.03)}

/* ---------- controls (shown by rg-hero.js) ---------- */
.rg-hc__controls{
  display:flex;align-items:center;justify-content:center;gap:10px;
  margin-top:18px;
}
.rg-hc__controls[hidden]{display:none}
.rg-hc__arrow,.rg-hc__pause{
  display:inline-grid;place-items:center;
  width:44px;height:44px;padding:0;
  border-radius:50%;
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--ink-2);
  cursor:pointer;
  box-shadow:var(--sh-1);
  transition:border-color .15s,color .15s,background .15s;
}
.rg-hc__pause{width:36px;height:36px;min-height:0;margin-left:4px;color:var(--ink-3)}
.rg-hc__arrow:hover,.rg-hc__pause:hover{border-color:var(--ink-4);color:var(--ink)}
.rg-hc__arrow:focus-visible,.rg-hc__pause:focus-visible,.rg-hc__dot:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.rg-hc__pause .rg-ico-play{display:none}
.rg-hc.is-paused .rg-hc__pause .rg-ico-play{display:block}
.rg-hc.is-paused .rg-hc__pause .rg-ico-pause{display:none}

.rg-hc__dots{display:flex;align-items:center;gap:2px;padding:0 6px}
.rg-hc__dot{
  position:relative;
  width:28px;height:44px;min-height:0;padding:0;
  border:0;background:none;cursor:pointer;
}
.rg-hc__dot::before{
  content:"";position:absolute;left:50%;top:50%;
  width:9px;height:9px;border-radius:999px;
  transform:translate(-50%,-50%);
  background:var(--ink-4);opacity:.45;
  transition:width .25s ease,opacity .25s ease,background .25s ease;
}
.rg-hc__dot[aria-current="true"]::before{width:24px;opacity:1;background:var(--lp-gold, #b8913a)}

.rg-hc__trust{margin-top:30px}

/* ---------- tablet ---------- */
@media (max-width:1023px){
  .rg-hc{padding-top:32px}
  .rg-hc__slide{gap:32px}
  .rg-hc__text{margin-bottom:22px}
  .rg-hc .btn-lg{padding:12px 20px;font-size:.95rem}
}

/* ---------- mobile: picture above words ---------- */
@media (max-width:767px){
  .rg-hc{padding:20px 0 48px}
  .rg-hc__slide{grid-template-columns:minmax(0,1fr);gap:22px;align-items:start;padding:4px 4px 24px}
  .rg-hc__media{border-radius:var(--r-lg, 16px)}
  .rg-hc__body{max-width:none}
  .rg-hc__eyebrow{margin-bottom:12px}
  .rg-hc__actions{flex-direction:column;align-items:stretch}
  .rg-hc__actions .btn{width:100%;justify-content:center;text-align:center}
  .rg-hc__media--kipx{aspect-ratio:auto}
  .rg-hc__media--kipx .kx-promo{max-width:100%}
  .rg-hc__trust{justify-content:flex-start;flex-direction:column;align-items:flex-start;gap:8px}
}

/* The installed-app look on phones (html.rgv2, rg-ui-3.css) forces small,
   fixed heading sizes; keep every slide title the same size there. */
.rgv2 main .rg-hc .rg-hc__title{font-size:25px !important;line-height:1.18 !important;margin:0 0 10px !important}

@media (prefers-reduced-motion: reduce){
  .rg-hc__track{scroll-behavior:auto;transition:none}
  .rg-hc__dot::before,.rg-hc a.btn svg{transition:none}
}
