/* Page-specific overrides that don't belong in tokens/base/components/layout go here. */

/* ---------- Home / hero illustration ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-7);
  align-items: center;
  text-align: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: left;
  }
  .hero-grid .hero-copy .d-flex.flex-wrap.gap-3,
  .hero-grid .hero-copy .hero-stats {
    justify-content: flex-start;
  }
  .hero-copy p {
    margin-inline: 0;
  }
}

.hero-copy p.hero-lede {
  margin-inline: auto;
  max-width: 560px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-6);
  justify-content: center;
  margin-top: var(--ds-space-7);
}

.hero-stat-value {
  font-size: var(--ds-fs-2xl);
  font-weight: var(--ds-fw-bold);
  color: var(--ds-white);
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--ds-fs-xs);
  color: var(--ds-text-on-dark-muted);
  margin-top: var(--ds-space-1);
}

.hero-illustration {
  width: 100%;
  height: auto;
  max-width: 460px;
  margin-inline: auto;
}

.hero-illustration .node {
  animation: ds-float 4s ease-in-out infinite;
}

.hero-illustration .node-delay-1 { animation-delay: -1.2s; }
.hero-illustration .node-delay-2 { animation-delay: -2.4s; }
.hero-illustration .node-delay-3 { animation-delay: -0.6s; }

.hero-illustration .pulse {
  animation: ds-pulse 2.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes ds-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ds-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-illustration .node,
  .hero-illustration .pulse {
    animation: none;
  }
}

/* ---------- Development process timeline ---------- */
.process-track {
  display: grid;
  gap: var(--ds-space-5);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  counter-reset: step;
  position: relative;
}

.process-step {
  position: relative;
  padding-top: var(--ds-space-2);
}

.process-step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ds-blue-100);
  color: var(--ds-blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--ds-fw-bold);
  font-size: var(--ds-fs-lg);
  margin-bottom: var(--ds-space-3);
}

.process-step-title {
  font-weight: var(--ds-fw-bold);
  color: var(--ds-navy);
  margin-bottom: var(--ds-space-1);
}

.process-step-text {
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-sm);
}

/* ---------- Tech stack ---------- */
.tech-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--ds-space-3);
}

@media (min-width: 576px) {
  .tech-badge-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 992px) {
  .tech-badge-grid { grid-template-columns: repeat(4, 1fr); }
}

.tech-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-4);
  background: var(--ds-white);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  font-weight: var(--ds-fw-semibold);
  color: var(--ds-navy);
  font-size: var(--ds-fs-sm);
  text-align: center;
  transition: border-color var(--ds-duration-fast) var(--ds-ease), transform var(--ds-duration-fast) var(--ds-ease);
}

.tech-badge:hover {
  border-color: var(--ds-blue);
  transform: translateY(-2px);
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  height: 100%;
}

.testimonial-quote {
  color: var(--ds-text);
  font-size: var(--ds-fs-base);
  margin-bottom: var(--ds-space-5);
}

.testimonial-quote::before {
  content: "\201C";
  color: var(--ds-blue-100);
  font-size: 3rem;
  line-height: 0;
  display: block;
  margin-bottom: var(--ds-space-2);
  font-family: Georgia, serif;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ds-blue-100);
  color: var(--ds-blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--ds-fw-bold);
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: var(--ds-fw-bold);
  color: var(--ds-navy);
  font-size: var(--ds-fs-sm);
}

.testimonial-role {
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-xs);
}

/* ---------- Case studies ---------- */
.case-study-card {
  overflow: hidden;
}

.case-study-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-white);
  font-weight: var(--ds-fw-bold);
  font-size: var(--ds-fs-lg);
}

/* ---------- Industries ---------- */
.industry-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  padding: var(--ds-space-3) var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-pill);
  font-weight: var(--ds-fw-medium);
  font-size: var(--ds-fs-sm);
  color: var(--ds-navy);
  background: var(--ds-white);
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding-block: var(--ds-space-7);
  background:
    radial-gradient(60% 100% at 90% 0%, rgba(0, 87, 252, 0.22), transparent 60%),
    var(--ds-navy);
}

.page-header > .container-ds {
  position: relative;
  z-index: 1;
}

.page-header-anim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.page-header-anim svg {
  width: 100%;
  height: 100%;
}

.page-header-anim .ph-node {
  animation: ds-float 4s ease-in-out infinite;
}

.page-header-anim .ph-delay-1 { animation-delay: -1.2s; }
.page-header-anim .ph-delay-2 { animation-delay: -2.4s; }
.page-header-anim .ph-delay-3 { animation-delay: -0.6s; }

.page-header-anim .ph-pulse {
  animation: ds-pulse 2.6s ease-in-out infinite;
  transform-origin: center;
}

.page-header-anim .ph-orbit {
  transform-origin: 0 0;
}

.page-header-anim .ph-orbit-a {
  animation: ph-spin 14s linear infinite;
}

.page-header-anim .ph-orbit-b {
  animation: ph-spin 22s linear infinite reverse;
}

.page-header-anim .ph-ring {
  animation: ph-ring-out 3.6s ease-out infinite;
  transform-origin: center;
}

.page-header-anim .ph-delay-1.ph-ring { animation-delay: 0s; }
.page-header-anim .ph-delay-2.ph-ring { animation-delay: 1.2s; }
.page-header-anim .ph-delay-3.ph-ring { animation-delay: 2.4s; }

@keyframes ph-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ph-ring-out {
  0% { opacity: 0.5; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.2); }
}

.page-header-anim .ph-growth-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: ph-glow 2.4s ease-in-out infinite;
}

.page-header-anim .ph-card {
  animation: ds-float 4.5s ease-in-out infinite;
}

.page-header-anim .ph-block {
  transform-box: fill-box;
  transform-origin: center;
  animation: ph-glow 2.8s ease-in-out infinite;
}

@keyframes ph-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
  .page-header-anim .ph-node,
  .page-header-anim .ph-pulse,
  .page-header-anim .ph-orbit-a,
  .page-header-anim .ph-orbit-b,
  .page-header-anim .ph-ring,
  .page-header-anim .ph-growth-dot,
  .page-header-anim .ph-card,
  .page-header-anim .ph-block {
    animation: none;
  }

  .page-header-anim animateMotion {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .page-header-anim {
    opacity: 0.6;
  }
}

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid;
  gap: var(--ds-space-5);
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}

@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(5, 1fr); }
}

.stat-tile-value {
  font-size: var(--ds-fs-3xl);
  font-weight: var(--ds-fw-bold);
  color: var(--ds-blue);
  line-height: 1;
}

.stat-tile-label {
  margin-top: var(--ds-space-2);
  font-size: var(--ds-fs-sm);
  color: var(--ds-text-muted);
}

/* ---------- Vertical timeline ---------- */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--ds-border);
}

@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-1px);
  }
}

.timeline-item {
  position: relative;
  padding-left: var(--ds-space-7);
  padding-bottom: var(--ds-space-6);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 6px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ds-blue);
  border: 3px solid var(--ds-blue-100);
}

.timeline-year {
  color: var(--ds-blue);
  font-weight: var(--ds-fw-bold);
  font-size: var(--ds-fs-sm);
  margin-bottom: var(--ds-space-1);
}

.timeline-title {
  color: var(--ds-navy);
  font-weight: var(--ds-fw-bold);
  margin-bottom: var(--ds-space-1);
}

.timeline-text {
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-sm);
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .timeline-item {
    width: 50%;
    padding-left: 0;
    padding-right: var(--ds-space-7);
  }
  .timeline-item .timeline-marker {
    left: auto;
    right: -11px;
  }
  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: var(--ds-space-7);
  }
  .timeline-item:nth-child(even) .timeline-marker {
    right: auto;
    left: -11px;
  }
}

/* ---------- Team ---------- */
.team-card {
  text-align: center;
}

.team-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ds-blue-100);
  color: var(--ds-blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--ds-fw-bold);
  font-size: var(--ds-fs-xl);
  margin-bottom: var(--ds-space-4);
}

.team-name {
  font-weight: var(--ds-fw-bold);
  color: var(--ds-navy);
  margin-bottom: 0.15rem;
}

.team-role {
  color: var(--ds-blue);
  font-size: var(--ds-fs-sm);
  font-weight: var(--ds-fw-medium);
}

.leadership-avatar {
  width: 120px;
  height: 120px;
  font-size: var(--ds-fs-2xl);
}

/* ---------- Engagement model cards ---------- */
.model-card {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-white);
  padding: var(--ds-space-6);
}

.model-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-1);
  padding-block: var(--ds-space-3);
  border-top: 1px solid var(--ds-border);
}

.model-row:first-of-type {
  border-top: none;
}

@media (min-width: 768px) {
  .model-row {
    grid-template-columns: 200px 1fr;
    gap: var(--ds-space-5);
    align-items: start;
  }
}

.model-row-label {
  font-weight: var(--ds-fw-bold);
  color: var(--ds-blue);
  font-size: var(--ds-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.model-row-value {
  color: var(--ds-text);
  font-size: var(--ds-fs-sm);
}

/* ---------- Filter tabs / chips ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  justify-content: center;
}

.filter-chip {
  border: 1.5px solid var(--ds-border);
  background: var(--ds-white);
  color: var(--ds-navy);
  border-radius: var(--ds-radius-pill);
  padding: 0.5rem 1.1rem;
  font-size: var(--ds-fs-sm);
  font-weight: var(--ds-fw-medium);
  cursor: pointer;
  transition: background-color var(--ds-duration-fast) var(--ds-ease), color var(--ds-duration-fast) var(--ds-ease), border-color var(--ds-duration-fast) var(--ds-ease);
}

.filter-chip:hover {
  border-color: var(--ds-blue);
}

.filter-chip.is-active {
  background: var(--ds-blue);
  border-color: var(--ds-blue);
  color: var(--ds-white);
}

.filterable-item[hidden] {
  display: none !important;
}

/* ---------- Legal pages ---------- */
.legal-content h2 {
  font-size: var(--ds-fs-xl);
  margin-top: var(--ds-space-6);
}

.legal-content p,
.legal-content li {
  color: var(--ds-text);
}

.legal-content .updated-date {
  color: var(--ds-text-muted);
  font-size: var(--ds-fs-sm);
}

/* ---------- Blog ---------- */
.blog-card-thumb {
  height: 140px;
  border-radius: var(--ds-radius-lg) var(--ds-radius-lg) 0 0;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  font-size: var(--ds-fs-xs);
  color: var(--ds-text-muted);
}

.blog-byline {
  display: flex;
  align-items: center;
  gap: var(--ds-space-3);
}

.blog-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ds-blue-100);
  color: var(--ds-blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--ds-fw-bold);
  font-size: var(--ds-fs-sm);
  flex-shrink: 0;
}

.blog-toc {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  padding: var(--ds-space-4);
  font-size: var(--ds-fs-sm);
}

.blog-toc a {
  color: var(--ds-text);
  display: block;
  padding: var(--ds-space-1) 0;
}

.blog-toc a:hover {
  color: var(--ds-blue);
  text-decoration: none;
}

.blog-content h2 {
  font-size: var(--ds-fs-2xl);
  margin-top: var(--ds-space-7);
}

.blog-content p {
  font-size: var(--ds-fs-base);
}

/* ---------- Multi-step wizard ---------- */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  gap: var(--ds-space-2);
}

.wizard-step {
  flex: 1;
  text-align: center;
  font-size: var(--ds-fs-xs);
  font-weight: var(--ds-fw-semibold);
  color: var(--ds-text-muted);
  position: relative;
}

.wizard-step span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ds-gray-100);
  color: var(--ds-text-muted);
  margin: 0 auto var(--ds-space-2);
  font-weight: var(--ds-fw-bold);
  transition: background-color var(--ds-duration-base) var(--ds-ease), color var(--ds-duration-base) var(--ds-ease);
}

.wizard-step.is-active {
  color: var(--ds-navy);
}

.wizard-step.is-active span {
  background: var(--ds-blue);
  color: var(--ds-white);
}

.wizard-step.is-complete span {
  background: var(--ds-teal);
  color: var(--ds-white);
}

/* ---------- Confidential / NDA badge ---------- */
.confidential-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---------- Case study screenshot mockups (illustrative, not real product screens) ---------- */
.mockup-frame {
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
  border: 1px solid var(--ds-border);
  box-shadow: var(--ds-shadow-md);
  background: var(--ds-white);
}

.mockup-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--ds-space-3) var(--ds-space-4);
  background: var(--ds-gray-100);
  border-bottom: 1px solid var(--ds-border);
}

.mockup-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ds-gray-300);
  display: inline-block;
}

.mockup-body {
  padding: var(--ds-space-5);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-3);
}

.mockup-bar {
  height: 12px;
  border-radius: var(--ds-radius-sm);
  background: rgba(255, 255, 255, 0.5);
}
