/* ============================================================
   Technology page styles — mirrors landing page aesthetic
   ============================================================ */

/* ---- Hero ---- */
.tech-hero {
  position: relative;
  padding: 90px 32px 80px;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tech-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tech-hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(79,70,229,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,70,229,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center top, black 30%, transparent 70%);
}

.tech-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float-blob 14s ease-in-out infinite;
}

.tech-hero-blob-1 {
  width: 480px;
  height: 480px;
  background: rgba(124,58,237,0.18);
  top: -120px;
  left: -100px;
}

.tech-hero-blob-2 {
  width: 520px;
  height: 520px;
  background: rgba(168,85,247,0.14);
  bottom: -200px;
  right: -100px;
  animation-delay: -7s;
}

.tech-hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.tech-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(79,70,229,0.2);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.4px;
  animation: fade-up 0.6s ease-out;
}

.tech-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-soft 1.6s infinite;
}

.tech-hero-h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1.02;
  margin: 22px 0;
  animation: fade-up 0.7s ease-out 0.05s both;
}

.tech-hero-accent {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-hero-p {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
  animation: fade-up 0.7s ease-out 0.15s both;
}

/* ---- Shared section helpers ---- */
.tech-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--brand);
  text-align: center;
  margin-bottom: 18px;
}

.tech-section-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  text-align: center;
  margin-bottom: 56px;
}

.tech-section-title span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Pipeline ---- */
.tech-pipeline {
  padding: 100px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tech-pipeline-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.pipeline-stages {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}

.pipeline-stage {
  flex: 1;
  max-width: 260px;
  text-align: center;
  padding: 28px 20px;
}

.pipeline-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pipeline-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform .35s ease;
}

.pipeline-icon--upload { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.pipeline-icon--parse  { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.pipeline-icon--ocr    { background: linear-gradient(135deg, #a855f7, #c084fc); }
.pipeline-icon--combine{ background: linear-gradient(135deg, #4f46e5, #7c3aed); }

.pipeline-stage:hover .pipeline-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(79,70,229,0.3);
}

.pipeline-num {
  position: absolute;
  top: -8px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-stage-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.pipeline-stage-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

/* Pipeline infographics */
.pipeline-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pipeline-file-icon { font-size: 28px; }

.pipeline-check-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.pipeline-arrow-right { color: var(--muted); }

/* Quick parse lines */
.pipeline-mini-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0 8px;
}

.pipeline-mini-line {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  opacity: 0.5;
  animation: pulse-soft 3s ease-in-out infinite;
}

.pipeline-mini-line:nth-child(2) { animation-delay: 0.3s; }
.pipeline-mini-line:nth-child(3) { animation-delay: 0.6s; }
.pipeline-mini-line:nth-child(4) { animation-delay: 0.9s; }
.pipeline-mini-line:nth-child(5) { animation-delay: 1.2s; }

/* OCR scan graphic */
.pipeline-scan-container {
  position: relative;
  width: 80px;
  height: 48px;
}

.pipeline-scan-page {
  width: 100%;
  height: 100%;
  background: var(--paper);
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.pipeline-scan-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  font-family: serif;
}

.pipeline-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.7), transparent);
  animation: scan-move 2s ease-in-out infinite;
}

@keyframes scan-move {
  0%   { top: 0; }
  50%  { top: 100%; }
  100% { top: 0; }
}

.pipeline-scan-glow {
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(168,85,247,0.15), transparent 70%);
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Combine merge paths */
.pipeline-merge-paths {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pipeline-merge-path {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--brand);
  opacity: 0.5;
}

.pipeline-merge-path--2 {
  background: var(--brand-3);
}

.pipeline-merge-output {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Connector between stages */
.pipeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding-top: 40px;
}

.pipeline-connector-line {
  width: 2px;
  flex: 1;
  min-height: 8px;
  background: var(--border);
}

.pipeline-connector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  margin: 4px 0;
}

/* ---- Workflow Flexibility ---- */
.tech-workflow {
  padding: 100px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tech-workflow-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.tech-workflow-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 48px;
}

.tech-workflow-placeholder {
  padding: 48px 32px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.tech-workflow-nodes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

.tech-workflow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: all .3s ease;
  min-width: 100px;
}

.tech-workflow-node--active {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(79,70,229,0.15);
}

.tech-workflow-node-icon {
  font-size: 24px;
}

.tech-workflow-node span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.tech-workflow-connector-line {
  width: 40px;
  height: 2px;
  background: var(--border);
}

.tech-workflow-coming {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ---- AI Engines ---- */
.tech-ai {
  padding: 100px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tech-ai-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.tech-ai-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 560px;
  margin: 0 auto;
}

.tech-ai-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: left;
  transition: all .35s ease;
  position: relative;
  overflow: hidden;
}

.tech-ai-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 20px 48px -12px rgba(79,70,229,0.2);
}

.tech-ai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tech-ai-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-ai-card-icon--glm {
  background: linear-gradient(135deg, #4f46e5, #a855f7);
  color: white;
}

.tech-ai-card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand);
  background: var(--brand-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.tech-ai-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.tech-ai-card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.tech-ai-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-ai-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--brand-light);
  color: var(--brand);
}

.tech-ai-more {
  font-size: 14px;
  color: var(--muted);
  margin-top: 28px;
  line-height: 1.5;
}

/* ---- Releases ---- */
.tech-releases {
  padding: 100px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tech-releases-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.tech-release-current {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 40px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.tech-release-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand);
  margin-bottom: 8px;
}

.tech-release-version {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-release-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
}

.tech-release-item {
  display: grid;
  grid-template-columns: 140px 1fr 12px;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.tech-release-item:last-child {
  border-bottom: none;
}

.tech-release-item--latest {
  position: relative;
}

.tech-release-item--latest::before {
  content: 'Latest';
  position: absolute;
  right: 24px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--success);
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 4px;
}

.tech-release-item-version {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
}

.tech-release-item-note {
  font-size: 14px;
  color: var(--muted);
}

.tech-release-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.tech-release-item--latest .tech-release-item-dot {
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.15);
}

/* ---- CTA ---- */
.tech-cta {
  padding: 100px 32px;
  background: var(--bg);
}

.tech-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.tech-cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}

.tech-cta-sub {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ===================== Dark Mode ===================== */
[data-theme="dark"] .tech-hero {
  background: #0f0f1a;
  border-bottom-color: #374151;
}

[data-theme="dark"] .tech-hero-grid {
  background-image: linear-gradient(rgba(99,102,241,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.08) 1px, transparent 1px);
}

[data-theme="dark"] .tech-hero-blob-1 { background: rgba(99,102,241,0.22); }
[data-theme="dark"] .tech-hero-blob-2 { background: rgba(139,92,246,0.18); }

[data-theme="dark"] .tech-hero-badge {
  background: rgba(31,41,55,0.7);
  border-color: rgba(99,102,241,0.3);
  color: var(--brand);
}

[data-theme="dark"] .tech-hero-h1 { color: #e5e7eb; }
[data-theme="dark"] .tech-hero-p  { color: #9ca3af; }

[data-theme="dark"] .tech-section-title { color: #e5e7eb; }

[data-theme="dark"] .tech-pipeline { background: #111827; border-bottom-color: #374151; }

[data-theme="dark"] .pipeline-stage-title { color: #e5e7eb; }
[data-theme="dark"] .pipeline-stage-desc  { color: #9ca3af; }
[data-theme="dark"] .pipeline-graphic {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .pipeline-connector-line { background: #374151; }

[data-theme="dark"] .tech-workflow { background: #0f0f1a; border-bottom-color: #374151; }
[data-theme="dark"] .tech-workflow-sub { color: #9ca3af; }
[data-theme="dark"] .tech-workflow-node { background: #1f2937; border-color: #374151; }
[data-theme="dark"] .tech-workflow-node span { color: #d1d5db; }
[data-theme="dark"] .tech-workflow-connector-line { background: #374151; }
[data-theme="dark"] .tech-workflow-coming { color: #9ca3af; }

[data-theme="dark"] .tech-ai { background: #111827; border-bottom-color: #374151; }
[data-theme="dark"] .tech-ai-card { background: #1f2937; border-color: #374151; }
[data-theme="dark"] .tech-ai-card-title { color: #e5e7eb; }
[data-theme="dark"] .tech-ai-card-desc { color: #9ca3af; }
[data-theme="dark"] .tech-ai-more { color: #9ca3af; }

[data-theme="dark"] .tech-releases { background: #0f0f1a; border-bottom-color: #374151; }
[data-theme="dark"] .tech-release-current { background: #1f2937; border-color: #374151; }
[data-theme="dark"] .tech-release-item-version { color: #e5e7eb; }
[data-theme="dark"] .tech-release-item-note { color: #9ca3af; }
[data-theme="dark"] .tech-release-item { border-bottom-color: #374151; }
[data-theme="dark"] .tech-release-item-dot { background: #374151; }
[data-theme="dark"] .tech-release-item--latest .tech-release-item-dot {
  background: var(--brand);
}

[data-theme="dark"] .tech-cta { background: #111827; }
[data-theme="dark"] .tech-cta-title { color: #e5e7eb; }
[data-theme="dark"] .tech-cta-sub { color: #9ca3af; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .pipeline-stages {
    flex-direction: column;
    align-items: center;
  }

  .pipeline-connector {
    flex-direction: row;
    min-width: auto;
    padding-top: 0;
    min-height: 40px;
  }

  .pipeline-connector-line {
    height: 2px;
    width: auto;
    min-width: 8px;
    min-height: auto;
  }

  .pipeline-stage {
    max-width: 400px;
    width: 100%;
  }
}
