/* Mostly Movies. The look the site has had since 2016: white, Oxygen for the
   words, an 80px bar across the top with the name, the three sections and
   the social links. templates/site.html links this after duckdown's
   site.css, so it only says what differs.

   Each kind of page has its own stylesheet as well: about.css, news.css and
   missing.css by `css:` in the page, projects.css by templates/project.html. */

:root {
  /* Always light: the site has never had a dark look, and the films'
     backgrounds are photographs. Every colour is said here, so the base's
     dark values never apply. */
  color-scheme: light;
  --bg: #ffffff;
  --text: #000000;
  --muted: #757575;
  --accent: #4f5d95;
  --border: #dcdbdb;
  --surface: #f9f9f9;
  --field-border: #818b98;

  --font-body: "Oxygen", sans-serif;
  --font-heading: "Arimo", sans-serif;

  /* The height of the top bar, and its rule: pages that fill the screen
     beneath it take this off. */
  --bar: 81px;
}

/* The bar stays at the top, so a #link lands below it. */
html {
  scroll-padding-top: var(--bar);
}

body {
  max-width: none;
  margin: 0;
  padding: 0;
  font: 300 16px/1.6 var(--font-body);
}

/* A heading's own link stays quiet: no # on hover. */
:is(h2, h3, h4) > a:hover::after {
  content: none;
}

/* --- The top bar --- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  height: var(--bar);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.navbar .brand {
  display: flex;
  flex: none;
  align-items: center;
  width: 300px;
  padding: 0 30px;
}

.navbar .brand img {
  display: block;
  width: 100%;
  height: auto;
}

.navbar > nav {
  flex: 1;
  min-width: 0;
}

ul.nav {
  gap: 0;
  flex-wrap: nowrap;
  height: 100%;
}

/* The front page is the intro, not a section: the bar lists the three. */
ul.nav li:has(> a[href="/"]) {
  display: none;
}

ul.nav a {
  display: block;
  width: 100px;
  height: 80px;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: inherit;
  line-height: 80px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

ul.nav a:hover,
ul.nav a[aria-current] {
  color: #000;
  background: var(--surface);
}

ul.nav a[aria-current] {
  border-bottom-color: #000;
  text-decoration: none;
}

.social {
  display: flex;
  margin: 0 30px 0 auto;
  padding: 0;
  list-style: none;
}

.social li {
  margin: 0;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 80px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.social a:hover { background: var(--surface); }
.social .facebook:hover { color: #45619d; }
.social .twitter:hover { color: #1da1f2; }
.social .vimeo:hover { color: #17b3e8; }
.social .youtube:hover { color: #e62117; }

/* --- The front page: the intro above the bar --- */

.welcome {
  height: calc(100vh - var(--bar));
  height: calc(100dvh - var(--bar));
  border-bottom: 1px solid var(--border);
}

.welcome video {
  display: block;
  width: 80%;
  height: 100%;
  margin: auto;
  padding-top: 100px;
}

/* --- A narrow screen: the name on a row of its own, the sections under it --- */

@media (max-width: 56rem) {
  :root {
    --bar: 107px;
  }

  .navbar {
    flex-wrap: wrap;
  }

  .navbar .brand {
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0 20px;
  }

  .navbar .brand img {
    width: 220px;
  }

  /* Its own width, so it can't sit in the name's row at none. */
  .navbar > nav {
    flex: 1 0 auto;
  }

  ul.nav a {
    width: auto;
    height: 50px;
    padding: 0 14px;
    line-height: 50px;
  }

  .social {
    margin-right: 10px;
  }

  .social a {
    width: 36px;
    height: 50px;
  }

  .welcome video {
    width: 100%;
    padding: 40px 20px 0;
  }
}
