/* Barcoder branding on top of the Zensical theme.
   Palette and fonts follow the bar-coder.ru "landing" identity. */

@font-face {
  font-family: "Ubuntu";
  src: url("../assets/fonts/Ubuntu-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../assets/fonts/Ubuntu-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../assets/fonts/Ubuntu-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("../assets/fonts/Merriweather-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("../assets/fonts/Merriweather-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --md-text-font: "Ubuntu";
  --md-code-font: "SFMono-Regular";
  --bc-serif-font: "Merriweather", Georgia, "Times New Roman", serif;
  --bc-radius: 16px;
  --bc-button-radius: 8px;
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0f7b6c;
  --md-primary-fg-color--light: #3a9a8c;
  --md-primary-fg-color--dark: #0a5b50;
  --md-primary-bg-color: #fff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  --md-accent-fg-color: #0a5b50;
  --md-accent-fg-color--transparent: rgba(15, 123, 108, 0.1);
  --md-default-bg-color: #f7f8f4;
  --md-default-fg-color: #1f2a2d;
  --md-default-fg-color--light: #5a686e;
  --md-typeset-a-color: #0f7b6c;
  --bc-surface: #fff;
  --bc-border: rgba(30, 35, 44, 0.12);
  --bc-shadow: 0 14px 32px rgba(28, 40, 42, 0.08);
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #3fb8a4;
  --md-primary-fg-color--light: #6fd0bf;
  --md-primary-fg-color--dark: #1f8f7e;
  --md-primary-bg-color: #10181a;
  --md-accent-fg-color: #6fd0bf;
  --md-accent-fg-color--transparent: rgba(63, 184, 164, 0.12);
  --md-typeset-a-color: #3fb8a4;
  --bc-surface: rgba(255, 255, 255, 0.04);
  --bc-border: rgba(255, 255, 255, 0.1);
  --bc-shadow: none;
}

/* Serif headings, as on bar-coder.ru. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  font-family: var(--bc-serif-font);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--md-default-fg-color);
}

.md-typeset ul li::marker,
.md-typeset ol li::marker {
  color: var(--md-primary-fg-color);
}

/* Links to the main site in the header. Small screens keep only the first
   one (the main site's home page); the rest appear from 76.25em up. */
.bc-site-links {
  display: flex;
  flex-shrink: 0;
  gap: 1.2rem;
  margin: 0 0.8rem;
}

.bc-site-links__item {
  font-size: 0.75rem;
  white-space: nowrap;
  color: inherit;
  opacity: 0.85;
  transition: opacity 125ms;
}

.bc-site-links__item:hover,
.bc-site-links__item:focus {
  opacity: 1;
  text-decoration: underline;
}

@media screen and (max-width: 76.2344em) {
  .bc-site-links__item:not(:first-child) {
    display: none;
  }
}

/* Buttons. */
.md-typeset .md-button {
  border-radius: var(--bc-button-radius);
}

/* Screenshots: centered, rounded, tall ones capped in width. */
.md-typeset img {
  display: block;
  margin: 1rem auto;
  border-radius: 8px;
  box-shadow: var(--bc-shadow);
}

.md-typeset p > img:only-child {
  max-height: 80vh;
  width: auto;
}

/* Cards, blockquotes, tables. */
.md-typeset .grid.cards > ul > li,
.md-typeset blockquote,
.md-typeset table:not([class]) {
  border-radius: var(--bc-radius);
}

.md-typeset .grid.cards > ul > li {
  background: var(--bc-surface);
  border: 1px solid var(--bc-border);
  box-shadow: var(--bc-shadow);
}

.md-typeset blockquote {
  padding: 0.8rem 1rem;
  background: var(--bc-surface);
  border-left: 4px solid var(--md-primary-fg-color);
}

/* Home page hero. */
.bc-hero {
  padding: 1.5rem 0 1rem;
}

.md-typeset .bc-hero h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.bc-hero p {
  max-width: 38rem;
  font-size: 0.9rem;
}

.md-typeset .bc-hero .md-button {
  margin: 0.4rem 0.4rem 0 0;
}
