@font-face {
  font-family: 'PDmed';
  src: url(../fonts/PlayfairDisplay-Medium.ttf);
}

@font-face {
  font-family: 'PDita';
  src: url(../fonts/PlayfairDisplay-Italic.ttf);
}

@font-face {
  font-family: 'PD';
  src: url(../fonts/PlayfairDisplay-Regular.ttf);
}

@font-face {
  font-family: 'RM';
  src: url(../fonts/BBBReadMe-Regular.woff);
}

@font-face {
  font-family: 'RMbold';
  src: url(.../fonts/BBBReadMe-Bold.woff);
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'RMita';
  src: url(../fonts/BBBReadMe-Italic.woff);
   font-style: italic, oblique;
   font-weight: normal;
}



@font-face {
  font-family: 'r35';
  src: url(../fonts/DepartureMono-Regular.woff);
   font-style: normal;
   font-weight: normal;
}






* {
  box-sizing: border-box;
}



 
:root {
  --basesize: 1.7vw;
  --width: 95vw;
  --height: calc(var(--width) * .75);
  --pa: .4em;
  --pad: .8em;
  --pad2: 1.6em;
  --pad3: 2em;
  --areaw: calc(var(--width) - var(--pad2));
  --areah: calc(var(--height) - var(--pad2));
  --gap: 1em;
  --migap: 5px;
  --shadow: 3px 3px 1px grey;
  --insets: 1px 1px 3px grey inset;
  --bg: lightgray;
  --wall: antiquewhite;
  --swall: rgb(255, 237, 212); 
  --floor: rgb(90, 44, 22);
  --gold: rgb(243, 255, 70) ;
  --panel: lightskyblue; 
  --br1: brown; 
  --door: tomato;
  --blue: lightskyblue; 
  --green: lightgreen;
  --building: rgb(255, 245, 138);
  --wallpaper: repeating-linear-gradient( 90deg,  antiquewhite, antiquewhite 10em, red .2em, red 10.2em);
--depth: 2em;
--height: calc(100vh - 2em);
}


html {
  font-size: 16px;
  scroll-behavior: smooth;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-family: 'RM';
}



body.layout_museum, body.layout_room{
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}


img{
  display: block;
}

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

}

.bold{
  font-weight: bold;
}

.room{
  height: var(--height);
  overflow: hidden;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
  background-color: var(--wall);
  border: inset antiquewhite 2em;
  border-width: 1em 2em;
  border-bottom: var(--floor) 2em solid;

}
.room>* {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1000%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: var(--floor) var(--floor);
  scrollbar-width: thin;
}

.wall{
  /* background: var(--wallpaper); */
  height: 90%;
   box-shadow: inset 0px 0px 2px gray;
}

.floor{
  background: var(--floor);
  height: 10%;
}

.wall>*{
  max-width: var(--width);
  position: relative;
  flex-shrink: 0;
 
}

.room-title{
  position: sticky;
  left: 0;
  height: fit-content;
  top:0;
  background-color: lightskyblue;
  
  margin: 0;
  padding: .5em;
  font-size: 1.5em;
  z-index: 200;
  box-shadow: var(-);
  border-bottom-right-radius: .5em;
 
 
}


.panel{
  align-self: end;
  max-width: 30ch;
  max-height: 5rem;
  padding: 1rem;
  background-color:var(--panel);
  margin: 4em 2em 0;
  box-shadow: lightslategray 1rem 1rem 0;
  transition: max-height 1s ease-in-out;
}

.panel:hover{
max-height: 80%;
overflow-y: scroll;
transition: max-height 1s ease-in-out;
}
.frame  {
  max-width: 100%;
  max-height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 5/4;
  
}

.frame, .doors{
  flex-grow: 0;
  max-width: 100%;
}

.inner-frame {
  border: inset 1em var(--gold);
  box-shadow: var(--shadow);
  background-color: whitesmoke;
  max-height: 70%;
  height: auto;
  width: fit-content;
  align-items: center;
  text-align: center;
  min-height: 20%;
  flex: 1 0 0%;
     transition: transform .5s;

}


.frame:nth-child(odd) .inner-frame{
   transform: rotate(1deg);
}  
.frame:nth-child(3n) .inner-frame{
   transform: rotate(-1deg);
}

.inner-frame:hover{
  -webkit-animation: bouncing 2s ease-in-out  normal;
    animation: bouncing 2s ease-in-out  normal;
    transition: transform .5s;
}



.frame figcaption {
  display: flex;
  gap: .5em;
  padding: 1em 0;

}

.frame figcaption div{
  display: block;
  background-color: whitesmoke;
  box-shadow: var(--insets);
  padding: 1em;
  font-size: .9rem;
  line-height: 1.25;
  border-radius: 5px;
  font-family: 'RMita';
  width: calc(100% - 120px);
  float: left;
}

figcaption div::before{
  content: "CAPTION - ";
  color: grey;
  font-family: 'RMbold';
  font-size: .8em;
  font-weight: bold;
}

.frame p, .frame ul, .frame ol, .frame blockquote {
    margin: 0;
    padding: 0;
}


iframe{
  aspect-ratio: 4/3;
  width: 100%;
  height: 100%;
  
   /* -ms-transform: scale(0.75);
    -moz-transform: scale(0.75);
    -o-transform: scale(0.75);
    -webkit-transform: scale(0.75);
    transform: scale(0.75);
    
    -ms-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    -o-transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0; */
}



iframe:hover{
  pointer-events: initial;
}


.frame .qr {
display: block;
aspect-ratio: 1/1;
max-width: 100px;
padding: 5px;
background-color: white;
border-radius: 5px;
 box-shadow: var(--insets);

  -webkit-box-shadow: var(--insets);   
  -moz-box-shadow: var(--insets);
} 

.frame .qr:hover{
  transform: scale(98%);
  transition:cubic-bezier(0.075, 0.82, 0.165, 1) 1s;
}


.frame img{
    max-width: 100%;
    max-height: 100%;
    font-family: 'PDita';
    font-size: .9rem;
    text-align: center;
    background-color: whitesmoke;

}

.doors{
  display: flex;
  align-items: end;
  height: 100%;
  gap: 1em;
}

.door{
  --mycol : var(--door);
  flex-shrink:0 ;
  display: block;
  background-color: var(--mycol);
  transition: 1s;
  width:  10rem;
height: 14rem;
position: relative;
   transform-style: preserve-3d;
	transform: perspective(2500px);
  margin: 0 1rem;
  border: 5px solid var(--mycol);
  border-bottom-width:0 ;


  &.tohome{
 --mycol: var(--blue);
  }
}

.door-front{
    background-color: var(--mycol);
    width: 100%;
  height: 100%;
  position: absolute;
  z-index: 200;
   transform-origin: left;
   border: 5px inset var(--mycol);
}


.door:hover>.door-front{


   transform: rotateY(-160deg); 
   z-index: 200;
   transition: 1s ;
}

.door a {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--wall);
  border: inset var(--wall) .5rem;
  border-width: .5rem 0 .5rem .5rem;
  border-bottom-color: var(--floor);
  position: absolute;
  box-shadow: var(--insets);
  text-align: center;

}

/* ANIMATION */

@keyframes bouncing {
  0% {
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  25% {
    -webkit-transform: rotate(1deg);
    -ms-transform: rotate(1deg);
    transform: rotate(1deg);
  }

  75% {
    -webkit-transform:rotate(-1deg);
    -ms-transform: rotate(-1deg);
    transform: rotate(-1deg);
  }

  100% {
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
}


@keyframes breathing {
  0% {
    -webkit-transform: scale(0.9);
    -ms-transform: scale(0.9);
    transform: scale(0.9);
  }

  25% {
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
  }

  60% {
    -webkit-transform: scale(0.9);
    -ms-transform: scale(0.9);
    transform: scale(0.9);
  }

  100% {
    -webkit-transform: scale(0.9);
    -ms-transform: scale(0.9);
    transform: scale(0.9);
  }
}





/*        
.frame1 img {
    border: 18px solid;
    border-image: url(../frame1.png) 18 round; 
   
}

.frame3 img{
    border: 10px solid;
    border-image: url(../frame3full.png) 10 round;
  
  
}

        
.frame4 img{
    border: 30px solid;
    border-image: url(../frame4full.png) 30 round;

    } */

body.layout_wpage {
  background-color: white;
  overflow-y: scroll;
}    

.wpage article {
  margin: 2em auto ;
     font-size: 1.3rem;
     min-height: 80vh;
     max-width: 1000px;
     padding: 0 2rem;
}

.wpage .doors{
 padding: 0 2em;
 justify-content: space-around;
}


.wpage {
  --col: var(--building);


  & aside {

  }

  & article a {
    border-bottom: 2px solid;
    font-style: oblique;
    color: var(--blue);
    font-size: 1.05em;
}


.cards {
  display: grid;
  gap: .5em;
width: 100%;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
font-size: 17px;
margin: 3rem auto;
}


.card{
 
  &.dictionary {
    --col: var(--blue);
  }

  &.timeline {
    --col: var(--building);
  }
  &.prompt {
    --col: var(--green);
  }
   &.questions {
    --col: var(--door);
  }
}

.card {
page-break-inside: avoid;

font-family: r35;
    max-width: 70mm;
    min-width: 200px;
    max-height: 130mm;
    /* max-height: 140mm; */
    aspect-ratio: 1/1.75;
   font-size: 17px;

    & .description {
     line-height: 1.2;
      padding: .4em;
    
    }

    & .title {
     background-color: var(--col);

    }
}

.card-front, .card-back{
    max-width: 70mm;
  
    aspect-ratio: 1/1.75;
    background-color: var(--col);
    border: outset lightgray 3mm;
    border-radius: 20px;
  backface-visibility: hidden;
    text-align: center;
    padding: 2mm;


}

.card-front{
  
   background-position: center; /* Center the image */
  background-repeat: no-repeat; /* Do not repeat the image */
  background-size: cover; /* Resize the background image to cover the entire container */

  display: flex;
      align-items: center;
  justify-content: center;
      flex-direction: column;

      gap: 1em;
  & h3 {
    font-size: 1.2rem;
    
      /* border: 1px solid black;
      border-radius: 100%; */
    padding: .2rem .6rem;
   font-weight: bold;
   margin: 0;
    
    word-wrap: anywhere;
  }

  &.hasimg h3{
 
  border: outset .25em var(--col);
  }
  &.bottom{
    justify-items: end;
  }
}

.card-back {
  transform: rotateY(180deg);
  background-color: white;
    
}



.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
 border: 1px solid black;
 border-radius: 20px;
& .card-back, & .card-front{
    position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  box-shadow: 0 0px 10px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
} 

}

.card:hover .card-inner {
  transform: rotateY(180deg);
}


}
.recto, .verso{
  page-break-inside: avoid;
    display: grid;
    gap: 1em;
    grid-template-columns: 1fr 1fr 1fr;
    width: 210mm;
    padding: 3mm;
    height: fit-content;
    margin: 3em 0 ;
    }

@media print { 
.wpage{

  & article{
margin: 0;
padding: 0;
  }

  padding: 0;
  & .recto, .verso{
   
    gap: 0;
  margin: 0;
    }

    & .card {
      border-radius: 0;
      width: 68mm;
   
      border-radius: 0px;
    }

    & .card-front { 
      display: flex;
      align-items: center;
      border-radius: 0;
      justify-content: center;
    }

   
}
aside{
  display: none;
}
}



/* printing workaround */

.verso .card:nth-child(3) {
  grid-column: 1;
  grid-row: 1;
}


.verso .card:nth-child(1) {
  grid-column: 3;
  grid-row: 1;
}



.verso .card:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}
 

.verso .card:nth-child(5) {

    grid-column: 2;
  grid-row: 2;
}

