/*
 * Integrations page styles. Reuses .sec-hero, .sec-section, .sec-tri-grid,
 * and .sec-card from security.css. Only adds a few page-specific tokens.
 */

/* Format chip lists -- compact, scannable. Used inside each .sec-card. */
.intg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}
.intg-chips li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-mono, "SFMono-Regular", Menlo, Consolas, monospace);
}
.intg-chips-muted li {
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
}

/* Status pills on cards (shipped / gated OFF / planned). */
.intg-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: middle;
  font-weight: 600;
}
.intg-status-shipped {
  background: rgba(131, 191, 79, 0.16);
  color: #b7d99a;
  border: 1px solid rgba(131, 191, 79, 0.32);
}
.intg-status-gated {
  background: rgba(224, 182, 58, 0.14);
  color: #e6cf85;
  border: 1px solid rgba(224, 182, 58, 0.34);
}
.intg-status-planned {
  background: rgba(90, 135, 153, 0.16);
  color: #a8c4d2;
  border: 1px solid rgba(90, 135, 153, 0.34);
}

/* Enterprise software subheads (Shipped / Roadmap split). */
.intg-subhead {
  max-width: 1080px;
  margin: 1.4rem auto 0.8rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #e0e9ee;
}
.intg-subhead-roadmap {
  margin-top: 2.4rem;
  color: #a8c4d2;
}

/* Provider grid -- two columns on wide, one on narrow. */
.intg-provider-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}
.intg-provider {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.4rem 1.3rem;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}
.intg-provider h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.intg-provider p {
  color: var(--ink-muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Air-gap callout band -- mirrors security page tinted band tone. */
.intg-callout {
  max-width: 980px;
  margin: 2.2rem auto 0;
  padding: 1.6rem 1.5rem;
  background: rgba(239, 78, 80, 0.06);
  border: 1px solid rgba(239, 78, 80, 0.22);
  border-left: 3px solid rgba(239, 78, 80, 0.55);
  border-radius: 10px;
}
.intg-callout h3 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: 1rem;
}
.intg-callout p {
  color: var(--ink-muted);
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Honest-scope footnote -- italicised, smaller. */
.intg-honest {
  max-width: 880px;
  margin: 1.6rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.6;
}

/* ---------------------------------------------------------------
   Collapsible sections -- click an h2 to fold / unfold a section.
   Pure HTML5 (details/summary), no JavaScript needed for the core
   behaviour. The Expand-all / Collapse-all pair is JS-augmented but
   degrades gracefully (without JS the buttons just stay inert and
   per-section toggles still work).
   --------------------------------------------------------------- */
.sec-collapse { display: block; }

.sec-summary {
  /* Native disclosure marker off; we draw our own. */
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------
   2-column grid for collapsible sections — when sections are
   closed they pack two-per-row so six summaries fit on screen at
   once. When the user opens a section, that section auto-spans
   both columns so the body content still has the full width to
   work with. The grid only covers the disclosure sections; the
   hero, the Expand/Collapse toolbar, and the bottom CTA stay
   outside in normal flow.
   --------------------------------------------------------------- */
.intg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  grid-auto-flow: dense;
}
.intg-grid > .sec-section {
  /* Override the page-wide .section padding (92px top+bottom is
     too generous when sections are packed two-per-row in compact
     disclosure mode). */
  padding: 28px 24px;
  margin: 0;
  width: auto;
}
/* When a section is opened, span both columns so the body content
   has the full reading width. `:has()` is widely supported in
   modern Chrome/Safari/Firefox (≥2023). On older engines the
   grid simply degrades to all-half-width which is still legible. */
.intg-grid > .sec-section:has(details[open]) {
  grid-column: 1 / -1;
  padding-top: 56px;
  padding-bottom: 56px;
}
@media (max-width: 940px) {
  /* On phones / tablets, fall back to single-column flow so
     summaries stay tappable and titles don't wrap awkwardly. */
  .intg-grid { grid-template-columns: 1fr; }
  .intg-grid > .sec-section { padding: 36px 16px; }
}
.sec-summary::-webkit-details-marker { display: none; }
.sec-summary::marker { content: ""; }

.sec-summary h2 {
  margin: 0;
  flex: 1 1 auto;
}

.sec-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.85rem;
  height: 0.85rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform 180ms ease;
  opacity: 0.55;
  margin-right: 0.4rem;
}
details[open] > .sec-summary::after {
  transform: rotate(-135deg);
  opacity: 0.8;
}
.sec-summary:hover::after,
.sec-summary:focus-visible::after {
  opacity: 1;
}
.sec-summary:focus-visible {
  outline: 2px solid rgba(120, 180, 220, 0.55);
  outline-offset: 4px;
  border-radius: 6px;
}
.sec-summary:hover h2 {
  color: var(--ink-bright, #ffffff);
}

/* Expand-all / Collapse-all controls under the hero. */
.sec-collapse-controls {
  max-width: 1080px;
  margin: -0.4rem auto 1.4rem;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.sec-collapse-controls button {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.sec-collapse-controls button:hover,
.sec-collapse-controls button:focus-visible {
  color: var(--ink, #f0f4f7);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}
