/* LiveCanvas website: the palette, Story Script for titles and Arial for everything else */

@font-face {
  font-family: "Story Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/story-script/StoryScript-Regular.ttf") format("truetype");
}

/* The palette (as in the app's shared/style.css) */
:root {
  --lc-blue: #2c6bff;
  --lc-purple: #8f3de8;
  --lc-pink: #f40f95;
  --lc-red: #fb234a;
  --lc-orange: #fe7e07;
  --lc-yellow: #ffd52c;
  --lc-green: #6dc905;
  --lc-mint: #21e887;
  --lc-cyan: #13c3f4;
  --lc-black: #000000;
  --lc-charcoal: #333333;
  --lc-dark-grey: #666666;
  --lc-grey: #999999;
  --lc-light-grey: #cccccc;
  --lc-white: #ffffff;

  --title-font: "Story Script", Arial, sans-serif;
  --text-font: Arial, Helvetica, sans-serif;
  --panel-width: 960px;
  --gutter: 30px;
}

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

body {
  margin: 0;
  padding: 0 16px;
  background: var(--lc-blue);
  color: var(--lc-black);
  font: 16px/1.5 var(--text-font);
}

a {
  color: var(--lc-blue);
}
a:visited {
  color: var(--lc-purple);
}
a:hover {
  color: var(--lc-pink);
}
a:active {
  color: var(--lc-black);
}
a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--lc-black);
  outline-offset: 2px;
}

/* Purple pill buttons with white text, links included, in five sizes: `pill-s`, `m` (the default, no class), `pill-l`,
   `pill-xl` and `pill-xxl`, as in the app (`packages/client/src/lib/shared/pill.css`). The top and bottom padding is
   half the height less the font size, and the sides' half the height. */
.button,
.home-body a {
  --pill-height: 32px;
  --pill-font-size: 16px;
  display: inline-block;
  box-sizing: border-box;
  min-height: var(--pill-height);
  padding: calc((var(--pill-height) - var(--pill-font-size)) * 0.5)
    calc(var(--pill-height) * 0.5);
  border-radius: 999px;
  font-size: var(--pill-font-size);
  line-height: 1;
  background: var(--lc-purple);
  color: var(--lc-white);
  font-weight: bold;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.button:visited,
.home-body a:visited {
  color: var(--lc-white);
}
.button:hover,
.home-body a:hover {
  background: var(--lc-pink);
  color: var(--lc-white);
}
.button:active,
.home-body a:active {
  background: var(--lc-black);
  color: var(--lc-white);
}

.pill-s {
  --pill-height: 16px;
  --pill-font-size: 12px;
}
.pill-l {
  --pill-height: 50px;
  --pill-font-size: 20px;
}
.pill-xl {
  --pill-height: 75px;
  --pill-font-size: 24px;
}
.pill-xxl {
  --pill-height: 100px;
  --pill-font-size: 28px;
}

/* "Donate" (in the footer): pink, and smaller than "Start Drawing" */
.button.donate {
  background: var(--lc-pink);
}
.button.donate:hover {
  background: var(--lc-purple);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header: the name on the left, "Start Drawing" on the right */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--panel-width);
  margin: 0 auto;
  padding: 40px var(--gutter) 16px;
}
.site-title {
  margin: 0;
  font: 64px/1 var(--title-font);
}
.site-title a,
.site-title a:visited {
  color: var(--lc-white);
  text-decoration: none;
}
.site-title a:hover {
  color: var(--lc-yellow);
}

/* The white panel with the page, and an aside beside it (if any) */
.site-content {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--gutter);
  max-width: var(--panel-width);
  margin: 0 auto;
  padding: var(--gutter);
  background: var(--lc-white);
}
.site-main {
  flex: 1 1 520px;
  min-width: 0;
}
.site-content > aside {
  flex: 0 0 220px;
  padding-top: 52px;
  color: var(--lc-dark-grey);
  font-size: 14px;
}
.site-content > aside dt {
  font-weight: bold;
}
.site-content > aside dd {
  margin: 0 0 16px;
}

.site-breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.site-breadcrumb li + li::before {
  content: ">";
  padding: 0 0.4em;
  color: var(--lc-dark-grey);
}
.site-breadcrumb a,
.site-breadcrumb a:visited {
  color: var(--lc-dark-grey);
  text-decoration: none;
}
.site-breadcrumb a:hover {
  color: var(--lc-pink);
  text-decoration: underline;
}

h1 {
  margin: 24px 0 0;
  font: 48px/1.2 var(--title-font);
}
h2 {
  margin: 40px 0 16px;
  font-size: 20px;
}
.article-updated {
  margin-top: 0;
  font-style: italic;
}

.list-articles {
  margin: 0;
  padding: 0;
  list-style: none;
}
.list-article + .list-article {
  margin-top: 48px;
}
.list-article .article-title {
  margin-top: 32px;
}
.list-article .article-title a,
.list-article .article-title a:visited {
  color: var(--lc-black);
  text-decoration: none;
}
.list-article .article-title a:hover {
  color: var(--lc-pink);
}
/* Lists in excerpts are inside the list of articles, so would otherwise get hollow bullets */
.article-excerpt ul {
  list-style: disc;
}
.article-meta {
  color: var(--lc-dark-grey);
  font-size: 14px;
}

/* Footer: white links in two rows, then the copyright line */
.site-footer {
  padding: 40px 0;
  color: var(--lc-white);
  text-align: center;
}
.site-footer div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 40px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}
.site-footer a,
.site-footer a:visited {
  color: var(--lc-white);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--lc-yellow);
  text-decoration: underline;
}
.footer-donate {
  margin: 0 0 24px;
}
.site-footer .button.donate,
.site-footer .button.donate:visited {
  color: var(--lc-white);
  text-decoration: none;
}
.colophon {
  margin: 0;
  font-size: 11px;
}

/* Home: the title, subtitle and button centred on the blue, without the panel */
.home .site-content {
  display: block;
  padding: 160px 0 32px;
  background: none;
  color: var(--lc-white);
  text-align: center;
}
.home .site-title {
  font-size: clamp(64px, 12vw, 120px);
  color: var(--lc-white);
}
.home-body h2 {
  margin: 24px 0 48px;
  font-size: 28px;
  letter-spacing: 0.05em;
}
.home-body a {
  padding: 32px 90px;
  font-size: 28px;
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }
  .site-title {
    font-size: 48px;
  }
  .site-content > aside {
    flex-basis: 100%;
    padding-top: 0;
  }
  .home .site-content {
    padding-top: 80px;
  }
  .home-body a {
    padding: 24px 48px;
  }
}
