/* === COLOPHON: BRUTALIST TERMINAL === */
/* Technical docs deserve a terminal aesthetic */

body.colophon-section {
  --col-accent: var(--green);
  --col-bg: #0a0a0a;
  --col-surface: #111111;
  --col-text: #e8e8e8;
  --col-muted: #888888; /* WCAG AA compliant (4.59:1) against #0a0a0a */
  --col-dim: #333333;
  font-family: var(--font-mono);
  background: var(--col-bg);
  color: var(--col-text);
}

/* Override base colors */
body.colophon-section main {
  background: var(--col-bg);
}

body.colophon-section .container {
  max-width: 900px;
}

/* Scanline overlay */
body.colophon-section::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Noise texture */
body.colophon-section::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 999;
}

/* === ANIMATIONS === */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* === HERO === */
.colophon-hero {
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(2rem, 6vw, 4rem);
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--col-dim);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.hero-marker {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.marker-line {
  width: 40px;
  height: 2px;
  background: var(--col-accent);
}

.marker-text {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--col-muted);
}

.marker-text::before {
  content: '// ';
  color: var(--col-muted);
}

.colophon-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-lg);
  color: var(--col-text);
  text-transform: uppercase;
}

.hero-lead {
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--col-muted);
  max-width: 650px;
  margin: 0;
}

.hero-lead::before {
  content: '> ';
  color: var(--col-accent);
  font-family: var(--font-mono);
}

/* === SECTION BLOCKS === */
.colophon-section-block {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--col-dim);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.colophon-section-block:nth-of-type(1) { animation-delay: 0.2s; }
.colophon-section-block:nth-of-type(2) { animation-delay: 0.3s; }
.colophon-section-block:nth-of-type(3) { animation-delay: 0.4s; }
.colophon-section-block:nth-of-type(4) { animation-delay: 0.5s; }
.colophon-section-block:nth-of-type(5) { animation-delay: 0.6s; }
.colophon-section-block:nth-of-type(6) { animation-delay: 0.7s; }

.colophon-section-block:last-of-type {
  border-bottom: none;
}

/* === SECTION LABEL === */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--col-muted);
  margin-bottom: var(--spacing-lg);
}

.section-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--col-accent);
  border-radius: 50%;
}

.section-intro {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--col-muted);
  margin: 0 0 var(--spacing-lg);
  max-width: 500px;
}

/* === PHILOSOPHY LOG === */
.philosophy-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--col-dim);
  background: var(--col-surface);
}

.philosophy-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--spacing-lg);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--col-dim);
  transition: background 0.15s ease;
  position: relative;
}

.philosophy-card:last-child {
  border-bottom: none;
}

.philosophy-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s ease;
}

.philosophy-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.philosophy-card:hover::before {
  background: var(--col-accent);
}

.philosophy-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--col-muted);
  padding-top: 0.15rem;
}

.philosophy-card:hover .philosophy-number {
  color: var(--col-accent);
}

.philosophy-content h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--col-text);
  margin: 0 0 var(--spacing-xs);
  letter-spacing: -0.01em;
}

.philosophy-content p {
  font-size: 0.85rem;
  color: var(--col-muted);
  line-height: 1.6;
  margin: 0;
}

/* === STACK LOG === */
.stack-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--col-dim);
  background: var(--col-surface);
}

.stack-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--col-dim);
  transition: background 0.15s ease;
  position: relative;
}

.stack-item:last-child {
  border-bottom: none;
}

.stack-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s ease;
}

.stack-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.stack-item:hover::before {
  background: var(--col-accent);
}

.stack-name {
  font-weight: 600;
  color: var(--col-text);
  font-size: 0.9rem;
}

.stack-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--col-muted);
}

/* === TYPOGRAPHY SPECIMENS === */
.type-specimens {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--col-dim);
  background: var(--col-surface);
}

.type-specimen {
  padding: 1.5rem;
  border-bottom: 1px solid var(--col-dim);
}

.type-specimen:last-child {
  border-bottom: none;
}

.type-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.type-role {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--col-muted);
}

.type-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--col-accent);
}

.type-sample {
  font-size: 1.5rem;
  color: var(--col-text);
  line-height: 1.4;
}

.type-sample.display {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.type-sample.sans {
  font-family: var(--font-sans);
}

.type-sample.mono {
  font-family: var(--font-mono);
}

/* === COLOR DISPLAY === */
.color-display {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: 1.5rem;
  border: 1px solid var(--col-dim);
  background: var(--col-surface);
}

.color-swatch {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 2px solid var(--col-accent);
}

.color-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.color-hex {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--col-text);
}

.color-desc {
  font-size: 0.85rem;
  color: var(--col-muted);
}

/* === PRINCIPLES LIST === */
.principles-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--col-dim);
  background: var(--col-surface);
}

.principle-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--spacing-lg);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--col-dim);
  transition: background 0.15s ease;
  position: relative;
}

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

.principle-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.15s ease;
}

.principle-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.principle-row:hover::before {
  background: var(--col-accent);
}

.principle-name {
  font-weight: 600;
  color: var(--col-text);
  font-size: 0.9rem;
}

.principle-desc {
  font-size: 0.85rem;
  color: var(--col-muted);
  line-height: 1.6;
}

/* === CREDITS === */
.credits-content {
  max-width: 600px;
  padding: 1.5rem;
  border: 1px solid var(--col-dim);
  background: var(--col-surface);
}

.credits-content p {
  font-size: 0.9rem;
  color: var(--col-muted);
  line-height: 1.7;
  margin: 0 0 var(--spacing-md);
}

.credits-content p:last-child {
  margin-bottom: 0;
}

.credits-content strong {
  color: var(--col-text);
}

.credits-content a {
  color: var(--col-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--col-dim);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.credits-content a:hover {
  color: var(--col-accent);
  text-decoration-color: var(--col-accent);
  text-decoration: underline;
}

/* === VERSION BLOCK === */
.version-block {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: clamp(2rem, 5vw, 3rem) 0;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

.version-block::before {
  content: 'build';
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--col-muted);
  margin-right: 0.5rem;
}

.version-number {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--col-accent);
  background: var(--col-surface);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--col-dim);
}

.version-date {
  font-size: 0.85rem;
  color: var(--col-muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .colophon-hero {
    padding: 4rem 0 1.5rem;
  }

  .colophon-hero h1 {
    font-size: 2.5rem;
  }

  .philosophy-card {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .philosophy-number {
    font-size: 0.7rem;
  }

  .principle-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-xs);
  }

  .type-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .color-display {
    flex-direction: column;
    align-items: flex-start;
  }

  .color-swatch {
    width: 100%;
    height: 40px;
  }
}

@media (max-width: 500px) {
  .type-sample {
    font-size: 1.25rem;
  }

  .version-block {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .version-block::before {
    margin-right: 0;
  }
}
