/* ============================================================
   Data Migration service detail page styles.
   Source: /docs/mockups/data-migration.html.

   Fifth 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/svc-process.css        (process strip)
     - components/case-study.css         (3-stat case study)
     - components/related-services.css   (2-up rail)

   What stays page-specific:
   - .sources-section + .source-card  4-col grid (8 cards) of where
                                      the source data lives. Similar
                                      shape to use-cases but with a
                                      monospace systems subtitle line.
   - .fallacy-section + .pipeline +
     .fallacy-callout                 Dark "the import fallacy" 8-step
                                      pipeline with one highlighted
                                      step (orange) and an info
                                      callout below.
   - .tdb-section + .tdb-grid +
     .tdb-visual                      Transition database 2-col split:
                                      feature list + flow diagram.
   - .faq-section + .faq-item         Bordered-card + (+/−) accordion
                                      (matches Implementation and
                                      Integrations).
   ============================================================ */

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

.sources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.source-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-card-lg);
  padding: 24px 22px;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
}
.source-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.15);
}
.source-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.source-card:nth-child(odd) .source-icon {
  background: rgba(220, 115, 76, 0.12);
  color: var(--orange);
}
.source-card:nth-child(even) .source-icon {
  background: rgba(22, 93, 148, 0.12);
  color: var(--blue);
}
.source-icon svg { width: 20px; height: 20px; }

.source-card h3 {
  font-size: 16.5px;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: var(--tracking-h3);
}
.source-systems {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12.5px;
  color: var(--text-dark-3);
  line-height: 1.5;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.source-card p {
  font-size: 13.5px;
  color: var(--text-dark-2);
  line-height: 1.6;
}

/* === IMPORT FALLACY (page-specific) ===
   Dark section with a faint topo wash. 8-step pipeline followed
   by an info callout. */

.fallacy-section { overflow: hidden; }
.fallacy-topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

.fallacy-intro {
  max-width: 780px;
  margin: 0 auto 56px;
  text-align: center;
}
.fallacy-intro .eyebrow {
  color: var(--orange-bright);
  margin-bottom: 18px;
  display: inline-block;
}
.fallacy-intro h2 {
  font-size: 42px;
  color: var(--text-light);
  margin-bottom: 18px;
  line-height: 1.1;
}
.fallacy-intro p {
  font-size: 17px;
  color: var(--text-light-2);
  line-height: 1.6;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-width: 1080px;
  margin: 0 auto 48px;
}
.pipe-step {
  position: relative;
  padding: 22px 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-card);
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pipe-step:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}
.pipe-step--easy {
  background: linear-gradient(180deg, rgba(220, 115, 76, 0.18) 0%, rgba(220, 115, 76, 0.08) 100%);
  border-color: rgba(220, 115, 76, 0.5);
}
.pipe-step--easy:hover {
  background: linear-gradient(180deg, rgba(220, 115, 76, 0.24) 0%, rgba(220, 115, 76, 0.12) 100%);
  border-color: rgba(220, 115, 76, 0.65);
}
.pipe-num {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-light-3);
  margin-bottom: 8px;
  font-weight: var(--weight-medium);
}
.pipe-step--easy .pipe-num { color: var(--orange-bright); }

.pipe-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light-2);
}
.pipe-step--easy .pipe-icon {
  background: rgba(220, 115, 76, 0.22);
  color: var(--orange-bright);
}
.pipe-icon svg { width: 14px; height: 14px; }

.pipe-step h3 {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.3;
  letter-spacing: var(--tracking-h3);
}
.pipe-step--easy h3 { color: var(--orange-bright); }

.pipe-easy-tag {
  margin-top: 6px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange);
  font-weight: var(--weight-medium);
}

.fallacy-callout {
  max-width: 880px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(220, 115, 76, 0.08) 0%, rgba(220, 115, 76, 0.02) 100%);
  border: 1px solid rgba(220, 115, 76, 0.28);
  border-radius: var(--radius-card-lg);
  padding: 28px 32px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.fallacy-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(220, 115, 76, 0.18);
  color: var(--orange-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fallacy-icon svg { width: 18px; height: 18px; }
.fallacy-callout-text h3 {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: var(--tracking-h3);
}
.fallacy-callout-text p {
  font-size: 14.5px;
  color: var(--text-light-2);
  line-height: 1.65;
}

/* === TRANSITION DATABASE (page-specific) === */

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

.tdb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.tdb-eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
}
.tdb-left h2 {
  font-size: 36px;
  color: var(--text-dark);
  margin-bottom: 22px;
  line-height: 1.15;
}
.tdb-left > p {
  font-size: 16px;
  color: var(--text-dark-2);
  line-height: 1.65;
  margin-bottom: 14px;
}
.tdb-features {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tdb-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.tdb-feature-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(22, 93, 148, 0.14);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.tdb-feature-icon svg { width: 13px; height: 13px; }
.tdb-feature p {
  font-size: 14.5px;
  color: var(--text-dark-2);
  line-height: 1.6;
}
.tdb-feature p strong {
  color: var(--text-dark);
  font-weight: var(--weight-medium);
}

.tdb-visual {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card-lg);
  padding: 32px 28px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.05);
}
.tdb-visual-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: center;
}
.tdb-node {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-card);
  padding: 16px 12px;
  text-align: center;
}
.tdb-node--center {
  background: linear-gradient(180deg, rgba(22, 93, 148, 0.12) 0%, rgba(22, 93, 148, 0.04) 100%);
  border-color: rgba(22, 93, 148, 0.32);
  padding: 22px 14px;
}
.tdb-node-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-dark-2);
}
.tdb-node--center .tdb-node-icon {
  background: rgba(22, 93, 148, 0.2);
  color: var(--blue);
}
.tdb-node-icon svg { width: 14px; height: 14px; }
.tdb-node-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dark-3);
  margin-bottom: 4px;
  font-weight: var(--weight-medium);
}
.tdb-node--center .tdb-node-label { color: var(--blue); }
.tdb-node-name {
  font-size: 12.5px;
  color: var(--text-dark);
  font-weight: var(--weight-medium);
  line-height: 1.3;
}
.tdb-arrow {
  width: 24px;
  height: 1.5px;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
}
.tdb-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid rgba(0, 0, 0, 0.2);
  border-top: 1.5px solid rgba(0, 0, 0, 0.2);
  transform: rotate(45deg);
}
.tdb-archive {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.tdb-archive-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(22, 93, 148, 0.14);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tdb-archive-icon svg { width: 12px; height: 12px; }
.tdb-archive-text {
  font-size: 13px;
  color: var(--text-dark-2);
  line-height: 1.4;
}

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

.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) {
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .fallacy-intro h2 { font-size: 34px; }
  .tdb-grid { grid-template-columns: 1fr; gap: 36px; }
  .faq-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  .sources-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .fallacy-intro h2 { font-size: 28px; }
  .fallacy-callout { flex-direction: column; gap: 16px; padding: 22px 24px; }
  .tdb-left h2 { font-size: 28px; }
  .tdb-visual { padding: 24px 18px; }
  .tdb-visual-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .tdb-arrow {
    width: 1.5px;
    height: 24px;
    margin: 0 auto;
  }
  .tdb-arrow::after {
    right: -3px;
    top: auto;
    bottom: -1px;
    transform: rotate(135deg);
  }
  .faq-intro h2 { font-size: 28px; }
}
