body, html { padding: 0; margin: 0; background-color: #000 }

div#verticalCenter {
	display: flex;
	align-items: center;
	height: 100vh;
}

div#outerDiv {
	height: 98vh;
	max-height: 69vw; /* (vw) 100 * 9 / (16 * 0.98 * 0.98 * 0.85)  -- with 85fr below, 1% row gaps, 1vh vertical padding on top and bottom */
	width: 100vw;
	max-width: 145vh; /* (vh) inverse of max-height number, ie: 100 / 0.69 */
	padding: 1vh 0 1vh 0;
	margin: 0 auto;
}
div#mainGrid {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 9fr 85fr 6fr; /* must add up to 100fr. after changing, update max-width and max-height above, test responsiveness */
	grid-row-gap: 1%; row-gap: 1%;
	height: 100%;
	min-width: 0;
	min-height: 0;
}
div#header {
	grid-column: 1 / 2;
	grid-row: 1 / 2;
	height: 100%;
	min-height: 0;
	overflow: hidden;
}
div#feature-wrapper {
	grid-column: 1 / 2;
	grid-row: 2 / 3;
	height: 100%;
	min-height: 0;
	overflow: hidden;
}
div#footer {
	grid-column: 1 / 2;
	grid-row: 3 / 4;
	height: 100%;
	min-height: 0;
}


div#headerGrid {
	display: grid;
	grid-template-columns: 1fr 4fr 1fr;
	grid-template-rows: 1fr;
	height: 100%;
	width: 100%;
}
div#headerGrid div#FSFlogo {
	grid-column: 2 / 3;
	grid-row: 1 / 2;
	min-height: 0;
	min-width: 0;
	width: 100%;
}
div#headerGrid div#joinLogo {
	grid-column: 3 / 4;
	grid-row: 1 / 2;
	min-height: 0;
	min-width: 0;
	width: 100%;

	position: relative;
}

div#headerGrid div#FSFlogo a { display: flex; justify-content: center; align-content: center; height: 100%; }
div#headerGrid div#joinLogo a { display: flex; justify-content: right; align-content: center; height: 100%; }
div#headerGrid div a img { max-height: 100%; max-width: 100%; }

div#headerGrid div a img#joinButton {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

/* for the moments when the page is loading */
video#feature {
	max-width: 100%;
	max-height: 100%;
}


div#footerFlex {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-content: center;
	height: 100%;

	/* font-size: 80% would just be relative to a parent font size, thus the hard-coded min() hack */
	font-size: min(3vw, 4vh);
	color: white;
	font-family: "Roboto", sans-serif,"Helvetica",Arial;
	font-weight: normal;
}
div#footerFlex div a {
        /* yes, this is a flex too, so we can vertically align icons and text */
	display: flex; 
	flex-direction: row;
	justify-content: center;
	align-content: center;

	text-decoration: none;
	color: white;
}
div#footerFlex div a img { height: 1.2em; margin-right: 0.5em; }
div#footerFlex div a span { font-size: 1em; }

div#separatorDiv { display: inline-block; margin: 0 1em; }


@media screen and (max-width: 500px), screen and (max-height: 350px) {

	div#outerDiv {
		max-height: 75vw; /* see comments above */
		max-width: 133vh; /* see comments above */
	}
	div#mainGrid {
		grid-template-rows: 12fr 78fr 10fr; /* see comments above */
	}
	div#headerGrid div#FSFlogo a {
		padding: 0 5vw;
	}
	div#footerFlex {
		font-size: min(3.5vw, 6vh);
	}
}
@media screen and (max-width: 350px), screen and (max-height: 350px) {
	div#footerFlex {
		font-size: min(5vw, 6vh);
	}
}



div#video-overlay { display: none; position: absolute; align-items: stretch; top: 0px; right: 0px; bottom: 0px; left: 0px; z-index: 10; background-color: rgba(0, 0, 0, 0.40);}
div#video-overlay-inner { margin: 20px; width: 100%; display: flex; justify-content: center; align-items: center; }
div#video-overlay-inner2 { max-height: 100%; max-width: 440px; padding: 20px; text-align: center; background: rgba(0, 0, 0, 1); border-radius: 10px; border: 4px solid #0a0; overflow: hidden; }

div#close-button { float: right; height: 40px; margin-right: -20px; margin-top: -27px; padding: 11px; color: #0a0; cursor: pointer; }
div#close-button:hover { color: #0f0; }

h2 { color: #0f0; font-size: 20px; font-weight: bold; font-family: "Roboto", sans-serif, "Helvetica", Arial; padding-left: 11px; }
h2 a { color: #0f0; text-decoration: none; }

div#overlay-buttons { margin: 10px auto; max-width: 200px; border: 3px solid #0a0; border-radius: 25px; }
div#overlay-buttons div { height:30px; line-height: 30px; margin-left:auto; margin-right:auto; display:block; }
div#overlay-button-donate { border-bottom: 1px solid #0a0; }
div#overlay-button-fsf35 { border-top: 1px solid #0a0; }
div#overlay-buttons div img { height: 1.2em; }
div#overlay-buttons a { width: 100%; display: block; text-align:center; font-size:20px; color: #0f0; text-decoration: none; font-family: "Roboto", sans-serif,"Helvetica",Arial; font-weight: normal; }
div#overlay-buttons div a { display: flex; align-items: center; justify-content: center; }

p { color: #0f0; font-family: "Roboto", sans-serif, "Helvetica", Arial; font-size: 16px; font-weight: 400; }
p a { color: #0f0; font-weight: 700; text-decoration: none; }
p a:hover { color: #0f0; }


@media screen and (max-width: 600px), screen and (max-height: 460px) {
  div#video-overlay-inner { margin: 10px; }
  div#video-overlay-inner2 { max-width: 390px; }
  h2 { font-size: 16px; }
  div#overlay-buttons { max-width: 150px; }
  div#overlay-buttons div { height: 24px; line-height: 24px; }
  div#overlay-buttons a { font-size: 16px; }
  p { font-size: 14px; }
}
@media screen and (max-width: 420px), screen and (max-height: 350px) {
  div#video-overlay-inner { margin: 10px; }
  div#video-overlay-inner2 { max-width: 350px; }
  h2 { font-size: 14px; }
  div#overlay-buttons { max-width: 125px; border-width: 2px; }
  div#overlay-buttons div { height: 20px; line-height: 20px; }
  div#overlay-buttons a { font-size: 12px; }
  p { font-size: 12px; }
}
@media screen and (max-width: 360px), screen and (max-height: 312px) {
  div#video-overlay-inner { margin: 10px; }
  div#video-overlay-inner2 { max-width: 280px; padding: 10px; }
  div#close-button { margin-right: -10px; margin-top: -17px; }
  h2 { font-size: 12px; }
  div#overlay-buttons { max-width: 100px; }
  div#overlay-buttons div { height: 18px; line-height: 18px; }
  div#overlay-buttons a { font-size: 12px; }
  p { font-size: 12px; }
}
@media screen and (max-width: 330px), screen and (max-height: 288px) {
  div#video-overlay-inner { margin: 0px; }
  div#video-overlay-inner2 { max-width: 270px; padding: 5px; }
  div#close-button { margin-right: -5px; margin-top: -12px; }
  h2 { font-size: 12px; }
  div#overlay-buttons { max-width: 100px; border-width: 1px; }
  div#overlay-buttons div { height: 18px; line-height: 18px; }
  div#overlay-button-donate { border-bottom-width: 0; }
  div#overlay-buttons a { font-size: 12px; }
  p { font-size: 10px; }
}
@media screen and (max-width: 260px), screen and (max-height: 250px) {
  div#video-overlay-inner { margin: 0px; }
  div#video-overlay-inner2 { max-width: 260px; padding: 5px; }
  div#close-button { margin-right: -5px; margin-top: -12px; }
  h2 { font-size: 10px; }
  div#overlay-buttons { max-width: 100px; }
  div#overlay-buttons div { height: 16px; line-height: 16px; }
  div#overlay-buttons a { font-size: 10px; }
  p { font-size: 8px; }
}
@media screen and (max-width: 220px), screen and (max-height: 225px) {
  div#video-overlay-inner { margin: 0px; }
  div#video-overlay-inner2 { max-width: 100%; padding: 5px; }
  div#close-button { margin-right: -5px; margin-top: -12px; }
  h2 { font-size: 8px; }
  div#overlay-buttons { max-width: 100px; }
  div#overlay-buttons div { height: 16px; line-height: 16px; }
  div#overlay-buttons a { font-size: 10px; }
  p { font-size: 7px; }
}

.pre-fade-in { opacity: 0; }
.fade-in { opacity: 1; animation-name: fadeInOpacity; animation-iteration-count: 1; animation-timing-function: ease-in; animation-duration: 0.2s; }
@keyframes fadeInOpacity {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

div#video-overlay-inner2 { position: relative; }
.pre-fade-in div#video-overlay-inner2 { left: 100vw; }
.fade-in div#video-overlay-inner2 { left: 0; animation-name: slideInOpacity; animation-iteration-count: 1; animation-timing-function: ease-in; animation-duration: 0.2s; }
@keyframes slideInOpacity {
  0% { left: 100vw; }
  100% { left: 0; }
}


.unselectable {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.selectable {
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

