
/* variables */

body {
  --gutter: 30px;
  --min-album-cols: 2;
  --max-album-cols: 4;
  --album-thumbnail-width: 279px;
  --max-container-width: calc(
    (var(--gutter) + var(--album-thumbnail-width)) * var(--max-album-cols) +
    var(--gutter)
  );
  --heading-font-size: 40px;
  --dark-bg-color: #202d20;
}

@media only screen and (max-width: 600px) {
  body {
    --gutter: 15px;
  }
}

/* resets */

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

html, body {
  height: 100%;
}

html, body, ul, li, h1, h2, h3 {
  margin: 0;
  padding: 0;
}

ul, li {
  list-style: none;
}

/* text */

body {
  font-family: Helvetica, Roboto, Arial, sans-serif;
  line-height: 1.35;
}

h1, h2, h3, h4, h5 {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
}

/* general section */

.section-container {
  max-width: var(--max-container-width);
  margin: 0 auto;
  padding: 1px var(--gutter);
}

h2, h3 {
  font-size: var(--heading-font-size);
}

/* header */

header {
  background: var(--dark-bg-color);
  color: #fff;
}

header .section-container {
  position: relative;
  height: 100vh;
  min-height: 690px;
  max-height: 1200px;
  max-width: 1800px;
  background-size: cover;
  background-position: 50% 50%;
  background-image: url('images/hero.jpeg');
}

.header-text {
  position: relative;
  top: 50%;
  text-align: center;
  font-family: 'Great Vibes', cursive;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@media only screen and (max-width: 800px) {
  header {
    margin-top: -40px; /* because browsers with tab-bar at bottom cover content */
  }

  .header-text {
    margin-top: -40px;
  }
}

header h1 {
  font-size: 80px;
  line-height: 1em; /* looks best when wrapped */
  margin: 20px 0;
}

header .date {
  font-size: var(--heading-font-size);
}

.header-arrow {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  margin: 0 auto;
  cursor: pointer;
}

.header-arrow svg {
  position: absolute;
  left: -20px;
  bottom: 3em;
  width: 40px;
  height: 40px;
}

/* footer */

footer {
  background: var(--dark-bg-color);
  color: #fff;
}

footer .section-container {
  display: flex;
  justify-content: space-between;
  padding-top: 3em;
  padding-bottom: 3em;
}

@media only screen and (max-width: 550px) {
  footer .section-container {
    flex-direction: column;
    align-items: center;
  }

  footer .section-container > :first-child {
    margin-bottom: 2em;
  }
}

footer a {
  color: inherit;
  text-decoration: none
}

footer a span {
  text-decoration: underline;
}

footer a svg {
  margin-left: 2px;
}

/* videos */

.videos-section {
  background: var(--dark-bg-color);
  color: #fff;
}

.videos-section .section-container {
  padding-top: 3em;
  padding-bottom: 4em;
}

.video-tabs {
  display: flex;
  justify-content: center;
  padding-bottom: 3em;
}

@media only screen and (max-width: 800px) {
  .videos-section .section-container {
    padding-top: 1em;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .video-tabs {
    padding-bottom: 1em;
  }
}

.video-tabs-item {
  margin: 0 5px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

.video-tabs-item:hover {
  background: #3a4d3a;
}

.video-tabs-item[data-selected] {
  background: #8cbd8c;
  color: #000;
}

.video-player {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* photos */

.photos-section .section-container {
  padding-top: 3em;
  padding-bottom: 3em;
}

.album-group-title {
  margin-bottom: 30px;
}

.albums {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--gutter) * -1);
}

.album {
  flex-grow: 0;
  flex-shrink: 0;
  width: calc(100% / var(--min-album-cols));
  max-width: calc(var(--album-thumbnail-width) + var(--gutter));
  padding-right: var(--gutter);
  padding-bottom: 30px;
}

.album > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.album-thumbnail {
  padding-bottom: 100%;
  background-size: cover;
  border-radius: 8px;
}

.album-meta {
  margin: 1em 0;
}

.album-count {
  color: #a4a4a4;
}

.album-group-upload {
  margin-top: 2em;
}

.album-group-upload .album-group-title {
  margin-bottom: 0; /* because thumbnail we chose has unclear top boundary */
}

.album-group-upload-instructions {
  flex-grow: 1;
}

.album-group-upload-instructions img {
  max-width: 100%;
  height: auto;
}

@media only screen and (max-width: 550px) {
  .album-group-upload .album {
    position: relative;
  }

  .album-group-upload-instructions {
    margin-top: -100px;
  }
}
