/* coglossa.com. Built on the Bonham Technologies design system: warm paper and ink, Archivo for
   text, IBM Plex Mono for technical content only, square corners, hairlines, no shadows.
   Coglossa's own voice inside that system is one accent, berry (--product-accent), and one
   motif, gloss marks: an underline in the text tied to a note in the margin. Safety orange is
   the action colour and nothing else. Colours are tokens; Daylight is the default and Night
   follows the reader's system setting. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg-ground: #f3f0e8;
  --bg-surface: #fbfaf6;
  --bg-sunken: #e8e4d9;
  --ink-primary: #16181a;
  --ink-muted: #4f5559;
  --ink-subtle: #606569;
  --line-hairline: #d8d2c4;
  --line-strong: #8a8477;
  --signal-fill: #ec5308;
  --signal-fill-hover: #d54a07;
  --signal-on: #140f0c;
  --status-ok: #26703a;
  --focus-ring: #2a5a96;
  --product-accent: #8f2d5e;
  --product-tint: #f3e3ea;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-ground: #0f1113;
    --bg-surface: #171a1d;
    --bg-sunken: #0a0b0c;
    --ink-primary: #ede9e0;
    --ink-muted: #a6acb0;
    --ink-subtle: #878d91;
    --line-hairline: #2a2f34;
    --line-strong: #6a7279;
    --signal-fill: #ff6a1f;
    --signal-fill-hover: #ff7f3d;
    --status-ok: #5cc27a;
    --focus-ring: #7aaef0;
    --product-accent: #f09bc0;
    --product-tint: #3a1f2c;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-primary);
  background: var(--bg-ground);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--ink-primary);
  text-decoration-line: underline;
  text-decoration-color: var(--product-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--product-accent);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.88em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--space-3) var(--space-4);
  background: var(--ink-primary);
  color: var(--bg-ground);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

.skip-link:hover {
  color: var(--bg-ground);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Header: the product lockup (accent square, name, parent) and the section links. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-ground);
  border-bottom: 1px solid var(--line-hairline);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-6);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  color: var(--ink-primary);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink-primary);
}

.logo::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--product-accent);
}

.logo b {
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo span {
  font-size: 14px;
  line-height: 24px;
  color: var(--ink-muted);
}

.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header ul a {
  display: inline-block;
  padding: var(--space-2) 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}

.site-header ul a:hover {
  color: var(--ink-primary);
  text-decoration: underline;
  text-decoration-color: var(--product-accent);
  text-decoration-thickness: 2px;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-12) var(--space-16);
  align-items: end;
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.hero.plain {
  display: block;
}

.eyebrow,
.label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.eyebrow {
  color: var(--product-accent);
  margin: 0 0 var(--space-6);
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 12ch;
  margin-bottom: var(--space-8);
}

/* The gloss: the phrase the page is about carries the same underline the motif draws. */
h1 em {
  font-style: normal;
  box-shadow: inset 0 -0.1em 0 var(--product-accent);
}

.lede {
  font-size: 20px;
  line-height: 30px;
  max-width: 640px;
  margin: 0 0 var(--space-8);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
}

.button:hover {
  color: var(--ink-primary);
  border-color: var(--ink-primary);
}

.button.primary {
  background: var(--signal-fill);
  border-color: var(--signal-fill);
  color: var(--signal-on);
}

.button.primary:hover {
  background: var(--signal-fill-hover);
  border-color: var(--signal-fill-hover);
  color: var(--signal-on);
}

/* Gloss marks: lines of text, some underlined, each underline tied to a note in the margin. */

.gloss {
  display: block;
  width: 100%;
  height: auto;
}

.gloss .g-line {
  fill: var(--ink-primary);
  opacity: 0.16;
}

.gloss .g-note {
  fill: var(--ink-primary);
  opacity: 0.4;
}

.gloss .g-mark {
  fill: var(--product-accent);
}

.gloss .g-tie {
  fill: none;
  stroke: var(--product-accent);
  stroke-width: 1;
}

.gloss .g-margin {
  stroke: var(--line-strong);
  stroke-width: 1;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .gloss {
    max-width: 420px;
  }
}

/* Sections */

section {
  padding: var(--space-24) 0;
  border-top: 1px solid var(--line-hairline);
}

section.band {
  background: var(--bg-surface);
}

.label {
  color: var(--product-accent);
  margin: 0 0 var(--space-3);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-6);
  max-width: 22ch;
}

h3 {
  font-size: 19px;
  line-height: 26px;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.intro {
  color: var(--ink-muted);
  font-size: 18px;
  line-height: 28px;
  max-width: 680px;
  margin: 0 0 var(--space-12);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--space-8) var(--space-16);
}

.two-col p {
  color: var(--ink-muted);
  margin: 0 0 var(--space-4);
}

.two-col p + h3 {
  margin-top: var(--space-8);
}

/* Open columns under a rule, not boxes. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-12) var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-strong);
}

.card p {
  font-size: 16px;
  line-height: 25px;
  color: var(--ink-muted);
  margin: 0;
}

.card p + p {
  margin-top: var(--space-3);
}

/* Step numbers are a real sequence, so they are numbered, in the technical face. */
.step {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-subtle);
  margin-bottom: var(--space-2);
}

.plain-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink-muted);
}

.plain-list li + li {
  margin-top: var(--space-2);
}

/* Each flag reads as a margin note: a short accent rule, then the note. */
.flags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-4) var(--space-8);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.flags li {
  padding-left: var(--space-8);
  position: relative;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 25px;
}

.flags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 20px;
  height: 2px;
  background: var(--product-accent);
}

.flags strong {
  color: var(--ink-primary);
  font-weight: 600;
}

.flags-title {
  margin-top: var(--space-16);
}

.intro.tight {
  margin-bottom: 0;
}

/* Demo */

.note {
  border-left: 2px solid var(--product-accent);
  background: var(--product-tint);
  padding: var(--space-4) var(--space-6);
  max-width: 820px;
  margin: 0 0 var(--space-12);
  color: var(--ink-primary);
  font-size: 16px;
  line-height: 25px;
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: var(--space-2);
}

.frame {
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--bg-sunken);
  margin: 0;
}

figure {
  margin: 0;
}

figcaption {
  font-size: 15px;
  color: var(--ink-subtle);
  margin-top: var(--space-3);
}

.video figcaption {
  margin-bottom: var(--space-16);
}

.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-16);
}

.shot {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-6) var(--space-12);
  align-items: start;
}

.shot > div {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-strong);
}

.shot p {
  margin: 0;
  color: var(--ink-muted);
}

.shot.narrow {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.shot.narrow .frame {
  max-width: 360px;
}

@media (max-width: 760px) {
  .shot,
  .shot.narrow {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot > div {
    padding-top: 0;
    border-top: 0;
  }
}

/* The sample passage: the text on the right, what each line is in the margin on the left. */

.sample {
  background: var(--bg-surface);
  border: 1px solid var(--line-strong);
}

.sample > header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-6);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}

.sample dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
}

.sample dt,
.sample dd {
  margin: 0;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line-hairline);
}

.sample dt {
  font-size: 14px;
  line-height: 27px;
  font-weight: 600;
  color: var(--product-accent);
}

.sample dd {
  color: var(--ink-primary);
}

.sample dd p {
  margin: 0;
}

.sample dd p + p,
.sample dd ul {
  margin-top: var(--space-2);
}

.sample dd ul {
  padding-left: 1.1em;
  margin-bottom: 0;
}

.sample .muted {
  color: var(--ink-muted);
  font-size: 15px;
}

.sample mark {
  background: var(--product-tint);
  color: inherit;
  padding: 0 3px;
  box-shadow: inset 0 -2px 0 var(--product-accent);
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  padding: 1px var(--space-2);
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
  margin-right: var(--space-2);
}

.badge.ok {
  color: var(--status-ok);
  border-color: var(--status-ok);
}

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-6);
  font-family: var(--mono);
  font-size: 14px;
}

.sample footer {
  padding: var(--space-4) var(--space-6);
  font-size: 15px;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .sample dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .sample dt {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .sample dd {
    padding-top: var(--space-1);
  }
}

/* Running it */

pre {
  background: var(--bg-sunken);
  border: 1px solid var(--line-hairline);
  padding: var(--space-4) var(--space-6);
  overflow-x: auto;
  line-height: 1.6;
  color: var(--ink-primary);
  margin: 0 0 var(--space-4);
}

pre .c {
  color: var(--ink-subtle);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line-hairline);
  padding: var(--space-12) 0 var(--space-16);
  font-size: 15px;
  color: var(--ink-muted);
}

.site-footer p {
  margin: 0 0 var(--space-2);
}

.site-footer a {
  color: var(--ink-muted);
}

.placeholder {
  border: 2px dashed var(--product-accent);
  padding: 2px var(--space-2);
  color: var(--ink-primary);
}
