/* ASCME Labs — parent site. Light-default, theme-aware. Cool neutrals + indigo. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #e4e7ec;
  --line-2: #d6dbe2;
  --ink: #12141a;
  --ink-2: #363c47;
  --muted: #626b7a;
  --faint: #98a1b0;
  --indigo: #4b47e6;
  --indigo-ink: #3a37c9;   /* accessible on light ground */
  --indigo-soft: #ecebfd;
  --lime: #6f8f1a;         /* AgentLedger, darkened for light ground */
  --republiq: #0e7c86;
  --superarc: #b8541f;
  --sola: #9c2f4a;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", "Roboto Mono", monospace;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(18,20,26,.04), 0 8px 30px rgba(18,20,26,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --surface: #12151c;
    --surface-2: #171b23;
    --line: #23282f;
    --line-2: #2e343d;
    --ink: #e9ebef;
    --ink-2: #c4c9d2;
    --muted: #8b93a1;
    --faint: #5c6472;
    --indigo: #8f8cff;
    --indigo-ink: #a6a3ff;
    --indigo-soft: #191a33;
    --lime: #c6f24e;
    --republiq: #46c8d4;
    --superarc: #f0894f;
    --sola: #e6849b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 40px rgba(0,0,0,.35);
  }
}
:root[data-theme="light"] {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f2f5; --line: #e4e7ec; --line-2: #d6dbe2;
  --ink: #12141a; --ink-2: #363c47; --muted: #626b7a; --faint: #98a1b0;
  --indigo: #4b47e6; --indigo-ink: #3a37c9; --indigo-soft: #ecebfd;
  --lime: #6f8f1a; --republiq: #0e7c86; --superarc: #b8541f; --sola: #9c2f4a;
  --shadow: 0 1px 2px rgba(18,20,26,.04), 0 8px 30px rgba(18,20,26,.05);
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --surface: #12151c; --surface-2: #171b23; --line: #23282f; --line-2: #2e343d;
  --ink: #e9ebef; --ink-2: #c4c9d2; --muted: #8b93a1; --faint: #5c6472;
  --indigo: #8f8cff; --indigo-ink: #a6a3ff; --indigo-soft: #191a33;
  --lime: #c6f24e; --republiq: #46c8d4; --superarc: #f0894f; --sola: #e6849b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 40px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 0);
  background-size: 28px 28px;
  background-attachment: fixed;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
a { color: var(--indigo-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--indigo) 22%, transparent); }

/* Monospace kicker with a section index, e.g. §01 */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--indigo); margin: 0 0 16px; display: inline-flex; align-items: baseline; gap: 10px; }
.kicker .idx { color: var(--faint); }
.kicker .idx::before { content: "§"; margin-right: 1px; }

/* Top nav */
.nav { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.mark .glyph { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); display: grid; place-items: center; flex: none; }
.mark .glyph svg { display: block; }
.mark:hover { text-decoration: none; }
.nav .spacer { flex: 1; }
.nav a.navlink { color: var(--muted); font-size: 14px; }
.nav a.navlink:hover { color: var(--ink); text-decoration: none; }
.themebtn { border: 1px solid var(--line-2); background: var(--surface); color: var(--muted);
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center;
  transition: color .15s ease, border-color .15s ease; }
.themebtn:hover { color: var(--ink); border-color: var(--faint); }
.themebtn .moon { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .sun { display: none; }
  :root:not([data-theme="light"]) .themebtn .moon { display: block; }
}

/* Hero — blueprint margin: a hairline rule + registration tick down the left */
.hero { padding: 96px 0 44px; position: relative; }
.hero .wrap { position: relative; }
.hero .frame { position: absolute; left: -1px; top: 4px; bottom: 4px; width: 1px;
  background: var(--line-2); }
.hero .frame::before, .hero .frame::after {
  content: ""; position: absolute; left: -3px; width: 7px; height: 1px; background: var(--indigo); }
.hero .frame::before { top: 0; }
.hero .frame::after { bottom: 0; }
h1 { font-size: clamp(40px, 6.6vw, 72px); line-height: 1.0; letter-spacing: -0.035em; font-weight: 780;
  margin: 0 0 22px; text-wrap: balance; max-width: 15ch; }
.hero .lede { font-size: clamp(17px, 2.1vw, 21px); color: var(--ink-2); max-width: 58ch; margin: 0 0 30px; text-wrap: pretty; }
.btnrow { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  border-radius: 10px; padding: 11px 18px; cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: transform .12s ease, background .15s ease, border-color .15s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--indigo) 88%, #000); transform: translateY(-1px); }
:root[data-theme="dark"] .btn-primary { color: #0b0d12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0b0d12; } }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--faint); transform: translateY(-1px); }

/* Sections */
section { padding: 64px 0; }
h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.025em; font-weight: 720; margin: 0 0 16px; text-wrap: balance; }
.section-lede { color: var(--muted); max-width: 62ch; font-size: 17px; margin: 0 0 8px; text-wrap: pretty; }
p { margin: 0 0 16px; }

/* Thesis principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 32px; margin-top: 34px; }
.principle { padding-top: 18px; border-top: 1px solid var(--line-2); }
.principle .n { font-family: var(--mono); font-size: 13px; color: var(--indigo); margin-bottom: 12px; letter-spacing: .5px; }
.principle h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.principle p { color: var(--muted); font-size: 15px; margin: 0; text-wrap: pretty; }

/* Products */
.products { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 26px; }
.product { display: grid; grid-template-columns: 1fr auto; gap: 20px 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 30px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: border-color .15s ease, transform .15s ease; }
.product:hover { border-color: var(--line-2); transform: translateY(-2px); }
/* accent index in the corner + a short accent rule — the child-brand color as an instrument marker */
.product .rule { grid-column: 1 / -1; width: 26px; height: 2px; border-radius: 2px;
  background: var(--accent, var(--indigo)); margin-bottom: 2px; }
.product .meta { position: absolute; top: 22px; right: 26px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 1px; color: var(--faint); }
.product .meta b { color: var(--accent, var(--indigo)); font-weight: 500; }
.product .body { grid-column: 1; }
.product .tag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px; color: var(--accent, var(--indigo)); }
.product h3 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; background: var(--accent, var(--indigo));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--indigo)) 14%, transparent); }
.product p { color: var(--muted); margin: 0; max-width: 60ch; text-wrap: pretty; }
.product .go { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px;
  white-space: nowrap; color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 15px;
  background: var(--surface-2); transition: border-color .15s ease; }
.product .go:hover { border-color: var(--faint); text-decoration: none; }
.product .go small { color: var(--faint); font-family: var(--mono); font-weight: 400; }

footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; color: var(--muted); font-size: 14px; }
footer .spacer { flex: 1; }
footer a.flink { color: var(--muted); font-size: 14px; }
footer a.flink:hover { color: var(--ink); }
footer .copy { color: var(--faint); font-family: var(--mono); font-size: 12px; }

@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; align-items: start; }
  .product .go { grid-column: 1; justify-self: start; }
  .product .meta { position: static; margin-bottom: 4px; }
  .hero { padding-top: 60px; }
  .hero .frame { display: none; }
}
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }
