/**
 * FRA Explorer Styles
 */

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

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

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

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

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

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

/* Validation Stats */
.validation-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.val-stat {
  text-align: center;
}

.val-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-fra-f);
  text-shadow: 0 0 20px rgba(68,136,255,0.3);
}

.val-label {
  font-size: 0.875rem;
  color: rgba(224,224,255,0.6);
  margin-top: 0.25rem;
}

/* FRA Core */
.fra-core {
  padding: 5rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
}

.fra-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.fra-phase {
  flex: 1;
  min-width: 280px;
  max-width: 340px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

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

.fra-phase[data-phase="f"] {
  border-top: 3px solid var(--color-fra-f);
}

.fra-phase[data-phase="r"] {
  border-top: 3px solid var(--color-fra-r);
}

.fra-phase[data-phase="a"] {
  border-top: 3px solid var(--color-fra-a);
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.phase-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.f-icon { background: linear-gradient(135deg, var(--color-fra-f), #2266cc); }
.r-icon { background: linear-gradient(135deg, var(--color-fra-r), #6622cc); }
.a-icon { background: linear-gradient(135deg, var(--color-fra-a), #cc2266); }

.phase-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--star-white);
}

.phase-desc {
  font-size: 0.9375rem;
  color: rgba(224,224,255,0.7);
  margin-bottom: 1rem;
}

.phase-verb {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.375rem 0.75rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  margin-bottom: 1rem;
  color: var(--star-white);
}

.phase-examples {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1rem;
}

.example-item {
  margin-bottom: 0.75rem;
}

.ex-domain {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(224,224,255,0.5);
  margin-bottom: 0.25rem;
}

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

.phase-arrow {
  font-size: 2rem;
  color: rgba(255,255,255,0.3);
  align-self: center;
}

.universal-gloss {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 1rem;
  color: rgba(224,224,255,0.8);
}

.universal-gloss strong {
  color: var(--star-white);
}

/* Domain Matrix */
.domain-matrix {
  padding: 5rem 0;
  background: radial-gradient(ellipse at center, rgba(136,68,255,0.05) 0%, transparent 60%);
}

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

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

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

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

.domain-icon {
  font-size: 1.5rem;
}

.domain-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--star-white);
}

.domain-systems {
  padding: 1rem;
}

.system-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.system-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-phi);
  margin-bottom: 0.5rem;
}

.fra-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.fra-f { color: var(--color-fra-f); }
.fra-r { color: var(--color-fra-r); }
.fra-a { color: var(--color-fra-a); }

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

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

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

.theorem-card:hover {
  border-color: rgba(255,215,0,0.2);
}

.theorem-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: var(--color-phi);
  color: var(--deep-space);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.theorem-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.theorem-formula {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.9375rem;
  color: var(--color-phi);
  padding: 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.theorem-card p {
  font-size: 0.875rem;
  color: rgba(224,224,255,0.7);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.proof-status {
  font-size: 0.75rem;
  color: var(--color-o2);
  font-weight: 500;
}

/* Results Section */
.results-section {
  padding: 5rem 0;
}

.results-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.result-chart h4,
.result-tsp h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--star-white);
  margin-bottom: 1.5rem;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-item {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  align-items: center;
  gap: 1rem;
}

.bar-label {
  font-size: 0.8125rem;
  color: rgba(224,224,255,0.7);
}

.bar-wrapper {
  height: 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.bar-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--star-white);
  text-align: right;
}

.chart-note {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: rgba(224,224,255,0.6);
  font-style: italic;
}

.chart-note strong {
  color: var(--star-white);
  font-style: normal;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.results-table th,
.results-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.results-table th {
  font-weight: 600;
  color: rgba(224,224,255,0.6);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.results-table td {
  color: rgba(224,224,255,0.8);
}

.results-table .good {
  color: var(--color-o2);
  font-weight: 600;
}

.table-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(224,224,255,0.7);
}

/* Responsive */
@media (max-width: 768px) {
  .fra-flow {
    flex-direction: column;
  }
  
  .phase-arrow {
    transform: rotate(90deg);
  }
  
  .matrix-grid {
    grid-template-columns: 1fr;
  }
  
  .results-content {
    grid-template-columns: 1fr;
  }
  
  .validation-stats {
    gap: 1.5rem;
  }
  
  .val-value {
    font-size: 1.75rem;
  }
}
