:root {
  --teal: #14b4bc;
  --yellow: #e6bf64;
  --red: #b9212e;
  --dark-red: #9c1c27;
  --white: #e6e2dd;
  --bright-white: #efefef;
  --text: #303030;
  --dark-grey: #222222;
}

/* Override pico variables */
[data-theme=light],
:root:not([data-theme=dark]) {
  --pico-text-selection-color: var(--yellow);
  --pico-primary: var(--red);
  --pico-primary-background: var(--red);
  --pico-primary-underline: var(--dark-red);
  --pico-primary-hover: var(--red);
  --pico-primary-hover-background: var(--dark-red);
  --pico-primary-focus: var(--dark-red);
  --pico-primary-inverse: var(--bright-white);
}

[data-theme=dark] {
  --pico-background-color: var(--text);
  --pico-color: var(--white);
  --pico-text-selection-color: var(--yellow);
  --pico-primary: var(--red);
  background-color: var(--text);
}

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--white) url('images/paper.png');
  color: var(--text);
}

h1, h2, h3, h4, h5, h6, .subtitle {
  font-family: 'Poiret One', cursive;
  text-transform: uppercase;
  text-align: center;
}

/* Section headers */
h2 {
  font-size: 3rem;
  padding: 4rem 0;
  margin: 0;
}

.big-title {
  font-family: 'Abril Fatface', cursive;
  font-size: 9vw;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  margin: 1rem 0 2.5rem 0;
}
.big-title u {
  /* Use a thicker border instead of standard underline */
  text-decoration: none;
  border-bottom: 1vw solid;
  line-height: 6.3vw;
  font-size: 80%;
}

.hidden { display: none; }

.donate {
  text-align: center;
  background: var(--teal);
  padding: 0.8rem;
}
.donate, .donate a { color: var(--bright-white); }

/* Header */
header .top {
  display: flex;
  align-items: center;
  height: 5rem;
}

header .top > .subtitle {
  width: 100%;
  text-align: right;
  font-size: 0.8rem;
  border: solid var(--text);
  border-width: 1px 0;
  line-height: 2rem;
}
header .top > .subtitle:first-child { text-align: left; }
header .top > .projector { margin: 0 2rem; }

header .top > .projector img {
  /* brightness(0) saturate(100%) turns the svg black */
  /* then the rest of the filter turns the svg to var(--text) */
  filter: brightness(0) saturate(100%) invert(15%) sepia(60%) saturate(2%) hue-rotate(317deg) brightness(99%) contrast(93%);
  width: 11rem;
  animation: 60s linear 0s infinite normal projector;
}
@keyframes projector {
  0% {
    filter: brightness(0) saturate(100%) invert(15%) sepia(60%) saturate(2%) hue-rotate(317deg) brightness(99%) contrast(93%);
  }
  25% {
    filter: brightness(0) saturate(100%) invert(70%) sepia(43%) saturate(433%) hue-rotate(4deg) brightness(100%) contrast(97%);
  }
  50% {
    filter: brightness(0) saturate(100%) invert(60%) sepia(24%) saturate(1044%) hue-rotate(132deg) brightness(88%) contrast(92%);
  }
  75% {
    filter: brightness(0) saturate(100%) invert(21%) sepia(28%) saturate(5177%) hue-rotate(334deg) brightness(101%) contrast(103%);
  }
  100% {
    filter: brightness(0) saturate(100%) invert(15%) sepia(60%) saturate(2%) hue-rotate(317deg) brightness(99%) contrast(93%);
  }
}

header .links {
  display: flex;
  justify-content: space-between;
  border: solid var(--text);
  border-width: 1px 0;
  margin-bottom: 3rem;
}
header .links a {
  text-decoration: none;
  font-size: 1.4rem;
  color: var(--dark-red);
  transition: 0.25s ease-in-out background;
}
header .links a:nth-child(1):hover { background: var(--yellow); color: var(--text); }
header .links a:nth-child(2):hover { background: var(--teal); color: var(--white); }
header .links a:nth-child(3):hover { background: var(--red); color: var(--white); }

header .description {
  font-size: 5vw;
  line-height: 150%;
  max-width: 100rem;
  padding: 0 1rem;
  text-align: center;
  display: flex;
  align-items: center;
}
header .description .subtitle { margin-top: 0; }
header .description .subtitle a { margin-top: 1.5rem; }
@media (min-width: 768px) {
  header .description {
    border-left: 1px solid;
    order: 1;
  }
}

main.container-fluid { padding: 0; }

/* Film posters */
#films {
  padding-bottom: 3rem;
}
#films .carousel {
  grid-template-columns: repeat(auto-fill, minmax(50%, 1fr));
}
#films .carousel-item .image,
#films .carousel-item .subtitle,
#films .carousel-item a[rel="prev"] { cursor: pointer; }

#films .carousel-item .details .subtitle {
  font-size: 2.5vw;
  margin-top: 1rem;
}
#films .image {
  overflow: hidden;
  text-align: center;
}
#films .image img {
  width: 80%;
  min-height: 100%;
}

@media (min-width: 576px) {
  #films .carousel {
    grid-template-columns: repeat(auto-fill, minmax(33%, 1fr));
  }
  #films .image { height: 48vw; }
  #films .image img { width: 100%; }
}
@media (min-width: 768px) {
  #films .carousel {
    grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
  }
  #films .image { height: 43vw; }
}

/* Tickets */
.tickets {
  text-align: center;
  margin-bottom: 3rem;
}
.tickets .details { padding-bottom: 3rem; }
.tickets > .subtitle.day {
  font-size: 2rem;
}
.tickets .lineup {
  margin: 3rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  overflow: scroll;
}
.tickets .lineup .day:first-child { border-left: none; }
.tickets .time {
  display: inline-block;
  margin-bottom: var(--pico-typography-spacing-vertical);
}

/* Film animation */
.film {
  height: 150px;
  background: url('images/film.png') repeat-x;
  animation: 15s linear 0s infinite normal film;
}
@keyframes film {
  from { background-position-x: 0; }
  to { background-position-x: -448px; }
}

/* Sponsors */
.sponsors {
  margin: 0;
  padding-bottom: 3rem;
}
.sponsors ul {
  margin: 0;
  padding: 0;
}
.sponsors ul li {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.sponsors img {
  max-width: 50vw;
  padding: 0.5rem;
}
@media (min-width: 768px) {
  .sponsors img { max-width: 20vw; }
}

/* Footer */
footer[data-theme="dark"] {
  padding: 3rem 2rem;
  background-color: var(--dark-grey);
}

footer .social ul {
  display: flex;
  justify-content: space-between;
  max-width: 13rem;
  width: 100%;
  padding: 0;
}
footer .social ul li { list-style: none; }
footer a { color: var(--white); }

#back-to-top {
  color: var(--red);
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  cursor: pointer;
}
#back-to-top svg {
  width: 3rem;
}
