/* Creelist holding site.
   Colours come from the app's palette (constants/creelist-theme.ts in the app
   repo): parchment and ink in light, navy in dark, brass as the accent.
   Plain brass #C08A2E is used only for rules and marks, never for text: as
   text it fails WCAG AA on both grounds. Text-safe brass is --accent-text. */

:root {
  color-scheme: light dark;
  --bg: #F3EEE2;            /* parchment */
  --surface: #FBF9F4;
  --text: #23302C;          /* ink */
  --text-2: #5F6E60;        /* 4.69:1 on parchment */
  --heading: #1F3B3D;       /* navy */
  --accent: #C08A2E;        /* brass: rules and marks only */
  --accent-text: #7E5A1C;   /* brass for text: 5.39:1 on parchment, 5.93 on surface */
  --rule: rgba(31, 59, 61, 0.14);
  --warn: #8F3B3B;          /* 6.99:1 on surface */
  --focus: #1F3B3D;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F3B3D;          /* navy */
    --surface: #25403E;
    --text: #F3EEE2;
    --text-2: #ABC2B6;      /* 5.91:1 on surface, 6.35 on background */
    --heading: #F3EEE2;
    --accent: #C08A2E;
    --accent-text: #EBC370; /* 7.18:1 on background, 6.68 on surface */
    --rule: rgba(243, 238, 226, 0.16);
    --warn: #F6AAA4;        /* 5.95:1 on surface */
    --focus: #EBC370;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

main { flex: 1; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  border-radius: 999px;
  z-index: 1;
}
.skip:focus { top: 0.75rem; }

/* The wordmark: brand fish + CREELIST. The fish is solid everywhere; only the
   home hero carries the brass gill (below ~50px of fish height it can't be seen). */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.43em;
  color: var(--heading);
  font-weight: 800;
  letter-spacing: 0.21em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
/* viewBox 981x379: 2.59em wide per 1em of height. */
.wordmark svg { width: 2.59em; height: 1em; flex: none; }
.wordmark svg path { fill: currentColor; }
.wordmark svg .gill { fill: var(--accent); }
/* Letter spacing also trails the last letter; pull it back so the mark centres. */
.wordmark span { margin-right: -0.21em; }

/* Sub-page header: the small wordmark links home. */
.masthead { padding: 1.75rem 0 0; }
.masthead .wordmark { font-size: 0.95rem; }

/* Home */
.home main { display: flex; align-items: center; }
/* .hero and .page share an element with .wrap: set only vertical padding
   here, or the shorthand wipes out .wrap's 16px side gutter. */
.hero { padding-top: 4rem; padding-bottom: 3rem; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(1.9rem, 8vw, 2.6rem); }
.hero h1 .wordmark { display: flex; justify-content: center; }
.tagline {
  margin: 1.4rem auto 0;
  max-width: 22rem;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--text);
}
.brass-rule {
  width: 3rem;
  height: 2px;
  margin: 2rem auto;
  border: 0;
  background: var(--accent);
}
.soon {
  display: inline-block;
  margin: 0;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 21px;      /* CreelistRadii.primary */
  background: var(--surface);
  font-size: 0.98rem;
}
.soon::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.12em;
}
.contact { margin: 1.75rem 0 0; color: var(--text-2); }

/* Text pages */
.page { padding-top: 2.25rem; padding-bottom: 3rem; }
.page h1 {
  margin: 0 0 0.75rem;
  color: var(--heading);
  font-size: clamp(1.6rem, 6vw, 2rem);
  line-height: 1.2;
}
.page h2 {
  margin: 2.25rem 0 0.5rem;
  color: var(--heading);
  font-size: 1.15rem;
  line-height: 1.3;
}
.page h2::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 2px;
  margin-bottom: 0.9rem;
  background: var(--accent);
}
.lead { font-size: 1.15rem; margin-top: 0; }
.page p, .page li { max-width: 34rem; }
.page ul, .page ol { padding-left: 1.3rem; }
.page li + li { margin-top: 0.35rem; }
.muted { color: var(--text-2); }

.callout {
  margin: 1.75rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--warn);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}
.callout h2 { margin: 0 0 0.35rem; color: var(--warn); }
.callout h2::before { display: none; }
.callout p { margin: 0.35rem 0 0; }

.status {
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
}
.status p { margin: 0; }
.status p + p { margin-top: 0.6rem; }

kbd {
  font: inherit;
  font-weight: 700;
  padding: 0 0.3em;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
}

/* Footer */
footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--text-2);
}
footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}
footer address { font-style: normal; }
footer p { margin: 0.2rem 0 0; }

@media (min-width: 40rem) {
  .hero { padding-top: 6rem; padding-bottom: 4rem; }
}
