/* =========================================================
   DESIGN TOKENS
   Update --ar-rail if your header padding ever changes —
   inner heroes will automatically follow.
   ========================================================= */

:root {
  /* Matches header/nav rail — clamps with viewport, same token as .ads-container gutters */
  --ar-rail: clamp(var(--ads-gutter-min, 32px), var(--ads-gutter-vw, 4vw), var(--ads-gutter-max, 100px));
}

/* Prevent 100vw scrollbar-width glitch on Windows */
body { overflow-x: hidden; }


/* =========================================================
   HOME HERO
   ========================================================= */

.ar-hero--home{ margin-bottom: 149px; }

.ar-hero--home .ar-hero__full{
  position: relative;
  overflow: hidden;

  /* Break out of Bricks section container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  min-height: calc(100svh - 96px);
  min-height: calc(100vh - 96px);

  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 35%;
}

/* Overlay */
.ar-hero--home .ar-hero__full::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 45%,
    rgba(0,0,0,0.00) 78%
  );
  z-index: 0;
  pointer-events:none;
}

.ar-hero--home .ar-hero__safe{
  position:absolute;
  inset:0;
  z-index: 1;
}

.ar-hero--home .ar-hero__content{
  position:absolute;
  left: 10%;
  top: 30%;
  transform: translateY(-10%);
  max-width: 620px;
  display:flex;
  flex-direction:column;
  gap: 22px;
  color:#fff;
  z-index: 2;
}

.ar-hero--home .ar-hero__content h1,
.ar-hero--home .ar-hero__content p{
  margin: 0;
}

@media (prefers-reduced-motion: no-preference){
  .ar-hero--home .ar-hero__content{
    opacity: 0;
    transform: translateY(14px);
    animation: arFadeUp 900ms cubic-bezier(.2,.9,.2,1) 120ms forwards;
  }
  @keyframes arFadeUp{
    to{ opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 1024px){
  .ar-hero--home .ar-hero__content{
    left: 8%;
    top: 32%;
    max-width: 560px;
  }
}

@media (max-width: 768px){
  .ar-hero--home{ margin-bottom: 96px; }
  .ar-hero--home .ar-hero__content{
    left: 36px;
    right: 36px;
    top: 32%;
    transform: translateY(-8%);
    max-width: none;
  }
  .ar-hero--home .ar-hero__title{
    font-size: 28px;
  }
  .ar-hero--home .ar-hero__intro{
    line-height: 1.35;
  }
}


/* =========================================================
   INNER HERO (aligned to header rails)
   v1.2 — two-region layout (breadcrumbs top / content bottom)
   ========================================================= */

.ar-hero--inner{
  margin-top: 28px;
  margin-bottom: 56px;

  /* Break out of Bricks container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  /* Re-apply padding using token */
  padding-inline: var(--ar-rail);
  box-sizing: border-box;
}

.ar-hero--inner .ar-hero__full{
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  border-radius: 20px;
  min-height: 600px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* Overlay — dual axis: strong horizontal fade + vertical base lift */
.ar-hero--inner .ar-hero__full::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0,0,0,0.85) 0%,
      rgba(0,0,0,0.62) 38%,
      rgba(0,0,0,0.25) 65%,
      rgba(0,0,0,0.00) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0,0,0,0.10) 0%,
      rgba(0,0,0,0.45) 100%
    );
  z-index: 0;
  pointer-events: none;
}

/* Safe wrapper — fills the full image area, flex column */
.ar-hero--inner .ar-hero__safe.ar-wrap{
  position: absolute;
  inset: 0;
  max-width: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1;
}

/* ── Top region: breadcrumbs ──────────────────────────────── */
.ar-hero--inner .ar-hero__top{
  padding: 36px 112px 0;
  flex-shrink: 0;
}

/* ── Bottom region: title, intro, CTAs ───────────────────── */
/* flex:1 + justify-content:center vertically centres content
   in the space below the breadcrumbs */
.ar-hero--inner .ar-hero__bottom{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 112px;
}

.ar-hero--inner .ar-hero__content{
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #fff;
}

.ar-hero--inner .ar-hero__title{
  margin: 0;
  font-size: clamp(32px, 3.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.ar-hero--inner .ar-hero__intro{
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  max-width: 52ch;
  opacity: 0.92;
}

/* CTA row — supports 1 or 2 buttons side by side */
.ar-hero--inner .ar-hero__cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── Breadcrumb styles ────────────────────────────────────── */
.ar-hero__breadcrumbs{
  display: block;
}

.ar-hero__bc-list{
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

/* Aradel icon — home link */
.ar-hero__bc-home{
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.ar-hero__bc-home:hover,
.ar-hero__bc-home:focus-visible{
  opacity: 1;
}

/* Aradel icon mark */
.ar-hero__bc-icon{
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.ar-hero__bc-icon svg{
  width: 16px;
  height: auto;
  display: block;
  opacity: 0.9;
}

/* Separator › */
.ar-hero__bc-sep{
  font-size: 13px;
  line-height: 1;
  color: rgba(255,255,255,0.55);
  user-select: none;
}

/* Breadcrumb items */
.ar-hero__bc-item{
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.75);
  line-height: 1;
}

.ar-hero__bc-item--current{
  color: rgba(255,255,255,0.95);
  font-weight: 500;
}

.ar-hero__bc-link{
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ar-hero__bc-link:hover,
.ar-hero__bc-link:focus-visible{
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Tablet ───────────────────────────────────────────────── */
@media (max-width: 1024px){
  .ar-hero--inner .ar-hero__full{
    min-height: 520px;
    border-radius: 16px;
  }
  .ar-hero--inner .ar-hero__top{
    padding: 28px 64px 0;
  }
  .ar-hero--inner .ar-hero__bottom{
    padding: 0 64px;
  }
  .ar-hero--inner .ar-hero__content{
    max-width: 520px;
  }
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px){
  .ar-hero--inner{
    margin-top: 18px;
    margin-bottom: 40px;
    padding-inline: 18px;
  }
  .ar-hero--inner .ar-hero__full{
    min-height: 480px;
    border-radius: 14px;
  }

  /* Mobile overlay — flip to darken bottom where text lives */
  .ar-hero--inner .ar-hero__full::before{
    background:
      linear-gradient(
        180deg,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.48) 50%,
        rgba(0,0,0,0.85) 100%
      );
  }

  /* Hide breadcrumbs on mobile */
  .ar-hero--inner .ar-hero__top{
    display: none;
  }

  /* With top hidden, anchor content to bottom of image */
  .ar-hero--inner .ar-hero__safe.ar-wrap{
    justify-content: flex-end;
  }

  /* Content sits above bottom edge with breathing room */
  .ar-hero--inner .ar-hero__bottom{
    flex: 0;
    justify-content: flex-start;
    padding: 0 24px 36px;
  }
  .ar-hero--inner .ar-hero__content{
    max-width: none;
    gap: 12px;
  }
  .ar-hero--inner .ar-hero__title{
    font-size: 28px;
    line-height: 1.0;
  }
  .ar-hero--inner .ar-hero__intro{
    line-height: 1.35;
  }
  .ar-hero--inner .ar-hero__cta-row{
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
}

/* Home hero CTA row (for second CTA if ever used on home) */
.ar-hero--home .ar-hero__cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}


/* =========================================================
   HOME HERO SLIDER
   Extension of .ar-hero--home for multiple slides.
   Inner hero is untouched.
   ========================================================= */

/* The slider has no static background — each slide owns its media */
.ar-hero--slider .ar-hero__full{
  background-image: none !important;
}

/* Override the one-shot fade-up animation: slider uses class-based transitions */
.ar-hero--slider .ar-hero__content{
  animation: none !important;
}


/* ── Slide stack ──────────────────────────────────────────── */

.ar-hero-slider__slides{
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ar-hero-slider__slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  /* Crossfade — keep TRANSITION_MS in JS in sync */
  transition: opacity 750ms ease;
  pointer-events: none;
  z-index: 0;
}

.ar-hero-slider__slide.is-active{
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}


/* ── Media layer ──────────────────────────────────────────── */

.ar-hero-slider__media{
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.ar-hero-slider__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.ar-hero-slider__video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* ── Per-slide gradient overlay ───────────────────────────── */
/* Replaces the ::before pseudo-element that lives on .ar-hero__full
   in the static home hero; that pseudo is suppressed for slider mode. */

.ar-hero--slider .ar-hero__full::before{
  display: none;
}

.ar-hero-slider__overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(0,0,0,0.58) 0%,
      rgba(0,0,0,0.28) 45%,
      rgba(0,0,0,0.00) 78%
    );
  pointer-events: none;
}


/* ── Content inside each slide ───────────────────────────── */
/* Overrides .ar-hero--home .ar-hero__content positioning (position/left/top)
   which still cascades in via the shared class — those values are correct.
   We only need to layer the slide-entry animation on top. */

.ar-hero--slider .ar-hero__safe.ar-wrap{
  position: absolute;
  inset: 0;
  max-width: none;
  padding: 0;
  z-index: 2;
}

/* Entry state: content starts offset and invisible */
.ar-hero--slider .ar-hero__content{
  opacity: 0;
  /* Combines the existing translateY(-10%) resting offset with a 16px entry push */
  transform: translateY(calc(-10% + 16px));
  transition:
    opacity     650ms ease 280ms,
    transform   650ms cubic-bezier(.2,.9,.2,1) 280ms;
}

/* Active state: slide in to resting position */
.ar-hero-slider__slide.is-active .ar-hero__content{
  opacity: 1;
  transform: translateY(-10%);
}


/* ── Eyebrow / meta label ─────────────────────────────────── */

.ar-hero__eyebrow{
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  line-height: 1;
}


/* ─────────────────────────────────────────────────────────────
   SEGMENTED NAVIGATION RAIL
   ───────────────────────────────────────────────────────────── */

.ar-hero__rail{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-bottom: 44px;
  /* Prevent rail from intercepting pointer events on the hero itself */
  pointer-events: none;
}

.ar-hero__rail-inner{
  display: flex;
  align-items: flex-end;
  gap: 10px;
  /* Align left edge with hero content */
  padding-left: 10%;
  padding-right: 10%;
  pointer-events: auto;
}

/* Individual segment button */
.ar-hero__rail-seg{
  flex: 1;
  position: relative; /* anchor for the absolutely-positioned preview popup */
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: block;
  text-align: left;
}

/* Focus ring sits on the line bar for a cleaner look */
.ar-hero__rail-seg:focus{ outline: none; }
.ar-hero__rail-seg:focus-visible .ar-hero__rail-line{
  outline: 2px solid rgba(255,255,255,0.75);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ── Persistent segment label ─────────────────────────────────
   Sits directly above the progress bar on every segment.
   Shows the slide meta/eyebrow label text.
   Dims when inactive; brightens for the active slide and on hover.
   ─────────────────────────────────────────────────────────── */

.ar-hero__rail-label{
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 8px;
  /* opacity + transform let the label float up when the popup replaces it */
  transition: color 200ms ease, opacity 200ms ease, transform 200ms ease;
}

.ar-hero__rail-seg:hover .ar-hero__rail-label,
.ar-hero__rail-seg:focus-visible .ar-hero__rail-label{
  color: rgba(255,255,255,0.65);
}

.ar-hero__rail-seg.is-active .ar-hero__rail-label{
  color: rgba(255,255,255,0.90);
  font-weight: 600;
}

/* On hover: float the label up and fade it out so only the popup title shows.
   Prevents the same text appearing twice simultaneously. */
.ar-hero__rail-seg.has-preview .ar-hero__rail-label{
  opacity: 0;
  transform: translateY(-7px);
}


/* ── Preview popup ────────────────────────────────────────────
   Appears above the hovered/focused rail segment.
   Layout: label text on the LEFT, slide image thumbnail on the RIGHT.
   Horizontal card — image bleeds the full height of the card.
   ─────────────────────────────────────────────────────────── */

.ar-hero__rail-preview{
  position: absolute;
  bottom: calc(100% + 16px); /* float above the segment */
  left: 50%;
  transform: translateX(-50%) translateY(10px);

  /* Card shell */
  width: 260px;
  background: rgba(6, 16, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 4px;
  overflow: hidden; /* keeps thumbnail inside rounded corners */

  /* Side by side: label left — image right */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;

  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  user-select: none;
  z-index: 20;

  transition:
    opacity   220ms ease,
    transform 220ms ease;
}

/* Show on hover / focus of inactive segment */
.ar-hero__rail-seg.has-preview .ar-hero__rail-preview{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Never show for the currently active slide */
.ar-hero__rail-seg.is-active .ar-hero__rail-preview{
  display: none;
}

/* Edge alignment — first segment: anchor left */
.ar-hero__rail-seg:first-child .ar-hero__rail-preview{
  left: 0;
  transform: translateY(10px);
}
.ar-hero__rail-seg:first-child.has-preview .ar-hero__rail-preview{
  transform: translateY(0);
}

/* Edge alignment — last segment: anchor right */
.ar-hero__rail-seg:last-child .ar-hero__rail-preview{
  left: auto;
  right: 0;
  transform: translateY(10px);
}
.ar-hero__rail-seg:last-child.has-preview .ar-hero__rail-preview{
  transform: translateY(0);
}

/* Label — left panel of the card; vertically centred */
.ar-hero__rail-preview-label{
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  font-family: var(--ads-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  line-height: 1.35;
  white-space: normal; /* allow wrap so short labels stay readable */
  padding: 13px 14px;
}

/* Image — right panel, full card height, fixed width.
   src is injected as background-image via JS at init time. */
.ar-hero__rail-preview-img{
  display: block;
  width: 110px;
  flex-shrink: 0;
  align-self: stretch;   /* fill the card height driven by the label */
  min-height: 72px;
  background-color: rgba(0,0,0,0.30); /* placeholder while loading */
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}


/* ── Line track ─────────────────────────────────────────────── */

.ar-hero__rail-line{
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  transition: background 300ms ease;
}

.ar-hero__rail-seg:hover .ar-hero__rail-line,
.ar-hero__rail-seg:focus-visible .ar-hero__rail-line{
  background: rgba(255,255,255,0.38);
}


/* ── Fill (progress animation) ──────────────────────────────── */

.ar-hero__rail-fill{
  display: block;
  position: absolute;
  inset: 0;
  /* Aradel red → Sherpa Blue gradient — restrained, premium */
  background: linear-gradient(
    90deg,
    var(--ads-brand-red,  #C1000F),
    var(--ads-brand-blue, #01303A)
  );
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  /* Animation is applied only when .is-active is on the parent segment.
     The JS restart trick (animationName toggle) ensures it replays each cycle. */
}

.ar-hero__rail-seg.is-active .ar-hero__rail-fill{
  animation: arRailFill 7s linear forwards;
}

@keyframes arRailFill{
  from{ transform: scaleX(0); }
  to  { transform: scaleX(1); }
}


/* ── Reduced motion overrides ─────────────────────────────── */

@media (prefers-reduced-motion: reduce){

  .ar-hero-slider__slide{
    transition: none;
  }

  /* Content is immediately visible — no entry animation */
  .ar-hero--slider .ar-hero__content{
    opacity: 1 !important;
    transform: translateY(-10%) !important;
    transition: none !important;
  }

  /* Active fill stays solid at 100% — no animation */
  .ar-hero__rail-seg.is-active .ar-hero__rail-fill{
    animation: none;
    transform: scaleX(1);
  }

  /* Label: no transition — all state changes instant */
  .ar-hero__rail-label{
    transition: none;
  }
  /* Ensure the has-preview hide still applies without the animated float */
  .ar-hero__rail-seg.has-preview .ar-hero__rail-label{
    opacity: 0;
    transform: none;
  }

  /* Preview popup: no transition — appears instantly */
  .ar-hero__rail-preview{
    transition: none;
  }
  /* Ensure transform resets work without the transition */
  .ar-hero__rail-seg.has-preview .ar-hero__rail-preview{
    transform: translateX(-50%) translateY(0);
  }
  .ar-hero__rail-seg:first-child.has-preview .ar-hero__rail-preview,
  .ar-hero__rail-seg:last-child.has-preview .ar-hero__rail-preview{
    transform: translateY(0);
  }
}


/* ── Tablet (≤ 1024px) ────────────────────────────────────── */

@media (max-width: 1024px){

  .ar-hero--slider .ar-hero__content{
    /* Matches existing tablet override: left:8%, top:32%, max-width:560px */
    transform: translateY(calc(-10% + 16px)); /* entry stays consistent */
  }

  .ar-hero-slider__slide.is-active .ar-hero__content{
    transform: translateY(-10%);
  }

  .ar-hero__rail-inner{
    padding-left: 8%;
    padding-right: 8%;
  }
}


/* ── Mobile (≤ 768px) ─────────────────────────────────────── */

@media (max-width: 768px){

  /* Content: existing mobile rule sets left:36px, right:36px, top:32%
     We only need to adjust the transform values */
  .ar-hero--slider .ar-hero__content{
    transform: translateY(calc(-8% + 16px));
  }

  .ar-hero-slider__slide.is-active .ar-hero__content{
    transform: translateY(-8%);
  }

  .ar-hero__rail{
    padding-bottom: 28px;
  }

  .ar-hero__rail-inner{
    padding-left: 36px;
    padding-right: 36px;
    gap: 6px;
  }

  /* Hide preview popup on touch devices — hover is not available.
     The rail line alone communicates active state clearly on mobile. */
  .ar-hero__rail-preview{
    display: none !important;
  }

  /* Slightly thinner lines on mobile */
  .ar-hero__rail-line{
    height: 2px;
  }
}

