/*
 * Colloquent — design system for the public site.
 *
 * One stylesheet, no framework, no web fonts, no JavaScript of our own. The
 * constraint is deliberate: it is what lets cookies.html describe exactly what
 * this site loads and have that be checkable in a network tab.
 *
 * Working without a webfont means the typography has to come from scale,
 * spacing and weight rather than from a typeface. Everything below is built on
 * a fluid type scale and a small set of tokens; nothing is a one-off.
 */

/* ---------------------------------------------------------------- tokens -- */

:root {
  /* Ink is green-tinted rather than neutral black, so text sits in the same
     family as the brand instead of next to it. */
  --ink: #0b100e;
  --ink-2: #1b2320;
  --muted: #5d6b64;
  --muted-2: #8b968f;

  --paper: #fbfaf8;
  --white: #ffffff;

  --emerald: #0f7a4f;
  --emerald-bright: #1fa36a;
  --emerald-deep: #063c27;

  /* Used at about one per screen. Restraint is what keeps it feeling like an
     accent rather than a second brand colour. */
  --brass: #b0873a;

  --line: rgba(11, 16, 14, 0.09);
  --line-strong: rgba(11, 16, 14, 0.16);

  --shadow-sm: 0 1px 2px rgba(11, 16, 14, 0.04), 0 2px 8px rgba(11, 16, 14, 0.04);
  --shadow-md: 0 2px 4px rgba(11, 16, 14, 0.04), 0 12px 28px rgba(11, 16, 14, 0.08);
  --shadow-lg: 0 8px 16px rgba(11, 16, 14, 0.06), 0 32px 64px rgba(11, 16, 14, 0.12);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --w-wide: 74rem;
  --w-mid: 58rem;
  --w-text: 40rem;

  --step: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 2.5rem);
}

.wrap--text { max-width: calc(var(--w-text) + 5rem); }
.wrap--mid  { max-width: calc(var(--w-mid) + 5rem); }

section { position: relative; }

.band          { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band--tight   { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.band--paper   { background: var(--paper); }
.band--white   { background: var(--white); border-block: 1px solid var(--line); }

/* ------------------------------------------------------------ typography -- */

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 640;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.35rem, 1.2rem + 4.6vw, 4.25rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.125rem); }
h3 { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem); line-height: 1.3; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 38ch;
  text-wrap: pretty;
}

.lede--wide { max-width: 52ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  margin: 0 0 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

a { color: var(--emerald); text-underline-offset: 0.2em; }
a:hover { color: var(--emerald-deep); }

:focus-visible {
  outline: 2px solid var(--emerald-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------- header --- */

header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 250, 248, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 1rem 1.75rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.0625rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.brand span { color: var(--emerald); }

header.site nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  font-size: 0.9375rem;
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 520;
  padding: 0.3rem 0;
  transition: color 0.18s var(--ease);
}

header.site nav a:hover { color: var(--ink); }

@media (max-width: 40rem) {
  header.site { position: static; }
  header.site .wrap { padding-block: 0.9rem; }
  header.site nav { margin-left: 0; width: 100%; font-size: 0.875rem; gap: 0.3rem 1.1rem; }
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--r-pill);
  font-size: 0.96875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn--primary {
  background: linear-gradient(180deg, var(--emerald-bright), var(--emerald));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, var(--shadow-md);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, var(--shadow-lg);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }

.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn--on-dark:hover { color: #fff; background: rgba(255, 255, 255, 0.13); transform: translateY(-1px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90rem 42rem at 78% -12%, rgba(31, 163, 106, 0.38), transparent 62%),
    radial-gradient(60rem 36rem at 8% 108%, rgba(15, 122, 79, 0.3), transparent 60%),
    linear-gradient(168deg, #0d1a15 0%, #08120e 55%, #060d0a 100%);
  color: #fff;
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4rem, 9vw, 7rem);
}

/* A hairline of brand colour along the top edge. Cheap, and it reads as care. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald-bright), var(--brass), transparent);
  opacity: 0.85;
}

.hero .eyebrow { color: #8fe3bb; }
.hero .display { color: #fff; }

.hero .lede {
  color: rgba(255, 255, 255, 0.76);
  max-width: 44ch;
  margin-top: 1.4rem;
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
}

@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The stat strip under the hero copy. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1.5rem 2rem;
  margin: 3rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  list-style: none;
}

.stats li { margin: 0; }

.stats b {
  display: block;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
}

.stats span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.4;
}

/* The glass panel beside the hero copy. */
.panel {
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.panel h3 {
  color: #fff;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.56);
  margin-bottom: 1rem;
}

.thread { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.thread li { margin: 0; display: flex; }

.bubble {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 5px;
}

.thread li.out { justify-content: flex-end; }

.thread li.out .bubble {
  background: linear-gradient(180deg, var(--emerald-bright), var(--emerald));
  border-color: transparent;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 5px;
}

.bubble small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

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

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.6rem 1.5rem;
  margin: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.card h3 { margin: 0 0 0.45rem; }

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96875rem;
  line-height: 1.55;
}

.card .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 11px;
  margin-bottom: 1.05rem;
  color: var(--emerald);
  background: linear-gradient(180deg, rgba(31, 163, 106, 0.16), rgba(15, 122, 79, 0.1));
  border: 1px solid rgba(15, 122, 79, 0.16);
}

.card .ico svg { width: 1.25rem; height: 1.25rem; }

/* Numbered steps. */
.steps { counter-reset: step; }

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 1.35rem;
  right: 1.4rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

/* --------------------------------------------------------------- section -- */

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); font-size: 1.0625rem; margin-top: 0.85rem; }

/* ------------------------------------------------------------------- cta -- */

.cta {
  border-radius: var(--r-lg);
  padding: clamp(2.25rem, 5vw, 3.5rem);
  background:
    radial-gradient(40rem 20rem at 85% -30%, rgba(31, 163, 106, 0.4), transparent 60%),
    linear-gradient(160deg, #0d1a15, #07110d);
  color: #fff;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.72); margin: 0.9rem auto 0; max-width: 46ch; }
.cta .btn-row { justify-content: center; }

/* -------------------------------------------------------- document pages -- */

main { display: block; }

.doc { padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 6rem); }

.doc h1 { margin-bottom: 0.85rem; }

.doc h2 {
  font-size: clamp(1.1875rem, 1.1rem + 0.5vw, 1.4375rem);
  margin: 2.75rem 0 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.doc h2:first-of-type { border-top: 0; padding-top: 0; }
.doc h3 { margin: 1.9rem 0 0.5rem; }

.doc ul, .doc ol { margin: 0 0 1.15rem; padding-left: 1.3rem; }
.doc li { margin-bottom: 0.5rem; }
.doc li::marker { color: var(--muted-2); }

.updated {
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin: 0 0 2.25rem;
}

.note {
  background: linear-gradient(180deg, rgba(31, 163, 106, 0.07), rgba(31, 163, 106, 0.03));
  border: 1px solid rgba(15, 122, 79, 0.18);
  border-left: 3px solid var(--emerald);
  border-radius: var(--r-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.75rem 0;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.4rem 0 1.75rem;
  font-size: 0.9375rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--line);
}

tr:last-child td { border-bottom: 0; }

th {
  font-weight: 620;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
}

/* A table is a grid, and a grid does not fit a phone. Let it scroll rather
   than squeeze four columns into 320px. */
.doc table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: rgba(11, 16, 14, 0.055);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}

dl.contact { margin: 1.25rem 0; }
dl.contact dt { font-weight: 620; margin-top: 1.1rem; }
dl.contact dd { margin: 0.2rem 0 0; color: var(--muted); }

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

footer.site {
  background: linear-gradient(180deg, #0a1310, #060c09);
  color: rgba(255, 255, 255, 0.62);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
  font-size: 0.9375rem;
}

.foot-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(9rem, 1fr));
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-brand .brand { color: #fff; margin-bottom: 0.9rem; }
.foot-brand .brand span { color: var(--emerald-bright); }
.foot-brand p { color: rgba(255, 255, 255, 0.52); font-size: 0.9375rem; max-width: 30ch; }

.foot-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }

.foot-col a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.foot-col a:hover { color: #fff; text-decoration: underline; }

.legal {
  margin: 2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
  max-width: 62ch;
}

.legal a { color: rgba(255, 255, 255, 0.62); }

/* ------------------------------------------------------------ dark scheme - */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef3f0;
    --ink-2: #dbe4df;
    --muted: #9aa8a1;
    --muted-2: #7d8b84;
    --paper: #080d0b;
    --white: #0f1613;
    --emerald: #35c187;
    --emerald-bright: #4ed79c;
    --emerald-deep: #7fe7bb;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 32px 64px rgba(0, 0, 0, 0.6);
  }

  header.site { background: rgba(8, 13, 11, 0.8); }
  th { background: rgba(255, 255, 255, 0.03); }
  code { background: rgba(255, 255, 255, 0.07); }
  .card .ico { background: rgba(53, 193, 135, 0.12); border-color: rgba(53, 193, 135, 0.22); }
  .btn--primary { color: #04120c; }
  .btn--primary:hover { color: #04120c; }
}

@media print {
  header.site, footer.site nav, .hero, .cta { display: none; }
  body { background: #fff; color: #000; }
}
