/* Lemma Systems — site stylesheet
   Palette, type and geometry all come from the identity system.

   One rule worth stating up front: nothing on this site has a rounded
   corner. The mark is built entirely from right angles, so the site is too.
   Adding a border-radius anywhere will read as a different brand. */

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

:root {
  --ink:      #101720;
  --graphite: #46525E;
  --faint:    #7A8794;
  --brass:    #9A6F28;
  --rule:     #D2D7DC;
  --hair:     #E3E6E9;
  --bg:       #EFF1F2;
  --panel:    #FFFFFF;
  --panel-2:  #E7EAEC;

  /* --ink is the FOREGROUND token: it flips light in dark mode. Anything
     that needs the dark brand colour as a SURFACE must use --solid, or it
     inverts into light-on-light when the theme flips. */
  --solid:     #101720;
  --on-solid:  #F4F5F6;
  --band-bg:   #101720;
  --band-fg:   #F4F5F6;
  --band-muted:#B4BFC9;

  --measure: 64ch;

  --s-1: 0.5rem;
  --s-2: 0.875rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: 6rem;

  --t-xs:  0.75rem;
  --t-sm:  0.875rem;
  --t-bd:  1.0625rem;
  --t-lg:  1.3125rem;
  --t-xl:  1.75rem;
  --t-2xl: 2.375rem;
  --t-3xl: clamp(2.5rem, 5.5vw, 3.75rem);

  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:      #DDE4EA;
    --graphite: #97A4B0;
    --faint:    #6B7885;
    --brass:    #C79A45;
    --rule:     #263039;
    --hair:     #1C242C;
    --bg:       #0C1116;
    --panel:    #141C24;
    --panel-2:  #1B242D;

    /* Solid controls invert so they still read as the emphatic element. */
    --solid:     #DDE4EA;
    --on-solid:  #0C1116;
    /* The band stays dark here — a full-width light slab on a dark page
       reads as a rendering fault, not as emphasis. */
    --band-bg:   #182029;
    --band-fg:   #E7EDF2;
    --band-muted:#9AA7B3;
  }
}

/* ------------------------------------------------------------ base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: var(--t-bd);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .u-sans, nav, .btn, .eyebrow, .label, th {
  font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
}

.u-mono, code, .data dd, .val {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

img, svg { max-width: 100%; }

a { color: inherit; }

a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--solid);
  color: var(--on-solid);
  padding: var(--s-2) var(--s-3);
  z-index: 20;
}
.skip:focus { left: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

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

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

h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }

h1 { font-size: var(--t-3xl); font-weight: 800; line-height: 1.02; }
h2 { font-size: var(--t-2xl); font-weight: 700; line-height: 1.12; }
h3 { font-size: var(--t-lg);  font-weight: 700; line-height: 1.25; }
h4 { font-size: var(--t-bd);  font-weight: 700; line-height: 1.3; }

.eyebrow {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s-2);
}

.label {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.lede {
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--graphite);
}

.muted { color: var(--graphite); }

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

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding-block: var(--s-3);
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; color: var(--ink); }
.brand .qed { fill: var(--brass); }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand .n1 {
  font-family: "Libre Franklin", sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.045em;
}
.brand .n2 {
  font-family: "Libre Franklin", sans-serif;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--brass);
  margin-top: 3px;
}

.site-nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.site-nav a {
  font-size: var(--t-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--graphite);
  padding-block: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }

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

.btn {
  display: inline-block;
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--solid);
  background: var(--solid);
  color: var(--on-solid);
}
.btn:hover { background: transparent; color: var(--ink); }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--solid); color: var(--on-solid); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

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

section { padding-block: clamp(3rem, 7vw, var(--s-6)); }
section.tight { padding-block: clamp(2.25rem, 5vw, var(--s-5)); }

.section-head { margin-bottom: var(--s-4); }
.section-head .lede { margin-top: var(--s-2); max-width: var(--measure); }

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

.hero { padding-block: clamp(3.5rem, 9vw, 7rem); border-bottom: 1px solid var(--rule); }
.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: var(--s-3); max-width: 56ch; font-size: var(--t-xl); color: var(--ink); }
.hero .sub { margin-top: var(--s-3); max-width: var(--measure); color: var(--graphite); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: var(--s-5);
  align-items: start;
}
.hero-grid .art { color: var(--ink); }
.hero-grid .art svg { display: block; width: 100%; height: auto; }
.hero-grid .art .qed { fill: var(--brass); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .hero-grid .art { width: 96px; }
}

/* ------------------------------------------------------------ grids */

.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid > * { background: var(--panel); padding: var(--s-3); }

.card h3 { margin-bottom: var(--s-1); }
.card p { margin: 0; font-size: var(--t-bd); color: var(--graphite); }
.card .kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-xs);
  color: var(--brass);
  display: block;
  margin-bottom: var(--s-2);
}

/* Single-person bio block. A lone .card in a .grid stretches full width
   because the grid uses auto-fit, which reads as a layout bug rather than a
   choice — so a one-person team gets its own constrained container. */
.bio {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: var(--s-3);
  max-width: 32rem;
}
.bio h3 { margin-bottom: 0.15rem; }
.bio .role {
  font-family: "Libre Franklin", sans-serif;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 var(--s-2);
}
.bio p:last-child { margin: 0; color: var(--graphite); }
/* the bio follows the company story; it needs air between them */
.prose + .bio { margin-top: var(--s-4); }

/* numbered steps — only used where order genuinely carries meaning */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: 1px solid var(--rule); }
.steps .n {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--brass);
  padding-top: 0.2rem;
}
.steps h3 { margin-bottom: var(--s-1); }
.steps p { margin: 0; color: var(--graphite); }

/* plain feature list */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--graphite);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 8px; height: 8px;
  background: var(--brass);
}
.ticks li b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ data */

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: var(--s-3);
}

.data { margin: 0; }
.data > div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: var(--s-3);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hair);
}
.data > div:last-child { border-bottom: 0; padding-bottom: 0; }
.data > div:first-child { padding-top: 0; }
.data dt {
  font-family: "Libre Franklin", sans-serif;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.2rem;
}
.data dd { margin: 0; font-size: var(--t-sm); word-break: break-word; }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chips span {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-xs);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.45rem;
  white-space: nowrap;
}
.chips span.pri { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }

/* a value the operator must replace before launch */
.fill {
  color: var(--brass);
  border-bottom: 1px dotted var(--brass);
  font-style: normal;
}

/* ------------------------------------------------------------ inverse band */

.band {
  background: var(--band-bg);
  color: var(--band-fg);
}
.band h2, .band h3 { color: var(--band-fg); }
.band p { color: var(--band-muted); }
.band .eyebrow { color: var(--brass); }
.band .btn { background: var(--band-fg); color: var(--band-bg); border-color: var(--band-fg); }
.band .btn:hover { background: transparent; color: var(--band-fg); }
.band a { color: var(--band-fg); }
.band .contact-list li { border-bottom-color: rgba(255,255,255,0.14); }
.band .contact-list .k { color: var(--band-muted); }

.band-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--s-5);
  align-items: center;
}
@media (max-width: 780px) { .band-grid { grid-template-columns: 1fr; gap: var(--s-3); } }

/* ------------------------------------------------------------ contact */

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--s-2);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hair);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .k {
  font-family: "Libre Franklin", sans-serif;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.25rem;
}
.contact-list .v { font-family: "IBM Plex Mono", monospace; font-size: var(--t-sm); }
.contact-list a { text-decoration-color: var(--brass); text-underline-offset: 3px; }

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: var(--s-4) var(--s-3);
  margin-top: var(--s-4);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-grid h4 {
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: var(--s-2);
}
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 0.4rem; }
.foot-links a {
  font-family: "Libre Franklin", sans-serif;
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--graphite);
}
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

.foot-strip {
  margin-top: var(--s-4);
  padding-top: var(--s-2);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-xs);
  color: var(--faint);
}
.foot-strip b {
  font-family: "Libre Franklin", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

/* ------------------------------------------------------------ misc */

.center-narrow { max-width: 46rem; margin-inline: auto; text-align: center; }
.center-narrow .lede { margin-inline: auto; }
.center-narrow .btn-row { justify-content: center; }

.error-page { padding-block: clamp(4rem, 12vw, 9rem); }
.error-page .code {
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--t-2xl);
  color: var(--brass);
  margin-bottom: var(--s-2);
}

@media print {
  .site-nav, .btn-row, .band { display: none; }
  body { background: #fff; color: #000; }
}
