/**
 * UCOS Architecture Styles
 */

/* Hero */
.ucos-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(136,68,255,0.1) 0%, transparent 60%);
}

.ucos-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(136,68,255,0.1);
  border: 1px solid rgba(136,68,255,0.3);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  color: var(--color-fra-r);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.ucos-hero .hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.ucos-hero .hero-title .subtitle {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  color: rgba(224,224,255,0.7);
  margin-top: 0.5rem;
}

.ucos-hero .hero-description {
  font-size: 1.125rem;
  color: rgba(224,224,255,0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.ucos-hero .hero-description strong {
  color: var(--star-white);
}

/* Layer Preview */
.layer-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.layer-mini {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.layer-mini[data-layer="4"] { border-color: rgba(255,215,0,0.3); }
.layer-mini[data-layer="3"] { border-color: rgba(136,68,255,0.3); }
.layer-mini[data-layer="2"] { border-color: rgba(68,136,255,0.3); }
.layer-mini[data-layer="1"] { border-color: rgba(68,255,136,0.3); }

.layer-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(224,224,255,0.5);
  text-transform: uppercase;
}

.layer-name {
  font-weight: 600;
  color: var(--star-white);
  margin: 0.25rem 0;
}

.layer-detail {
  font-size: 0.75rem;
  color: rgba(224,224,255,0.5);
}

.layer-arrow {
  color: rgba(255,255,255,0.3);
  font-size: 1.25rem;
}

/* Architecture Viz */
.architecture-viz {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
}

.layers-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.layer-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.layer-card:hover {
  transform: translateX(8px);
  border-color: rgba(255,255,255,0.15);
}

.layer-card[data-layer="4"] { border-left: 4px solid var(--color-phi); }
.layer-card[data-layer="3"] { border-left: 4px solid var(--color-fra-r); }
.layer-card[data-layer="2"] { border-left: 4px solid var(--color-fra-f); }
.layer-card[data-layer="1"] { border-left: 4px solid var(--color-o2); }

.layer-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.layer-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--star-white);
}

.layer-icon svg {
  width: 24px;
  height: 24px;
}

.layer-title {
  flex: 1;
}

.layer-number {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(224,224,255,0.5);
  text-transform: uppercase;
}

.layer-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--star-white);
  margin: 0.25rem 0;
}

.layer-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  color: rgba(224,224,255,0.7);
}

.layer-content {
  padding: 1.25rem;
}

.layer-desc {
  font-size: 0.9375rem;
  color: rgba(224,224,255,0.8);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Layer 4: Axes */
.layer-axes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.axis-def {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.axis-label {
  width: 28px;
  height: 28px;
  background: var(--color-phi);
  color: var(--deep-space);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.axis-name {
  font-weight: 600;
  color: var(--star-white);
  font-size: 0.9375rem;
}

.axis-values {
  font-size: 0.75rem;
  color: rgba(224,224,255,0.6);
}

.layer-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.layer-stats .stat {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255,215,0,0.1);
  border-radius: 4px;
  color: var(--color-phi);
}

/* Layer 3: Dynamics */
.dynamics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.dynamic-block {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 1rem;
}

.dynamic-block h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 0.75rem;
}

.operator-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.op-cat {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.op-cat.divergence { background: rgba(255,68,68,0.2); color: #ff6644; }
.op-cat.modulation { background: rgba(255,136,68,0.2); color: #ffaa44; }
.op-cat.network { background: rgba(68,136,255,0.2); color: #88aaff; }
.op-cat.integration { background: rgba(68,255,136,0.2); color: #88ffaa; }

.pattern-formula {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.875rem;
  color: var(--color-phi);
}

/* Layer 2: Statics */
.folding-viz {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.fold-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

.fold-step.highlight {
  background: rgba(68,136,255,0.1);
  border: 1px solid rgba(68,136,255,0.3);
}

.fold-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-fra-f);
  min-width: 60px;
}

.fold-step.highlight .fold-num {
  color: var(--color-fra-r);
}

.fold-label {
  font-size: 0.875rem;
  color: rgba(224,224,255,0.8);
}

.fold-arrow {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(224,224,255,0.5);
  font-style: italic;
}

.folding-result {
  font-size: 0.9375rem;
  color: rgba(224,224,255,0.9);
  text-align: center;
  margin-top: 1rem;
}

.folding-result strong {
  color: var(--star-white);
}

/* Layer 1: Process */
.process-cycles {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cycle-card {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 1rem;
}

.cycle-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 0.75rem;
}

.cycle-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.step {
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
  background: rgba(68,255,136,0.1);
  border-radius: 4px;
  color: var(--color-o2);
  font-weight: 500;
}

.step-arrow {
  color: rgba(255,255,255,0.3);
}

.compass-levels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.level {
  font-size: 0.75rem;
  padding: 0.375rem 0.5rem;
  background: rgba(255,215,0,0.1);
  border-radius: 4px;
  color: var(--color-phi);
}

.level-arrow {
  color: rgba(255,255,255,0.3);
}

/* Kernels Section */
.kernels-section {
  padding: 5rem 0;
  background: radial-gradient(ellipse at center, rgba(255,215,0,0.05) 0%, transparent 60%);
}

.kernels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.kernel-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.kernel-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
}

.kernel-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.kernel-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 0.25rem;
}

.kernel-axis {
  font-size: 0.75rem;
  color: var(--color-phi);
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.kernel-card p {
  font-size: 0.8125rem;
  color: rgba(224,224,255,0.7);
}

/* Integration Section */
.integration-section {
  padding: 5rem 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 100%);
}

.integration-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding: 0 2rem;
}

.input-node,
.output-node {
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  font-weight: 600;
  color: var(--star-white);
}

.flow-arrow {
  color: rgba(255,255,255,0.3);
  font-size: 1.5rem;
}

.process-box {
  background: rgba(136,68,255,0.1);
  border: 1px solid rgba(136,68,255,0.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.box-label {
  display: block;
  font-weight: 600;
  color: var(--color-fra-r);
  margin-bottom: 1rem;
}

.box-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.box-steps span {
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  color: rgba(224,224,255,0.8);
}

/* Responsive */
@media (max-width: 768px) {
  .layer-preview {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .layer-arrow {
    transform: rotate(90deg);
  }
  
  .layer-header {
    flex-direction: column;
    text-align: center;
  }
  
  .layer-axes {
    grid-template-columns: 1fr;
  }
  
  .fold-step {
    flex-direction: column;
    text-align: center;
  }
  
  .integration-diagram {
    flex-direction: column;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
  }
}
