/**
 * Design System — "The Maker's Catalog"
 * Ink & paper base, vermilion accent, Inter + JetBrains Mono.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Ink & Paper */
  --ink:    #16181d;   /* primary text */
  --ink-2:  #3a3d45;   /* secondary text */
  --ink-3:  #71747c;   /* muted text */
  --paper:  #fcfbf8;   /* warm near-white background */
  --square: #eeebe3;   /* light board-tint panel */
  --line:   #ddd9cf;   /* hairline rules */
  --line-2: #e8e5dc;   /* softer hairline */

  /* Accent — vermilion */
  --accent:     #e2502a;
  --accent-ink: #b23a18;   /* darker accent for hover text */
  --on-accent:  #ffffff;
  --accent-wash: rgba(226, 80, 42, 0.08);

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --display-tracking: -0.03em;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 980px;
  --header-height: 66px;

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--display-tracking);
  color: var(--ink);
}

p { color: var(--ink-2); }

a {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

/* Layout utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.content { flex: 1; padding: var(--space-3xl) 0; }

/* Mono spec labels — the signature motif */
.spec {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.spec .tick { color: var(--accent); }

/* Section coordinate labels */
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-label .coord {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.section-label .section-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-label .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-3);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-dim { color: var(--ink-3); font-weight: 500; }

.lang-switch { display: flex; gap: 2px; }
.lang-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-btn.active { color: var(--accent); background: var(--accent-wash); }

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copyright,
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-divider { display: none; }

/* Buttons */
.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 11px 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent);
  transition: transform var(--transition), filter var(--transition);
}
.btn-primary:hover,
.btn:hover { color: var(--on-accent); filter: brightness(1.05); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { color: var(--ink); background: var(--square); transform: translateY(-1px); }

/* Mono underline link */
.link-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}
.link-mono:hover { color: var(--accent-ink); }

/* Responsive */
@media (max-width: 680px) {
  :root { --header-height: 58px; }
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .footer-content { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
