/* Ledgr Foundation microsite (ledgr.org) — institutional, restrained */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --sub: #525252;
  --muted: #86868b;
  --hair: #e5e5e5;
  --faint: #f5f5f5;
  --accent: #003d7a;
  --accent-deep: #001f4f;

  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-display: "Instrument Sans", "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --col-wide: 980px;
  --col-content: 720px;
  --display-1-size: clamp(2.25rem, 5.5vw, 3.5rem);
  --nav-height: 3.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--sub);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* —— Site header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 101;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--hair);
}

.nav-product {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-product:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-product-mark {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

/* —— Main layout —— */
.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--col-content);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 1.5rem 5rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--display-1-size);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.014em;
  margin-bottom: 1rem;
}

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.lede {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.5;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--ink);
}

/* —— Hero —— */
.hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

/* —— Sections —— */
.section {
  margin-top: 4.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--hair);
}

.section .eyebrow,
.section h2 {
  text-align: center;
}

.section-prose {
  max-width: 52ch;
  margin: 1.25rem auto 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--sub);
}

.section-prose + .section-prose {
  margin-top: 1rem;
}

.section-prose--muted {
  color: var(--muted);
  font-size: 0.92rem;
}

/* —— 404 —— */
.not-found {
  text-align: center;
  padding: 3rem 0;
}

.not-found .subhead {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
}

/* —— Footer —— */
.footer {
  color: var(--muted);
  font-size: 0.6875rem;
  padding: 3rem 1.5rem 2rem;
  background: var(--bg);
  border-top: 1px solid var(--hair);
  text-align: center;
}

.footer-inner {
  max-width: var(--col-wide);
  margin: 0 auto;
}

/* —— Fade-in —— */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-fade-delay="1"] { transition-delay: 0.06s; }
.fade-in[data-fade-delay="2"] { transition-delay: 0.12s; }
.fade-in[data-fade-delay="3"] { transition-delay: 0.18s; }
.fade-in[data-fade-delay="4"] { transition-delay: 0.24s; }

@media (max-width: 720px) {
  .nav-product span {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
