/* ==========================================================================
   SmartScale360 polish pass — loaded after launch-fixes.css on every page.
   Techniques borrowed from the reference set (Justworks, Niural, Remote
   CoWorker, Away, Liveops, Base44, Paycom, Uber, Kelly).
   ========================================================================== */

/* ---------- 6. Announcement bar ------------------------------------------ */
.announce {
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.announce p {
  margin: 0 auto;
  max-width: 1200px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  text-align: center;
}
.announce a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .4);
  text-underline-offset: 4px;
  white-space: nowrap;
}
.announce a:hover { text-decoration-color: #fff; }
.announce-short { display: none; }
.announce-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 640px) {
  .announce-text { display: none; }
  .announce p { font-size: 13px; padding: 8px 14px; gap: 4px 8px; }
  .announce-long { display: none; }
  .announce-short { display: inline; }
}

/* Sticky header: a soft shadow once the page scrolls (set by polish.js) */
html body header { transition: box-shadow .2s ease; }
html body header.is-scrolled { box-shadow: 0 6px 24px rgba(16, 44, 87, .08); }
body .site-nav a[aria-current="page"] { color: var(--blue); }

/* ---------- 9. Pill eyebrows --------------------------------------------- */
html body .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  padding: 6px 13px 6px 11px;
  border-radius: 999px;
  background: rgba(1, 81, 254, .08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.3;
}
html body .eyebrow::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
/* On dark or blue bands */
html body .case .eyebrow,
html body .page-band .eyebrow,
html body .cta-band .eyebrow,
html body .consult-final .eyebrow,
html body .franchise-close .eyebrow,
html body .story-media-band .eyebrow,
html body .testimonial-card-dark .eyebrow,
html body .booking-panel .eyebrow,
html body .consultation-band .eyebrow,
html body .videos .eyebrow {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
/* Long-form eyebrow on the stories page reads as a subheading, not a pill */
html body .story-feature-copy > .eyebrow {
  display: block; padding: 0; background: none; border-radius: 0;
}
html body .story-feature-copy > .eyebrow::before { display: none; }
/* Labels inside image cards read as plain text labels */
html body .home-media-card .eyebrow { padding: 0; background: none; border-radius: 0; }
html body .home-media-card .eyebrow::before { display: none; }
/* Card labels ("Industry 01") stay compact */
html body .role-directory-card .eyebrow { padding: 4px 10px; }

/* ---------- 3. Bolder hero type ----------------------------------------- */
html body .hero h1 {
  font-size: clamp(44px, 5.5vw, 76px) !important;
  line-height: 1.02;
  letter-spacing: -.045em;
}
html body .marketing-hero h1,
html body .franchise-hero h1,
html body .editorial-hero h1,
html body .stories-hero h1,
html body .consult-hero h1 {
  font-size: clamp(40px, 4.9vw, 66px) !important;
  line-height: 1.05;
  letter-spacing: -.04em;
}
html body .hero .lead,
html body .marketing-hero .lead,
html body .editorial-hero .lead,
html body .franchise-lead,
html body .consult-lead,
html body .stories-hero-aside > p {
  font-size: clamp(17px, 1.45vw, 19px);
  line-height: 1.6;
}
html body .hero .lead { max-width: 34em; }
html body .hero .actions { margin-top: 30px; }

/* ---------- 4. Ghost button --------------------------------------------- */
html body .button.ghost {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid #c9d6ea;
  box-shadow: none;
}
html body .button.ghost:hover {
  background: var(--pale);
  border-color: var(--blue);
  color: var(--blue);
}
html body .button { border-radius: 8px; font-size: 15px; }
@media (max-width: 520px) {
  html body .hero .actions,
  html body .marketing-hero .actions,
  html body .franchise-hero .actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  html body .actions > .button { width: 100%; }
}

/* ---------- 2. Social proof under the hero CTAs ------------------------- */
.hero-proof {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.hero-proof-rating {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}
.hero-proof-rating:hover strong { color: var(--blue); }
.hero-avatars { display: inline-flex; }
.hero-avatars > span {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  font: 700 13px/1 Poppins, Arial, sans-serif;
  color: #fff;
  background: var(--navy);
}
.hero-avatars > span + span { margin-left: -10px; }
.hero-avatars > span:nth-child(2) { background: var(--blue); }
.hero-avatars > span:nth-child(3) { background: #00a86b; }
.hero-proof-text { display: grid; gap: 1px; }
.hero-stars { color: #00a86b; letter-spacing: .08em; font-size: 15px; }
.hero-proof-vendor {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.hero-proof-vendor span { color: var(--blue); }

/* ---------- 7. Floating chips around the hero video ---------------------- */
html body .hero .hero-visual { padding-bottom: 0; }
.hero-chips { list-style: none; margin: 0; padding: 0; }
.hero-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px 11px 11px;
  background: #fff;
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(16, 44, 87, .14);
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
}
.hero-chip strong { display: block; font: 700 15px/1.25 Poppins, Arial, sans-serif; letter-spacing: -.01em; }
.hero-chip small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.chip-icon {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--blue);
}
.chip-b .chip-icon { background: #00a86b; }
.chip-c .chip-icon { background: var(--navy); font-size: 11px; }
.chip-a { top: 9%; right: -26px; }
.chip-b { top: 48%; left: -40px; }
.chip-c { bottom: 7%; right: -18px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-chip { animation: chip-float 6s ease-in-out infinite; }
  .chip-b { animation-delay: -2s; }
  .chip-c { animation-delay: -4s; }
  @keyframes chip-float { 50% { transform: translateY(-6px); } }
}
@media (max-width: 1100px) {
  .chip-a { right: -10px; }
  .chip-b { left: -16px; }
  .chip-c { right: -8px; }
}
@media (max-width: 900px) {
  .hero-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 14px;
  }
  .hero-chip {
    position: static; animation: none !important;
    padding: 7px 12px 7px 7px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(16, 44, 87, .06);
  }
  .hero-chip small { display: none; }
  .hero-chip strong { font-size: 13px; }
  .chip-icon { flex-basis: 24px; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; }
  .chip-c .chip-icon { font-size: 9px; }
}

/* ---------- 11. Tighter home flow --------------------------------------- */
html body .home-media.section { padding-top: clamp(48px, 5vw, 72px); }
html body .reviews-section.section { padding-top: clamp(48px, 5vw, 64px); }

/* ---------- 8. Role cards with skill chips ------------------------------ */
.role-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.role-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(16, 44, 87, .04);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.role-card:hover {
  border-color: #b8ccf0;
  box-shadow: 0 16px 36px rgba(16, 44, 87, .09);
  transform: translateY(-2px);
}
.role-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 26px; }
.role-card-num {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px; background: var(--pale); color: var(--blue);
  font: 700 14px/1 Poppins, Arial, sans-serif;
}
.role-card-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: #e8f7f0; color: #037a4f;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.role-card h3 {
  margin: 0 0 6px;
  font: 700 19px/1.25 Poppins, Arial, sans-serif;
  letter-spacing: -.02em;
  color: var(--ink);
}
.role-card > p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.role-chips { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.role-chips li {
  padding: 5px 10px; border-radius: 999px;
  background: #f3f6fb; border: 1px solid #e3e9f3;
  font-size: 13px; line-height: 1.3; color: var(--ink);
}
.role-card-link {
  margin-top: auto;
  font-size: 15px; font-weight: 600; color: var(--blue); text-decoration: none;
}
.role-card-link span { display: inline-block; transition: transform .2s; }
.role-card:hover .role-card-link span { transform: translateX(3px); }

@media (max-width: 1100px) { .role-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .role-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin: 0 -20px;
    padding: 4px 20px 14px;
    scrollbar-width: none;
  }
  .role-cards::-webkit-scrollbar { display: none; }
  .role-card { flex: 0 0 82%; scroll-snap-align: start; }
  .role-card:hover { transform: none; }
}

/* Mobile: swipeable review cards instead of a tall stack */
@media (max-width: 640px) {
  html body .review-cards {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; margin: 0 -20px; padding: 4px 20px 14px; scrollbar-width: none;
  }
  html body .review-cards::-webkit-scrollbar { display: none; }
  html body .review-cards > .review-card { flex: 0 0 84%; scroll-snap-align: start; }
}

/* ---------- 10. Large list rows with arrows ----------------------------- */
.list-rows { margin-top: 28px; border-top: 1px solid var(--line); }
.list-row {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr auto;
  align-items: center;
  gap: 8px 28px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background .2s, padding .2s;
}
.list-row:hover { background: var(--pale); padding-left: 16px; padding-right: 16px; }
.list-row-label { font: 700 clamp(19px, 1.8vw, 24px)/1.25 Poppins, Arial, sans-serif; letter-spacing: -.02em; }
.list-row-meta { color: var(--muted); font-size: 15px; }
.list-row-arrow {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid #c9d6ea; color: var(--blue);
  font-size: 18px; transition: background .2s, color .2s, border-color .2s;
}
.list-row:hover .list-row-arrow { background: var(--blue); border-color: var(--blue); color: #fff; }
.list-row-compact { grid-template-columns: 1fr auto; padding: 14px 0; margin-top: 14px; border-top: 1px solid var(--line); }
.list-row-compact .list-row-label { font-size: 17px; }
.list-row-compact .list-row-arrow { width: 36px; height: 36px; font-size: 15px; }
@media (max-width: 640px) {
  .list-row { grid-template-columns: 1fr auto; }
  .list-row-meta { grid-column: 1; grid-row: 2; font-size: 14px; }
  .list-row-arrow { grid-column: 2; grid-row: 1 / span 2; }
}

/* Why outsource: "Where teams start" tiles become rows */
html body .tile-grid.tile-rows {
  display: block;
  border-top: 1px solid var(--line);
}
html body .tile-rows .info-tile {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 8px 28px;
  padding: 24px 4px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  box-shadow: none;
  min-height: 0;
}
html body .tile-rows .info-tile h3 { margin: 0; font-size: clamp(19px, 1.8vw, 24px); }
html body .tile-rows .info-tile p { margin: 0; color: var(--muted); }
html body .tile-rows .info-tile > a {
  white-space: nowrap; padding: 10px 16px; border: 1.5px solid #c9d6ea; border-radius: 999px;
  text-decoration: none; font-weight: 600; margin: 0;
}
html body .tile-rows .info-tile > a:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 760px) {
  html body .tile-rows .info-tile { grid-template-columns: 44px 1fr; }
  html body .tile-rows .info-tile > p,
  html body .tile-rows .info-tile > a { grid-column: 2; justify-self: start; }
}

/* Resources: article cards become editorial list rows */
html body .article-grid {
  display: block;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
html body .article-grid .article-card {
  display: grid;
  grid-template-columns: minmax(150px, .5fr) minmax(0, 1.5fr);
  column-gap: 40px;
  align-items: start;
  min-height: 0;
  padding: 28px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: none;
}
html body .article-grid .article-card > .article-meta { grid-column: 1; grid-row: 1 / span 3; margin-top: 6px; }
html body .article-grid .article-card > h3,
html body .article-grid .article-card > p:not(.article-meta),
html body .article-grid .article-card > details { grid-column: 2; }
html body .article-grid .article-card > h3 { font-size: clamp(20px, 2vw, 26px); margin: 0 0 8px; }
html body .article-grid .article-card > p:not(.article-meta) { font-size: 16px; max-width: 62ch; }
@media (max-width: 760px) {
  html body .article-grid .article-card { grid-template-columns: 1fr; }
  html body .article-grid .article-card > * { grid-column: 1 !important; grid-row: auto !important; }
}

/* ---------- 14. Credential badge row ------------------------------------ */
.badge-row {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.badge-row li {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.3;
}
.badge-row strong { display: block; font: 700 15px/1.3 Poppins, Arial, sans-serif; color: var(--ink); }
.badge-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.badge-icon {
  flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; background: var(--pale); color: var(--blue); font-size: 17px;
}
.badge-row li:first-child .badge-icon { background: #e8f7f0; color: #00a86b; }
@media (max-width: 1000px) { .badge-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .badge-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .badge-row li { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
}

/* ---------- Subpage hero photos: caption becomes a floating chip -------- */
html body .marketing-hero-photo { overflow: visible; }
html body .marketing-hero-photo img { border-radius: 12px; }
html body .marketing-hero-photo::after { display: none; }
html body .marketing-hero-photo figcaption {
  left: -28px; right: auto; bottom: 26px;
  max-width: 300px;
  padding: 16px 20px;
  gap: 4px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(16, 44, 87, .14);
}
html body .marketing-hero-photo figcaption > span { color: var(--blue); }
html body .marketing-hero-photo figcaption strong { font-size: 18px; color: var(--ink); }
html body .marketing-hero-photo figcaption small { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  html body .marketing-hero-photo figcaption { left: 14px; right: 14px; bottom: -22px; max-width: none; }
  html body .marketing-hero-art { padding-bottom: 28px; }
}

/* ---------- 12. Sticky mobile CTA --------------------------------------- */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta {
    display: flex;
    position: fixed;
    z-index: 30;
    left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(1, 81, 254, .32);
    transform: translateY(160%);
    transition: transform .3s ease;
  }
  .mobile-cta.is-shown { transform: none; }
}

/* Utility in case a page lacks it */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
