/* ========= */
/* = Fonts = */
/* ========= */

@font-face {
  font-family: "clan-web-1";
  font-weight: 500;
  font-style: normal;
  font-family: 'LeagueGothic';
  src: url('../fonts/ClanWeb-News.eot');
  src: url('../fonts/ClanWeb-News.eot?#iefix') format('embedded-opentype'),
       url('../fonts/ClanWeb-News.woff') format('woff');  
}

@font-face {
  font-family: "clan-web-1";
  font-weight: 700;
  font-style: normal;  
  src: url('../fonts/ClanWeb-Bold.eot');
  src: url('../fonts/ClanWeb-Bold.eot?#iefix') format('embedded-opentype'),
       url('../fonts/ClanWeb-Bold.woff') format('woff');  
}

/* ============= */
/* = Structure = */
/* ============= */

html{
  font-size: 62.5%; /* Allow for REM font-sizing */
  font-family: verdana, helvetica, arial, sans-serif;  
  height: 100%;
}

body{
  height: auto;
  min-height: 100%;
  position: relative;
}

#page{
  padding-bottom: 83px;
}

.wrapper{
  margin: 0 auto;
  max-width: 850px;
  position: relative;
}

body#home{
  font-size: 100%;
  color: #fff;
  background: url(../images/backgrounds/background1.jpg);
  background: -webkit-gradient(linear, 0 0, 100% 0, from(rgba(0,0,0,1)), color-stop(0.02, rgba(0,0,0,0)), color-stop(0.98, rgba(0,0,0,0)), to(rgba(0,0,0,1))), url(../images/backgrounds/background1.jpg);  
  background: -webkit-linear-gradient(left, rgba(0,0,0,1) 0, rgba(0,0,0,0) 2%, rgba(0,0,0,0) 98%, rgba(0,0,0,1) 100%), url(../images/backgrounds/background1.jpg);      
  background: -moz-linear-gradient(left, rgba(0,0,0,1) 0, rgba(0,0,0,0) 2%, rgba(0,0,0,0) 98%, rgba(0,0,0,1) 100%), url(../images/backgrounds/background1.jpg);
  background: -ms-linear-gradient(left, rgba(0,0,0,1) 0, rgba(0,0,0,0) 2%, rgba(0,0,0,0) 98%, rgba(0,0,0,1) 100%), url(../images/backgrounds/background1.jpg);  
  background: -o-linear-gradient(left, rgba(0,0,0,1) 0, rgba(0,0,0,0) 2%, rgba(0,0,0,0) 98%, rgba(0,0,0,1) 100%), url(../images/backgrounds/background1.jpg);
  background: linear-gradient(left, rgba(0,0,0,1) 0, rgba(0,0,0,0) 2%, rgba(0,0,0,0) 98%, rgba(0,0,0,1) 100%), url(../images/backgrounds/background1.jpg);      
  background-repeat: repeat-y, no-repeat;
  background-position: 50% 0, 50% 0%;
  background-color: #000;
}

header > p{
  font-size: 1.3rem;
}

#sharing{
  position: absolute;
  right: 0;
  top: 1rem;
  width: 150px;
}

#home #sharing{
  top: 5rem;
}

#sharing .rss{
  margin-top: 1em;
  
  display: block;
  vertical-align: middle;
  line-height: 14px;
  color: #fff;  
  
  padding-left: 16px;
  background: url(../images/feed.png) 0 50% no-repeat;
}


/* ======================= */
/* = Header - Navigation = */
/* ======================= */

#page > header > nav{
  background: rgba(255, 255, 255, 0.3);
  padding: 10px 0;
}

#page > header > nav ul{
  width: 100%;
  display: table;
}

#page > header > nav li{
  display: table-cell;
  text-align: center;
}

#page > header > nav li:first-child{
  text-align: left;
}

#page > header > nav li:last-child{
  text-align: right;
}

button,
.button,
#page > header > nav a{
  display: inline-block;
  text-decoration: none;
  background: #fff;
  color: #25002A;
  padding: 0.5rem;

  border: 0;

  box-shadow: 
    1px 1px 0 0 #6c226f,
    2px 2px 0 0 #6c226f,
    3px 3px 0 0 #6c226f,
    4px 4px 0 0 #6c226f,
    5px 5px 0 0 #6c226f                
  ;
}

button + button{
  margin-left: 1em;
}

button:hover,
.button:hover,
#page > header > nav a:hover{
  color: #fff;
  background-color: #4d184e;
}

button:active,
.button:active,
#page > header > nav a:active{
  background: #fff;
  color: #25002A;
  box-shadow: 
    -1px -1px 0 0 #6c226f,
    -2px -2px 0 0 #6c226f,
    -3px -3px 0 0 #6c226f,
    -4px -4px 0 0 #6c226f,
    -5px -5px 0 0 #6c226f                
  ;  
}

#page > header h1,
#home #page > .wrapper > header h1{
  font-family: "clan-web-1", "clan-web-2", sans-serif;
  font-weight: bold;
  color: #fff;
  font-size: 4rem;
  text-shadow: #000 2px 2px 0;
  margin-bottom: 2rem;
}

#home #page.wrapper > header{
  padding: 4rem 0;
  border-bottom: 1px dashed #fff;
  background: none;
}

#page > header {
  background: url(../images/backgrounds/background1.jpg) #000 50% 0 no-repeat;
  padding: 4rem 0 0 0;  
  margin-bottom: 3rem;
}

/* ========== */
/* = Footer = */
/* ========== */

body > footer{
  width: 100%;
  height: 22px;
  position: absolute;
  bottom: 0;
  z-index: 100;
  
  padding: 8px 0;  
  
  background: -webkit-linear-gradient(top, #2a1131 0, #2a1131 5px, #36143E 5px, #36143E);
  background: -moz-linear-gradient(top, #2a1131 0, #2a1131 5px, #36143E 5px, #36143E);    
  background: -ms-linear-gradient(top, #2a1131 0, #2a1131 5px, #36143E 5px, #36143E);      
  background: -o-linear-gradient(top, #2a1131 0, #2a1131 5px, #36143E 5px, #36143E);      
  background: linear-gradient(top, #2a1131 0, #2a1131 5px, #36143E 5px, #36143E);      
  background-color: #36143E;
    
  background-clip: padding-box;
  border-top: 5px solid rgba(0,0,0,0.35);
}

body > footer section{
  background: #364c15;
}

body > footer section .text{
  visibility: hidden;
  position: absolute;
  bottom: 22px;  
  background: #36143E;  
  color: #000;
  width: 130px;
  padding: 10px;
  right: 0;
  height: auto;
  overflow: hidden;
  opacity: 0;
  -webkit-transition: opacity 0.5s;
  -moz-transition: opacity 0.5s;
  -ms-transition: opacity 0.5s;
  -o-transition: opacity 0.5s;      
  transition: opacity 0.5s;        
}

body > footer section .text a{
  color: #000;
}

body > footer section:hover .text{
  z-index: 100;
  visibility: visible;
  opacity: 1;
}

body > footer .button{
  position: absolute;
  right: 0;
  top: 0;
}


/* ========= */
/* = Doors = */
/* ========= */

.doors {
   margin: 4rem 0;
   counter-reset: days;
}

.doors > li{
  -webkit-perspective: 900;
  -moz-perspective: 900;	
  -o-perspective: 900;	   
  perspective: 900;
  
  position: relative;
  float: left;
  margin-right: 20px;
  margin-bottom: 20px;  
  
  counter-increment: days;
}

.doors li:nth-child(6n){
  margin-right: 0;
}

.doors > li,
.doors li .door,
.doors li .door:after,
.doors li .doorway{
  width: 125px;
  height: 125px;
  left: 0;
  top: 0;
  display: block;
  
  
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;  
  box-sizing: border-box;  
}

.doors li .door{
  position: absolute;
  z-index: 3;
  border-left: 1px solid rgba(255,255,255,0.5);  
  border-top: 1px solid rgba(255,255,255,0.5);
  border-right: 1px solid rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(0,0,0,0.5);

  padding: 1rem;
  
  color: transparent;
  
  background: -webkit-gradient(linear, 0 0, 100% 0, from(rgba(0,0,0,0)), to(rgba(0,0,0,0.4))), url(../images/backgrounds/background1.jpg);
  background: -webkit-linear-gradient(left, rgba(0,0,0,0) 0, rgba(0,0,0,0.4) 100%), url(../images/backgrounds/background1.jpg);
  background: -moz-linear-gradient(left, rgba(0,0,0,0) 0, rgba(0,0,0,0.4) 100%), url(../images/backgrounds/background1.jpg);
  background: -ms-linear-gradient(left, rgba(0,0,0,0) 0, rgba(0,0,0,0.4) 100%), url(../images/backgrounds/background1.jpg);  
  background: -o-linear-gradient(left, rgba(0,0,0,0) 0, rgba(0,0,0,0.4) 100%), url(../images/backgrounds/background1.jpg);
  background: linear-gradient(left, rgba(0,0,0,0) 0, rgba(0,0,0,0.4) 100%), url(../images/backgrounds/background1.jpg);
  
  background-position: 0 0, 0,0;
  background-repeat: no-repeat;  
}

.doors li a{
  display: block;
  text-decoration: none;
  color: #fff;
  position: relative;
}

/* The numbers */
.doors li .door:before{
  display: block;
  position: absolute;
  left: 15px;
  top: 15px;
  content: counter(days);  
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  font-family: "clan-web-1", "clan-web-2", sans-serif;
  font-weight: bold;  
  padding-right: 20px;
  background: url(../images/lock.png) 100% 100% no-repeat;
}

/* The doorway */
.doorway{
  background: #fff;
  color: rgba(37,0,42,0.2);
  position: absolute;
  top: 0;
  left: 0;
  
  font-size: 1.5rem;
  line-height: 1;
  font-family: "clan-web-1", "clan-web-2", sans-serif;
  font-weight: bold; 
   
  -webkit-transition: color 1s;
  -moz-transition: color 1s;
  -o-transition: color 1s;  
  transition: color 1s;  
  
  padding: 2rem;
  
  box-shadow: inset -2px -2px 10px 5px rgba(0,0,0,0.2);
  overflow: hidden;
}

/* Available */
.doors li.available:hover .doorway{
  color: rgba(37,0,42,1);
}

.doors li.available .door:before{
  background: none;
}

/* ==================== */
/* = Door BG position = */
/* ==================== */
/* Initial values, will be overriden by JS */


.doors li:nth-child(1)  .door { background-position: 0 0, -423.5px -369.5px}
.doors li:nth-child(2)  .door { background-position: 0 0, -568.5px -369.5px}
.doors li:nth-child(3)  .door { background-position: 0 0, -713.5px -369.5px}
.doors li:nth-child(4)  .door { background-position: 0 0, -858.5px -369.5px}
.doors li:nth-child(5)  .door { background-position: 0 0, -1003.5px -369.5px}
.doors li:nth-child(6)  .door { background-position: 0 0, -1148.5px -369.5px}
.doors li:nth-child(7)  .door { background-position: 0 0, -423.5px -514.5px}
.doors li:nth-child(8)  .door { background-position: 0 0, -568.5px -514.5px}
.doors li:nth-child(9)  .door { background-position: 0 0, -713.5px -514.5px}
.doors li:nth-child(10) .door { background-position: 0 0, -858.5px -514.5px}
.doors li:nth-child(11) .door { background-position: 0 0, -1003.5px -514.5px}
.doors li:nth-child(12) .door { background-position: 0 0, -1148.5px -514.5px}
.doors li:nth-child(13) .door { background-position: 0 0, -423.5px -659.5px}
.doors li:nth-child(14) .door { background-position: 0 0, -568.5px -659.5px}
.doors li:nth-child(15) .door { background-position: 0 0, -713.5px -659.5px}
.doors li:nth-child(16) .door { background-position: 0 0, -858.5px -659.5px}
.doors li:nth-child(17) .door { background-position: 0 0, -1003.5px -659.5px}
.doors li:nth-child(18) .door { background-position: 0 0, -1148.5px -659.5px}
.doors li:nth-child(19) .door { background-position: 0 0, -423.5px -804.5px}
.doors li:nth-child(20) .door { background-position: 0 0, -568.5px -804.5px}
.doors li:nth-child(21) .door { background-position: 0 0, -713.5px -804.5px}
.doors li:nth-child(22) .door { background-position: 0 0, -858.5px -804.5px}
.doors li:nth-child(23) .door { background-position: 0 0, -1003.5px -804.5px}
.doors li:nth-child(24) .door { background-position: 0 0, -1148.5px -804.5px}

/* ========================= */
/* = Doors - 3D transforms = */
/* ========================= */

.csstransforms3d .doors li .door{
  position: absolute;
  -webkit-transform-origin: left center;
  -moz-transform-origin: left center;
  -o-transform-origin: left center;
  transform-origin: left center;
  
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
  
  -webkit-transition: -webkit-transform 1s;
  -moz-transition: -moz-transform 1s;
  -o-transition: -o-transform 1s;  
  transition: transform 1s;
  
  -webkit-backface-visibility: hidden;    
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  -o-backface-visibility: hidden;
  backface-visibility: hidden;        
}

.csstransforms3d .doors li .door:after{
  position: absolute;
  content: "";
  background: #000;
  z-index: 4;
    
  -webkit-backface-visibility: hidden;    
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  -o-backface-visibility: hidden;
  backface-visibility: hidden;      
  
  -webkit-transform: rotateY(-180deg);
  -moz-transform: rotateY(-180deg);
  -ms-transform: rotateY(-180deg);    
  -o-transform: rotateY(-180deg);      
  transform: rotateY(-180deg);
}

.csstransforms3d .doors li.available .door{
  -webkit-transform: rotateY(-25deg);
  -moz-transform: rotateY(-25deg);
  -ms-transform: rotateY(-25deg);    
  -o-transform: rotateY(-25deg);      
  transform: rotateY(-25deg);  
  
  -webkit-box-shadow: 5px 5px 5px 0 rgba(0,0,0,0.5);
  box-shadow: 5px 5px 5px 0 rgba(0,0,0,0.5);
}

.csstransforms3d .doors li.available:hover .door{
  -webkit-transform: rotateY(-100deg);  
  -webkit-transform: rotate3d(0, -100deg, 0);  
  -moz-transform: rotateY(-100deg);
  -o-transform: rotateY(-100deg);  
  transform: rotateY(-100deg);
}

/* ============================== */
/* = Doors - no-csstransforms3d = */
/* ============================== */
.no-csstransforms3d.csstransitions .doors li .door{
  -webkit-transition: opacity 1s;  
  -moz-transition: opacity 1s;
  transition: opacity 1s;
  opacity: 1;
}

.no-csstransforms3d.csstransitions .doors li.available:hover .door{
  opacity: 0;
}



/* =========== */
/* = Article = */
/* =========== */

article h1,
article h2,
article h3{
  font-family: "clan-web-1", "clan-web-2", sans-serif;
  font-weight: bold;
  color: #25002A;  
}


article h1,
article > hgroup h2{
  font-size: 2.8rem;
  text-shadow: rgba(95, 39, 109, 0.3) 3px 3px 0;
}

article h1{
  text-transform: uppercase;
  margin-bottom: 1em;
}

article h2{
  font-size: 1.8rem;
}

article h2 + h3{
  margin-top: 0.5rem;
}

article footer,
article footer h2{
  color: #9A899E;
}

/* ============ */
/* = Examples = */
/* ============ */


.examples .example{
  display: table-cell;
  text-align: center;
  vertical-align: top;
  padding: 2rem;
}

.example *{
  text-align: left;
}

.examples .row{
  width: 100%;
  display: table;
}

figcaption{
  text-align: center;
  margin-top: 1rem;
}

/* one item */
.figures figure:first-child:nth-last-child(1),
.examples .example:first-child:nth-last-child(1) {
	width: 100%;
}

/* two items */
.figures figure:first-child:nth-last-child(2),
.examples .example:first-child:nth-last-child(2),
.examples .example:first-child:nth-last-child(2) ~ .example {
	width: 50%;
}

/* three items */
.figures figure:first-child:nth-last-child(3),
.examples .example:first-child:nth-last-child(3),
.examples .example:first-child:nth-last-child(3) ~ .example {
	width: 33.3333%;
}

/* four items */
.figures figure:first-child:nth-last-child(4),
.examples .example:first-child:nth-last-child(4),
.examples .example:first-child:nth-last-child(4) ~ .example {
	width: 25%;
}

/* =========== */
/* = Figures = */
/* =========== */

.figures figure{
  width: 50%;
  float: left;
  text-align: center;
}
        
.figures{
  overflow: hidden;
  margin-bottom: 2rem;
}
        


/* =============== */
/* = Code blocks = */
/* =============== */

pre > code{
  display: block;
  background: #F7F4F8;
  padding: 2rem;
  margin-left: 20px;
  position: relative;
}

pre > code:before{
  display: block;
  content: " ";
  background: url(../images/code.png) #441D4F 50% 50% no-repeat;
  position: absolute;
  left: -20px;
  top: 0;
  width: 20px;
  height: 20px;
}


/* ================== */
/* = General styles = */
/* ================== */

/* Boxes for example text */
.box{
  border: 1px solid #52235F;
  padding: 10px;  
}

/* Images */
p img.right{
  float:right
}

/* Links */

a.next:after{
  content: " »";
}

a.previous:before{
  content: "« ";
}

/* Code */

code{
  color: #000;
  background: #F7F4F8;
  padding: 0.1rem 0.5rem;
}

/* Text */

footer section p,
article{
  font-size: 1.3rem;
}

footer section p,
article p,
article ul,
article ol,
article pre,
article dl{
  margin-bottom: 2rem;
}

/* Text - Styles */

strong{
  font-weight: bold;
}

/* Text - Intro */

article .intro{
  color: #441D4F;
  font-size: 1.6rem;
}

/* Definition lists */

article dt{
  font-weight: bold;
  display: block;
}

article dd{
  margin-bottom: 1rem;
  display: block;
}

/* Lists */

article ul{
  list-style: disc;
  margin-left: 2.5rem;
}

article ul li{
  padding-left: 0.5rem;
}

article ul li ul{
  margin-left: 2rem;
  list-style: none;
  margin: 0.5rem 0 0.5rem 2rem;
}

article ul li ul li:before{
  content: "-";
  margin-right: 0.8rem;
}

article ol{
  list-style-type: decimal;
  list-style-position:inside;
  margin-left: 1.5rem;
}

article ol li ol{
  list-style-type: lower-alpha;
  margin-left: 4rem;
  list-style-position:outside; 
}


/* ================ */
/* = Autoclearing = */
/* ================ */

#page:after{
	content: ".";
	visibility: hidden;
	clear: both;
	display: block;
	height: 0px;
}

/* ==================== */
/* = HTML advent 2012 = */
/* ==================== */

#advent2012{
  position: absolute;
  top: 0;
  right: 0;
}