/* WorldFlow AI — Page-specific styles (Hero, Sections, Animations) */

/* ───────────────── Hero Section ───────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 32px 80px;
  overflow: hidden;
  background: var(--gradient-hero);
}

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

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(5, 150, 105, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 150, 105, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 1200px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.06) 0%, rgba(37, 99, 235, 0.02) 40%, transparent 60%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(5, 150, 105, 0.4); }
  50% { opacity: 0.4; box-shadow: 0 0 16px rgba(5, 150, 105, 0.6); }
}

.hero-title {
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.hero-title-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  margin-bottom: 56px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

/* ───────────────── Hero Visual ───────────────── */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.neural-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, var(--bg-secondary) 0%, transparent 70%);
  border-radius: 50%;
}

[data-theme="dark"] .neural-container {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.03) 0%, transparent 70%);
}

.neural-svg {
  width: 100%;
  height: 100%;
  max-width: 480px;
  max-height: 480px;
}

/* Synapse connections */
.synapse-path {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 1;
  opacity: 0.3;
}

.synapse-glow {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
  filter: drop-shadow(0 0 4px var(--accent-primary));
}

.synapse-group:nth-child(1) .synapse-glow { animation: synapse-fire 4s ease-in-out 0s infinite; }
.synapse-group:nth-child(2) .synapse-glow { animation: synapse-fire 4s ease-in-out 0.3s infinite; }
.synapse-group:nth-child(3) .synapse-glow { animation: synapse-fire 4s ease-in-out 0.6s infinite; }
.synapse-group:nth-child(4) .synapse-glow { animation: synapse-fire 4s ease-in-out 0.9s infinite; }
.synapse-group:nth-child(5) .synapse-glow { animation: synapse-fire 4s ease-in-out 1.2s infinite; }
.synapse-group:nth-child(6) .synapse-glow { animation: synapse-fire 4s ease-in-out 1.5s infinite; }
.synapse-group:nth-child(7) .synapse-glow { animation: synapse-fire 4s ease-in-out 1.8s infinite; }
.synapse-group:nth-child(8) .synapse-glow { animation: synapse-fire 4s ease-in-out 2.1s infinite; }
.synapse-group:nth-child(9) .synapse-glow { animation: synapse-fire 4s ease-in-out 2.4s infinite; }
.synapse-group:nth-child(10) .synapse-glow { animation: synapse-fire 4s ease-in-out 2.7s infinite; }
.synapse-group:nth-child(11) .synapse-glow { animation: synapse-fire 4s ease-in-out 3s infinite; }
.synapse-group:nth-child(12) .synapse-glow { animation: synapse-fire 4s ease-in-out 3.3s infinite; }

@keyframes synapse-fire {
  0%, 100% { opacity: 0; stroke-dasharray: 0 1000; }
  5% { opacity: 0.8; }
  50% { opacity: 0.8; stroke-dasharray: 1000 0; }
  55% { opacity: 0; }
}

/* Neural nodes */
.neural-node {
  fill: var(--bg-tertiary);
  stroke: var(--border-color);
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.neural-node-glow {
  fill: var(--accent-primary);
  opacity: 0;
  filter: blur(8px);
}

.node-group:nth-child(odd) .neural-node-glow { animation: node-glow 4s ease-in-out 0s infinite; }
.node-group:nth-child(even) .neural-node-glow { animation: node-glow 4s ease-in-out 2s infinite; }

@keyframes node-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.4; }
}

/* Core node */
.core-outer {
  fill: var(--accent-primary);
  opacity: 0.08;
  animation: core-pulse 3s ease-in-out infinite;
}

.core-middle {
  fill: var(--accent-primary);
  opacity: 0.15;
  animation: core-pulse 3s ease-in-out 0.5s infinite;
}

.core-inner {
  fill: var(--accent-primary);
  filter: drop-shadow(0 0 24px var(--accent-primary));
}

.core-highlight {
  fill: var(--accent-secondary);
  opacity: 0.6;
}

@keyframes core-pulse {
  0%, 100% { transform: scale(1); opacity: 0.08; }
  50% { transform: scale(1.15); opacity: 0.22; }
}

/* Orbital ring */
.orbital-ring {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  opacity: 0.2;
  transform-origin: center;
  animation: orbit 30s linear infinite;
}

.orbital-ring-reverse {
  animation: orbit-reverse 25s linear infinite;
  stroke-dasharray: 2 12;
}

@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes orbit-reverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

/* Stats Card */
.hero-stats {
  position: absolute;
  bottom: -20px;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

.stats-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-weight: 600;
}

.stats-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -0.02em;
}

.stats-unit {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Metrics Card */
.hero-metrics {
  position: absolute;
  top: 0;
  right: -20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  backdrop-filter: blur(12px);
}

.metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 28px;
  border-bottom: 1px solid var(--border-color);
}

.metrics-row:last-child {
  border-bottom: none;
}

.metrics-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.metrics-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-primary);
  white-space: nowrap;
  text-align: right;
  letter-spacing: -0.01em;
}

/* ───────────────── Solution Section ───────────────── */
.solution-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 80px;
}

.solution-step {
  position: relative;
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-slow);
  overflow: hidden;
}

.solution-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.solution-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.solution-step:hover::before {
  opacity: 1;
}

.solution-step::after {
  content: '';
  position: absolute;
  top: 48px;
  right: -8px;
  width: 16px;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.solution-step:last-child::after {
  display: none;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1.15rem;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.step-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.differentiators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.differentiator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.differentiator:hover {
  border-color: rgba(5, 150, 105, 0.15);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.differentiator svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.differentiator span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ───────────────── Technical Section ───────────────── */
.tech-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.tech-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-feature {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.tech-feature:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

.tech-feature-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(5, 150, 105, 0.03));
  border: 1px solid rgba(5, 150, 105, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-feature-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.tech-feature-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.tech-feature-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Code Block */
.code-block {
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27ca40; }

.code-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: #64748b;
  font-family: var(--font-mono);
}

.code-content {
  padding: 28px;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.85;
  overflow-x: auto;
  color: var(--code-text);
}

.code-comment { color: #64748b; }
.code-keyword { color: #c084fc; }
.code-string { color: #86efac; }
.code-function { color: #7dd3fc; }
.code-variable { color: #fcd34d; }

/* ───────────────── Security Badges ───────────────── */
.security-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.security-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-card);
}

.security-badge:hover {
  border-color: rgba(5, 150, 105, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.security-badge-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(5, 150, 105, 0.04));
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.security-badge-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-primary);
}

.security-badge-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 1rem;
}

.security-badge-status {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* ───────────────── Job Cards (Careers) ───────────────── */
.job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-card);
}

.job-card:hover {
  border-color: rgba(5, 150, 105, 0.15);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.job-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.job-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.job-meta span {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.job-description {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

/* ───────────────── Blog Cards ───────────────── */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.blog-card:hover {
  border-color: rgba(5, 150, 105, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(5, 150, 105, 0.03));
  border: 1px solid rgba(5, 150, 105, 0.12);
  color: var(--accent-primary);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  width: fit-content;
}

.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-excerpt {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
  flex-grow: 1;
}

.blog-read-more {
  margin-top: 16px;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-base);
}

.blog-read-more:hover {
  gap: 8px;
}

/* ───────────────── Blog Post Content ───────────────── */
.blog-post-meta {
  text-align: center;
  margin-bottom: 48px;
}

.blog-post-meta .blog-tag {
  margin-bottom: 12px;
}

.blog-post-meta time {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.blog-post-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.blog-post-content > *:first-child {
  margin-top: 0;
}

.blog-post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 56px 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.blog-post-content > h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.blog-post-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 40px 0 16px;
}

.blog-post-content p {
  margin-bottom: 24px;
}

.blog-post-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-post-content a:hover {
  opacity: 0.8;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 8px 0 28px 28px;
  padding: 0;
}

.blog-post-content li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.blog-post-content li strong {
  color: var(--text-primary);
}

.blog-post-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.05rem;
}

.blog-post-content blockquote p {
  margin-bottom: 12px;
}

.blog-post-content blockquote p:last-child {
  margin-bottom: 0;
}

.blog-post-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 32px 0;
}

.blog-post-content code {
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
}

.blog-post-content pre {
  background: var(--bg-tertiary);
  padding: 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 32px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
}

.blog-post-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-post-content em {
  font-style: italic;
}

/* Tables */
.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.blog-post-content thead {
  border-bottom: 2px solid var(--border-color);
}

.blog-post-content th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-post-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.blog-post-content tbody tr:last-child td {
  border-bottom: none;
}

/* Horizontal rules */
.blog-post-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 48px 0;
}

/* Numbered lists */
.blog-post-content ol {
  list-style-type: decimal;
}

.blog-post-content ol li::marker {
  color: var(--accent-primary);
  font-weight: 600;
}

.blog-post-back {
  max-width: 680px;
  margin: 48px auto 0;
  padding: 0 24px;
}

/* ───────────────── Error Page ───────────────── */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ───────────────── Responsive ───────────────── */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content { max-width: 100%; }
  .hero-ctas { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { display: none; }
  .solution-steps { grid-template-columns: repeat(2, 1fr); }
  .solution-step::after { display: none; }
  .tech-content { grid-template-columns: 1fr; }
  .differentiators { grid-template-columns: 1fr; }
  .security-badges { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 20px 60px;
  }

  .hero-title { font-size: 2.5rem; }
  .hero-description { font-size: 1rem; }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn { width: 100%; }
  .solution-steps { grid-template-columns: 1fr; }
  .security-badges { grid-template-columns: 1fr; }
}
