/*
 * Styles for crowcorelabs.com.
 *
 * Charcoal and gold: crows, and the shiny things they collect. One accent, system fonts, no build
 * step and nothing fetched from anywhere. The page is a paragraph and a list of links, and it should
 * render instantly, offline, in any browser, in either colour scheme.
 *
 * Contrast: the light-mode accent is a deliberately dark gold (#7a5c0e, about 5.6:1 on this ground)
 * because it is link text and normal-size text needs 4.5:1 for WCAG AA. The brighter gold that reads
 * as "gold" (#e0b53a) only appears in dark mode, where it measures around 9.8:1 on #131316.
 */

:root {
  --bg: #f6f5f2;
  --bg-raised: #ffffff;
  --fg: #1c1b1f;
  --fg-soft: #5d5a55;
  --edge: #e2dfd8;
  --accent: #7a5c0e;
  --cta-bg: #1c1b1f;
  --cta-fg: #f6f5f2;
  --cta-bg-hover: #333238;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131316;
    --bg-raised: #1d1d22;
    --fg: #ece9e2;
    --fg-soft: #a39f97;
    --edge: #2c2c33;
    --accent: #e0b53a;
    --cta-bg: #e0b53a;
    --cta-fg: #131316;
    --cta-bg-hover: #f0c650;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Header ------------------------------------------------------------------------------------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--fg-soft);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* Type ----------------------------------------------------------------------------------------- */

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-soft);
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--edge);
}

h3 {
  font-size: 1.25rem;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--fg-soft);
}

.muted {
  color: var(--fg-soft);
  font-size: 0.95rem;
}

/* Cards ---------------------------------------------------------------------------------------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.app-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.tag {
  font-size: 0.8rem;
  color: var(--fg-soft);
  white-space: nowrap;
}

.links {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.1rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.more {
  font-size: 0.95rem;
}

/* Buttons -------------------------------------------------------------------------------------- */

.cta {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-fg);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  line-height: 1.2;
}

.cta:hover {
  background: var(--cta-bg-hover);
  text-decoration: none;
}

/* Footer --------------------------------------------------------------------------------------- */

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--edge);
  font-size: 0.9rem;
  color: var(--fg-soft);
}
