/* ==========================================================================
   JobReady Revamp: Hero Section ("The Bridge")
   Scoped under .jr-hero. No styles bleed into global bootstrap or style.css.
   ========================================================================== */

.jr-hero {
  position: relative;
  min-height: calc(100vh - 72px);
  padding: clamp(32px, 5vw, 64px) 1.5rem clamp(40px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--jr-paper);
  color: var(--jr-ink);
  transition: background-color var(--jr-d-2) var(--jr-ease-out),
              color var(--jr-d-2) var(--jr-ease-out);
}

/* Hero Stage: Encapsulates Arch, Wordmark, Road, Traveler, and Banks */
.jr-hero__stage {
  position: relative;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
}

/* Arch SVG */
.jr-hero__arch {
  width: 100%;
  max-width: 1000px;
  height: clamp(80px, 14vw, 150px);
  overflow: visible;
  display: block;
  margin-bottom: clamp(-10px, -1.5vw, -4px);
  z-index: 1;
}

#jrArch {
  fill: none;
  stroke: var(--jr-coral);
  stroke-width: 3px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

#jrHangers line {
  stroke: var(--jr-coral);
  stroke-width: 1.5px;
  stroke-dasharray: 2 1;
  opacity: 0.85;
  vector-effect: non-scaling-stroke;
}

/* Title & Wordmark (Outline + Fill overlay) */
.jr-hero__title {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  margin: 0 0 clamp(16px, 2.5vw, 28px) 0;
  padding: 0;
  line-height: 0.9;
  z-index: 2;
}

.jr-hero__word {
  grid-area: 1 / 1;
  font-family: var(--jr-font-display);
  font-size: var(--jr-fs-hero);
  font-weight: 800;
  font-variation-settings: "wdth" 100, "opsz" 96;
  letter-spacing: -0.025em;
  line-height: 0.9;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  text-align: center;
}

.jr-hero__word--outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--jr-ink);
  opacity: 0.35;
}

[data-theme="dark"] .jr-hero__word--outline {
  opacity: 0.45;
  -webkit-text-stroke: 2px var(--jr-ink);
}

.jr-hero__word--fill {
  color: var(--jr-ink);
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
}

/* Road Line */
.jr-hero__road-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 28px;
  margin-top: 4px;
  z-index: 3;
}

.jr-hero__road {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

#jrRoad {
  stroke: var(--jr-ink);
  stroke-width: 2px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.8;
}

/* Traveler "You" */
.jr-hero__traveller {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 4;
}

.jr-hero__tag {
  background: var(--jr-paper-2);
  color: var(--jr-ink);
  border: 1px solid var(--jr-line);
  font-family: var(--jr-font-text);
  font-size: var(--jr-fs-label);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--jr-r-1);
  margin-bottom: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: background-color var(--jr-d-1) var(--jr-ease-out),
              color var(--jr-d-1) var(--jr-ease-out);
}

.jr-hero__tag span {
  display: none;
}

.jr-hero__tag span.active {
  display: inline-block;
}

.jr-hero__dot {
  width: 14px;
  height: 14px;
  background-color: var(--jr-coral);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(240, 87, 54, 0.28);
}

/* Bank Labels: Degree & Direction */
.jr-hero__banks {
  width: 100%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding: 0 4px;
  font-family: var(--jr-font-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--jr-ink);
  z-index: 2;
}

.jr-hero__bank--right {
  position: relative;
  display: inline-block;
}

.jr-hero__bank--right .jr-direction-line {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--jr-coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--jr-d-2) var(--jr-ease-out);
}

.jr-hero__bank--right.is-reached .jr-direction-line {
  transform: scaleX(1);
}

/* Supporting Lede, Actions, and Roles */
.jr-hero__lede {
  max-width: 600px;
  margin: clamp(1.5rem, 3.5vw, 2.25rem) auto clamp(1.25rem, 2.5vw, 1.75rem);
  text-align: center;
  font-family: var(--jr-font-text);
  font-size: var(--jr-fs-lede);
  line-height: 1.5;
  color: var(--jr-steel);
  z-index: 2;
}

.jr-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  z-index: 2;
}

.jr-hero__actions .jr-btn--primary {
  min-width: 230px;
}

.jr-hero__roles {
  margin-top: 1.25rem;
  text-align: center;
  font-family: var(--jr-font-text);
  font-size: var(--jr-fs-small);
  color: var(--jr-steel);
  z-index: 2;
}

.jr-hero__roles .jr-link {
  margin-left: 0.5rem;
  font-weight: 600;
}

/* Replay hint for touch devices */
.jr-hero__replay-hint {
  display: none;
  font-size: 0.75rem;
  color: var(--jr-steel);
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* Graceful Degradation: when GSAP has not initialized or without JS */
html:not(.js-motion) .jr-hero__word--fill {
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
}

html:not(.js-motion) .jr-hero__traveller {
  left: 100% !important;
}

html:not(.js-motion) .jr-hero__tag span[data-stage="3"] {
  display: inline-block;
}

html:not(.js-motion) .jr-hero__bank--right .jr-direction-line {
  transform: scaleX(1);
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .jr-hero__word--fill {
    clip-path: inset(0 0 0 0) !important;
    -webkit-clip-path: inset(0 0 0 0) !important;
  }
  .jr-hero__traveller {
    left: 100% !important;
    transform: translate(-50%, -50%) !important;
  }
  .jr-hero__tag span {
    display: none !important;
  }
  .jr-hero__tag span[data-stage="3"] {
    display: inline-block !important;
  }
  .jr-hero__bank--right .jr-direction-line {
    transform: scaleX(1) !important;
  }
  .jr-hero__arch path,
  .jr-hero__arch line {
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mobile & Tablet Adaptations (< 992px) */
@media (max-width: 991.98px) {
  .jr-hero {
    min-height: auto;
    padding-top: clamp(36px, 7vw, 64px);
    padding-bottom: clamp(48px, 8vw, 72px);
  }

  .jr-hero__stage {
    cursor: pointer;
  }

  .jr-hero__replay-hint {
    display: block;
  }

  .jr-hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    gap: 1rem;
  }

  .jr-hero__actions .jr-btn--primary {
    width: 100%;
    height: 56px;
    font-size: 1.0625rem;
  }

  .jr-hero__arch {
    margin-bottom: -10px;
  }

  .jr-hero__tag {
    font-size: 0.75rem;
    padding: 2px 7px;
    margin-bottom: 5px;
  }

  .jr-hero__dot {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 4px rgba(240, 87, 54, 0.28);
  }
}
