/* yveslab.ai: the app's look (webapp/static/app.css), white, greys and navy; the logo carries
   ARSLA's colours. Atkinson Hyperlegible Next, drawn for low-vision readers, everywhere;
   Raleway, the logo's face, for the lockup and the headline. Both served from here (SIL OFL,
   fonts/OFL-*.txt): the page asks nothing of another site. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/raleway-700.woff2") format("woff2");
}

:root {
  --navy: #022781;
  --navy-strong: #011652;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #0f1b3d;
  --text-soft: #3b4560;
  --text-muted: #6b7386;
  --line: #eceef3;
  --line-strong: #d9dde6;
  --brand: var(--navy);
  --primary: var(--navy);
  --primary-hover: var(--navy-strong);
  --accent: var(--navy);
  --on-accent: #ffffff;
  --accent-hover: var(--navy-strong);
  --focus: #3b5bdb;
  --err: #b52304;
  --radius: 10px;
  --radius-l: 16px;
  --shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 6px 24px rgba(15, 27, 61, .06);
  --font-sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Raleway", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1222;
    --surface: #151a2e;
    --surface-2: #11162a;
    --text: #e7eaf3;
    --text-soft: #c6ccdb;
    --text-muted: #8f97ad;
    --line: #222a42;
    --line-strong: #323c5c;
    --brand: #ffffff;
    --primary: #9db2f7;
    --primary-hover: #c3d0fb;
    --accent: #e7eaf3;
    --on-accent: #0e1222;
    --accent-hover: #ffffff;
    --focus: #9db2f7;
    --err: #ff8a6b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul { margin: 0; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

.top, main, .foot { width: min(880px, 100% - 32px); margin-inline: auto; }

/* The lockup: the ARSLA mark, « Yves » / « Lab AI » under SLA. */
.top { padding: 48px 0 8px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.brand { line-height: 0; color: var(--brand); }
.brand-logo { height: 96px; width: auto; display: block; }

.intro { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 24px 0 32px; }
.headline {
  max-width: 46ch; font: 700 clamp(26px, 3.4vw, 34px)/1.2 var(--font-display); font-variant-numeric: lining-nums;
  letter-spacing: -.01em; color: var(--text); text-wrap: balance;
}
.lead { max-width: 62ch; font-size: 17px; color: var(--text-soft); text-wrap: pretty; }
.credit { max-width: 62ch; font-size: 15px; color: var(--text-muted); text-wrap: balance; }

/* Buttons: one solid, as in the app. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: 600 15.5px/1.2 var(--font-sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }

.get { display: grid; gap: 14px; justify-items: stretch; }
.card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-l); box-shadow: var(--shadow); }

/* The password, before anything else. */
.gate { width: min(440px, 100%); justify-self: center; display: grid; gap: 12px; padding: 28px 24px; text-align: center; }
.gate h2 { font-size: 19px; font-weight: 700; }
.gate p { font-size: 15px; color: var(--text-soft); }
.gate input {
  width: 100%; min-height: 48px; padding: 0 18px; border-radius: 999px; margin-top: 4px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit;
}
.gate input::placeholder { color: var(--text-muted); }
.gate input:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 24%, transparent); }
.gate .field-error { color: var(--err); font-size: 14.5px; font-weight: 600; }

/* The visitor's installer: the app's icon, the version, the button. */
.offer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 22px; padding: 22px 24px; }
.offer-icon { width: 80px; height: 80px; display: block; }
.offer-text { display: grid; gap: 4px; }
.offer h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.offer-meta, .offer-status { font-size: 14.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.offer-none .offer-status { color: var(--text-soft); font-size: 15.5px; }
.offer-actions { display: grid; gap: 8px; justify-items: center; }
.support-link { font-size: 14px; color: var(--text-muted); }
.also { text-align: center; font-size: 15px; color: var(--text-soft); }

/* Before installing: three short columns. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 48px 0 16px; }
.fact { display: grid; align-content: start; gap: 10px; font-size: 15px; color: var(--text-soft); }
.fact h2 { font-size: 16px; font-weight: 700; color: var(--text); }
.fact ul { padding-left: 1.1em; display: grid; gap: 6px; }
.fact strong { color: var(--text); font-weight: 600; }

/* ARSLA's donation block (webapp/static/app.css .donate), calm like the page. */
.foot { padding: 32px 0 48px; border-top: 1px solid var(--line); margin-top: 32px; }
.donate { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; }
.donate-logo { display: block; width: 88px; height: auto; color: var(--text); }
.donate-text p { max-width: 62ch; font-size: 15px; line-height: 1.55; color: var(--text); }
.donate-text .donate-note { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }

@media (max-width: 760px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 36px; }
  .offer { grid-template-columns: auto minmax(0, 1fr); padding: 20px; }
  .offer-actions { grid-column: 1 / -1; justify-items: stretch; text-align: center; }
  .offer-icon { width: 64px; height: 64px; }
  .donate { grid-template-columns: minmax(0, 1fr); }
  .donate .btn { white-space: normal; }
}
@media (max-width: 480px) {
  .top { padding-top: 32px; }
  .brand-logo { height: 80px; }
  .btn { white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
