/* Catalogue styling.
   Tokens mirror www.aice-lab.org (assets/css/main.css) so the docs read as part
   of the same site. Self-hosted fonts are not worth it for one page, so this
   falls back through the same stacks the main site declares. */

:root {
  --primary: #3D5A80;
  --primary-dark: #2E4566;
  --accent: #A63D40;
  --accent-on-light: #6E2528;
  --accent-on-dark: #E5A8A9;

  --bg: #F0F4F8;
  --bg-alt: #E2E8F0;
  --bg-dark: #1B263B;

  --text: #293241;
  --text-light: #4A5568;
  --text-muted: #7B8794;
  --text-on-dark: #E0E6ED;
  --text-on-dark-muted: #9CA8B8;
  --border: #CBD5E1;
  --border-dark: #2D3A4D;

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  --max-w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.inner { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

.masthead {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 6rem 0 5rem;
  /* Same octagram motif the main site uses on dark sections. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M50 0L100 50L50 100L0 50Z' fill='none' stroke='%2398C1D9' stroke-width='0.65' opacity='0.09'/%3E%3Cpath d='M50 14L86 50L50 86L14 50Z' fill='none' stroke='%237BA3BC' stroke-width='0.48' opacity='0.065'/%3E%3C/svg%3E");
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-on-dark);
  margin: 0 0 1rem;
}
.title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 1.5rem;
}
.lede {
  font-size: 1.125rem;
  color: var(--text-on-dark-muted);
  max-width: 36em;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1px;
  background: var(--border);
  margin: 5rem 0 4rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.card {
  display: block;
  background: var(--bg);
  padding: 2.5rem 2rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.card:hover { background: var(--bg-alt); }
.card-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-on-light);
  margin-bottom: 1rem;
}
.card-name {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--primary-dark);
}
.card-tag { color: var(--text-light); margin: 0 0 1.5rem; }
.card-go {
  font-size: 0.875rem;
  color: var(--primary);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
/* A product without a handbook must not look like a broken link to one. */
.card--nobook .card-go { color: var(--text-muted); border-bottom-style: dashed; }

.note {
  max-width: 40em;
  margin: 0 0 6rem;
  padding-top: 2rem;
  border-top: 2px solid var(--primary);
}
.note-title {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.note p { color: var(--text-light); margin: 0 0 1rem; }
.note code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-alt);
  padding: 0.1em 0.35em;
}

.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-muted);
  padding: 3rem 0;
  font-size: 0.875rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer p { margin: 0; }
.footer-links a { color: var(--text-on-dark); text-decoration: none; margin-left: 1.5rem; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--accent-on-dark); }

@media (max-width: 600px) {
  .masthead { padding: 4rem 0 3rem; }
  .cards { margin: 3rem 0; }
  .footer-links a { margin: 0 1rem 0 0; }
}
