/* system.css — Camada 5: Design System + Matriz */

.c5-hero { padding: 80px 40px 32px; max-width: 1560px; margin: 0 auto; }
.c5-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; }

.c5-section { padding: 40px 40px; max-width: 1560px; margin: 0 auto; }
.c5-section + .c5-section { padding-top: 0; }

.c5-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: 28px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.c5-section-head h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 40px; line-height: 1.05; letter-spacing: -0.02em;
  font-weight: 400; margin: 0; color: #e8e6e2;
}
.c5-section-head h2 em { font-style: italic; color: #E89A4A; }
.c5-section-head .right {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #7a7a7a;
}

/* Colors */
.c5-colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.c5-swatch {
  background: #141414; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px; overflow: hidden;
}
.c5-swatch .chip { height: 90px; }
.c5-swatch .meta { padding: 12px 14px; }
.c5-swatch .name { font-size: 13px; color: #e8e6e2; margin-bottom: 4px; font-weight: 500; }
.c5-swatch .hex { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #7a7a7a; letter-spacing: 0.04em; }
.c5-swatch .role { font-size: 10px; color: #b0b0b0; margin-top: 6px; line-height: 1.5; }

/* Type scale */
.c5-type { display: flex; flex-direction: column; gap: 18px; }
.c5-type-row {
  display: grid; grid-template-columns: 120px 140px 1fr;
  gap: 24px; align-items: baseline;
  padding: 18px 20px; background: #141414;
  border: 1px solid rgba(255,255,255,0.05); border-radius: 12px;
}
.c5-type-row .token {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.1em; color: #E89A4A;
}
.c5-type-row .specs {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #7a7a7a; line-height: 1.6;
}
.c5-type-row .sample { color: #e8e6e2; }

/* Spacing tokens */
.c5-tokens-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.c5-token {
  background: #141414; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px; padding: 18px;
}
.c5-token .t { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #E89A4A; letter-spacing: 0.1em; margin-bottom: 12px; }
.c5-token .demo { margin: 6px 0 12px; display: flex; align-items: center; gap: 10px; height: 48px; }
.c5-token .demo .bar { background: rgba(232,154,74,0.3); height: 18px; border-radius: 3px; }
.c5-token .demo .box { background: rgba(232,154,74,0.2); border: 1px solid rgba(232,154,74,0.4); }
.c5-token .demo .shadow-card { width: 56px; height: 38px; background: #1a1a1a; border-radius: 6px; }
.c5-token .v { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #e8e6e2; }
.c5-token .role { font-size: 11px; color: #7a7a7a; margin-top: 6px; line-height: 1.4; }

/* Component showcase */
.c5-comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.c5-comp {
  background: #141414; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px; overflow: hidden;
}
.c5-comp .h {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: baseline;
  background: #171717;
}
.c5-comp .h .name { font-size: 13px; color: #e8e6e2; font-weight: 500; }
.c5-comp .h .kind { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #7a7a7a; letter-spacing: 0.08em; }
.c5-comp .body { padding: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; min-height: 120px; background: #121212; }
.c5-comp .footer { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.05); font-size: 11px; color: #7a7a7a; background: #171717; line-height: 1.5; }

/* Visibility matrix */
.c5-matrix-wrap {
  background: #141414; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px; overflow: hidden;
}
.c5-matrix {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.c5-matrix th, .c5-matrix td {
  padding: 10px 12px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.c5-matrix th {
  background: #171717; font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em;
  color: #E89A4A;
}
.c5-matrix th:first-child, .c5-matrix td:first-child {
  text-align: left; padding-left: 18px;
  background: #171717; color: #e8e6e2; font-weight: 500;
  font-family: 'Inter', sans-serif;
  min-width: 150px;
}
.c5-matrix td.on {
  background: rgba(76,175,80,0.12); color: #4CAF50; font-weight: 600;
}
.c5-matrix td.soft {
  background: rgba(232,154,74,0.08); color: #E89A4A;
}
.c5-matrix td.off { color: #3a3a3a; }
.c5-matrix tr:hover td:not(:first-child) { background: rgba(255,255,255,0.02); }
.c5-matrix tr:hover td.on { background: rgba(76,175,80,0.2); }
.c5-matrix tr:hover td.soft { background: rgba(232,154,74,0.14); }

.c5-matrix-legend {
  display: flex; gap: 18px; padding: 12px 20px;
  background: #171717; border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 11px; color: #7a7a7a;
}
.c5-matrix-legend .item { display: flex; align-items: center; gap: 6px; }
.c5-matrix-legend .sw { width: 14px; height: 14px; border-radius: 3px; }
.c5-matrix-legend .sw.on { background: rgba(76,175,80,0.3); border: 1px solid #4CAF50; }
.c5-matrix-legend .sw.soft { background: rgba(232,154,74,0.18); border: 1px solid #E89A4A; }
.c5-matrix-legend .sw.off { background: #1a1a1a; border: 1px solid #333; }

/* Principles */
.c5-principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.c5-princ {
  background: #141414; border: 1px solid rgba(255,255,255,0.05);
  border-left: 3px solid #E89A4A;
  border-radius: 12px; padding: 22px 24px;
}
.c5-princ .n {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: #7a7a7a; letter-spacing: 0.12em; margin-bottom: 10px;
}
.c5-princ h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px; line-height: 1.15; margin: 0 0 10px;
  font-weight: 400; color: #e8e6e2; letter-spacing: -0.01em;
}
.c5-princ p {
  font-size: 13px; color: #b0b0b0; line-height: 1.6; margin: 0;
}

/* Demo: inline buttons sharing app styles */
.c5-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}
.c5-btn.primary { background: #E89A4A; color: #141414; }
.c5-btn.ghost { background: transparent; color: #e8e6e2; border-color: rgba(255,255,255,0.14); }
.c5-btn.danger { background: transparent; color: #ef4444; border-color: rgba(239,68,68,0.3); }

.c5-input {
  background: #0a0a0a; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 10px 14px;
  color: #e8e6e2; font-size: 13px; font-family: inherit;
  min-width: 200px;
}
.c5-input:focus { outline: 0; border-color: #E89A4A; }
