/* Lucian Dynamics / Lucian Labs LLC — the one stylesheet for the whole site:
   the Lucian Dynamics page at the root and the Lucian Labs pages under labs/.
   Plain CSS, no build step, no external fonts. The palette follows the
   PayGrade icon: navy and royal blue on white, inverted for dark mode. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f3f6fc;
  --ink: #0f1a33;
  --ink-2: #4a5570;
  --line: #dde3ef;
  --brand: #0b1f5c;
  --accent: #1a5fd6;
  --accent-ink: #ffffff;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(15, 26, 51, .06), 0 10px 28px rgba(15, 26, 51, .07);
  --max: 64rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1f;
    --bg-2: #111a33;
    --ink: #e9edf8;
    --ink-2: #aab4d0;
    --line: #26314f;
    --brand: #e3eaff;
    --accent: #7fa9ff;
    --accent-ink: #061030;
    --card: #121b36;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

h1, h2, h3 { color: var(--brand); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 0; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .35em; }

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

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: .5em .9em; border-radius: 8px;
}
.skip:focus { left: 16px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: .5rem 1.5rem; min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.wordmark {
  display: inline-flex; align-items: baseline; gap: .4em;
  color: var(--brand); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em;
}
.wordmark small { font-weight: 500; font-size: .8rem; color: var(--ink-2); letter-spacing: .04em; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .25em 0; }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero .wrap { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 760px) { .hero .wrap.split { grid-template-columns: 1fr auto; } }
.hero h1 { max-width: 22em; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.hero .icon {
  width: 164px; height: 164px; border-radius: 36px; box-shadow: var(--shadow);
  border: 1px solid var(--line); justify-self: center;
}
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button {
  display: inline-block; padding: .7em 1.2em; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 1px solid transparent;
}
.button:hover { filter: brightness(1.06); }
.button.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }

/* Sections and cards */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section.alt { background: var(--bg-2); }
.section > .wrap > p.intro { color: var(--ink-2); max-width: 40em; font-size: 1.05rem; }
.grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card p:last-child { margin-bottom: 0; color: var(--ink-2); }

/* A line of the company, or a product, as a card */
.product {
  display: grid; gap: 1.25rem; align-items: start; margin-top: 1.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
@media (min-width: 640px) { .product { grid-template-columns: auto 1fr; gap: 1.75rem; } }
.product img { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line); }
.product .mark {
  width: 96px; height: 96px; border-radius: 22px; display: grid; place-items: center;
  background: var(--brand); color: var(--bg); font-weight: 700; font-size: 2rem; letter-spacing: -0.02em;
}
.product h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.product .tag {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px; padding: .15em .6em; margin-bottom: .6rem;
}
.product .actions { margin-top: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5rem; }
.card .tag {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px; padding: .15em .6em; margin-bottom: .6rem;
}
.card ul { margin-bottom: 0; color: var(--ink-2); }
.card ul li { padding-left: .1em; }

.two { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } }

.note {
  border-left: 3px solid var(--accent); padding: .6rem 1rem; background: var(--bg-2);
  border-radius: 0 10px 10px 0; color: var(--ink-2); margin: 1.25rem 0;
}

/* Long-form pages */
.prose { max-width: 44em; padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.prose h1 { margin-bottom: .25em; }
.prose .dateline { color: var(--ink-2); margin-bottom: 2rem; }
.prose h2 { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.prose h3 { margin-top: 1.5rem; }
.prose summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: .35em 0; }
.prose details { border-bottom: 1px solid var(--line); padding: .35em 0 .6em; }
.prose details p:last-child { margin-bottom: 0; }
.prose dl dt { font-weight: 600; color: var(--brand); margin-top: 1rem; }
.prose dl dd { margin: .25rem 0 0; color: var(--ink); }
.prose code { font-size: .92em; background: var(--bg-2); padding: .1em .35em; border-radius: 6px; }
.toc { background: var(--bg-2); border-radius: var(--radius); padding: 1rem 1.25rem 1rem 2.25rem; margin: 0 0 1.5rem; }
.toc li + li { margin-top: .2em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--ink-2); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: baseline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { color: var(--ink-2); }
.site-footer p { margin: 0; }
.site-footer .legal { flex-basis: 100%; font-size: .85rem; margin-top: .5rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
