
/*
CR
subtext.studio
*/

/*---------------------------------------------MAIN*/

*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;

-webkit-text-size-adjust: none;
-webkit-font-smoothing: antialiased;
}

/* html, body + overflow to prevent horizontal scroll on mobile, position and z-index to allow click through */
html,
body {
font-family: 'font1', "Times New Roman", Times, serif, sans-serif;
width: 100%;
height: 100%;
overflow: hidden;
/* TODO : fix viewport units on ios ? */
/*position: fixed;*/
}

/*baseline grid*/
html, body {
font-size: 18px;
line-height: 1.5em;
/*font-size: 1.5vw;*/
}
@media(max-width: 720px) {
html, body {
	font-size: 11px;
}
}
html, body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,p,blockquote,th,td,a,select,iframe {
margin:0;
padding:0;
}

a {
font-style: italic;
text-decoration: none;
color: black;
}
a:hover {
text-decoration: none;
color: lightgrey;
}

/*---------------------------------------------PAGES*/

#marker {
position: absolute;
top: 0;
left: 0;
z-index: 10;
margin: 2vh;
width: 4vh;
height: 4vh;
}
#marker img {
vertical-align: top;
width: 100%;
height: 100%;
}

.editor h1,
.editor h2 {
font-size: 1.5000em;
line-height: 1.0000em;
}
.editor div,
.editor p,
.editor ul,
.editor h3,
.editor h4,
.editor h5 {
font-size: 1.0000em;
line-height: 1.2000em;
}
.editor p, .editor li { font-weight: lighter; }
.editor h1 { text-align: center; }
.editor strong { font-weight: bold; }
.editor em { font-style: italic; }

.project-title h2 {
font-size: 4vh;
line-height: 4vh;
}

.crs-col {
position: fixed;
overflow: hidden;
}
.crs-col-wrapper {
padding-right: 50px; /* to hide the scrollbar */
width: calc(100% + 50px);
height: 100%;
overflow-x: hidden;
overflow-y: scroll;
/* TODO: ios momentum scrolling */
-webkit-overflow-scrolling: auto;
/*-webkit-overflow-scrolling: touch;*/
}
/*.touch {
-webkit-overflow-scrolling: touch;
}*/
.crs-row {
position: relative;
width: 100%;
display: block;
}
.crs-row:not(:last-child) {
margin-bottom: 2vh;
}
.crs-row img {
display: block;
width: 100%;
height: auto;
}
.crs-row .overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: black;
/*background-color: rgba(255,255,255,.7);*/
/*border: 1px solid black;*/
opacity: 0;
font-style: normal;
}
.crs-row .overlay { padding: .5rem; }
.crs-row .overlay:hover { opacity: 1; }
.crs-row-l-1 { padding-left: 1vh; }
.crs-row-r-1 { padding-right: 1vh; }
.crs-row-l-2 { padding-left: 2vh; }
.crs-row-r-2 { padding-right: 2vh; }
.crs-row-t-2 { padding-top: 2vh; }
.crs-row-b-2 { padding-bottom: 2vh; }
.crs-row-t-35 { padding-top: 35vh; }
.crs-row-b-35 { padding-bottom: 35vh; }

.p5 {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 30vh;
}
.p5 canvas {
width: 100%;
height: auto;
}

.zoom-item {
cursor: pointer;
}
#zoom-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
z-index: 100;
display: none;
padding: 2vh;
background-color: white;
-webkit-background-size: contain;
-moz-background-size: contain;
-o-background-size: contain;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
background-origin: content-box;
}

/*---------------------------------------------LAYOUT*/

#splash {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
#splash img {
max-width: 95%;
max-height: 95%;
}

#all {
opacity: 0;
}

#content {
background-color: white;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}

#panel {
background-color: white;
padding: 2vh;
height: 100vh;
padding-bottom: 150px;
overflow-x: hidden;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
#subtitle {
position: fixed;
left: 0;
bottom: 0;
color: white;
padding-left: 2vh;
padding-right: 2vh;
padding-top: 2vh;
}
#subtitle h1 {
margin: 0;
font-size: 4vh;
line-height: 4vh;
padding-bottom: 2vh;
}
#social {
position: fixed;
left: 0;
bottom: 0;
}
#social p {
float: right;
width: 4vh;
height: 4vh;
margin: 0 2vh 2vh 0;
}
#social p:hover { transform: scale(1.1); }
/* http://stackoverflow.com/a/22014077/7662622 */
#social p:nth-child(2n+1) {
clear: both;
}
#social img {
display: block;
width: 100%;
height: 100%;
}

.drawer {
position: fixed;
width: 40vw;
margin-left: -40vw;
z-index: 1;
}
#drawer-button {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 0;
z-index: 10;
}
#drawer-button > :first-child {
margin: 2vh;
width: 3vw;
height: 3vw;
cursor: pointer;
}
#drawer-toggle { display: none; } /* prevent scroll caused by the checkbox Hack: https://css-tricks.com/the-checkbox-hack/ */
#drawer-toggle:checked ~ #drawer-button {
left: 40vw;
width: 60vw;
height: 100%;
}
#drawer-toggle:checked ~ .drawer  {
margin-left: 0;
}
@media screen and (max-width: 720px) {
	#drawer-toggle:checked ~ #drawer-button {
	left: 60vw;
	width: 40vw;
	}
	.drawer {
	width: 60vw;
	margin-left: -60vw;
	}
}

#lg {
position: fixed;
right: 0;
top: 0;
margin: 2vh;
z-index: 10;
font-size: 4vh;
line-height: 4vh;
}
#lg a {
font-style: normal;
}

/*---------------------------------------------MISC*/

/* Works with the ajax code snippet in main.js */
.no-opacity {
opacity: 0;
}

.grad {
background: rgba(255,255,255,0);
background: -webkit-linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0));
background: -o-linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0));
background: -moz-linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0));
background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0));
}

.shad {
-moz-box-shadow: 0px 5px 24px rgba(0,0,0,0.1);
-webkit-box-shadow: 0px 5px 24px rgba(0,0,0,0.1);
box-shadow: 0px 5px 24px rgba(0,0,0,0.1);
}

::selection {
background: white;
color: gold;
}
::-moz-selection {
background: white;
color: gold;
}

::-webkit-scrollbar {
display: none;
}

.no-select {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.transition {
-webkit-transition: .3s ease-in-out;
-moz-transition: .3s ease-in-out;
-o-transition: .3s ease-in-out;
transition: .3s ease-in-out;
}

.rotate {
-webkit-animation-name: spin;
-webkit-animation-duration: 2500ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-moz-animation-name: spin;
-moz-animation-duration: 2500ms;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
-ms-animation-name: spin;
-ms-animation-duration: 2500ms;
-ms-animation-iteration-count: infinite;
-ms-animation-timing-function: linear;
animation-name: spin;
animation-duration: 2500ms;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@-ms-keyframes spin {
from { -ms-transform: rotate(0deg); }
to { -ms-transform: rotate(360deg); }
}
@-moz-keyframes spin {
from { -moz-transform: rotate(0deg); }
to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
from { transform:rotate(0deg); }
to { transform:rotate(360deg); }
}
