/* Lou website. Plain CSS, no build step. Light and dark follow the visitor's device setting. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #23499f;
  --blue-strong: #1a3878;
  --bg: #fbfaf7;
  --bg-soft: #f2f0ea;
  --surface: #ffffff;
  --text: #1b2030;
  --muted: #4a5163;
  --line: #dedbd2;
  --link: #23499f;
  --code-bg: #f0eee8;
  --on-blue: #ffffff;
  --shadow: 0 1px 2px rgb(20 25 40 / 6%), 0 8px 24px rgb(20 25 40 / 8%);
  --radius: 12px;
  --wrap: 1140px;
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #3d64c4;
    --blue-strong: #5479d6;
    --bg: #12151d;
    --bg-soft: #181c26;
    --surface: #1d2230;
    --text: #eceef3;
    --muted: #b9bfcc;
    --line: #2e3445;
    --link: #a9c1ff;
    --code-bg: #232939;
    --on-blue: #ffffff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

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

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 780px; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: 0.5rem 1rem; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 1.1em; height: 1.1em; flex: none; }

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

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 0.9rem; padding-bottom: 0.9rem; }

.logo { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; }
.logo__icon { width: 34px; height: 34px; }
.logo__word { height: 22px; width: auto; margin-top: 3px; }
.logo--small .logo__icon { width: 28px; height: 28px; }
.logo--small .logo__word { height: 18px; }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: 0.3rem 0; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 0.4rem; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--blue); }

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

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--blue); color: var(--on-blue);
  border: 2px solid var(--blue); border-radius: 999px;
  padding: 0.65rem 1.3rem; font-weight: 600; text-decoration: none;
}
.button:hover { background: var(--blue-strong); border-color: var(--blue-strong); }
.button--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button--ghost:hover { background: var(--surface); border-color: var(--muted); }

/* ------------------------------------------------------------- home */

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; } }
.eyebrow { color: var(--muted); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.hero__note { color: var(--muted); font-size: 0.95rem; margin-top: 1.25rem; }

.shot { margin: 0; }
.shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 0.75rem; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section:nth-of-type(even) { background: var(--bg-soft); }

.steps__list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 760px) { .steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.step::before {
  content: counter(step);
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.9rem;
  border-radius: 8px; background: var(--blue); color: var(--on-blue); font: 600 1.05rem var(--serif);
}
.step p, .feature p { color: var(--muted); margin: 0; }

.features__grid { display: grid; gap: 1.75rem 2rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .features__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature h3 { font-size: 1.15rem; }

.shots__grid { display: grid; gap: 2rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .shots__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.fit__grid { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .fit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fit__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.75rem; }
.fit__col--yes { border-top: 4px solid var(--blue); }
.fit__col--no { border-top: 4px solid var(--muted); }
.fit__col li { margin-bottom: 0.4rem; }

.requirements .prose { max-width: 860px; }

.cta__inner { text-align: center; max-width: 720px; }
.cta__inner p { color: var(--muted); font-size: 1.1rem; }
.cta .actions { justify-content: center; }

/* ------------------------------------------------------------- inner pages */

.page-head { padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }
.page-head .lead { margin-bottom: 0; }
.crumb { margin-bottom: 0.5rem; font-weight: 500; }
.crumb a { text-decoration: none; }
.crumb a::after { content: " /"; color: var(--muted); }

.wrap--narrow > .prose:first-child, .page-section:first-child { margin-top: 1rem; }
.page-section { margin: 2.5rem 0; }
.page-section, .doc__section, .release { scroll-margin-top: 1.5rem; }

.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; font-size: 1.2rem; }
.prose h4 { margin: 1.2em 0 0.4em; font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.3rem; }
.prose li > ul, .prose li > ol { margin: 0.3rem 0 0; }
.prose blockquote { margin: 1.25em 0; padding: 0.75rem 1.25rem; border-left: 4px solid var(--blue); background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.45rem 0.7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); }

code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.15rem; overflow-x: auto; line-height: 1.5; margin: 0 0 1.2em; }
pre code { background: none; padding: 0; font-size: 0.88rem; overflow-wrap: normal; }

.anchor { color: inherit; text-decoration: none; }
.anchor:hover::after { content: " #"; color: var(--muted); }

/* docs */

.doc-list { list-style: none; margin: 1rem 0 2.5rem; padding: 0; display: grid; gap: 0.9rem; }
.doc-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.35rem; text-decoration: none; color: var(--text); }
.doc-card:hover { border-color: var(--blue); }
.doc-card__title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font: 600 1.2rem var(--serif); color: var(--link); }
.doc-card__text { display: block; color: var(--muted); margin-top: 0.25rem; }

.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-bottom: 4rem; }
@media (min-width: 900px) { .doc { grid-template-columns: 240px minmax(0, 1fr); gap: 3.5rem; } }
.doc__body { max-width: 780px; min-width: 0; }
.doc__nav { font-size: 0.95rem; }
@media (min-width: 900px) { .doc__toc { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; } }
.doc__toc summary { font-weight: 600; cursor: pointer; margin-bottom: 0.5rem; }
.doc__toc ul { list-style: none; margin: 0; padding: 0; }
.doc__toc li { margin: 0.15rem 0; }
.doc__toc a { display: block; padding: 0.25rem 0.6rem; border-radius: 6px; color: var(--text); text-decoration: none; border-left: 3px solid transparent; }
.doc__toc a:hover { background: var(--bg-soft); }
.doc__toc a[aria-current="page"] { border-left-color: var(--blue); background: var(--bg-soft); font-weight: 600; }
.doc__sections { margin: 0.2rem 0 0.5rem 0.8rem !important; }
.doc__sections a { color: var(--muted); font-size: 0.9rem; padding: 0.15rem 0.6rem; }
.doc__section { margin-top: 2.5rem; }
.doc__source { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }

/* download */

.download-box { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin: 1rem 0 2rem; box-shadow: var(--shadow); }
.download-box__version { font: 600 1.35rem var(--serif); margin: 0; }
.download-box .actions { margin-top: 1rem; }
.download-box__note { color: var(--muted); font-size: 0.95rem; margin: 1rem 0 0; }

/* changelog */

.changelog__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0.5rem 0 1rem; }
.release { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.release:last-child { border-bottom: 0; }
.release h2 { margin-top: 0; }
.release--next h2 { color: var(--muted); }

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

.site-footer { border-top: 1px solid var(--line); margin-top: 0; padding: 2.5rem 0 1.5rem; font-size: 0.95rem; color: var(--muted); }
.section:last-of-type + .site-footer, .cta + .site-footer { margin-top: 0; }
.site-footer__inner { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.site-footer__about .logo { margin-bottom: 0.75rem; }
.site-footer__about p { margin-bottom: 0.4rem; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer__legal { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.site-footer__legal p { margin: 0; }

.error-head { padding-bottom: 5rem; }

@media (max-width: 899px) {
  .doc__sections { display: none; }
}
@media (max-width: 480px) {
  .site-nav ul { gap: 0.25rem 1rem; }
  .site-nav a { font-size: 0.97rem; }
}
