/* coppersandcandles.com: parchment and ink, like the game. */

:root {
  --bg: #f6f3ec;
  --panel: #fffdf8;
  --line: #ddd5c6;
  --text: #23211c;
  --muted: #6d6a62;
  --accent: #9a6d12;
  --accent-ink: #fffdf8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12131a;
    --panel: #1a1c25;
    --line: #2f3342;
    --text: #e6e3da;
    --muted: #9a9cab;
    --accent: #d9b45a;
    --accent-ink: #12131a;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.95rem; }
.top nav a { text-decoration: none; }
.top nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* The art is ink on white: it sits on its own parchment card in either theme. */
.art {
  margin: 28px 0 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #fffdf8;
}

/* The home page shows the art down to the title, leaving off the line beneath it. */
.art.title-only { aspect-ratio: 1536 / 890; }
.art.title-only img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.hero { text-align: center; padding: 20px 0 8px; }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3rem); line-height: 1.15; margin: 8px 0 6px; }
.hero .lede { font-size: 1.12rem; color: var(--muted); margin: 0 auto 18px; max-width: 34em; }
.badge {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px;
}

.buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0 4px; }
.button {
  display: inline-block; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-weight: 600;
  border: 1px solid var(--accent); color: var(--accent);
}
.button.primary { background: var(--accent); color: var(--accent-ink); }
.live { text-align: center; color: var(--muted); font-size: 0.92rem; min-height: 1.6em; margin: 6px 0 0; }

section { padding: 18px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
h2 { font-family: var(--serif); font-size: 1.45rem; margin: 6px 0 8px; }
h3 { font-size: 1rem; margin: 14px 0 4px; }
p { margin: 0 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 8px 0 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card h3 { margin-top: 0; font-family: var(--serif); font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; white-space: nowrap; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }

footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 18px 0 40px; color: var(--muted); font-size: 0.88rem; }
footer a { color: var(--muted); }

@media (max-width: 520px) {
  th, td { padding: 7px 6px; }
  .hero .lede { font-size: 1.02rem; }
}

/* Buttons that are <button>s look like the links. */
button.button { font: inherit; font-weight: 600; cursor: pointer; }
button.button:disabled { opacity: 0.6; cursor: default; }

/* The "hear when it's out" box. */
.signup { max-width: 30em; margin: 6px auto 0; text-align: left; }
.signup > label { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin-bottom: 6px; text-align: center; }
.signup-row { display: flex; gap: 8px; }
.signup input[type="email"] {
  flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.signup input[type="email"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; text-align: center; min-height: 1.5em; }
.form-note.good { color: #2f7d3a; }
.form-note.bad { color: #b03a2e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-note.good { color: #7fd18b; }
  :root:not([data-theme="light"]) .form-note.bad { color: #f08a7e; }
}

/* A screenshot of the game. */
.shot { margin: 18px 0 8px; }
.shot img { width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.shot figcaption { color: var(--muted); font-size: 0.88rem; text-align: center; margin-top: 6px; }

/* News posts. */
.post { padding: 18px 0; border-top: 1px solid var(--line); }
.post h2 { margin-bottom: 2px; }
.post .date { color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; }
.post ul { padding-left: 1.2em; margin: 0 0 12px; }
.post li { margin-bottom: 6px; }

@media (max-width: 420px) {
  .signup-row { flex-direction: column; }
}
