/* OHIW — Open Hardware Infrastructure Works
   Brand palette and typography from shared/brand.md */

/* ── Fonts ── */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Reset and base ── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  line-height: 1.7;
  color: #F0EDE8;
  background-color: #0D1117;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ── */

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: #F0EDE8;
  margin-bottom: 0.75rem;
}

.hero .tagline {
  font-size: 0.95rem;
  font-weight: 400;
  color: #D4707A;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.hero .hook {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: #8B9AB0;
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Sections ── */

section {
  padding: 3.5rem 0;
  border-top: 1px solid #161B22;
}

section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #D4707A;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

section h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: #5EC4E0;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

section p {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  color: #F0EDE8;
}

section p.muted {
  color: #8B9AB0;
}

/* ── Lists ── */

section ul,
section ol {
  font-size: 0.875rem;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

section li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

section li strong {
  color: #5EC4E0;
  font-weight: 500;
}

/* ── Emphasis and links ── */

strong {
  font-weight: 700;
  color: #F0EDE8;
}

em {
  font-style: italic;
  color: #8B9AB0;
}

a {
  color: #5EC4E0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover,
a:focus {
  border-bottom-color: #5EC4E0;
}

/* ── Term sheet table ── */

.term-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 1.5rem 0;
}

.term-sheet th {
  text-align: left;
  font-weight: 500;
  color: #5EC4E0;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid #5EC4E0;
  white-space: nowrap;
}

.term-sheet td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #161B22;
  color: #F0EDE8;
  vertical-align: top;
}

.term-sheet tr:last-child td {
  border-bottom: none;
}

.term-sheet td:first-child {
  color: #8B9AB0;
  font-weight: 400;
  white-space: nowrap;
  width: 35%;
}

/* ── Precedents grid ── */

.precedents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.precedent {
  padding: 1rem;
  background: #161B22;
  border-left: 2px solid #5EC4E0;
}

.precedent .name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #5EC4E0;
  margin-bottom: 0.35rem;
}

.precedent .detail {
  font-size: 0.75rem;
  color: #8B9AB0;
  line-height: 1.6;
}

/* ── Workshop banner ── */

.workshop-banner {
  background: #161B22;
  border: 1px solid #D4707A;
  padding: 2rem;
  margin: 1rem 0;
}

.workshop-banner .date {
  font-size: 0.8rem;
  font-weight: 500;
  color: #D4707A;
  margin-bottom: 0.5rem;
}

.workshop-banner h3 {
  margin-top: 0;
  font-size: 1rem;
  color: #F0EDE8;
  font-weight: 700;
}

/* ── Call to action ── */

.cta ol {
  list-style: none;
  padding-left: 0;
  counter-reset: cta-counter;
}

.cta li {
  counter-increment: cta-counter;
  padding-left: 2rem;
  position: relative;
  margin-bottom: 1rem;
}

.cta li::before {
  content: counter(cta-counter);
  position: absolute;
  left: 0;
  color: #D4707A;
  font-weight: 700;
  font-size: 0.875rem;
}

/* ── Closing ── */

.closing {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid #161B22;
}

.closing .statement {
  font-size: 1rem;
  font-weight: 500;
  color: #D4707A;
  line-height: 1.6;
}

/* ── Footer ── */

footer {
  padding: 2.5rem 0;
  border-top: 1px solid #161B22;
  text-align: center;
}

footer p {
  font-size: 0.75rem;
  color: #8B9AB0;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

footer a {
  color: #8B9AB0;
}

footer a:hover {
  color: #5EC4E0;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  section {
    padding: 2.5rem 0;
  }

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

  .term-sheet {
    font-size: 0.75rem;
  }

  .term-sheet td:first-child {
    white-space: normal;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.4rem;
  }
}
