/* Evenground: site styles. Palette tracks the app's Light theme
   (lib/app_themes.dart): cream background, muted sage accent. */

:root {
  color-scheme: light dark;
  --bg:      #faf7f3;
  --card:    #fefdfb;
  --ink:     #2e2e2e;
  --muted:   #6b6f63;
  --accent:  #75896b;
  --accent-deep: #4f6347;
  --line:    #e7e2d9;
  --sun:     #d8845c;
  --radius:  14px;
  --wordmark-filter: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 20px; }

/* ── Site header ─────────────────────────────────────────────── */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 0 0;
}
.topbar .mark { text-decoration: none; }
.topbar .lockup .hills { height: 20px; }
.topbar .lockup .logo { height: 15px; }
.topbar nav { display: flex; gap: 18px; font-size: 0.9rem; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--accent-deep); }

/* ── Lockup ──────────────────────────────────────────────────── */

/* Icon and wordmark sit together as one mark, the hills scaled to the
   cap height of the type rather than standing on their own. */
.lockup {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
}
.lockup img { width: auto; display: block; filter: var(--wordmark-filter); }

/* ── Prose ───────────────────────────────────────────────────── */

h1 { font-size: 1.75rem; letter-spacing: -0.02em; margin: 34px 0 4px; }
h2 { font-size: 1.12rem; margin: 38px 0 8px; }
h3 { font-size: 0.98rem; margin: 24px 0 4px; }
p  { margin: 0 0 14px; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 30px; }
ul { padding-left: 1.2rem; }
li { margin: 6px 0; }
a { color: var(--accent-deep); }

table { border-collapse: collapse; width: 100%; margin: 14px 0; 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; }

.note {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin: 26px 0;
  color: var(--muted); font-size: 0.95rem;
}
.note p { margin: 0; }

/* ── Footer ──────────────────────────────────────────────────── */

footer {
  margin: 64px 0 0; padding: 24px 0 56px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--muted);
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent-deep); text-decoration: underline; }

/* Pages that are plain documents keep the old rhythm. */
.doc { padding-top: 8px; }
.doc nav { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.doc nav a { margin-right: 16px; }

@media (max-width: 520px) {
  .topbar nav { gap: 14px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #1b1c1a;
    --card:   #232421;
    --ink:    #e9e8e3;
    --muted:  #9b9d93;
    --accent: #9ab38d;
    --accent-deep: #a9c09c;
    --line:   #33352f;
    --wordmark-filter: brightness(1.55);
  }
}

/* ── Contact form ────────────────────────────────────────────── */

.field { margin: 0 0 18px; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.field .hint { font-weight: 400; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
button.send {
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  padding: 11px 22px;
  cursor: pointer;
}
button.send:hover { background: var(--accent-deep); }
button.send[disabled] { opacity: 0.55; cursor: default; }
.formnote { color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }
.result { margin: 18px 0 0; padding: 13px 15px; border-radius: 10px; }
.result.ok   { background: #eef2ea; border: 1px solid #cfdac8; }
.result.bad  { background: #f7eeee; border: 1px solid #e0cccc; }

@media (prefers-color-scheme: dark) {
  .result.ok  { background: #20271e; border-color: #38442f; }
  .result.bad { background: #2a1f1f; border-color: #4a3434; }
}

/* A paragraph that is the only thing in its box. Was an inline style
   attribute on three paragraphs, which a strict style-src cannot allow. */
.flush { margin: 0; }

/* The contact form's honeypot. Taken out of the layout without display:none
   or visibility:hidden, both of which some bots know to skip. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
