/**
 * This wants to become a NixOS theme.
 *
 * Palette from github.com/NixOS/branding,
 * package-sets/top-level/nixos-branding/nixos-color-palette/colors.toml.
 * The color names are that file's, the L-suffixes its tint ladder, and
 * the values are its OKLCH triples unconverted.
 */

:root {
  --nix-afghani-blue-l15: oklch(0.15 0.03 264);
  --nix-light-blue: oklch(0.75 0.09 240);
  --nix-white-l95: oklch(0.95 0 0);
  --nix-indian-gold-l75: oklch(0.75 0.12 90);

  --nix-afghani-blue-l25: oklch(0.25 0.05 264);
  --nix-afghani-blue-l35: oklch(0.35 0.07 264);
  --nix-afghani-blue-l85: oklch(0.85 0.07 264);

  --nix-radius: 12px;
  --nix-block-width: 90%;

  --r-background-color: var(--nix-afghani-blue-l15);
  --r-main-color: var(--nix-white-l95);

  --r-heading-font: "Route 159", sans-serif;
  --r-heading-color: var(--nix-indian-gold-l75);
  --r-heading-text-transform: none;

  --r-link-color: var(--nix-light-blue);
  --r-link-color-hover: var(--nix-afghani-blue-l85);

  --r-selection-background-color: var(--nix-indian-gold-l75);
  --r-selection-color: var(--nix-afghani-blue-l15);

  --credit-radius: var(--nix-radius);
  --credit-background: color-mix(
    in oklch,
    var(--nix-afghani-blue-l25) 80%,
    transparent
  );
}

@font-face {
  font-family: "Route 159";
  src: url("fonts/Route159-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Route 159";
  src: url("fonts/Route159-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

.reveal a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.reveal .controls,
.reveal .progress {
  color: var(--nix-indian-gold-l75);
}

/**
 * Code blocks
 *
 * monokai's own near-black olive background belongs to no part of the
 * NixOS palette. Its token colors stay; only the box is tweaked onto
 * the Afghani Blue ladder.
 */

.reveal pre {
  width: var(--nix-block-width);
  box-shadow: none;
}

.reveal pre code.hljs {
  background: var(--nix-afghani-blue-l25);
  border: 3px solid var(--nix-afghani-blue-l35);
  border-radius: var(--nix-radius);
  max-height: calc(var(--slide-height, 720px) * 0.62);
}

.reveal pre.small {
  font-size: 0.45em;
}

/**
 * .small and .large
 */

.reveal .small {
  font-size: 0.8em;
}

.reveal .large {
  font-size: 1.25em;
}

/**
 * .left
 */

.reveal .left {
  text-align: left;
}

/**
 * Quotes
 */

.reveal blockquote {
  box-sizing: border-box;
  width: var(--nix-block-width);
  padding: 0.6em 1em;
  background: var(--nix-afghani-blue-l25);
  border: 3px solid var(--nix-afghani-blue-l35);
  border-radius: var(--nix-radius);
  box-shadow: none;
}

.reveal .source {
  width: var(--nix-block-width);
  margin: 0 auto;
  text-align: right;
  font-size: 0.7em;
  font-style: italic;
}
