/* ============================================================================
   Matlan — base v2: reset, typography, prose (flat professional dark)
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--ink-hi);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(62, 207, 110, .25); }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}

h1 { font-size: var(--fs-6); font-weight: 700; }
h2 { font-size: var(--fs-5); margin-top: var(--sp-6); }
h3 { font-size: var(--fs-4); margin-top: var(--sp-5); }

/* quiet rule instead of the v1 triad underline */
h2.rule::after {
  content: "";
  display: block;
  width: 42px; height: 2px;
  margin-top: .6rem;
  background: var(--acc);
  opacity: .85;
}

p { margin: 0 0 var(--sp-3); }

a {
  color: var(--acc);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}
a:hover { color: var(--acc-hover); text-decoration: underline; text-underline-offset: 3px; }

strong { color: var(--ink-hi); font-weight: 600; }
em { color: var(--ink-mid); }

code, kbd {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .08em .38em;
}

hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- layout shells ---- */

.shell { display: grid; min-height: 100vh; grid-template-rows: auto 1fr auto; }

.wrap { width: min(1200px, 100% - 2 * var(--sp-5)); margin-inline: auto; }

.prose { max-width: var(--col-prose); margin-inline: auto; }
.prose .lead { font-size: var(--fs-3); color: var(--ink-mid); line-height: 1.65; }

/* mono label — chrome voice (sans caps in v2) */
.tag {
  font-family: var(--sans);
  font-size: var(--fs-0);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-low);
}

.site-footer { border-top: 1px solid var(--line); padding: var(--sp-4) 0 var(--sp-5); margin-top: var(--sp-7); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  justify-content: space-between;
  color: var(--ink-low); font-size: var(--fs-1);
  font-family: var(--sans);
}
.site-footer .credit { font-style: normal; }
