/* Section heads, one owner for every page that uses .sec-head (Apple-style: eyebrow, headline, copy).
   .sec-head            variant C: one left headline, optional .sec-eyebrow on its own row above, optional .sec-link on its baseline (drops under on phones), .sec-sub copy below
   .sec-head--center    variant A: centered eyebrow, headline and wide copy
   .sec-head--left      variant B: the same three parts, left-aligned
   Also owns the FAQ list look and the Expand all button (js/faq-expand.js). Loaded after landing.css and product-page.css. */

.imsg {
  --sh-link: var(--imsg-blue-deep, #0062CC);
}
[data-theme="dark"] .imsg { --sh-link: var(--imsg-blue, #007AFF); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .imsg { --sh-link: var(--imsg-blue, #007AFF); } }

/* ---- variant C (default) ---- */
.sec-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 12px 32px; max-width: none; margin: 0 0 clamp(32px, 3.4vw, 48px); text-align: left;
}
.sec-head h2 {
  margin: 0; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.06; letter-spacing: -.035em;
  font-weight: 500; text-wrap: balance; color: var(--ink);
}
.sec-head .sec-sub {
  flex: 0 0 100%; margin: 0; max-width: 760px; text-wrap: pretty;
  font-size: clamp(17px, 1.3vw, 19px); line-height: 1.45; color: var(--ink-2);
}
.sec-key { color: var(--ink); }

.sec-eyebrow {
  margin: 0; font-size: clamp(15px, 1.3vw, 19px); line-height: 1.2; font-weight: 500;
  color: var(--ink); letter-spacing: -.01em;
}

/* variant C eyebrow: its own full-width row, 8px above the headline like A and B (row gap is 12px).
   Variants A and B are columns, where flex-basis would set a height, so they are excluded. */
.sec-head:not(.sec-head--center):not(.sec-head--left) > .sec-eyebrow { flex: 0 0 100%; margin-bottom: -4px; }

/* ---- variants A and B: eyebrow, bigger headline, wide copy ---- */
.sec-head--center, .sec-head--left { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.sec-head--center h2, .sec-head--left h2 { font-size: clamp(34px, 4.2vw, 60px); margin-top: 8px; }
.sec-head--center .sec-eyebrow + h2, .sec-head--left .sec-eyebrow + h2 { margin-top: 8px; }
.sec-head--center h2:first-child, .sec-head--left h2:first-child { margin-top: 0; }
.sec-head--center .sec-sub, .sec-head--left .sec-sub { flex: none; margin-top: clamp(10px, 1.1vw, 16px); }
.sec-head--center { align-items: center; text-align: center; max-width: 820px; margin-inline: auto; margin-bottom: clamp(48px, 6vw, 88px); }
.sec-head--center h2 { max-width: 11em; }
.sec-head--center .sec-sub { max-width: 720px; margin-inline: auto; }
.sec-head--left { align-items: flex-start; margin-bottom: clamp(48px, 6vw, 88px); }

/* ---- the small link at the right of a variant C head ---- */
.sec-link {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: clamp(15px, 1.2vw, 17px); line-height: 1.3; color: var(--sh-link); text-decoration: none;
}
.imsg .sec-link { color: var(--sh-link); } /* beats the site-wide .imsg a colour */
.sec-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sec-link:active { opacity: .6; }
.sec-link:focus-visible, .faq-expand:focus-visible { outline: 2px solid var(--sh-link); outline-offset: 3px; border-radius: 4px; }
.sec-link-arrow { transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
@media (hover: hover) { .sec-link:hover .sec-link-arrow { transform: translateX(3px); } }

/* ---- homepage family: section rhythm for the heads above (subpages keep their own) ---- */
.imsg:not(.pg) section:is(.imsg-cases, .imsg-pricing, .imsg-support, .imsg-features, .imsg-faq, .imsg-impl) {
  padding-block: clamp(96px, 11vw, 160px);
}

/* ---- hero eyebrow and lede, same type as a head ---- */
.imsg-hero .sec-eyebrow { margin-bottom: 14px; }
.imsg-hero .hero-lede {
  margin: 22px 0 0; max-width: 34ch; text-align: left; text-wrap: pretty;
  font-size: clamp(17px, 1.3vw, 19px); line-height: 1.45; color: var(--ink-2);
}
@media (max-width: 900px) {
  .hero-with-sim .sec-eyebrow { order: 0; text-align: center; margin: 0 auto -4px; }
  .hero-with-sim .hero-lede { order: 1; text-align: center; margin: 4px auto 0; }
}

/* ---- FAQ: full-width rows with dividers and right chevrons, Expand all above ---- */
.imsg .faq-layout { display: block; }
.imsg .faq-list { max-width: none; margin: 0; border-top: 0; }
.imsg .faq-item { border-bottom: 1px solid var(--hairline); }
.imsg .faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: pointer; list-style: none;
  padding: clamp(18px, 1.9vw, 26px) 2px; font-size: clamp(18px, 1.7vw, 24px); font-weight: 400;
  letter-spacing: -.015em; line-height: 1.3; color: var(--ink);
}
.imsg .faq-question::-webkit-details-marker { display: none; }
.imsg .faq-chevron { width: 24px; height: 24px; }
.faq-tools { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.faq-expand {
  background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15px; color: var(--sh-link); cursor: pointer;
}
.faq-expand:hover { text-decoration: underline; text-underline-offset: 3px; }
.faq-expand:active { opacity: .6; }
@media (max-width: 560px) {
  .imsg .faq-question { gap: 16px; padding: 16px 0; }
  .imsg .faq-chevron { width: 20px; height: 20px; }
}
