/* ── RemarkableChess — global styles ───────────────────────────────────────── */
/* Black and white. No gray. E-ink aesthetic. */

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

@font-face {
  font-family: 'Sentient-Medium';
  src: url('../fonts/Sentient-Medium.woff2') format('woff2'),
       url('../fonts/Sentient-Medium.woff') format('woff'),
       url('../fonts/Sentient-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}

:root {
  --black:   #000000;
  --white:   #ffffff;
  --border:  1px solid #000000;
  --font-body: 'Satoshi-Regular', sans-serif;
  --font-headers: 'Sentient-Medium', serif;
  --font-ui:   'Helvetica Neue', 'Arial', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--black);
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

/* ── layout ──────────────────────────────────────────────────────────────────*/

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;

}

.brand {
  font-family: var(--font-headers);
  font-size: 1.15rem;
  font-weight: 400;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 2rem;
}

.site-header nav a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header nav a:hover {
  text-decoration: none;
}

main {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2rem;
  flex: 1;
}

.site-footer {
  padding: 1.25rem 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  line-height: 1.4;
}

.site-footer__inner {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-footer p {
  max-width: none;
  margin-bottom: 0;
}

.site-footer p + p {
  margin-top: 0.2rem;
}

/* ── typography ──────────────────────────────────────────────────────────────*/

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headers);
}

h1 {
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

p {
  margin-bottom: 1rem;
  max-width: 60ch;
}

/* ── puzzle generator ────────────────────────────────────────────────────────*/

.lede {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 0;
  max-width: 52ch;
}

.generator {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.count-options {
  display: flex;
  gap: 0.5rem;
}

.count-options button,
.btn {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--black);
  border: var(--border);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.count-options button:hover,
.btn:hover {
  background: var(--black);
  color: var(--white);
}

.count-options button.active {
  background: var(--black);
  color: var(--white);
}

.btn-primary {
  font-size: 1rem;
  padding: 0.75rem 2rem;
  font-weight: 700;
}

.hero {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p {
  margin-bottom: 2.5rem;
}

.hero .btn {
  display: inline-block;
}

.disclaimer {
  margin-top: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  opacity: 0.5;
  max-width: none;
}

select {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  background: var(--white);
  color: var(--black);
  border: var(--border);
  padding: 0.5rem;
  appearance: none;
  cursor: pointer;
  width: max-content;
  min-width: 200px;
}

.divider {
  border: none;
  border-top: var(--border);
}

/* ── preview boards ──────────────────────────────────────────────────────────*/

.preview-section {
  margin-top: 2rem;
}

.preview-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.preview-board {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preview-board .meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
}

/* ── status messages ─────────────────────────────────────────────────────────*/

.status {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.75rem 0;
}

.status.error {
  color: var(--black);
  font-weight: 700;
}

/* ── board renderer test page ────────────────────────────────────────────────*/

.board-test {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.board-test svg {
  max-width: 400px;
  width: 100%;
  height: auto;
}

/* ── responsive ──────────────────────────────────────────────────────────────*/

@media (max-width: 600px) {
  main {
    padding: 2rem 1rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }
}
