/* Generated by build.js from themes/<id>/theme.css. Edit those, not this. */

/* ---------- Original (themes/original/) ---------- */

:root[data-theme="original"] [data-squiggle="original"] {
  display: block;
}

/* ---------- Riso (themes/riso/) ---------- */

:root[data-theme="riso"] [data-squiggle="riso"] {
  display: block;
}

/* Riso: fluoro pink and riso blue on cream stock. */
:root[data-theme="riso"] {
  --paper: #f7f0e2;
  --surface: #efe5d0;
  --ink: #1c2457;
  --muted: #575c7c;
  --cyan: #ff48b0;
  --cyan-text: #b3166f;
  --hot: #0067a5;
  --subtle: #ede4d1;
  --border: #c9bca3;
}

/* ---------- Blueprints (themes/blueprints/) ---------- */

:root[data-theme="blueprints"] [data-squiggle="blueprints"] {
  display: block;
}

/* Blueprints: the site as a technical drawing, printed blue on white
   (a "whiteprint"), with red pencil for highlights and hovers. The
   squiggle's box is the one true blueprint: a deep-blue plate with the
   squiggle drafted in white. All text >= 5:1. */
:root[data-theme="blueprints"] {
  --paper: #f6f8fc;
  --surface: #e3ebf8;
  --ink: #163f94;
  --muted: #4a5f8f;
  --cyan: #3b6fd8;
  --cyan-text: #1f55c0;
  --hot: #c42b22;
  --subtle: #e6edf8;
  --border: #9fb4dc;
}

/* The whole page is drafting paper: a very faint blue 40px grid. */
:root[data-theme="blueprints"] body {
  background-color: #f6f8fc;
  background-image:
    linear-gradient(rgb(26 80 184 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(26 80 184 / 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* The squiggle's box: a blueprint plate. Deep blue, fine 20px white
   squares with a stronger line every 100px. (Delete this rule for a
   plain whiteprint box.) */
:root[data-theme="blueprints"] .fig-art {
  background-color: #1a50b8;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.28) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.1) 1px, transparent 1px);
  background-size:
    100px 100px,
    100px 100px,
    20px 20px,
    20px 20px;
  background-position: -1px -1px;
}

/* The small footer squiggle sits on white paper, so it's blueprint blue. */
:root[data-theme="blueprints"] .footer-squiggle path {
  fill: var(--ink);
}

/* The junk-drawer strip: a pale blue sheet with a slightly stronger grid. */
:root[data-theme="blueprints"] #tools {
  background-color: #e3ebf8;
  background-image:
    linear-gradient(rgb(26 80 184 / 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgb(26 80 184 / 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---------- Candy Cane (themes/candy-cane/) ---------- */

:root[data-theme="candy-cane"] [data-squiggle="candy-cane"] {
  display: block;
}

/* Candy Cane: the whole site in candy red on icy white,
   with holly green for highlights and hovers. Seasonal: see from/until
   in theme.json. All text >= 5:1. */
:root[data-theme="candy-cane"] {
  --paper: #f2f7fc;
  --surface: #e3edf4;
  --ink: #a3121e;
  --muted: #8f3a42;
  --cyan: #d42a36;
  --cyan-text: #b51c2b;
  --hot: #1b6e42;
  --subtle: #e8eff7;
  --border: #e2a9ad;

  /* Bolder lines than the other themes, like the stripes on the cane.
     Same red as the text, inside and out. */
  --rule: 2px solid var(--ink);
  --card-edge: 3px solid var(--ink);
}

/* The squiggle's box only: an icy sky for the snow to fall through. */
:root[data-theme="candy-cane"] .fig-art {
  position: relative;
  overflow: hidden;
  background: #e3edf4;
}

/* The junk-drawer strip: the same icy blue as the snowy box. */
:root[data-theme="candy-cane"] #tools {
  background-color: #e3edf4;
}

/* Two layers of falling snow (snow.svg, repeated) at different sizes and
   speeds, so the pattern never looks like it repeats. Each layer starts
   one tile above the box and slides down exactly one tile, so the loop
   is seamless. Moving with transform keeps it on the GPU (cheap). */
:root[data-theme="candy-cane"] .fig-art::before,
:root[data-theme="candy-cane"] .fig-art::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--tile)) 0 0;
  background: url("/themes/candy-cane/snow.svg") 0 0 / var(--tile) var(--tile);
  pointer-events: none;
}

/* Far: small flakes, drifting slowly. */
:root[data-theme="candy-cane"] .fig-art::before {
  --tile: 260px;
  opacity: 0.7;
  animation: candy-cane-snow 22s linear infinite;
}

/* Near: bigger flakes, falling faster, offset from the far layer. */
:root[data-theme="candy-cane"] .fig-art::after {
  --tile: 470px;
  background-position: 137px 61px;
  animation: candy-cane-snow 13s linear infinite;
}

/* The squiggle sits in front of the snow. */
:root[data-theme="candy-cane"] .fig-art .squiggle {
  position: relative;
  z-index: 1;
}

@keyframes candy-cane-snow {
  to {
    transform: translateY(var(--tile));
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="candy-cane"] .fig-art::before,
  :root[data-theme="candy-cane"] .fig-art::after {
    animation: none;
  }
}
