/* Layer 8 Ecosystem — Section Styles */

/* ── Section Navigation Cards (Homepage) ── */
.section-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.section-nav-card {
  display: block;
  background: var(--color-bg);
  padding: 32px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    background 0.2s,
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section-nav-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section-nav-card:hover {
  background: var(--color-bg-alt);
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
}

.section-nav-card:hover::before,
.section-nav-card:focus-visible::before {
  transform: scaleX(1);
}

.section-nav-card:focus-visible {
  outline: none;
  background: var(--color-bg-alt);
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
}

.section-nav-card:active {
  transform: translateY(-2px) scale(0.985);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.section-nav-card .mono {
  margin-bottom: 8px;
  display: block;
}

.section-nav-card h3 {
  color: var(--color-text);
  margin-bottom: 8px;
  transform: translateX(0);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section-nav-card:hover h3,
.section-nav-card:focus-visible h3 {
  transform: translateX(6px);
}

.section-nav-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ── Statement Cards ── */
.statement-cards {
  display: grid;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: 34px;
}

.statement-card {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 24px 28px;
  background: var(--color-bg);
}

.statement-number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.statement-card p {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-text);
  margin: 0;
  max-width: none;
}

/* ── Problem ── */
.problem-list {
  list-style: none;
  margin-top: 34px;
}

.problem-list li {
  font-size: 24px;
  font-weight: 500;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.problem-list li:first-child {
  border-top: 1px solid var(--color-border);
}

/* ── Decay Timeline ── */
.decay-legend {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.decay-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--color-text-secondary);
}

.decay-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
}

.decay-swatch-build { background: var(--color-text); }
.decay-swatch-maintain { background: var(--color-border); }

.decay-timeline {
  margin-top: 28px;
  border: 1px solid var(--color-border);
}

.decay-row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

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

.decay-year {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.decay-desc {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.decay-bars {
  display: flex;
  height: 28px;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.decay-bar {
  transition: width 0.8s ease;
}

.decay-build { background: var(--color-text); }
.decay-maintain { background: var(--color-bg-alt); }

.decay-pct {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: right;
  white-space: nowrap;
}

.decay-pct-build { color: var(--color-text); font-weight: 600; }
.decay-pct-maintain { color: var(--color-text-muted); }

@media (max-width: 768px) {
  .decay-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .decay-pct { text-align: left; }
}

/* ── The Shift ── */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  margin-top: 48px;
}

.shift-item h3 {
  margin-bottom: 8px;
}

.shift-item p {
  font-size: 16px;
}

/* ── Ground Rules ── */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: 34px;
}

.rule-card {
  padding: 28px 24px;
  background: var(--color-bg);
}

.rule-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rule-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: none;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}

/* ── How It Works — Pipeline ── */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.pipeline-step {
  padding: 28px 24px;
  background: var(--color-bg);
}

.pipeline-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 16px;
}

.pipeline-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pipeline-step p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: none;
  line-height: 1.5;
}

.how-points {
  list-style: none;
  margin-top: 32px;
}

.how-points li {
  font-size: 18px;
  color: var(--color-text-secondary);
  padding: 12px 0;
  padding-left: 20px;
  position: relative;
}

.how-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-text-muted);
}

/* ── Split Compare ── */
.split-compare {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: 34px;
}

.split-side {
  background: var(--color-bg);
}

.split-header {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}

.split-platform .split-header {
  color: var(--color-text);
  font-weight: 600;
}

.split-items {
  display: grid;
  gap: 1px;
  background: var(--color-border);
}

.split-item {
  padding: 20px 24px;
  background: var(--color-bg);
}

.split-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.split-item p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
  max-width: none;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .split-compare {
    grid-template-columns: 1fr;
  }
}

/* ── Architecture Diagram ── */
.arch-diagram {
  margin-top: 48px;
  counter-reset: arch-layer;
}

.arch-layer {
  padding: 24px 28px;
  margin-bottom: 2px;
  border-left: 4px solid var(--color-text);
  counter-increment: arch-layer;
}

.arch-layer:nth-child(1) { background: rgba(0, 0, 0, 0.02); }
.arch-layer:nth-child(2) { background: rgba(0, 0, 0, 0.04); }
.arch-layer:nth-child(3) { background: rgba(0, 0, 0, 0.06); }
.arch-layer:nth-child(4) { background: rgba(0, 0, 0, 0.08); }
.arch-layer:nth-child(5) { background: rgba(0, 0, 0, 0.10); }
.arch-layer:nth-child(6) { background: rgba(0, 0, 0, 0.12); }

.arch-layer-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.arch-layer-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.arch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 18px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  text-align: center;
  min-width: 120px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.arch-item-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.arch-item-display {
  font-size: 14px;
  font-weight: 600;
}

.arch-item:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.arch-item:hover .arch-item-name {
  color: var(--color-bg);
  opacity: 0.7;
}

.arch-caption {
  margin-top: 24px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ── Founders ── */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  margin-top: 48px;
}

.founder-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
}

.founder-card h3 {
  margin-bottom: 4px;
}

.founder-card .role {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.founder-card a {
  font-size: 14px;
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  margin: 0 auto 40px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-content p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-text);
}

/* ── Section Responsive ── */
@media (max-width: 768px) {
  .problem-list li {
    font-size: 18px;
  }

  .pipeline-grid {
    grid-template-columns: 1fr 1fr;
  }
}
