/* Venelia's public pages. The colours are the app's own tokens
   (lib/theme/app_theme.dart); the type is the app's Cinzel and Poppins. */

@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/poppins-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --page: #F2F6F3;
  --text: #343A36;
  --muted: #5E6A61;
  --primary: #4C5F45;
  --warm: #E7C38A;
  --rule: #D3DDD6;
  --fill-bg: #F5E3C1;
  --fill-text: #4A3B1F;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121714;
    --text: #E8EEE9;
    --muted: #A9B5AC;
    --primary: #9DB894;
    --warm: #E7C38A;
    --rule: #2A332D;
    --fill-bg: #4A3D22;
    --fill-text: #F5E3C1;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.wrap {
  max-width: calc(var(--measure) + 2rem);
  margin-inline: auto;
  padding-inline: 1rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: .5rem .8rem;
  background: var(--primary);
  color: var(--page);
  border-radius: .4rem;
  text-decoration: none;
  z-index: 1;
}
.skip:focus { top: 1rem; }

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

/* Header: the app's lotus and name, then the four pages. */
header.site { padding-top: 2rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: .06em;
}
.brand img { height: 1.75rem; width: auto; display: block; }

.docs-nav, .foot-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.4rem;
}
.docs-nav { margin-top: 1.1rem; font-size: .9375rem; }
.docs-nav a, .foot-nav a { color: var(--muted); text-decoration: none; }
.docs-nav a:hover, .foot-nav a:hover { color: var(--text); }
.docs-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--warm);
  text-decoration-thickness: 2px;
  text-underline-offset: .45em;
}

/* The page's title, in the app's title face, with the warm evening line. */
h1 {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 1.3rem + 3vw, 2.875rem);
  line-height: 1.18;
  letter-spacing: .01em;
  margin: 3rem 0 0;
  text-wrap: balance;
}
h1::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-top: 1.25rem;
  background: var(--warm);
}
h2 {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--primary);
  margin: 2.75rem 0 .5rem;
}

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin: .45rem 0; padding-left: .15rem; }
li::marker { color: var(--muted); }
strong { font-weight: 500; }
em { font-style: normal; color: var(--muted); }

/* After the p/ul/ol margins above, and more specific than them, so the
   space under the title's warm line is never cancelled. */
main > h1 + * { margin-top: 1.75rem; }

/* A fact still to fill in. Visible on purpose. */
mark.fill {
  background: var(--fill-bg);
  color: var(--fill-text);
  padding: .05em .35em;
  border-radius: .3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Home */
.home { padding-top: clamp(3rem, 12vh, 6.5rem); }
.home .mark { height: 6rem; width: auto; display: block; }
.home h1 {
  font-weight: 600;
  font-size: clamp(2.75rem, 1.9rem + 4.4vw, 4.25rem);
  letter-spacing: .07em;
  margin-top: 1.25rem;
}
.home .lede { font-size: 1.1875rem; color: var(--muted); max-width: 30rem; }

.docs { list-style: none; margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.docs li { margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.docs a { display: block; padding: .85rem 0; color: var(--text); text-decoration: none; font-weight: 500; }
.docs a:hover { color: var(--primary); }

.home .contact { margin-top: 2rem; color: var(--muted); }

/* Footer */
footer.site {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  font-size: .875rem;
  color: var(--muted);
}
footer.site p { margin: .9rem 0 0; }
footer.site p a { color: var(--muted); text-decoration: none; font-family: "Cinzel", Georgia, serif; letter-spacing: .06em; }

@media print {
  .skip, header.site nav, footer.site { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  h1::after { background: #999; }
  mark.fill { outline: 1px dashed #999; }
}
