/* =====================================================================
   /integrations — page-specific styles (D-07: linked ONLY on /integrations,
   kept out of the shared styles.css). Built on the site's :root tokens from
   styles.css (fonts, spacing, radii, colours) so it feels native. Headings
   use Inter Tight via --serif (D-05 — the prototype's display font is dropped;
   no 4th font family). Faithful to docs/design-archive/integrations/
   integrations-rendered.png (D-04), reconciled to the shared shell.
   ===================================================================== */

/* Simpro brand accent — same hue as the site --accent, pinned literally so the
   Simpro wordmark reads on-brand independent of any future token change. */
.i-simpro { color: #3F74BE; }

/* ---------- HERO ---------- */
.i-hero { padding: 66px 0 58px; }
.i-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.i-hero-copy h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(38px, 5.4vw, 62px);
  margin: 16px 0 0;
}
.i-hero-sub {
  margin: 20px 0 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
}
.i-hero-sub em { font-style: normal; font-weight: 600; color: var(--ink); }
.i-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.i-hero-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--paper-page);
  box-shadow: var(--shadow-card);
}
.i-hero-badge { width: auto; max-width: 220px; height: auto; }
.i-hero-stat { padding-top: 20px; border-top: 1px solid var(--line); }
.i-hero-stat-num {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  color: #3F74BE;
}
.i-hero-stat-label { display: block; margin-top: 8px; font-size: 15px; color: var(--ink-3); }
.i-hero-stat-label strong { color: var(--ink); font-weight: 600; }

/* ---------- SECTION HEADS ---------- */
.i-sec-head { max-width: 720px; margin: 0 0 34px; }
.i-sec-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 14px 0 0;
}
.i-sec-sub { margin: 14px 0 0; font-size: 17px; color: var(--ink-2); }
.i-sec-sub strong { font-weight: 600; color: var(--ink); }

/* ---------- SECTION 2: ONBOARDING SYNC ---------- */
.i-sync { padding: 20px 0 76px; }
.i-sync-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 34px;
  align-items: start;
}

.i-sync-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.i-sync-check { color: var(--signal); font-weight: 700; }
.i-sync-total { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.i-sync-total b { color: var(--ink); }

.i-sync-rows { display: flex; flex-direction: column; }
.i-sync-row {
  display: grid;
  grid-template-columns: 150px 1fr auto auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  transition: background .18s var(--easing), transform .18s var(--easing);
}
.i-sync-row:hover,
.i-sync-row.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--paper-page));
}
.i-sync-row.is-active { transform: translateX(3px); }
.i-sync-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.i-row-name { font-family: var(--serif); font-weight: 600; font-size: 17px; }
.i-row-bar {
  height: 7px;
  border-radius: var(--r-full);
  background: var(--paper-3);
  overflow: hidden;
}
.i-row-fill {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--accent);
}
.i-row-count { font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.i-row-pct { font-family: var(--mono); font-size: 12px; color: var(--ink-3); min-width: 3.2em; text-align: right; }

/* Right sticky dark explainer panel — updated by integrations.js on hover/tap */
.i-sync-panel,
[data-sync-panel] {
  position: sticky;
  top: 100px;
  padding: 30px 28px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-card);
}
.i-panel-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.i-panel-name { color: #82A6CE; }
.i-panel-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 14px 0 0;
}
.i-panel-body { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: color-mix(in srgb, var(--paper) 82%, transparent); }

/* ---------- SECTION 4: BI-DIRECTIONAL LOOP (screen-recording placeholder) ---------- */
.i-loop { padding: 8px 0 90px; }
.i-loop-media {
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-page);
  box-shadow: var(--shadow-card);
}
.i-loop-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-3);
  background: var(--paper-2);
}
.i-loop-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.i-loop-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 8.5;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, color-mix(in srgb, var(--ink) 3%, transparent) 22px 44px),
    var(--paper-3);
}
.i-loop-play {
  display: grid;
  place-items: center;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-card);
}
.i-loop-play svg { width: 30px; height: 30px; margin-left: 4px; }
.i-loop-cap {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
}
/* CONTENT-01 (Phase 09): real product recording — block display kills the inline-gap
   under the video inside the overflow:hidden rounded card. */
.i-loop-media video { display: block; width: 100%; height: auto; }

/* ---------- Responsive: stack the sync two-column below the prototype's 980px ---------- */
@media (max-width: 980px) {
  .i-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .i-sync-grid { grid-template-columns: 1fr; gap: 22px; }
  .i-sync-panel { position: static; top: auto; }
  .i-sync-row { grid-template-columns: 1fr auto auto; }
  .i-row-bar { display: none; }
}

@media (max-width: 560px) {
  .i-sync-row { grid-template-columns: 1fr auto; gap: 10px; }
  .i-row-pct { display: none; }
}

/* ---------- Reduced motion: the only motion here is the row hover transition ---------- */
@media (prefers-reduced-motion: reduce) {
  .i-sync-row { transition: none; }
  .i-sync-row.is-active { transform: none; }
}
