/* Moehr Crokinole Board — preview skin.
   Implements 09-visual/output/visual-direction.md option C: the arcade site's
   pixel face survives as a signature at small sizes, everything else is warmed
   up for a wooden object. Palette is maple, walnut, wax. */

:root {
  --bg: #1a1512;
  --surface: #241d18;
  --line: #3d3229;
  --text: #f0e9e0;
  --muted: #a89684;
  --maple: #e8c99b;
  --wax: #ffb347;
  --walnut: #5c3a24;
  --gold: #ffd23f;
  --measure: 41rem; /* ~68 characters at 20px */
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    400 20px/1.65 "Source Serif 4",
    Georgia,
    "Times New Roman",
    serif;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem 6rem;
}

/* ---------------------------------------------------------------- chrome */
.banner {
  background: var(--walnut);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font:
    400 15px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
  padding: 0.75rem 1.25rem;
  text-align: center;
}
.banner strong {
  color: var(--wax);
}
.banner a {
  color: var(--maple);
  margin-left: 0.5rem;
}

header.site {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  padding: 1.4rem 1.25rem;
}
.mark {
  color: var(--gold);
  font:
    400 11px/1 "Press Start 2P",
    ui-monospace,
    monospace;
  letter-spacing: 0.04em;
}
.sec {
  color: var(--muted);
  font:
    400 10px/1 "Press Start 2P",
    ui-monospace,
    monospace;
}

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font:
    400 14px/1.6 ui-sans-serif,
    system-ui,
    sans-serif;
  margin-top: 4rem;
  padding: 2rem 1.25rem;
  text-align: center;
}
footer.site code {
  color: var(--maple);
  font-size: 13px;
}

/* ---------------------------------------------------------------- type */
h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 2.5rem 0 1.5rem;
}
h1 .l0,
h1 .l1,
h1 .l2 {
  display: block;
}
h1 .l2 {
  color: var(--muted);
  font-size: 0.7em;
  margin-top: 0.35em;
}

h2 {
  color: var(--maple);
  font-family: Fraunces, Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.18;
  margin: 5rem 0 1.25rem;
}

h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  margin: 3rem 0 1rem;
}

p {
  margin: 0 0 1.35rem;
}

/* The pre-headline. First paragraph in main, before the h1. */
main > p:first-of-type {
  color: var(--muted);
  font:
    400 11px/1.6 "Press Start 2P",
    ui-monospace,
    monospace;
  margin-bottom: 0;
  margin-top: 3rem;
}

a {
  color: var(--maple);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--wax);
}
strong {
  color: #fff;
  font-weight: 600;
}

ul {
  margin: 0 0 1.5rem;
  padding-left: 1.3rem;
}
li {
  margin-bottom: 0.6rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

/* ---------------------------------------------------------------- blocks */
blockquote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--wax);
  border-radius: 4px;
  margin: 2rem 0;
  padding: 1.5rem 1.6rem;
}
blockquote p:last-child {
  margin-bottom: 0;
}
blockquote strong {
  color: var(--wax);
  font-size: 1.15em;
}

.tablewrap {
  margin: 2rem 0;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  font:
    400 16px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
  width: 100%;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--maple);
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.018);
}

figure {
  margin: 2.5rem 0;
}
figure img {
  border: 1px solid var(--line);
  border-radius: 4px;
  display: block;
  height: auto;
  width: 100%;
}
figcaption {
  color: var(--muted);
  font:
    400 15px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
  margin-top: 0.7rem;
}

.diagram svg {
  display: block;
  margin: 0 auto;
  max-width: 420px;
  width: 100%;
}

.note {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--muted);
  font:
    400 15px/1.55 ui-sans-serif,
    system-ui,
    sans-serif;
  margin: 2rem 0;
  padding: 1rem 1.15rem;
}

/* ---------------------------------------------------------------- cta */
.cta {
  margin: 2.5rem 0;
  text-align: center;
}
.btn {
  background: var(--wax);
  border-radius: 4px;
  color: #1a1512;
  display: inline-block;
  font:
    400 15px/1 "Press Start 2P",
    ui-monospace,
    monospace;
  min-height: 48px;
  padding: 1.1rem 1.6rem;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn.is-disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
.cta-warn {
  color: var(--muted);
  display: block;
  font:
    400 14px/1.5 ui-sans-serif,
    system-ui,
    sans-serif;
  margin-top: 0.75rem;
}

/* Unresolved placeholders stay visible on purpose. */
.ph {
  background: rgba(255, 179, 71, 0.14);
  border: 1px dashed var(--wax);
  border-radius: 3px;
  color: var(--wax);
  font:
    400 0.72em/1.3 ui-monospace,
    monospace;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}
.ph-link {
  color: var(--muted);
  text-decoration: underline dashed;
}

:focus-visible {
  outline: 2px solid var(--maple);
  outline-offset: 3px;
}

@media (max-width: 768px) {
  body {
    font-size: 18px;
  }
  h1 {
    font-size: 34px;
  }
  h2 {
    font-size: 26px;
    margin-top: 3.5rem;
  }
  h3 {
    font-size: 21px;
  }
  main {
    padding-bottom: 4rem;
  }
  .banner {
    font-size: 14px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .btn:hover {
    transform: none;
  }
}

/* The primary buying moment gets the most visual weight on the page. */
.cta-primary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 3rem 0;
  padding: 2rem 1.25rem;
}
.btn-lg { font-size: 17px; padding: 1.35rem 2rem; }

/* The three shop images are pixel art, not photographs of the board. They hold
   the layout in the preview and are labelled so nobody mistakes them for proof. */
.is-placeholder img {
  border: 1px dashed var(--wax);
  margin: 0 auto;
  max-width: 340px;
  opacity: 0.85;
}
.is-placeholder figcaption { color: var(--wax); text-align: center; }

/* The h1 is three sentences set as three lines. At 52px the first one broke
   after "can play", stranding "it." on its own line. Balance each line and
   drop a step so the sentences read as sentences. */
h1 { font-size: 46px; }
h1 .l0, h1 .l1, h1 .l2 { text-wrap: balance; }
@media (min-width: 1100px) { h1 { font-size: 50px; } }
