/* =========================================================
   Cloudline Press — site.css
   ========================================================= */

/* ---------------------------------------------------------
   Base / Defaults
   --------------------------------------------------------- */

:root {
  color-scheme: light dark;
}

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

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: Canvas;
  color: CanvasText;
}

img {
  height: auto;
  border: 0;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}


/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1rem;
}

main.content {
  padding-bottom: 4rem;
}


/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.site-nav a {
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  border-radius: 0.4rem;
}

.site-nav a:hover {
  background: rgba(127,127,127,0.15);
}

/* center nav ONLY on homepage */
.wrap.home .site-nav {
  justify-content: center;
}


/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */

h1, h2, h3 {
  line-height: 1.2;
  margin-top: 1.5rem;
}

p {
  max-width: 72ch;
}


/* ---------------------------------------------------------
   Homepage
   --------------------------------------------------------- */

.home-hero {
  text-align: center;
  margin-top: 2rem;
}

.home-hero picture {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.home-hero img.lizzie {
  width: min(70vw, 420px);
  height: auto;
}


/* optical centering of wordmark */
.home-hero p {
  margin-top: 0.25rem;
  letter-spacing: 0.08em;
  text-align: center;
  transform: translateX(
    clamp(0px, calc((120vw - 700px) / 4), 320px)
  );
}


/* ---------------------------------------------------------
   Docs / Articles
   --------------------------------------------------------- */

article,
main {
  margin-top: 1.5rem;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  background: rgba(127,127,127,0.12);
  border-radius: 6px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}


/* ---------------------------------------------------------
   Lizzie — corner watermark (non-home pages)
   --------------------------------------------------------- */

.lizzie-corner {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 96px;
  height: auto;
  opacity: 0.85;
  pointer-events: none;
  z-index: 1000;
}

.lizzie-corner img {
  width: 100%;
  height: auto;
  display: block;
}

/* mobile */
@media (max-width: 600px) {
  .lizzie-corner {
    width: 72px;
    right: 0.75rem;
    bottom: 0.75rem;
    opacity: 0.75;
  }
}


/* ---------------------------------------------------------
   Print
   --------------------------------------------------------- */

@media print {
  :root {
    color-scheme: light;
  }

  @page {
    margin: 0.75in;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
    line-height: 1.35;
  }

  .wrap {
    max-width: none !important;
    padding: 0 !important;
  }

  nav,
  .site-nav,
  .lizzie-corner,
  .actions,
  .btn,
  .print-hide {
    display: none !important;
  }

  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-break: break-word;
  }

  a[href^="/"]:after,
  a[href^="#"]:after {
    content: "";
  }

  img,
  picture {
    max-width: 100% !important;
    height: auto !important;
    break-inside: avoid;
  }

  h1, h2, h3 {
    break-after: avoid;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  pre, code {
    background: transparent !important;
    border: 1px solid #ccc;
  }
}


/* ---------------------------------------------------------
   Utilities
   --------------------------------------------------------- */

.page-break-before {
  break-before: page;
}

.avoid-break {
  break-inside: avoid;
}

