@font-face {
	font-family: "Adelphe";
    font-style: normal;
      src:
        url("../fonts/Adelphe/Adelphe-GerminalRegular.woff") format("woff");
}

@font-face {
	font-family: "Adelphe";
    font-style: italic;
      src:
        url("../fonts/Adelphe/Adelphe-GerminalItalic.woff") format("woff");
}

@font-face {
    font-family: "Cristone";
    font-style: normal;
      src:
        url("../fonts/Cristone.ttf") format("truetype");
}

@font-face {
    font-family: "Mrs Eaves SC";
    font-style: normal;
      src:
        url("../fonts/Mrs Eaves/Mrs Eaves Roman Small Caps.ttf") format("truetype");
}

@keyframes pulse {
	from {opacity: 1;}
	to {opacity: 0.3;}
}


:root {
	--colBackground: black;
	--colText: #e1e5d9;
	--colPrimary: #596545;

	--fontText: "Adelphe", serif;

	--storyBorder: 4px double var(--colPrimary);

    --colProgressBar: #596545;
}

* {
    box-sizing: border-box;
}

html {
	color-scheme: dark light;
	user-select: none;
	background-color: var(--colBackground);
	background-position: center;
	background-size: cover;
}

body {
	margin: 0;
	display: grid;
    width: 100vw;
    height: 100vh;
    background-position: center;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(6, 1fr);
    grid-template-areas: 
    'story story story story auto'
    'story story story story auto'
    'story story story story auto'
    'story story story story auto'
    'story story story story auto'
    'story story story story auto';
    align-items: center;
    justify-items: center;
	font-family: "Adelphe", serif;
	color: var(--colText);
    font-size: 1.1rem;
    line-height: 1.4rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--colText);
}

/* background class */

.background {
    z-index: -100;
    position: fixed;
    inset: 0;
    object-fit: cover;
    width:100%;
    height:100%;
}

/**
 * this is the id of the default story container
 */
#container {
	grid-area: story;
    display: flex;
    flex-flow: column;
    position: relative;
    overflow: scroll;
    scrollbar-width: none;
    scroll-behavior: smooth;
    height: 100vh;
    width: 32vw;
    max-width: 500px;
    padding-top: 64px;
    padding-bottom: 10em;
    padding-inline: 28px;
	background-color: var(--colBackground);
	border-right: var(--storyBorder);
	border-left: var(--storyBorder);
	justify-self: flex-end;
}

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

#container > :first-child { 
	margin-top: auto !important;
}

/**
 * this is the div the choice elements go inside
 */
.choices {
	display: flex;
	flex-flow: column;
	gap: 0.5rem;
	border: 4px double var(--colPrimary);
	padding: 8px;
	font-family: "Mrs Eaves SC";
}

.choices a {
	border: 2px solid var(--colPrimary);
    border-radius: 20px;
    padding: 8px 8px 8px 16px;
}

.choices a:hover {
	transition: all 0.5s ease;
    background-color: var(--colPrimary);
    background-image: url('../images/choice-bg.png');
    background-blend-mode: difference;
    cursor: pointer;
}

.choiceList, .fuckChoice {
	border: none;
	font-family: var(--fontText);
    color: var(--colPrimary);
	padding: 0;
	gap: 0.5rem;
}

.choiceList a, .fuckChoice a {
	border: none;
	border-radius: 0;
}

.choiceList a:hover, .fuckChoice a:hover {
    color: var(--colText);
	border: none;
	background-image: none;
	transform: translate(8px);
}

.choiceList a:before, .fuckChoice a:before {
	content: '☞';
	padding-right: 8px;
}

.fuckChoice {
    font-style: italic;
}

/* in-text titles and stuff */

.title {
    font-family: "Mrs Eaves SC";
    text-align: center;
}

.quadrant { /* i do not remember why i named this "quadrant" */
    text-align: center;
}

/**
 * when we start putting heaps of images/audio in this thing
 * then we'll need to start styling this crap
 */
.progressContainer {
    background-color: black;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 100;
	position: fixed;
	inset: 0;
}

/* styled this crap --ESG */

/* progress bar background */
progress, progress::-webkit-progress-bar {
    background: black;
    width: 100vw;
    border: none;
}

/* progress bar value */
progress { color: var(--colProgressBar); }
progress::-webkit-progress-value { background-color: var(--colProgressBar); }
progress::-moz-progress-bar { background-color: var(--colProgressBar); }

/**
 * the continue marker that goes after each line
 */

#continueMarker {
	display: block;
    width: 1rem;
    min-height:0.5rem;
    margin-inline: auto;
    clip-path: polygon(0% 0%, 100% 0%, 50% 100%, 0% 0%);
    background-color: var(--colText);
    animation: pulse 2s ease-in alternate infinite;
    flex-shrink:0;
}

#titlecard #continueMarker {
	background-color: var(--colPrimary);
}

/* title card stuff */

#titlecard {
    position: fixed;
    inset: 0;
    background-color: var(--colBackground);
    display: flex;
    flex-flow: column;
    justify-content: center;
}

#titlecard > p {
    color: var(--colPrimary);
    text-align: center;
}

#titlecard h1 {
    font-family: "Cristone";
    text-align: center;
    font-size: 5rem;
}

#titlecard img {
    max-height: 500px;
}

/* credits */

#credits {
    position: fixed;
    inset: 0;
    background-color: var(--colBackground);
    display: flex;
    flex-flow: column;
    justify-content: center;
}

#credits p, #credits div {
    margin-inline: auto;
    text-align: center;
}

/* image grid */

#grid > img {
    display:inline-block;
    position:relative;
    border: 30px solid black;
    border-image: url(../images/border-1.png) 100 round;
    max-width: calc(100% - 12px);
    max-height: calc(100% - 12px);
    background-color: black;
}

.portrait {
	z-index: 10;
    grid-area: 4 / 5 / 6 / 7;
    justify-self: flex-start;
    transform: translate(-12px, 20px);
    border-image: url(../images/border-portrait.png) 100 round !important;
}

#statue {
    grid-area: 1 / 6 / 6 / 10;   
}

#eye {
    grid-area: 1 / 9 / 8 / 12;
    border-image: url(../images/border-2.png) 100 round !important;
}

#tavern {
  grid-area: 1 / 7 / 5 / 12;
}

#tarot-hangedman {
    grid-area: 2 / 6 / 6 / 10;
}

#peire-face {
  grid-area: 3 / 7 / 7 / 13;
  border-image: url(../images/border-3.png) 100 round !important;
}

#galley-rowing {
  grid-area: 2 / 6 / 5 / 12;;
}

#fleur-de-lys {
    grid-area: 3 / 6 / 8 / 8;
}

#keyhole {
    grid-area: 1 / 6 / 7 / 9;
}

#door-open {
  grid-area: 2 / 6 / 7 / 9;
}

#saint-sebastian {
  grid-area: 1/6/7/10;
}

#historian-eyes, #historian-eyes-dream {
  grid-area: 2 / 8 / 4 / 12;
}

#nude {
  grid-area: 1 / 7 / 7 / 11;
}

#mushrooms {
  grid-area: 2 / 10 / 4 / 12;
}

#plants {
  grid-area: 3 / 6 / 6 / 10;
}

#veins {
  grid-area: 2 / 7 / 6 / 13;
}

#bloodletting {
  grid-area: 4 / 8 / 7 / 12;
}

#transfusion {
  grid-area: 1 / 5 / 5 / 10;
}

#farandole, #farandole-negative, #cicada, #cicada-negative, #ninoun-death, #stabbing {
  grid-area: 1 / 6 / 7 / 12;
}

#horseman, #ninoun-death, #stabbing, #cicada {
    border-image: url(../images/border-2.png) 100 round !important;
}

#horseman, #bonfire, #bowels, #moult {
    grid-area: 2 / 6 / 6 / 12;
}

#dagger {
    grid-area: 2 / 5 / 6 / 9;
}

#cicada-shell {
    grid-area: 3 / 7 / 5 / 11;
}

#doumenico-eyes {
    grid-area: 2 / 7 / 6 / 11
}

/* i hate safari */

@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) {

    #grid > img {
        border-image: url(../images/border-1.png) 100 repeat;
    }

    #portrait {
        border-image: url(../images/border-portrait.png) 100 repeat !important;
    }

    #eye {
        border-image: url(../images/border-2.png) 100 repeat !important;
    }

    #peire-face {
        border-image: url(../images/border-3.png) 100 repeat !important;
    }

    #horseman, #ninoun-death, #stabbing, #cicada {
        border-image: url(../images/border-2.png) 100 repeat !important;
    }
}}