/* Mühlewerk website — the app's materials in CSS (docs/design/BOARD.md, DESIGN-SYSTEM.md).

   One surface, not two. Mühlewerk's board is stone and metal and keeps its material in light and
   dark alike; the site does the same rather than offering the same page in two moods. The tokens
   are the app's own: graphite plate, ivory and charcoal pieces, the steel blue the app uses for
   the one obvious next step.

   System fonts only. No external request of any kind — no font, no script, no tracker, no
   cookie. */

:root {
  color-scheme: dark;

  /* The plate, top to bottom (BoardPalette.plateTop / .plateBottom / .plateRim). */
  --graphite: #16181B;
  --graphite-raised: #23262A;
  --graphite-edge: #3E4146;
  --rim: #5A5E64;

  /* The pieces. */
  --ivory: #F9F6F1;
  --ivory-dim: #B9B4AC;

  /* The accent, as the app uses it on a dark ground (AccentColor, dark appearance). */
  --accent: #8FAECE;
  --accent-strong: #B6CCE4;

  /* A closed mill lights up gold. The site uses it once, for the same reason. */
  --mill: #FDE4A9;

  --line: rgba(249, 246, 241, 0.12);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --radius: 18px;
  --radius-inner: 10px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--graphite);
  color: var(--ivory);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 650; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-top: var(--space-7); }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 var(--space-4); }
ul { margin: 0 0 var(--space-4); padding-left: 1.2em; }
li { margin-bottom: var(--space-2); }

.skip {
  position: absolute; left: -999px; top: var(--space-2);
  background: var(--graphite-raised); color: var(--ivory);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-inner);
}
.skip:focus { left: var(--space-3); z-index: 10; }

/* Header ------------------------------------------------------------------------------- */

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  color: var(--ivory); text-decoration: none; font-weight: 650; font-size: 1.1rem;
}
.brand img { border-radius: 9px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.site-header nav a { color: var(--ivory); text-decoration: none; padding: var(--space-2) 0; }
.site-header nav a:hover { text-decoration: underline; color: var(--ivory); }
.languages { margin-left: auto; font-size: 0.95rem; display: flex; gap: var(--space-3); }
.languages a[aria-current="true"] { font-weight: 650; text-decoration: underline; }

/* Main --------------------------------------------------------------------------------- */

main { padding: var(--space-6) var(--space-5) var(--space-8); max-width: 1100px; margin: 0 auto; }
main.prose { max-width: var(--measure); }
main.prose h2 { font-size: 1.35rem; }

.hero { text-align: center; padding: var(--space-7) 0 var(--space-6); }
.hero-icon {
  border-radius: 26px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}
.tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--ivory-dim);
  margin-top: var(--space-3);
}
.lead { max-width: var(--measure); margin: var(--space-5) auto 0; color: var(--ivory-dim); }

/* A thin lit rule, the way the board lights a closed mill. Used once. */
.rule {
  height: 1px; border: 0; margin: var(--space-7) auto 0; max-width: 240px;
  background: linear-gradient(90deg, transparent, var(--mill), transparent);
  opacity: 0.55;
}

.features { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--graphite-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.card h3 { margin-bottom: var(--space-2); }
.card p { margin: 0; color: var(--ivory-dim); }

.screens {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 0; margin: 0; list-style: none;
}
/* A figure carries 1em/40px of margin from the browser's own stylesheet, which took 80px out of
   every grid column and squeezed the screenshots to two thirds of their intended width. */
.screens figure { margin: 0; }
.screens img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-inner);
  border: 1px solid var(--line);
  background: var(--graphite);
}
.screens figcaption { color: var(--ivory-dim); font-size: 0.95rem; margin-top: var(--space-2); }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2);
         grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.facts li {
  border-left: 2px solid var(--graphite-edge);
  padding-left: var(--space-3);
  color: var(--ivory-dim);
}

.cta { text-align: center; margin-top: var(--space-7); color: var(--ivory-dim); }

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--graphite-raised);
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: var(--space-3) 0 0; color: var(--ivory-dim); }

.placeholder { background: var(--mill); color: #1A1A1A; padding: 0 var(--space-1); border-radius: 3px; }

/* Footer ------------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-5);
  color: var(--ivory-dim);
  font-size: 0.95rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-3); }
.site-footer a { color: var(--ivory-dim); }
.site-footer a:hover { color: var(--accent-strong); }

@media (max-width: 560px) {
  main { padding: var(--space-5) var(--space-4) var(--space-7); }
  .site-header { padding: var(--space-3) var(--space-4); }
  .languages { margin-left: 0; width: 100%; }
}

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