/* =============================================================================
   IMPLEMENTATION PAGE — implementation.css
   Layout and page-specific styles only.
   All tokens, components, and utilities from global.css.
   ============================================================================= */


/* =============================================================================
   HERO
   ============================================================================= */
.impl-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-16);
  align-items: center;
}

.impl-hero-copy h1 {
  font-size: var(--t-hero-page);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  margin-bottom: var(--s-5);
}

.impl-hero-sub {
  font-size: var(--t-lead);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  max-width: 540px;
  margin-bottom: var(--s-8);
}

.impl-hero-ctas {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.impl-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  flex-shrink: 0;
}

.impl-stat {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
  text-align: center;
  min-width: 140px;
}

.impl-stat-val {
  font-size: var(--t-3xl);
  font-weight: var(--w-xbold);
  color: var(--blue);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  margin-bottom: var(--s-2);
}

.impl-stat-label {
  font-size: var(--t-caption);
  font-weight: var(--w-semibold);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

@media (max-width: 1024px) {
  .impl-hero-grid {
    grid-template-columns: 1fr;
    gap: var(--s-10);
  }
  .impl-hero-stats {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .impl-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =============================================================================
   PHASE TIMELINE — overview
   ============================================================================= */
.impl-timeline {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin-inline: auto;
}

.impl-timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-6);
  background: var(--bg);
  border: 1.5px solid var(--border-sub);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .15s;
}

.impl-timeline-item:hover {
  border-color: var(--blue);
  box-shadow: var(--sh-md);
  transform: translateX(4px);
}

.impl-tl-num {
  font-size: var(--t-xl);
  font-weight: var(--w-xbold);
  color: var(--blue);
  letter-spacing: var(--ls-tight);
  line-height: 1;
  text-align: center;
}

.impl-tl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.impl-tl-body strong {
  font-size: var(--t-base);
  font-weight: var(--w-bold);
  color: var(--text);
  display: block;
}

.impl-tl-body span {
  font-size: var(--t-base);
  color: var(--text-muted);
  display: block;
}

.impl-tl-time {
  font-size: var(--t-caption);
  font-weight: var(--w-bold);
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 3px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.impl-tl-connector {
  width: 2px;
  height: var(--s-3);
  background: var(--border-sub);
  margin-left: calc(48px / 2 + var(--s-6) - 1px);
}

@media (max-width: 640px) {
  .impl-timeline-item {
    grid-template-columns: 40px 1fr;
    gap: var(--s-3);
  }
  .impl-tl-time {
    display: none;
  }
  .impl-tl-connector {
    margin-left: calc(40px / 2 + var(--s-3) - 1px);
  }
}


/* =============================================================================
   PHASE SECTIONS — shared layout
   ============================================================================= */
.impl-phase-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s-12);
  align-items: start;
}

/* Left column — phase number + time badge */
.impl-phase-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding-top: var(--s-2);
  position: sticky;
  top: calc(var(--header-h) + var(--s-6));
}

.impl-phase-num {
  font-size: 3.5rem;
  font-weight: var(--w-xbold);
  color: var(--blue-soft2);
  line-height: 1;
  letter-spacing: var(--ls-tight);
}

.impl-phase-badge {
  font-size: var(--t-caption);
  font-weight: var(--w-bold);
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border-sub);
  padding: 4px 10px;
  border-radius: var(--r-full);
  text-align: center;
  line-height: var(--lh-snug);
}

.impl-phase-badge-green {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-border);
}

.impl-phase-badge-warn {
  color: #C05621;
  background: rgba(221,107,32,.1);
  border-color: rgba(221,107,32,.2);
}

.impl-phase-flag {
  font-size: 10px;
  font-weight: var(--w-xbold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--blue);
  text-align: center;
}

/* Right column — content */
.impl-phase-content > p {
  margin-bottom: var(--s-5);
  color: var(--text-sec);
}

.impl-phase-content .sh-title {
  margin-bottom: var(--s-5);
}

@media (max-width: 900px) {
  .impl-phase-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
  .impl-phase-label {
    flex-direction: row;
    align-items: center;
    position: static;
    gap: var(--s-4);
  }
  .impl-phase-num {
    font-size: var(--t-4xl);
  }
}


/* =============================================================================
   CHECKLIST
   ============================================================================= */
.impl-checklist {
  background: var(--bg-subtle);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-7) var(--s-8);
  margin-bottom: var(--s-8);
}

.impl-checklist h3 {
  font-size: var(--t-base);
  font-weight: var(--w-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  font-size: var(--t-label);
  margin-bottom: var(--s-6);
}

.impl-checklist ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.impl-checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-4);
  align-items: flex-start;
}

.impl-check-icon {
  padding-top: 2px;
  flex-shrink: 0;
}

.impl-check-icon svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.impl-checklist strong {
  display: block;
  font-size: var(--t-base);
  font-weight: var(--w-bold);
  color: var(--text);
  margin-bottom: 3px;
}

.impl-checklist span {
  display: block;
  font-size: var(--t-base);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
}


/* =============================================================================
   PLATFORM CARDS (Phase 2)
   ============================================================================= */
.impl-platform-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin-bottom: var(--s-7);
}

.impl-platform-card {
  padding: var(--s-6);
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
}

.impl-platform-card h4 {
  font-size: var(--t-base);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-2);
}

.impl-platform-card p {
  font-size: var(--t-base);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  margin: 0;
}

@media (max-width: 640px) {
  .impl-platform-cards {
    grid-template-columns: 1fr;
  }
}


/* =============================================================================
   TWO-COLUMN DETAIL BLOCKS
   ============================================================================= */
.impl-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}

.impl-detail-block h3 {
  font-size: var(--t-base);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-3);
}

.impl-detail-block p {
  font-size: var(--t-body);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--s-3);
}

.impl-detail-block p:last-child { margin-bottom: 0; }

.impl-detail-block a {
  color: var(--blue);
  font-weight: var(--w-semibold);
}
.impl-detail-block a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .impl-two-col {
    grid-template-columns: 1fr;
  }
}


/* =============================================================================
   NUMBERED STEPS (Phase 4)
   ============================================================================= */
.impl-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--s-8);
}

.impl-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s-5);
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--border-sub);
}

.impl-step:last-child { border-bottom: none; }

.impl-step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3px;
  width: 28px;
  height: 28px;
  background: var(--blue);
  color: #fff;
  font-size: var(--t-sm);
  font-weight: var(--w-xbold);
  border-radius: 50%;
  flex-shrink: 0;
}

.impl-step-body h4 {
  font-size: var(--t-base);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-2);
}

.impl-step-body p {
  font-size: var(--t-body);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  margin: 0;
}


/* =============================================================================
   EMBED FLOW (Phase 7)
   ============================================================================= */
.impl-embed-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: var(--s-4);
  background: var(--bg-subtle);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  margin-bottom: var(--s-8);
}

.impl-embed-step {
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
}

.impl-embed-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--blue);
  color: #fff;
  font-size: var(--t-caption);
  font-weight: var(--w-xbold);
  border-radius: 50%;
  margin-bottom: var(--s-3);
}

.impl-embed-step h4 {
  font-size: var(--t-base);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-2);
}

.impl-embed-step p {
  font-size: var(--t-body);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  margin: 0;
}

.impl-embed-step code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-muted);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
  word-break: break-all;
}

.impl-embed-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.impl-embed-connector svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
}

@media (max-width: 900px) {
  .impl-embed-flow {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .impl-embed-connector svg {
    transform: rotate(90deg);
  }
}


/* =============================================================================
   RESOURCE LINKS
   ============================================================================= */
.impl-resources {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
  padding-top: var(--s-7);
  border-top: 1px solid var(--border-sub);
}

.impl-resource-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--blue);
  padding: 7px 14px;
  background: var(--bg-blue);
  border: 1px solid var(--blue-soft2);
  border-radius: var(--r-full);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.impl-resource-link:hover {
  background: var(--blue-soft2);
  border-color: var(--blue);
}

.impl-resource-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}


/* =============================================================================
   SERVICES BLOCK
   ============================================================================= */
.impl-services-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
  align-items: center;
  background: var(--navy);
  border-radius: var(--r-xl);
  padding: var(--s-14) var(--s-12);
}

.impl-services-copy .sh-label {
  color: var(--on-dark-badge);
}

.impl-services-copy .sh-label::before {
  background: var(--on-dark-badge);
}

.impl-services-copy h2 {
  color: #fff;
  font-size: var(--t-4xl);
  margin-bottom: var(--s-4);
}

.impl-services-copy p {
  color: var(--on-dark-sec);
  margin-bottom: var(--s-8);
}

.impl-services-ctas {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.impl-service-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg);
  font-size: var(--t-base);
  font-weight: var(--w-semibold);
  color: var(--on-dark-sec);
  margin-bottom: var(--s-3);
}

.impl-service-item:last-child { margin-bottom: 0; }

.impl-service-item svg {
  width: 15px;
  height: 15px;
  color: var(--on-dark-badge);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .impl-services-block {
    grid-template-columns: 1fr;
    padding: var(--s-10) var(--s-8);
    gap: var(--s-8);
  }
  .impl-services-copy h2 {
    font-size: var(--t-3xl);
  }
}

@media (max-width: 480px) {
  .impl-services-block {
    padding: var(--s-8) var(--s-6);
  }
}
