/* g3web.com's pages: www, crosswords, puzzles and the 404 page share this.
   tools/deploy.sh puts a copy at the root of each site, as /site.css. */

:root {
  color-scheme: light dark;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1d2321;
  --muted: #5a6560;
  --line: #dcd8cf;
  --accent: #1f6b4f;       /* the green of a card table */
  --accent-text: #ffffff;
  --accent-edge: #134532;  /* a button's raised edge */
  --quiet-edge: #bdb7aa;
  --link: #1a5c8f;
  --red: #b3261e;          /* hearts and diamonds */
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1b2120;
    --text: #e6ebe8;
    --muted: #a3aeaa;
    --line: #2f3836;
    --accent: #3fa57c;
    --accent-text: #08130f;
    --accent-edge: #23664b;
    --quiet-edge: #0b0f0e;
    --link: #7fbef0;
    --red: #f2837b;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

/* --- Header and footer ---------------------------------------------------- */

.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.suits { color: var(--muted); letter-spacing: 0.15em; }
.suits .r { color: var(--red); }

.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2rem; color: var(--muted); font-size: 0.9rem; }
.site-foot p { margin: 0.25rem 0; }

/* --- The landing page ------------------------------------------------------- */

.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.15; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 40rem; margin: 0 0 0.75rem; }
.hero .facts { color: var(--text); }

.clubs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.25rem; }

.club {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.club h2 { margin: 0; font-size: 1.5rem; line-height: 1.25; }
.club h2 a { color: var(--text); text-decoration: none; }
.club h2 a:hover { text-decoration: underline; }
.club .host { margin: 0.1rem 0 0.75rem; color: var(--muted); font-size: 0.95rem; }
.club .lead { margin: 0 0 1rem; }
.club ul { margin: 0 0 1.25rem; padding-left: 1.2rem; }
.club li { margin: 0.4rem 0; }
.club li::marker { color: var(--accent); }

.actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }

/* Raised: lit from above, standing on an edge of its own darker colour, and
   pressed down onto that edge when clicked. */
.button {
  --face: var(--accent);
  --edge: var(--accent-edge);
  display: inline-block;
  position: relative;
  top: 0;
  background: linear-gradient(to bottom, rgb(255 255 255 / 22%), rgb(255 255 255 / 0%) 55%, rgb(0 0 0 / 8%)), var(--face);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 35%),
    0 4px 0 var(--edge),
    0 6px 10px rgb(0 0 0 / 22%);
  transition: top 80ms ease, box-shadow 80ms ease, filter 120ms ease;
  margin-bottom: 4px;   /* room for the edge below it */
}
.button:hover { filter: brightness(1.07); text-decoration: none; }
.button:active {
  top: 3px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 20%),
    0 1px 0 var(--edge),
    0 2px 4px rgb(0 0 0 / 22%);
}
.button.quiet { --face: var(--surface); --edge: var(--quiet-edge); color: var(--link); }

.note { margin-top: 2rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; }
.note h2 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.note p { margin: 0.4rem 0; }

/* --- Under construction, and not found --------------------------------------- */

.notice { min-height: 70vh; display: flex; align-items: center; padding-top: 3rem; padding-bottom: 3rem; }
.notice h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.2; margin: 0 0 0.75rem; }
.notice p { font-size: 1.1rem; margin: 0.5rem 0; max-width: 36rem; }
.notice .muted { color: var(--muted); font-size: 1rem; }
