@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/open-sans.woff2") format("woff2");
}

@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/open-sans-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Saira Extra Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/saira-extra-condensed-500.woff2") format("woff2");
}

@font-face {
  font-family: "Saira Extra Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/saira-extra-condensed-700.woff2") format("woff2");
}

:root {
  --primary: #bd5d38;
  --primary-dark: #824027;
  --text: #868e96;
  --heading: #343a40;
  --border: #dee2e6;
  --card-border: rgba(0, 0, 0, 0.125);
  --bar-height: 3.5rem;
  --sidebar-width: 17rem;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Saira Extra Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
}

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

html {
  scroll-padding-top: var(--bar-height);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  padding-top: var(--bar-height);
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 0.5rem;
  color: var(--heading);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1,
h2 {
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3.25rem, 13vw, 6rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(2.5rem, 9vw, 3.5rem);
}

h3 {
  margin-top: 2.5rem;
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

p,
ul,
blockquote,
figure {
  margin: 0 0 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

mark {
  padding: 0.2em;
  background: #fcf8e3;
}

/* Navigation: top bar on small screens, fixed sidebar from 992px. */

.sidenav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: var(--bar-height);
  padding: 0.5rem 1rem;
  background: var(--primary);
}

.brand {
  color: #fff;
  font-size: 1.25rem;
}

.brand:hover,
.brand:focus-visible {
  color: #fff;
  text-decoration: none;
}

.brand-img {
  display: none;
}

.nav-toggle {
  width: 2.75rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
  background: transparent
    url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")
    center / 1.5rem no-repeat;
  cursor: pointer;
}

#nav {
  display: none;
  flex-basis: 100%;
}

.nav-open #nav {
  display: block;
}

#nav ul {
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
}

#nav a {
  display: block;
  padding: 0.5rem 0;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  text-transform: uppercase;
}

#nav a:hover,
#nav a:focus-visible,
#nav a[aria-current="true"] {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

#nav a[aria-current="true"] {
  color: #fff;
}

@media (min-width: 992px) {
  html {
    scroll-padding-top: 0;
  }

  body {
    padding-top: 0;
    padding-left: var(--sidebar-width);
  }

  .sidenav {
    inset: 0 auto 0 0;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    width: var(--sidebar-width);
    padding: 1rem;
    text-align: center;
  }

  .brand {
    padding: 0.5rem;
  }

  .brand-text,
  .nav-toggle {
    display: none;
  }

  .brand-img {
    display: block;
    width: 10rem;
    height: 10rem;
    margin: 0 auto 0.5rem;
    border: 0.5rem solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    object-fit: cover;
  }

  #nav {
    display: block;
    flex-basis: auto;
    width: 100%;
  }
}

/* Sections */

main section {
  padding: 5rem 1rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  main section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
  }
}

@media (min-width: 992px) {
  main section {
    padding: 3rem;
  }
}

main section > h2 {
  margin-top: 1rem;
}

.intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
}

.subheading {
  margin: 0.75rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  text-transform: uppercase;
}

.accent {
  color: var(--primary);
}

.logo {
  width: 6rem;
  height: 6rem;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .logo {
    margin: 0 auto;
  }
}

/* Image cards */

.cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

.card {
  width: 18rem;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 0.25rem;
  background: #fff;
}

.cards.small .card {
  width: 12rem;
}

.card img {
  display: block;
  width: 100%;
}

.card figcaption {
  padding: 1.25rem;
}

.card h5 {
  margin-bottom: 0.75rem;
}

.card p {
  margin: 0;
}

/* Quotes */

blockquote {
  margin: 1.5rem 0;
  padding-left: 1em;
  border-left: 4px solid var(--primary);
  font-size: 1.25rem;
}

blockquote p {
  margin: 0;
}

blockquote footer {
  color: #6c757d;
  font-size: 0.8rem;
}

blockquote footer::before {
  content: "\2014\00a0";
}

/* Tables */

.table-wrap {
  margin: 1.5rem 0 1rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.3rem;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

thead th {
  border-bottom: 2px solid var(--border);
  vertical-align: bottom;
}

.timeline th[scope="row"] {
  white-space: nowrap;
}

.timeline tbody tr:hover {
  background: rgba(0, 0, 0, 0.075);
}

.ebooks th,
.ebooks td {
  padding: 0.75rem;
}

/* Book and link lists */

.volumes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0 2rem;
  margin-bottom: 3rem;
}

.volumes h4 {
  margin-top: 3rem;
}

.books {
  padding: 0;
  list-style: none;
}

.books li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--card-border);
}

.books li:last-child {
  border-bottom: 0;
}

.link-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0 2rem;
}

.links {
  padding: 0;
  list-style: none;
}

.links li {
  margin-bottom: 1rem;
}

/* Footer */

.site-footer {
  margin: 1rem 0;
  text-align: center;
}

/* Impressum */

.legal h1 {
  margin-bottom: 2rem;
}

.legal h2 {
  margin-top: 2rem;
  font-size: clamp(2rem, 7vw, 2.5rem);
}

.legal ol {
  padding-left: 1.5rem;
}

.legal li {
  margin-bottom: 1rem;
}

.legal li strong {
  display: block;
  color: var(--heading);
}
