/* Hub hero — unified impartial landing surface for /jobs-and-services/.
   Consumes tokens.css directly; no :root overrides.
   Pattern: 3-line headline (third line in accent gradient) + verbs subtitle
   + hero image (side-by-side desktop / stacked mobile) + 3 equal door CTAs. */

/* Mobile search overlay base — services-responsive.css only styles
   `.mobile-search-expanded` inside its ≤767px media block, so without this it
   would paint as a stray block on desktop. Hidden here at all widths; the
   mobile media rule (loaded after this file) re-shows it with display:block. */
.mobile-search-expanded {
    display: none;
}

.hub-hero {
  position: relative;
  background: var(--white);
  /* Generous top padding so the first title line clears any header
     above with comfortable breathing room. Bottom is tighter since the
     doors handle their own margin-top. */
  padding: 4.5rem 0 2.5rem;
  overflow: hidden;
  /* If a deep-link arrives with a #hash target inside the hero, the browser
     should land below any header chrome rather than pinning to viewport top. */
  scroll-margin-top: 4rem;
}

/* Two subtle brand-accent blobs — one top-right, one bottom-left — low opacity
   so they never fight the content but give the white plane some depth. */
.hub-hero::before {
  content: '';
  position: absolute;
  top: -25%;
  right: -15%;
  width: 55%;
  height: 140%;
  background: radial-gradient(
    circle at center,
    rgba(26, 137, 23, 0.10) 0%,
    rgba(26, 137, 23, 0) 65%
  );
  pointer-events: none;
  z-index: 0;
}

.hub-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 45%;
  height: 80%;
  background: radial-gradient(
    circle at center,
    rgba(22, 160, 133, 0.08) 0%,
    rgba(22, 160, 133, 0) 65%
  );
  pointer-events: none;
  z-index: 0;
}

.hub-hero .container {
  position: relative;
  z-index: 1;
  /* Explicit horizontal padding overrides any cascade weirdness from the
     global .container (which depends on --spacing-md). Guarantees the
     headline + image + doors get breathing room from the viewport edges. */
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .hub-hero .container {
    padding-inline: 2rem;
  }
}

@media (min-width: 960px) {
  .hub-hero .container {
    padding-inline: 2.5rem;
  }
}

/* ===== Headline + image grid ===== */
.hub-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 640px) {
  .hub-hero {
    padding: 5.5rem 0 3rem;
  }
}

@media (min-width: 960px) {
  .hub-hero {
    padding: 7rem 0 4.5rem;
  }
  /* Text column gets ~65% — wide enough that the longest title phrase
     ("Three ways to hustle.") fits on one line at the clamp's upper bound. */
  .hub-hero-grid {
    grid-template-columns: 1.3fr 0.7fr;
    gap: 4rem;
  }
}

@media (min-width: 1280px) {
  .hub-hero {
    padding: 8rem 0 5rem;
  }
  .hub-hero-grid {
    gap: 5rem;
  }
}

/* ===== Text content ===== */
.hub-hero-content {
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease-out both;
}

.hub-hero-title {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: clamp(2.125rem, 4.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--gray-900);
  margin: 0 0 1.5rem;
}

.hub-hero-title .title-line {
  display: block;
}

/* Each phrase is its own intentional line. On desktop where there's room,
   forbid mid-line wrapping so e.g. "Three ways to hustle." doesn't break
   onto two lines. On mobile / tablet (≤959px), allow wrapping since the
   title scales down via clamp but viewport is narrower than the longest
   phrase at the lower clamp bound. */
@media (min-width: 960px) {
  .hub-hero-title .title-line {
    white-space: nowrap;
  }
}

/* Narrow phones: pull letter-spacing tighter so the three lines
   ("One platform." / "Three ways to hustle." / "Built for Cameroon.")
   don't crowd at the clamp's lower bound. */
@media (max-width: 480px) {
  .hub-hero-title {
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
  }
}

@media (min-width: 960px) {
  .hub-hero-title {
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
  }
}

.hub-hero-title .title-line {
  display: block;
}

.hub-hero-title .title-line.accent {
  background: linear-gradient(90deg, var(--primary-color) 0%, #16a085 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Small-phone fallback: solid color when gradient text legibility risks fading */
@media (max-width: 480px) {
  .hub-hero-title .title-line.accent {
    background: none;
    -webkit-text-fill-color: var(--primary-color);
    color: var(--primary-color);
  }
}

.hub-hero-subtitle {
  font-family: var(--font-primary);
  font-size: clamp(1.125rem, 2.1vw, 1.5rem);
  font-weight: 500;
  color: var(--gray-600);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.hub-hero-visual {
  animation: fadeInUp 0.7s ease-out both;
  animation-delay: 0.1s;
}

/* ===== Hero image =====
   Edges feather seamlessly into the hero's white background via a soft radial
   mask. Two-stop gradient keeps the subject crisp while the rectangular border
   dissolves. `-webkit-` prefix kept for Safari ≤16 + iOS Safari coverage. */
.hub-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hub-hero-image {
  width: 100%;
  max-width: 380px;
  /* Re-crop the 3:2 landscape source into a more portrait-leaning frame so
     the silhouette feels intentional, not "stock photo placed on page." The
     object-position favors the upper-middle where faces live. */
  aspect-ratio: 5 / 5;
  height: auto;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  border-radius: 2.75rem;
  /* Soft brand-tinted ambient glow — operates on the post-masked silhouette
     so there's no shadow rectangle. */
  filter: drop-shadow(0 18px 36px rgba(26, 137, 23, 0.14));
  /* Explicit-size ellipse sized in box-relative units. With X-radius 50% and
     Y-radius 58%, the gradient line ends exactly at the horizontal edges (50%)
     and slightly past the vertical edges (58%). The opaque core is held tight
     (45%) so the subject reads clean, then a hard accelerating fade dissolves
     the rectangle into transparent well before its boundary on every axis. */
  -webkit-mask-image: radial-gradient(
    ellipse 50% 58% at center,
    #000 0%,
    #000 45%,
    rgba(0, 0, 0, 0.45) 70%,
    rgba(0, 0, 0, 0.12) 88%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 50% 58% at center,
    #000 0%,
    #000 45%,
    rgba(0, 0, 0, 0.45) 70%,
    rgba(0, 0, 0, 0.12) 88%,
    transparent 100%
  );
}

@media (min-width: 640px) {
  .hub-hero-image {
    max-width: 480px;
  }
}

@media (min-width: 960px) {
  .hub-hero-visual {
    justify-content: flex-end;
  }
  .hub-hero-image {
    max-width: 560px;
  }
}

@media (min-width: 1280px) {
  .hub-hero-image {
    max-width: 620px;
  }
}

/* Door anchor targets: when a door's #strip-* link triggers anchor-scroll,
   land below any sticky chrome so the strip header isn't cut off. */
#strip-services,
#strip-jobs,
#strip-talent {
  scroll-margin-top: 5rem;
}

/* ===== Three equal-weight door CTAs ===== */
.hub-doors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 640px) {
  .hub-doors {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 960px) {
  .hub-doors {
    margin-top: 3.5rem;
    gap: 1.5rem;
  }
}

/* Compact horizontal media-object card: icon left (spans both rows),
   label + sub-label stacked right, arrow far right. Pattern distilled from
   Subframe / shadcn Item / Mobbin tile / Geist hover — calm, neutral, and
   visually identical across all three verticals (impartiality preserved). */
.hub-door {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.875rem;
  row-gap: 0.125rem;
  padding: 0.875rem 1rem;
  min-height: 80px;
  background: var(--white);
  border: 1px solid #eceef1;
  border-radius: 16px;
  /* 2-layer cool-tinted shadow — matches the marketplace card system. */
  box-shadow: 0 1px 2px hsl(220 25% 10% / 0.04), 0 2px 6px hsl(220 25% 10% / 0.05);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out both;
}

@media (min-width: 960px) {
  .hub-door {
    padding: 1rem 1.25rem;
    min-height: 96px;
    column-gap: 1rem;
  }
}

.hub-door:nth-child(1) { animation-delay: 0.15s; }
.hub-door:nth-child(2) { animation-delay: 0.25s; }
.hub-door:nth-child(3) { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  .hub-hero-content,
  .hub-hero-visual,
  .hub-door {
    animation: none;
  }
  .hub-door:hover {
    transform: none;
  }
}

.hub-door::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 137, 23, 0) 0%, rgba(26, 137, 23, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hub-door:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px hsl(220 25% 10% / 0.05), 0 8px 20px hsl(220 25% 10% / 0.08);
  transform: translateY(-2px);
}

.hub-door:hover::before {
  opacity: 1;
}

.hub-door:focus-visible {
  outline: 3px solid var(--primary-tint);
  outline-offset: 2px;
}

.door-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  border-radius: 0.625rem;
  background: var(--primary-tint);
  color: var(--primary-color);
  font-size: 1.125rem;
  transition: var(--transition);
}

@media (min-width: 960px) {
  .door-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
}

.hub-door:hover .door-icon {
  background: var(--primary-color);
  color: var(--white);
}

.door-label {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

@media (min-width: 960px) {
  .door-label {
    font-size: 1.0625rem;
  }
}

.door-sub {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 400;
  line-height: 1.3;
}

.door-arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--gray-300);
  font-size: 0.875rem;
  transition: var(--transition);
}

.hub-door:hover .door-arrow {
  color: var(--primary-color);
  transform: translateX(4px);
}

/* ===== Generic CTA section — 3-button row =====
   Replaces the single "Become a Pro" CTA. Three equal-weight buttons routing
   to each vertical's onboarding. Buttons stay primary-filled for affordance
   but smaller than the legacy hero CTA so 3-up doesn't dominate. */
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cta-actions .cta-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.cta-actions .cta-btn:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
}

.cta-actions .cta-btn i.fa-arrow-right {
  font-size: 0.8125rem;
  margin-left: auto;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.cta-actions .cta-btn:hover i.fa-arrow-right {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .cta-actions {
    flex-direction: column;
  }
  .cta-actions .cta-btn {
    width: 100%;
  }
}
