/* Ways of Being — support site.
   Colour comes from tokens.css (generated from the Flutter theme); this file
   only assigns roles to elements. Never reference --wob-c-* here except for
   the two things that genuinely do not theme: the wordmark's navy band. */

/* ---------------------------------------------------------------- type --- */

@font-face {
  font-family: "Lexend";
  src: url("Lexend-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: Lexend, "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 65ch;
  --gutter: 24px;
}

/* --------------------------------------------------------------- reset --- */

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

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

body {
  margin: 0;
  background: var(--wob-surface);
  color: var(--wob-on-surface);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.5px;
}

img { max-width: 100%; }

/* ------------------------------------------------------------ masthead --- */

/* The wordmark measures 1.94:1 on the cream page background, so on a light
   ground it always sits in a navy band. 318px is the width at which the
   asset lands 1:1 on a 3x display; 29px is one dot diameter of clear space. */

.masthead {
  background: var(--wob-c-navy);
  padding: 29px var(--gutter);
}

.masthead__link {
  display: inline-block;
  border-radius: 4px;
}

/* The band is fixed navy in both themes, so its focus ring has to be fixed
   too: the light theme's --wob-primary is only 2.4:1 on navy, under the 3:1
   a focus indicator needs. This is one of the few legitimate uses of a raw
   palette variable. */
.masthead__link:focus-visible {
  outline-color: var(--wob-c-blue-sky);
}

.masthead__logo {
  display: block;
  width: 318px;
  height: auto;
}

/* --------------------------------------------------------------- shell --- */

.page {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
}

.page > * + * { margin-top: 24px; }

/* Higher specificity than the stack rule above, so section headings keep
   their larger gap. */
.page > h2 { margin-top: 48px; }

/* --------------------------------------------------------------- scale --- */

h1, h2, h3 {
  font-family: var(--font);
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
}

h2 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

p, ul, ol { margin: 0; }

ul, ol { padding-left: 24px; }

li + li { margin-top: 8px; }

.lede {
  color: var(--wob-on-surface-variant);
  font-size: 16px;
}

.small {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--wob-on-surface-variant);
}

/* --------------------------------------------------------------- links --- */

/* Colour alone is not a sufficient signal, so links in running text are
   underlined. --wob-primary is 6.18:1 on the light page, 9.23:1 on dark. */

a {
  color: var(--wob-primary);
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 2px solid var(--wob-primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- cards --- */

.card {
  background: var(--wob-surface-container);
  border: 1px solid var(--wob-outline-variant);
  border-radius: 12px;
  padding: 20px;
}

.card > * + * { margin-top: 12px; }
.card > :first-child, .callout > :first-child { margin-top: 0; }

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ------------------------------------------------------------- callout --- */

.callout {
  background: var(--wob-secondary-container);
  color: var(--wob-on-secondary-container);
  border-radius: 12px;
  padding: 20px;
}

.callout > * + * { margin-top: 12px; }

.callout a { color: inherit; }

/* -------------------------------------------------------------- button --- */

.button {
  display: inline-block;
  background: var(--wob-primary);
  color: var(--wob-on-primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.1px;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 100px;
  min-height: 48px;
}

.button:hover { text-decoration: underline; }

/* -------------------------------------------------------------- footer --- */

.footer {
  border-top: 1px solid var(--wob-outline-variant);
  margin-top: 64px;
  padding: 24px var(--gutter) 40px;
}

.footer__inner {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: var(--wob-on-surface-variant);
}

/* ------------------------------------------------------------ narrower --- */

@media (max-width: 420px) {
  :root { --gutter: 16px; }
  h1 { font-size: 28px; line-height: 36px; }
  .masthead { padding: 20px var(--gutter); }
  /* 318px is the wordmark's legibility floor; below that the viewport wins. */
  .masthead__logo { width: min(318px, 100%); }
}
