/* ============================================================
   Integrations service detail page styles.
   Source: /docs/mockups/integrations.html.

   Fourth of seven service detail pages. Patterns shared with
   earlier service pages live in components/:
     - components/svc-hero.css           (hero + what-card)
     - components/cred-strip.css         (credibility strip)
     - components/use-cases.css          (use case grid)
     - components/svc-process.css        (process strip)
     - components/case-study.css         (3-stat case study)
     - components/related-services.css   (lifted on this page —
                                          2-up rail; second use
                                          after Implementation)

   What stays page-specific:
   - .arch-section + .arch-diagram   Hub-and-spoke architecture
                                     diagram on tinted-light with
                                     light-gray topo callback.
                                     Inline SVG is a working
                                     concept; the .arch-diagram
                                     container can swap in a
                                     single <img> later.
   - .mech-section + .mech-row +
     .mech-callout                   3-row stack of integration
                                     mechanisms (Layer 1/2/3) with
                                     alternating accent on the
                                     left border, plus a
                                     "combine layers" callout.
   - .beyond-section + .beyond-card  2-col layout; narrative on
                                     the left and three "more
                                     than just syncing" cards on
                                     the right.
   - .faq-section + .faq-item        Implementation's bordered-
                                     card + (+/−) accordion.
                                     Divergent from Creator/
                                     Portals' borderless-row +
                                     chevron treatment. Hold both
                                     until reconciliation.
   ============================================================ */

/* === ARCHITECTURE (page-specific) === */

.arch-section {
  background: var(--bg-light-2);
  position: relative;
  overflow: hidden;
}
.arch-topo {
  position: absolute;
  inset: 0;
  background-image: var(--topo-light-gray);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}
.arch-section .container { position: relative; z-index: 2; }

.arch-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.arch-head .eyebrow {
  color: var(--orange);
  margin-bottom: 18px;
  display: block;
}
.arch-head h2 {
  font-size: 38px;
  color: var(--text-dark);
  margin-bottom: 18px;
  line-height: 1.15;
}
.arch-head p {
  font-size: 17px;
  color: var(--text-dark-2);
  line-height: 1.6;
}

.arch-diagram {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card-lg);
  padding: 36px 32px 28px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  max-width: 1000px;
  margin: 0 auto;
}
.arch-diagram svg,
.arch-diagram img {
  width: 100%;
  height: auto;
  display: block;
}
.arch-caption {
  text-align: center;
  font-size: 14px;
  color: var(--text-dark-3);
  margin-top: 22px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Diagram inline-SVG styles. Becomes dead code when the SVG
   is replaced by an <img>; kept colocated with .arch-diagram. */
.dg-pill {
  fill: #fff;
  stroke: #DC734C;
  stroke-opacity: 0.35;
  stroke-width: 1;
}
.dg-pill-text text {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: var(--weight-medium);
  fill: var(--text-dark);
}
.dg-ext-text text {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: var(--weight-medium);
  fill: var(--text-dark);
}
.dg-axis-orange {
  font-size: 10px;
  fill: var(--orange);
  letter-spacing: 0.2em;
  font-weight: var(--weight-medium);
}
.dg-axis-blue {
  font-size: 10px;
  fill: var(--blue);
  letter-spacing: 0.16em;
}
.dg-axis-mute {
  font-size: 10px;
  fill: var(--text-dark);
  opacity: 0.5;
  letter-spacing: 0.2em;
}
.dg-arrows line {
  stroke: #94a3b8;
  stroke-width: 1.2;
  fill: none;
  opacity: 0.7;
}

/* === MECHANISMS (page-specific) === */

.mech-section { background: var(--bg-light); }

.mech-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1000px;
  margin: 0 auto;
}
.mech-row {
  display: grid;
  grid-template-columns: 220px 1fr 90px;
  gap: 32px;
  align-items: center;
  padding: 26px 28px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-card);
  transition: background 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}
.mech-row:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.18);
}
.mech-row--blue { border-left-color: var(--blue); }
.mech-row--blue-bright { border-left-color: var(--blue-bright); }
.mech-row--orange { border-left-color: var(--orange); }

.mech-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mech-label-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: var(--weight-medium);
  color: var(--blue);
}
.mech-row--blue-bright .mech-label-tag { color: var(--blue-bright); }
.mech-row--orange .mech-label-tag { color: var(--orange); }
.mech-label-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-h3);
  color: var(--text-dark);
  line-height: 1.25;
}

.mech-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dark-2);
}

.mech-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  text-align: right;
}
.mech-meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dark-3);
  font-weight: var(--weight-medium);
}
.mech-meta-value {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-dark);
  font-weight: var(--weight-medium);
}

.mech-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  max-width: 1000px;
  margin: 28px auto 0;
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(220, 115, 76, 0.07) 0%, rgba(220, 115, 76, 0.02) 100%);
  border: 1px solid rgba(220, 115, 76, 0.22);
  border-radius: var(--radius-card-lg);
}
.mech-callout-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(220, 115, 76, 0.16);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mech-callout-icon svg { width: 18px; height: 18px; }
.mech-callout-text h3 {
  font-size: 17px;
  color: var(--text-dark);
  margin-bottom: 6px;
  letter-spacing: var(--tracking-h3);
}
.mech-callout-text p {
  font-size: 14.5px;
  color: var(--text-dark-2);
  line-height: 1.6;
}

/* === BEYOND SYNCING (page-specific) === */

.beyond-section { background: var(--bg-light-2); }

.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.beyond-eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
}
.beyond-left h2 {
  font-size: 32px;
  color: var(--text-dark);
  line-height: 1.15;
  margin-bottom: 18px;
}
.beyond-left p {
  font-size: 16px;
  color: var(--text-dark-2);
  line-height: 1.6;
  margin-bottom: 14px;
}
.beyond-left p:last-child { margin-bottom: 0; }

.beyond-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.beyond-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card-lg);
  padding: 24px 26px;
}
.beyond-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--orange);
  font-weight: var(--weight-medium);
  margin-bottom: 10px;
}
.beyond-card:nth-child(even) .beyond-card-label { color: var(--blue); }
.beyond-card h3 {
  font-size: 17px;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: var(--tracking-h3);
}
.beyond-card p {
  font-size: 14px;
  color: var(--text-dark-2);
  line-height: 1.6;
}

/* === FAQ (page-specific; matches Implementation) === */

.faq-section { padding-top: var(--section-pad-y); padding-bottom: var(--section-pad-y); }

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.faq-intro .eyebrow {
  color: var(--blue);
  margin-bottom: 18px;
  display: block;
}
.faq-intro h2 {
  font-size: 36px;
  color: var(--text-dark);
  margin-bottom: 18px;
  line-height: 1.15;
}
.faq-intro p {
  font-size: 16px;
  color: var(--text-dark-2);
  line-height: 1.6;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  transition: background 0.2s ease;
}
.faq-item:hover { background: rgba(255, 255, 255, 0.7); }

.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: var(--weight-medium);
  color: var(--text-dark);
}

.faq-toggle {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s var(--ease-out);
}
.faq-toggle::before, .faq-toggle::after {
  content: "";
  position: absolute;
  background: var(--text-dark-2);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
.faq-toggle::before {
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1.5px;
  transform: translateY(-50%);
}
.faq-toggle::after {
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1.5px;
  transform: translateX(-50%);
}
.faq-item[open] .faq-toggle::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-a {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--text-dark-2);
  line-height: 1.65;
}
.faq-a p + p { margin-top: 12px; }

/* === RESPONSIVE === */

@media (max-width: 980px) {
  .arch-head h2 { font-size: 30px; }
  .mech-row { grid-template-columns: 1fr; gap: 12px; }
  .mech-meta { align-items: flex-start; text-align: left; flex-direction: row; gap: 8px; }
  .beyond-grid { grid-template-columns: 1fr; gap: 36px; }
  .faq-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  .arch-head h2 { font-size: 26px; }
  .arch-diagram { padding: 22px 18px 18px; }
  .mech-row { padding: 22px 22px 22px 24px; }
  .mech-callout { padding: 22px 22px; grid-template-columns: 1fr; }
  .beyond-left h2 { font-size: 26px; }
  .faq-intro h2 { font-size: 28px; }
}
