/* Confiance Group — solution pages (Corporate, Workforce, Family Legacy). Figma: Corporate Solutions · Desktop 1440 */

/* ---------- hero ---------- */

.corp-hero {
  height: 798px;
  padding: 200px calc(120px + var(--edge)) 30px;
}
.corp-hero::before { background-image: url("../img/solutions/corporate/solution-corporate-hero-desktop.jpg"); }
.corp-hero::after {
  background:
    linear-gradient(0deg, rgb(6, 74, 61) 0.391%, rgba(0, 0, 0, 0) 42.857%),
    linear-gradient(180deg, rgba(8, 49, 42, 0.5) 25.94%, rgba(8, 49, 42, 0) 48.371%);
}
.corp-hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  white-space: nowrap;
}
.corp-hero-title h1 { display: flex; flex-direction: column; }
.corp-hero .hero-aside > p { width: 411px; min-width: 0; }

/* ---------- intro ---------- */

.corp-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  min-height: 742px;
  padding: 200px 120px;
  background: var(--bg-ink);
  color: var(--text-on-dark);
  text-align: center;
}
.corp-intro::before,
.corp-intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.corp-intro::before {
  left: 0;
  top: -9.75%;
  width: 102.62%;
  height: 119.45%;
  background: url("../img/shared/mission-bg.webp") 0 0 / 100% 100% no-repeat;
  translate: 0 var(--drift, 0%);
}
.corp-intro::after {
  inset: 0;
  background: linear-gradient(0deg, rgba(6, 74, 61, 0) 0%, #064a3d 89.889%);
}
.corp-intro h2 { width: 938px; max-width: 100%; }
.corp-intro p { width: 720px; max-width: 100%; }

/* ---------- services ---------- */

.corp-services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  padding-top: 100px;
  background: var(--bg-base);
}
.corp-services-head,
.others-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0 var(--gutter);
  text-align: center;
  color: var(--text-heading);
}
.corp-services-head h2 { white-space: nowrap; }

.services-track { width: 100%; }
.services-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 847px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}
.services-photo {
  position: absolute;
  z-index: -2;
  left: -36.9%;
  top: 0;
  width: 138.65%;
  height: 100%;
  object-fit: fill;
}
.services-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(181.92deg, rgba(10, 23, 29, 0) 63.925%, rgba(10, 23, 29, 0.8) 97.306%);
  pointer-events: none;
}
.services-list {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  padding: 0 calc(32px + var(--edge));
  color: var(--text-on-dark);
}
.service {
  flex: 1 0 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 12px;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}
.service.is-active { opacity: 1; }
.service:not(.is-active):hover { opacity: 0.75; }
.service-tab { text-align: left; white-space: nowrap; }
/* collapsible copy: grid rows animate from 0 to the copy's natural height */
.service-body {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -24px; /* cancels the flex gap while closed */
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1), margin-top 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.service.is-active .service-body { grid-template-rows: 1fr; margin-top: -18px; } /* 6px gap under the title */
.service-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.service-inner p { width: 395px; max-width: 100%; }
.service-line { width: 100%; height: 3px; }

.services-track.is-scrolly {
  height: calc(min(847px, 100vh) + (var(--count) - 1) * 70vh);
}
.services-track.is-scrolly .services-panel {
  position: sticky;
  top: max(0px, calc((100vh - 847px) / 2));
  height: min(847px, 100vh);
}

/* ---------- services (accordion: corporate.html) ----------
   Left: the three service lines, one open at a time (description, four
   example services, a CTA to the contact form). Right: a photo that follows
   the open line. */
.svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: stretch;
  width: 100%;
  padding: 0 calc(120px + var(--edge)) 120px;
}
.svc-list { display: flex; flex-direction: column; }
.svc-item { border-top: 2px solid var(--divider); }
.svc-item:first-child { border-top: 0; }
.svc-item h3 { margin: 0; }
.svc-q {
  width: 100%;
  padding: 24px 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: -0.13px;
  color: var(--text-heading);
  transition: color 0.2s ease;
}
.svc-item:first-child .svc-q { padding-top: 0; }
.svc-item:not(.is-open) .svc-q:hover { color: var(--bg-accent); }
.svc-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-item.is-open .svc-a { grid-template-rows: 1fr; }
.svc-a-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.svc-item.is-open .svc-a-inner { padding-bottom: 32px; }
.svc-a-inner > p { max-width: 480px; color: var(--text-body); }
.svc-examples { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.svc-examples li { position: relative; padding-left: 16px; font-size: 17px; line-height: 1.3; color: var(--text-body); }
.svc-examples li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bg-accent);
}
.svc-a-inner .btn { margin-top: 8px; }
.svc-q:focus-visible { outline: 2px solid var(--bg-accent); outline-offset: 4px; border-radius: 4px; }

.svc-media { position: relative; min-height: 560px; /* stretches to the list's height: a tall rectangle */ overflow: hidden; border-radius: 20px; background: var(--bg-mist); }
.svc-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  scale: 1.04;
  transition: opacity 0.5s ease, scale 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.svc-photo.is-on { opacity: 1; scale: 1; }

@media (max-width: 1024px) {
  .svc { grid-template-columns: 1fr; gap: 32px; padding: 0 var(--gutter) 80px; }
  .svc-media { order: -1; min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- coverage ---------- */

.coverage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 944px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 60px;
  padding: 150px calc(120px + var(--edge)) 40px;
  background: #0a171d;
}
.coverage::before,
.coverage::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.coverage::before {
  left: -0.01%;
  top: 17.22%;
  width: 113.14%;
  height: 123.15%;
  background: url("../img/shared/corp-coverage.jpg") 0 0 / 100% 100% no-repeat;
  translate: 0 var(--drift, 0%);
}
.coverage::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(102, 102, 102, 0) 69.331%, rgba(0, 0, 0, 0.8) 100%),
    linear-gradient(180deg, rgb(10, 23, 29) 16.525%, rgba(10, 23, 29, 0) 37.698%);
}
.coverage-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  color: var(--text-on-dark);
}
.coverage-head h2 { width: 666px; max-width: 100%; }

.markets { display: flex; align-items: flex-end; gap: 24px; }
.market {
  flex: 0 1 230px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: var(--bg-mist);
  opacity: 0.9;
  overflow: hidden;
  transition: flex-basis 0.5s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease, opacity 0.3s ease;
}
.market:not(.is-open):hover { opacity: 1; background: #ffffff; }
.market.is-open { flex: 0 0 380px; background: var(--bg-base); opacity: 1; }
.market-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  color: var(--text-heading);
  text-align: left;
  white-space: nowrap;
  transition: gap 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.market.is-open .market-toggle { gap: 16px; cursor: default; }
.market-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.market-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 32px; }
.market.is-open .market-detail { grid-template-rows: 1fr; opacity: 1; transition-delay: 0s, 0.15s; }
.market.is-open .market-detail { padding-top: 16px; }
.market-facts {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 16px;
  row-gap: 30px;
  overflow: hidden;
  white-space: nowrap;
}
.market-facts > div { display: flex; flex-direction: column; gap: 4px; }
.market-facts dt { color: var(--text-muted); }
.market-facts dd { color: var(--text-body); }


.flag { position: relative; display: block; width: 22px; height: 16px; flex-shrink: 0; }
.flag > img { width: 22px; height: 16px; }
.flag-my { overflow: hidden; border-radius: 2px; background: #ffffff; }
/* seven red stripes, each 7.18% tall and 14.36% apart, as in the Figma flag */
.flag-my-stripes {
  position: absolute;
  inset: 0 0 6.67% 0;
  background: repeating-linear-gradient(180deg, #af010d 0 7.18%, transparent 7.18% 14.36%);
}
.flag-my > img { position: absolute; width: auto; height: auto; }
.flag-my-canton { inset: 0 47.62% 42.53% 0; width: 52.38%; height: 57.47%; }
.flag-my-star { inset: 26.67% 61.9% 66.67% 33.33%; width: 4.77%; height: 6.66%; }
.flag-my-moon { inset: 13.33% 64.29% 53.33% 14.29%; width: 21.42%; height: 33.34%; }

/* ---------- other solutions ---------- */

.others {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding-top: 96px;
  background: var(--bg-base);
}
.others-head { gap: 20px; }
.others-head h2 { width: 948px; max-width: 100%; }
.others-row { display: flex; gap: 24px; padding: 0 calc(var(--gutter) + var(--edge)) 80px; } /* two inset cards, 24px apart */
/* two equal cards; on hover the photo eases in and a short description slides up under the title */
.other {
  position: relative;
  aspect-ratio: 1 / 1;
  isolation: isolate;
  overflow: hidden;
  flex: 1 0 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 50px 60px;
  color: var(--text-on-dark);
}
.other-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.other:hover .other-photo { scale: 1.05; }
.other::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 49, 42, 0) 51.149%, #0c1816 108.56%);
}
.other-text { display: flex; flex-direction: column; gap: 8px; }
.other-more {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 326px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.other:hover .other-more,
.other:focus-visible .other-more { max-height: 160px; opacity: 1; }
.other:focus-visible { outline-offset: -4px; }

/* ---------- faq ---------- */

.faq {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding: 120px calc(120px + var(--edge)) 100px;
  background: var(--bg-mist);
}
.faq > h2 { width: 324px; flex-shrink: 0; color: var(--text-heading); }
.faq-list { flex: 1 0 0; min-width: 1px; display: flex; flex-direction: column; gap: 24px; }
.faq-item { display: flex; flex-direction: column; }
.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  color: var(--text-accent-on-dark);
  text-align: left;
}
.faq-q .t-subheading { max-width: 622px; }
.faq-q:hover .t-subheading { color: var(--bg-deep); }
.faq-q .t-subheading { transition: color 0.2s ease; }
.faq-icon { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.faq-icon img {
  position: absolute;
  inset: 0;
  width: 36px;
  height: 36px;
  transition: opacity 0.3s ease, rotate 0.3s ease;
}
.faq-minus { opacity: 0; rotate: -90deg; }
.faq-item.is-open .faq-add { opacity: 0; rotate: 90deg; }
.faq-item.is-open .faq-minus { opacity: 1; rotate: 0deg; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-a > div { min-height: 0; overflow: hidden; }
.faq-a p { padding-top: 10px; color: var(--text-body); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-line { width: 100%; height: 1px; margin-top: 24px; }

/* ---------- actions ---------- */

.faq + .actions { padding-top: 80px; }

/* ---------- smaller screens ---------- */

@media (max-width: 1024px) {
  .corp-hero { height: auto; min-height: 720px; padding: 163px var(--gutter) 40px; }
  .corp-hero .hero-aside > p { width: auto; max-width: 480px; }
  .corp-intro { padding: 120px var(--gutter); }
  .corp-services-head h2 { white-space: normal; }
  .services-panel { height: 720px; padding: 24px 0; }
  .services-photo { left: 0; width: 100%; object-fit: cover; }
  .services-list { flex-direction: column; align-items: stretch; gap: 24px; padding: 0 var(--gutter); }
  .service-tab { white-space: normal; }
  .coverage { height: auto; padding: 100px var(--gutter) 40px; gap: 280px; }
  .markets { flex-wrap: wrap; align-items: stretch; }
  .market, .market.is-open { flex: 1 1 200px; }
  .market.is-open { flex-basis: 100%; }
  .others-row { flex-direction: column; height: auto; padding-bottom: 64px; }
  .other { flex: none; height: auto; padding: 32px 24px; }
  .other-more { max-height: none; opacity: 1; }
  .faq { flex-direction: column; gap: 40px; padding: 80px var(--gutter); }
}

@media (max-width: 640px) {
  .corp-hero-title { white-space: normal; }
  .market-facts { grid-template-columns: 1fr; white-space: normal; }
  .other-text h3 { white-space: normal; }
}

/* ---------- service catalogue drawer ---------- */

.catalogue {
  position: fixed;
  inset: 0 0 0 auto;
  width: clamp(640px, 50vw, 960px);
  max-width: 100vw;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg-base);
  color: var(--text-body);
  translate: 100% 0;
  transition: translate 0.55s cubic-bezier(0.22, 1, 0.36, 1), overlay 0.55s allow-discrete, display 0.55s allow-discrete;
}
.catalogue[open].is-in { translate: 0 0; }
.catalogue::backdrop {
  background: rgba(8, 49, 42, 0);
  backdrop-filter: blur(0);
  transition: background-color 0.45s ease, backdrop-filter 0.45s ease, overlay 0.45s allow-discrete, display 0.45s allow-discrete;
}
.catalogue.is-in::backdrop { background: rgba(8, 49, 42, 0.55); backdrop-filter: blur(4px); }
html.has-catalogue { overflow: hidden; }

.catalogue-sheet { display: flex; flex-direction: column; min-height: 100%; }
.catalogue-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 64px 24px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--divider);
}
.catalogue-top { display: flex; align-items: center; justify-content: space-between; }
.catalogue-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; transition: background-color 0.2s ease; }
.catalogue-close:hover { background: var(--bg-mist); }
.catalogue-close img { rotate: 45deg; transition: rotate 0.3s ease; }
.catalogue-close:hover img { rotate: 135deg; }

.catalogue-tabs { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-mist); align-self: flex-start; }
.catalogue-tabs[hidden] { display: none; } /* one service line: no tabs needed */
.catalogue-tab { position: relative; z-index: 1; padding: 8px 18px; border-radius: 999px; color: var(--text-muted); transition: color 0.3s ease; }
.catalogue-tab[aria-selected="true"] { color: var(--text-on-dark); }
.catalogue-tab-ink {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 999px;
  background: var(--bg-deep);
  transition: translate 0.4s cubic-bezier(0.22, 1, 0.36, 1), width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.catalogue-head h2 { color: var(--text-heading); margin-top: 8px; }
.catalogue-blurb { color: var(--text-body); max-width: 560px; }
.catalogue-count { color: var(--text-muted); }

.catalogue-list { flex: 1 0 auto; padding: 8px 64px 40px; counter-reset: svc; }
.catalogue-row { border-bottom: 1px solid var(--divider); }
.catalogue-row.is-entering { opacity: 0; translate: 24px 0; }
.catalogue-row {
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms), translate 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms);
}
.catalogue-q {
  display: grid;
  grid-template-columns: 40px 1fr 36px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 0;
  text-align: left;
}
.catalogue-num { font-size: 13px; letter-spacing: 0.6px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.catalogue-q .t-subheading { font-size: 21px; color: var(--text-heading); transition: color 0.2s ease, translate 0.3s ease; }
.catalogue-q:hover .t-subheading { color: var(--bg-accent); translate: 4px 0; }
.catalogue-row .faq-icon img { width: 28px; height: 28px; inset: 4px; }
.catalogue-row.is-open .faq-add { opacity: 0; rotate: 90deg; }
.catalogue-row.is-open .faq-minus { opacity: 1; rotate: 0deg; }
.catalogue-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.catalogue-row.is-open .catalogue-a { grid-template-rows: 1fr; }
.catalogue-a > div { min-height: 0; overflow: hidden; padding-left: 56px; }
.catalogue-a p { color: var(--text-body); max-width: 560px; }
.catalogue-ask {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 24px;
  color: var(--text-heading);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
.catalogue-ask img { width: 20px; height: 20px; transition: translate 0.2s ease; }
.catalogue-ask:hover img { translate: 3px 0; }

.catalogue-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 40px 64px 56px;
  background: var(--bg-mist);
}

@media (max-width: 640px) {
  .catalogue-head, .catalogue-list, .catalogue-foot { padding-left: 20px; padding-right: 20px; }
  .catalogue-a > div { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .catalogue, .catalogue::backdrop { transition: none; }
}

/* ---------- dark mode (follows the device setting; tokens flip in style.css) ---------- */

@media (prefers-color-scheme: dark) {
  /* coverage cards sit on the night-city photo: dark glass instead of white */
  .market { background: rgba(9, 23, 20, 0.92); border-color: rgba(255, 255, 255, 0.12); }
  .market:not(.is-open):hover { background: #1d3530; }
  .market.is-open { background: var(--bg-base); border-color: rgba(143, 224, 198, 0.35); }
  .flag-my { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }

  /* faq: the hover colour was dark green, which disappears on the dark page */
  .faq-q:hover .t-subheading { color: var(--text-heading); }
  .faq-line { opacity: 0.25; }

  /* service drawer */
  .catalogue { box-shadow: -24px 0 64px rgba(0, 0, 0, 0.5); }
  .catalogue.is-in::backdrop { background: rgba(0, 0, 0, 0.6); }
  .catalogue-close img { filter: brightness(1.4); }
  .catalogue-tab[aria-selected="true"] { color: #ffffff; }
  .catalogue-tab-ink { background: var(--bg-accent); }
  .catalogue-ask img { filter: brightness(0) invert(1); opacity: 0.85; }
  .catalogue-foot { border-top: 1px solid var(--divider); }

  /* the "Ready to grow" photo is light in both themes, so its text and button stay as designed */
}

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- services accordion: hierarchy pass ----------
   open item = deep-green title; closed items = quiet grey; summary > list; list in two columns; solid CTA */
.svc-item { position: relative; }
.svc-q { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.svc-item:not(.is-open) .svc-q { font-weight: 500; color: #6c6c6c; }
.svc-item:not(.is-open) .svc-q:hover { color: var(--text-heading); }
.svc-a-inner > .t-body { font-size: 20px; line-height: 1.4; color: var(--text-body); }
.svc-label {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #6c6c6c;
}
.svc-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  width: 100%;
  margin-top: -8px;
}
.svc-examples li { font-size: 15px; line-height: 1.35; color: #3d4f4a; }
.svc-examples li::before { width: 4px; height: 4px; top: 0.6em; }
.svc-a-inner .btn { margin-top: 16px; }
@media (max-width: 640px) {
  .svc-examples { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  .svc-examples li { color: var(--text-body); opacity: 0.85; }
  .svc-item:not(.is-open) .svc-q { color: var(--text-muted); }
}

/* + / − on each service line, smaller titles */
.svc-q { font-size: 22px; letter-spacing: -0.11px; }
.svc-icon { position: relative; flex: none; width: 28px; height: 28px; }
.svc-icon img { position: absolute; inset: 0; width: 28px; height: 28px; transition: opacity 0.3s ease, rotate 0.3s ease; }
.svc-minus { opacity: 0; rotate: -90deg; }
.svc-item.is-open .svc-plus { opacity: 0; rotate: 90deg; }
.svc-item.is-open .svc-minus { opacity: 1; rotate: 0deg; }

/* wide screens: the photo grows from its card into the full right half of the
   viewport (edge to edge, full height) as the section scrolls in, then stays
   pinned beside the list (js/solution.js drives --open 0 → 1) */
@media (min-width: 1025px) {
  .svc.is-bleed { align-items: start; padding-bottom: 0; }
  .svc.is-bleed .svc-list { padding: 120px 0; }
  .svc.is-bleed .svc-media {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
    margin-right: calc(-120px - var(--edge));
    border-radius: 0;
    background: none;
    clip-path: inset(
      calc((1 - var(--open, 0)) * 12vh)
      calc((1 - var(--open, 0)) * (120px + var(--edge)))
      calc((1 - var(--open, 0)) * 12vh)
      0
      round calc((1 - var(--open, 0)) * 20px)
    );
  }
}

/* corporate: section title sits at the top of the list column (left-aligned) */
.svc-head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 48px; color: var(--text-heading); }
.corp-services:has(.svc-head) { padding-top: 0; gap: 0; }
.svc.is-bleed .svc-list { padding: 120px 0; }
.svc-head + .svc-item { border-top: 0; }
.svc-head + .svc-item .svc-q { padding-top: 0; }
.svc:not(.is-bleed) .svc-list { padding-top: 100px; }
@media (max-width: 1024px) { .svc-head { margin-bottom: 32px; } .svc-head h2 { font-size: 34px; } .svc:not(.is-bleed) .svc-list { padding-top: 0; } .corp-services:has(.svc-head) { padding-top: 80px; } }
/* extra room above and below the list so the pinned photo has scroll distance */
.svc.is-bleed .svc-list { padding: 28vh 0 32vh; }

/* ---------- coverage: expanding market panels (corporate.html) ----------
   A row of tall photo panels; the open one (Malaysia first) widens and shows
   one figure, the others stay narrow and dimmed with the market name over
   them. Hover or click a panel to open it. */
.regions {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding: 100px 20px 120px;
  background: var(--bg-ink);
  color: #ffffff;
}
.regions-head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 0 calc(100px + var(--edge)); }
.regions-head h2 { color: #ffffff; }
.regions-row { display: flex; gap: 20px; height: 580px; }
.region {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  isolation: isolate;
  transition: flex-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.region.is-open { flex-grow: 3.2; }
.region-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.region:not(.is-open):hover .region-photo { scale: 1.04; }
.region::after { /* dim the closed panels; the open one keeps a bottom fade for the figure */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 49, 42, 0.55);
  transition: background-color 0.6s ease;
  pointer-events: none;
}
.region.is-open::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.7) 100%); }
.region-toggle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 24px;
  text-align: left;
  cursor: pointer;
}
.region.is-open .region-toggle { align-items: flex-start; cursor: default; }
.region-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px; /* fits the narrow panels; grows when open */
  line-height: 1.1;
  letter-spacing: -0.69px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  transition: font-size 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}
.region.is-open .region-name { color: #ffffff; font-size: 56px; }
.region-toggle:focus-visible { outline: 2px solid var(--bg-accent); outline-offset: -6px; }
.region-stat {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0;
  translate: 0 12px;
  transition: opacity 0.3s ease, translate 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.region.is-open .region-stat { opacity: 1; translate: 0 0; transition-delay: 0.25s; }
.region-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -1.28px;
}
.region-caption { margin-top: 8px; font-size: 17px; line-height: 1.3; color: rgba(255, 255, 255, 0.9); }

@media (max-width: 1024px) {
  .regions { padding: 80px var(--gutter); gap: 40px; }
  .regions-head { padding: 0; }
  .regions-row { flex-direction: column; height: auto; gap: 12px; }
  .region { flex: none; height: 96px; transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
  .region.is-open { height: 420px; }
  .region-name { font-size: 32px; }
  .region.is-open .region-name { font-size: 40px; }
  .region-num { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .region, .region-photo, .region::after, .region-name, .region-stat { transition: none; }
}

/* coverage panels: the open market takes most of the row, the others are slim strips */
.region.is-open { flex-grow: 6; }
.regions-row { gap: 12px; }
.region:not(.is-open) .region-toggle { padding: 24px 16px; }
.region:not(.is-open) .region-name {
  font-size: 26px;
  writing-mode: vertical-rl;
  rotate: 180deg; /* reads bottom-to-top along the slim strip */
}
.region.is-open .region-name { writing-mode: horizontal-tb; rotate: none; }
@media (max-width: 1024px) {
  .region:not(.is-open) .region-name { writing-mode: horizontal-tb; rotate: none; }
}

/* services photo: on wide screens the photo column runs to the viewport's right
   edge at any width (the right padding is dropped instead of using a negative
   margin, which resolved against the column on large screens) */
@media (min-width: 1025px) {
  .svc.is-bleed { padding-right: 0; }
  .svc.is-bleed .svc-media {
    margin-right: 0;
    clip-path: inset(
      calc((1 - var(--open, 0)) * 12vh)
      calc((1 - var(--open, 0)) * 120px)
      calc((1 - var(--open, 0)) * 12vh)
      0
      round calc((1 - var(--open, 0)) * 20px)
    );
  }
}

/* services content: everything under a service title in the body style (17px, body colour) */
.svc-a-inner > .t-body { font-size: 17px; line-height: 1.3; color: var(--text-body); }
.svc-examples li { font-size: 17px; line-height: 1.3; color: var(--text-body); opacity: 1; }

/* services review pass */
.svc-item:not(.is-open) .svc-q { font-weight: 600; color: var(--text-heading); } /* every title in the default style */
.svc-item:not(.is-open) .svc-q:hover { color: var(--text-heading); opacity: 0.8; }
.svc-a-inner > .t-body { max-width: none; width: 100%; }
.svc-label { /* body emphasis */
  margin-top: 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-body);
}
/* lists run down in columns of at most five: 9 items = 5 + 4, 5 items = one list */
.svc-examples {
  grid-template-columns: none;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-top: -4px;
}
.svc-examples:not(:has(li:nth-child(6))) { grid-auto-columns: 100%; }
@media (max-width: 640px) {
  .svc-examples { grid-template-rows: none; grid-auto-flow: row; }
}

/* services: no hover change on the titles; more room under the section title */
.svc-item:not(.is-open) .svc-q:hover { color: var(--text-heading); opacity: 1; }
.svc-head { margin-bottom: 80px; }

/* coverage: closed tiles darkened with 70% black (no tint) */
.region::after { background: rgba(0, 0, 0, 0.7); }

/* other solutions: rounded tiles, same 16px radius as the story and people photos */
.other { border-radius: 16px; }

/* other solutions: body-size description, and a deeper fade behind the text */
.other-more .t-caption { font-size: 17px; line-height: 1.3; }
.other::after {
  background: linear-gradient(180deg, rgba(12, 24, 22, 0) 35%, rgba(12, 24, 22, 0.55) 62%, rgba(12, 24, 22, 0.9) 100%);
}

/* coverage: closed-tile names 20% larger (26px -> 31px) */
.region:not(.is-open) .region-name { font-size: 31px; }
@media (max-width: 1024px) { .region:not(.is-open) .region-name { font-size: 32px; } }

/* other solutions: the description runs the full width of the card */
.other-more { max-width: none; width: 100%; }
.other-more .t-caption { align-self: stretch; width: auto; min-width: 0; max-width: none; }

/* a page with a single service line: a plain heading, no accordion */
.svc-title {
  margin: 0;
  padding-bottom: 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.11px;
  color: var(--text-heading);
}

/* each solution page uses its own photo in the hero (the one on its "other solutions" card) */
.wf-hero::before { background-image: url("../img/solutions/workforce/solution-workforce-hero-desktop.jpg"); }
.fl-hero::before { background-image: url("../img/solutions/family-legacy/solution-familylegacy-hero-desktop.jpg"); }

/* services lists: independent columns of up to five (a two-line item no longer
   stretches the matching row in the next column); longest names are listed
   first so the wrapping ones sit together in the first column */
.svc-examples {
  display: block;
  column-count: 1;
  column-gap: 24px;
  width: 100%;
}
.svc-examples:has(li:nth-child(6)) { column-count: 2; }
.svc-examples:has(li:nth-child(11)) { column-count: 3; }
.svc-examples li { break-inside: avoid; margin-bottom: 8px; }
.svc-examples li:nth-child(5n + 1):not(:first-child) { break-before: column; }
@media (max-width: 640px) {
  .svc-examples, .svc-examples:has(li:nth-child(6)), .svc-examples:has(li:nth-child(11)) { column-count: 1; }
  .svc-examples li:nth-child(5n + 1) { break-before: auto; }
}

/* services lists: up to six per column (7-12 items = two columns, 13+ = three) */
.svc-examples:has(li:nth-child(6)) { column-count: 1; }
.svc-examples:has(li:nth-child(7)) { column-count: 2; }
.svc-examples:has(li:nth-child(11)) { column-count: 2; }
.svc-examples:has(li:nth-child(13)) { column-count: 3; }
.svc-examples li:nth-child(5n + 1):not(:first-child) { break-before: auto; }
.svc-examples li:nth-child(6n + 1):not(:first-child) { break-before: column; }
@media (max-width: 640px) {
  .svc-examples:has(li:nth-child(7)), .svc-examples:has(li:nth-child(13)) { column-count: 1; }
  .svc-examples li:nth-child(6n + 1) { break-before: auto; }
}

/* FAQ: questions use the full width of the list (icon stays on the right) */
.faq-q .t-subheading { max-width: none; flex: 1 1 auto; min-width: 0; }
.faq-q .t-subheading { text-wrap: pretty; } /* fill the line; balance would shorten both lines */

/* mobile/tablet: service bullet lists are one single column (the forced column breaks pushed items off-screen) */
@media (max-width: 768px) {
  body .svc-examples { column-count: 1 !important; columns: auto !important; display: flex; flex-direction: column; }
  body .svc-examples li { break-before: auto !important; }
}

/* ---------- solution pages on phones (≤640px) ---------- */
@media (max-width: 640px) {
  /* intro: only as tall as its copy (it had a 742px minimum) */
  html body section.corp-intro:not(.about-story) { min-height: 0; height: auto; }

  /* services: 32px under the heading (was 80), 40px at the end of the section */
  html body .svc-head { margin-bottom: 32px; }
  html body section.corp-services { padding-bottom: 0; }

  /* other solutions: dots get 40px before the FAQ; cards show copy by default, no hover changes */
  html body .others { padding-bottom: 40px; }
  html body .others-row { padding-bottom: 0; }
  html body .other .other-more { max-height: none; opacity: 1; translate: none; }
  html body .other:hover .other-photo, html body .other:hover img { scale: 1; transform: none; }

  /* coverage (Corporate): swipeable cards, every card shows its name and figure */
  html body .regions-row.regions-carousel { height: auto; gap: 12px; }
  html body .regions-carousel > .region { flex: 0 0 calc((100vw - 2 * var(--gutter)) * 0.66); height: 330px; border-radius: 4px; }
  html body .regions-carousel .region::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.7) 100%); }
  html body .regions-carousel .region-toggle { align-items: flex-start; padding: 20px; cursor: default; }
  html body .regions-carousel .region-name { font-size: 32px; color: #ffffff; writing-mode: horizontal-tb; rotate: none; }
  html body .regions-carousel .region-stat { opacity: 1; translate: 0 0; left: 20px; right: 20px; bottom: 20px; padding-top: 16px; }
  html body .regions-carousel .region-num { font-size: 40px; line-height: 1.05; }
  html body .regions-carousel .region-caption { font-size: 12px; line-height: 1.4; }
}
@media (max-width: 640px) { html body .svc-item:last-child .svc-a-inner { padding-bottom: 0; } html body .svc-item:last-child .svc-a { padding-bottom: 0; } }
@media (max-width: 640px) {
  /* other solutions: no Explore button */
  html body .other .btn, html body .other-more .btn { display: none; }

  /* services: title → description 16px (24px padding left 25px) and no padding under the list */
  html body .svc-q[aria-expanded="true"], html body h3.svc-title { padding-bottom: 15px; }

  /* intro: back to a fuller block, copy centred in ~400px */
  html body section.corp-intro:not(.about-story) { min-height: 480px; justify-content: center; }
}
@media (max-width: 640px) {
  /* "What's included": list items sit close together */
  html body .svc-examples { gap: 6px; }
  html body .svc-examples li { margin: 0; }
}
@media (max-width: 640px) {
  /* service names (Corporate Services, Accounting & Financial Reporting…) 20px */
  html body .svc-q, html body .svc-q span:not(.svc-icon), html body h3.svc-title { font-size: 20px; line-height: 1.3; }
}

/* ---------- phones: services — heading first, each service's photo inside its own panel ---------- */
.svc-inline-photo { display: none; }
@media (max-width: 640px) {
  html body .svc-media { display: none; }
  html body .svc-head { margin-bottom: 16px; }
  html body .svc-inline-photo { display: block; width: 100%; aspect-ratio: 335 / 240; height: auto; object-fit: cover; border-radius: 16px; }
  html body .svc-a-inner { gap: 16px; }
}
@media (max-width: 640px) {
  /* a divider above the first service too, same as between services */
  html body .svc-head + .svc-item, html body .svc-list > .svc-item:first-of-type { border-top: 1px solid var(--content-divider, #c2d5d1); }
  html body .svc-list > .svc-item:first-of-type .svc-q, html body .svc-list > .svc-item:first-of-type h3.svc-title { padding-top: 24px; }
}
@media (max-width: 640px) { html body .svc-head + .svc-item .svc-q, html body .svc-head + .svc-item h3.svc-title { padding-top: 24px; } }

/* coverage: office fact + the local lead for this solution in that market (no client figures) */
.region-stat { pointer-events: none; }
.region.is-open .region-stat { pointer-events: auto; }
.region-num { font-size: 56px; letter-spacing: -1.1px; }
.region-lead {
  display: flex; align-items: center; gap: 14px;
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.region-lead-avatar {
  flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #8fe0c6;
  border: 1px solid rgba(143, 224, 198, 0.5);
}
.region-lead-avatar svg { width: 24px; height: 24px; }
.region-lead-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.region-lead-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.25; color: #ffffff; }
.region-lead-role { font-size: 14px; line-height: 1.3; color: rgba(255, 255, 255, 0.8); }
.region-lead-btn { flex: none; }
@media (max-width: 1024px) {
  .region-num { font-size: 40px; }
  .region.is-open { height: 460px; }
}
@media (max-width: 640px) {
  html body .regions-carousel > .region { height: 400px; }
  html body .regions-carousel .region-num { font-size: 30px; }
  html body .regions-carousel .region-stat { pointer-events: auto; }
  .region-lead { flex-wrap: wrap; gap: 10px 12px; margin-top: 14px; padding-top: 14px; }
  .region-lead-avatar { width: 40px; height: 40px; }
  .region-lead-btn { width: 100%; justify-content: center; }
}
/* coverage: no rule above the office fact */
html body .region-stat, html body .regions-carousel .region-stat { border-top: 0 !important; padding-top: 0; }
html body .regions-carousel .region-stat { padding-top: 0; }
/* coverage: stronger fade behind the fact + lead so text stays readable on bright photos */
.region.is-open::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.82) 100%); }
@media (max-width: 640px) {
  html body .regions-carousel .region::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.88) 100%); }
  html body .regions-carousel > .region { height: 430px; }
  .region-lead { flex-wrap: wrap; }
  .region-lead-avatar { width: 36px; height: 36px; }
  .region-lead-avatar svg { width: 18px; height: 18px; }
  .region-lead-id { flex: 1 1 0; min-width: 0; }
  .region-lead-name { font-size: 16px; }
  .region-lead-role { font-size: 13px; }
}
/* coverage: lead details removed — the card ends with the "Talk to our team" button */
.region-lead { justify-content: flex-start; }
@media (max-width: 640px) { .region-lead-btn { width: auto; } }
/* coverage: "Talk to our team" sits on the same row as the office fact */
.region-stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: end; }
.region-stat .region-num, .region-stat .region-caption { grid-column: 1; }
.region-stat .region-lead { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; padding: 0; border: 0; }
@media (max-width: 640px) {
  html body .regions-carousel .region-stat { grid-template-columns: 1fr; row-gap: 0; }
  html body .regions-carousel .region-stat .region-lead { grid-column: 1; grid-row: auto; margin-top: 16px; }
}

/* phones: dedicated portrait hero photos (≈921×1708). The photo spans the full width from the top
   and the hero is as tall as the photo; the headline, intro and buttons sit at the bottom over
   the floor, which fades into the hero green. */
@media (max-width: 640px) {
  html body .hero.corp-hero { height: auto; min-height: 185.5vw; justify-content: flex-end; padding-top: 120px; padding-bottom: 40px; background: rgb(6, 74, 61); }
  html body .corp-hero::before { inset: 0 0 auto 0; height: 185.5vw; background: url("../img/solutions/corporate/solution-corporate-hero-mobile.jpg?v=2") center top / 100% auto no-repeat; }
  html body .wf-hero::before { background-image: url("../img/solutions/workforce/solution-workforce-hero-mobile.jpg?v=1"); }
  html body .fl-hero::before { background-image: url("../img/solutions/family-legacy/solution-familylegacy-hero-mobile.jpg?v=1"); }
  html body .corp-hero::after {
    inset: 0 0 auto 0; height: 185.5vw;
    background:
      linear-gradient(180deg, rgba(8, 49, 42, 0.5) 0%, rgba(8, 49, 42, 0) 12%), /* keeps the header legible */
      linear-gradient(180deg, rgba(6, 74, 61, 0) 52%, rgba(6, 74, 61, 0.85) 72%, rgb(6, 74, 61) 90%);
  }
}

/* coverage: key contacts for this solution in the open market (replaces the office count) */
.region-label { font-size: 13px; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; color: #8fe0c6; }
.region-contacts { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }
.region-contacts li { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.25; color: #ffffff; white-space: normal; }
@media (max-width: 640px) {
  html body .regions-carousel .region-label { font-size: 11px; }
  html body .regions-carousel .region-contacts { gap: 2px; margin-top: 6px; }
  html body .regions-carousel .region-contacts li { font-size: 15px; }
}
