/* Cogno Solutions LLC — site stylesheet
   Plain CSS, no build step. Light theme by default, dark theme via prefers-color-scheme. */

:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-2: #edf3f9;
  --text: #13213a;
  --muted: #4b5b73;
  --line: #d5dfea;
  --accent: #0f6fc5;        /* light blue, primary accent */
  --accent-strong: #0a5aa3;
  --accent-soft: #e2effb;
  --on-accent: #ffffff;
  --amber: #9a5b00;         /* amber, secondary highlight (AA on light bg) */
  --amber-soft: #fff1d6;
  --focus: #c47a00;
  --shadow: 0 1px 2px rgba(19, 33, 58, 0.06), 0 8px 24px -12px rgba(19, 33, 58, 0.18);
  --grid: rgba(15, 111, 197, 0.09);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c131d;
    --surface: #121c29;
    --surface-2: #182536;
    --text: #e8eef6;
    --muted: #a6b4c8;
    --line: #273549;
    --accent: #6fb6ff;
    --accent-strong: #9ccdff;
    --accent-soft: #14294a;
    --on-accent: #0c131d;
    --amber: #f2b64f;
    --amber-soft: #3a2a0c;
    --focus: #f2b64f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --grid: rgba(111, 182, 255, 0.10);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

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

html {
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

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

address { font-style: normal; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 20px;
}
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  min-height: 64px;
  padding-block: 0.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark:hover { color: var(--text); }
.wordmark .mark {
  width: 26px; height: 26px;
  flex: none;
}
.wordmark b { font-weight: 700; }
.wordmark span { font-weight: 400; color: var(--muted); }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
}
.site-nav a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); }

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-top: 1px solid var(--line);
}
.section:first-child { border-top: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem; height: 2px;
  background: var(--amber);
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 44ch;
}

.measure { max-width: 68ch; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3rem, 6vw, 5rem);
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  /* fade the grid toward the bottom so content below starts clean */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--surface));
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.hero h1 { max-width: 20ch; }
.hero .lead { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); max-width: 40ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
}
.btn:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn svg { width: 1em; height: 1em; }

.btn-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem 2rem;
  margin: 3rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.facts > div { margin: 0; }
.facts dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.facts dd { margin: 0; font-size: 0.95rem; }

/* ---------- Products ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.product {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color 120ms ease, transform 120ms ease;
}
@media (prefers-reduced-motion: no-preference) {
  .product:hover { transform: translateY(-2px); }
}
.product:hover { border-color: var(--accent); }

.product-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.product h3 { margin: 0; font-size: 1.35rem; }
.product .url {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.product .url:hover { color: var(--accent); text-decoration: underline; }

.product p { margin-bottom: 0.9rem; }
.product .audience {
  font-size: 0.95rem;
  color: var(--muted);
}
.product .audience strong { color: var(--text); font-weight: 600; }

.product-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.status::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.status.is-dev::before { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status.is-open::before { background: transparent; border: 2px solid var(--accent); box-shadow: none; }

.product-foot .go {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- How we work ---------- */

.points {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem 2.5rem;
  counter-reset: point;
}
.points li {
  counter-increment: point;
  padding-top: 1rem;
  border-top: 2px solid var(--line);
  position: relative;
}
.points li::before {
  content: counter(point, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  display: block;
  margin-bottom: 0.5rem;
}
.points h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.points p { color: var(--muted); font-size: 1rem; }

/* ---------- About / Contact ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 4rem;
  align-items: start;
}
@media (min-width: 820px) {
  .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.contact-card dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.3rem;
}
.contact-card dd { margin: 0 0 1.25rem; }
.contact-card dd:last-child { margin-bottom: 0; }
.contact-card .email {
  font-size: 1.15rem;
  font-weight: 600;
  word-break: break-all;
}

/* ---------- Legal pages ---------- */

.page-head {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 0.5rem; max-width: 24ch; }
.page-head .meta {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.legal {
  padding-block: clamp(2rem, 4vw, 3.5rem);
}
.legal > * { max-width: 72ch; }
.legal h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { margin-top: 1.5rem; }
.legal ul, .legal ol { padding-left: 1.4rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal .note {
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
}
.legal .related {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.925rem;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 3rem;
  padding-block: 2.25rem 2rem;
}
@media (min-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer .wordmark { font-size: 1.05rem; margin-bottom: 0.6rem; }
.site-footer .wordmark .mark { width: 22px; height: 22px; }
.site-footer h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
.site-footer .copyright {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  body { font-size: 1rem; }
  .product { padding: 1.25rem; }
  .site-nav a { padding: 0.3rem 0.45rem; font-size: 0.9rem; }
}

@media print {
  .site-header, .site-footer, .skip-link, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
