/* Lonexa LLC — lonexa.ai
   Palette and type scale. Colours mirror the Steady Increment light theme
   (mobile/src/theme/tokens.ts) so the company site and the product read as
   one family. Change them here and nowhere else. */

:root {
  --bg:      #EDEFF1;  /* cool zinc — deliberately not cream */
  --surface: #FFFFFF;
  --ink:     #14181B;  /* graphite */
  --muted:   #5A6470;
  --faint:   #8C959E;
  --rule:    #C7CDD3;
  --brass:   #A8762A;  /* the app's light-mode accent */
  --deep:    #0E1215;  /* the app's dark background */
  --deep-2:  #1C2328;

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --measure: 34rem;   /* prose line length */
  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
  --shell:   68rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis-weight: none;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .dot { color: var(--brass); }

.masthead nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--brass); }

/* ---------- the increment rule (signature) ----------
   A machinist's scale: minor ticks every 9px, major every 45px. The product
   snaps every recommendation onto increments a rack can physically make; this
   is that idea, drawn. */

.increment-rule {
  height: 18px;
  margin-block: 0;
  border: 0;
  background-image:
    repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(to right, var(--brass) 0 1px, transparent 1px 45px);
  background-size: 100% 7px, 100% 15px;
  background-position: left bottom, left bottom;
  background-repeat: repeat-x;
}

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

.hero { padding-block: clamp(3.5rem, 11vw, 7rem) clamp(2rem, 5vw, 3rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.5rem;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7.5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 1.75rem;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: var(--measure);
  margin: 0;
}

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

/* ---------- sections ---------- */

section { padding-block: clamp(2.75rem, 7vw, 4.5rem); }

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.75rem;
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

section > p { max-width: var(--measure); color: var(--muted); }

/* ---------- product card ---------- */

.product {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 46rem;
}

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

.product h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
  margin: 0;
}

.status {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
  border-radius: 2px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.product p { margin: 0 0 1.25rem; color: var(--muted); max-width: var(--measure); }

.doclinks {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.doclinks a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--brass); padding-bottom: 1px; }
.doclinks a:hover { color: var(--brass); }

/* ---------- contact slab (inverted) ---------- */

.contact {
  background: var(--deep);
  color: #E1E6EA;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.contact .section-label { color: var(--brass); }

.contact h2 { color: #E1E6EA; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.field-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8D97A1;
  margin: 0 0 0.5rem;
}

.field-value {
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #E1E6EA;
  margin: 0;
  font-style: normal;
}

.field-value a { color: #E1E6EA; text-decoration: none; border-bottom: 1px solid var(--brass); }
.field-value a:hover { color: #D8A155; }

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

footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--brass); }

/* ---------- legal documents ---------- */

.doc { padding-block: clamp(2.5rem, 6vw, 4rem) 4rem; }

.doc-inner { max-width: 42rem; }

.doc h1 {
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

.doc h2 {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.doc h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.625rem;
}

.doc p, .doc li { color: #2C343B; }

.doc a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--brass); }
.doc a:hover { color: var(--brass); }

.doc ul { padding-left: 1.125rem; }
.doc li { margin-block: 0.4rem; }
.doc li::marker { color: var(--brass); }

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

.doc hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin-block: 2.5rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.5rem;
  font-size: 0.9375rem;
}

.doc th, .doc td {
  text-align: left;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.doc th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.table-wrap { overflow-x: auto; }

.updated {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.backlink {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2.5rem;
}

.backlink:hover { color: var(--brass); }

/* ---------- 404 ---------- */

.notfound { padding-block: clamp(4rem, 14vw, 9rem); }

/* ---------- accessibility floor ---------- */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

a { transition: color 120ms ease; }

@media print {
  body { background: #fff; }
  .contact { background: #fff; color: #000; }
  .contact h2, .field-value, .field-value a { color: #000; }
  .masthead nav, .increment-rule { display: none; }
}

.nowrap { white-space: nowrap; }

/* The source markdown puts `---` before most `##`. The h2 already carries a
   top rule, so collapse the pair into one line. */
.doc hr + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
