/*
 * CSS Day
 * A whole day about this stuff:
 */
 
*,
*:before,
*:after {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    }

body {
    font: 100% Source Code Pro, Inconsolata, Menlo, monospace;
    background-color: white;
    color: #222;
    -webkit-font-smoothing: antialiased;
    }

header {
    background-color: #e3e2db;
    padding: 0 1em;
    text-align: center;
    }

/* Logo */
header h1 {
    width: 100%;
    height: 5em;
    background: transparent url('img/cssday-logo.png') center 1.618em no-repeat;
    background-size: 5em;
    text-indent: 100%;
    white-space: nowrap;
    overflow: hidden;
    }

#content p,
#content ul,
#content ol,
#content dl {
    line-height: 1.618em;
    margin-top: 1.618em;
    margin-bottom: 1.618em;
    }

/* divisions */
#content,
footer {
    padding: 1px 1em;
    }

nav,
footer,
#spotlight {
    background-color: #333;
    color: white;
    }

/* Headings */
h1,h2,h3 {
    color: steelblue;
    font-weight: normal;
    }
h1::before,
h2::before,
h3::before {
    content: '/* ';
    }
h1::after,
h2::after,
h3::after {
    content: ' */';
    }

/* footer */
footer { text-align: center; }
footer h1 { font-size: 1em; }
footer ul {
    list-style: none;
    padding-left: 0;
    }
footer li {
    margin-bottom: 2em;
    }
footer a:hover {
    background-color: transparent;
    }

/* Links */
a { 
    text-decoration: none;
    border-bottom: 1px dotted steelblue;
    }

a:link,
.info { color: navy; }

a:visited { color: gray; }
nav a:visited { color: white; }

input[type="submit"]:hover,
a:hover,
a:active {
    background-color: navy;
    color: white;
    -webkit-transition-property: background-color, border;
    -webkit-transition-duration: .5s;
    transition-property: background-color, border;
    transition-duration: .5s;
    }

nav a,
footer a { border: none; }

footer a, footer a:link, footer a:visited {
    color: #fff;
    }

input[type="submit"],
nav a,
#spotlight a {
    color: white;
    }

/* Date */
.date {
    color: #222;
    font-size: xx-large;
    margin: 0 .4em;
    }

/* Purchase link */
.purchase,
input[type="submit"] {
    background-color: navy;
    }
    .purchase a {
        display: block;
        padding: .2em 1em 1em;
        color: white;
        }
    .purchase a:hover,
    input[type="submit"]:hover {
        background-color: #222;
        }

/* Menus */
.speakers ul,
#spotlight,
nav ul {
    list-style: none;
    padding-left: 0;
    }

/* Navigation */
nav li {
    text-align: center;
    border-bottom: 1px solid #444;
    }
nav a {
    display: block;
    }
    nav a:link {
        color: white;
        }

/* List of speakers */
.speakers ul::before { 
    content: '#speakers {'; 
    font-weight: bold;
    }
.speakers ul::after { 
    content: '}'; 
    font-weight: bold;
    }
.speakers li { padding-left: 2em; }

/* Put a couple of links in the spotlight on small screens */
#spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    overflow: hidden;
    }
    #spotlight li {
        float: left;
        width: 50%;
        border-left: 1px solid #e3e2db;
        }
    #spotlight li:first-child {
        border-left: none;
        margin-left: -1px;
        }
    #spotlight a,
    nav a {
        display: block;
        padding: .5em 0;
        }

/* Contact form */
fieldset:before {
    content: '/*** contact form ***/';
    }
fieldset:after {
    content: '/*** end contact form ***/';
    }
fieldset {
    padding: .5em 1em;
    background-color: #e3e2db;
    border: none;
    }
label, input { display: block; }
textarea { 
    width: 100%; 
    resize: vertical;
    }
.with-caption + p {
    margin-top: 0;
    font-size:x-small;
    }
.img img,
.speaker img {
    max-width: 100%;
    border-radius: .4rem;
    }

input[type="submit"] {
    border: none;
    }

/* Table fun */
th, td {
    padding: .5em;
    }
th { text-align: left; }
tr:nth-child(2n+2) {
    background-color: #e3e2db;
    }
#attendees tr>td.header {
    background-color: #222;
    color: white;
    }
thead.scripted th {
    cursor:pointer;
    }
#attendees {
    font-size: small;
    width: 100%;
    }
caption {
    margin-bottom: 1em;
    }
@media only screen and (max-width: 30em) {
    #attendees thead {
        position: absolute;
        top: -9999px;
        }
    #attendees thead.scripted {
        position:static;
        }
    #attendees thead tr {
        background-color: #e3e2db;
        }
    #attendees thead.scripted tr:before {
        content: 'Sort by:';
        margin: 0 0 .5em .5em;
        }
    thead.scripted tr>td.header {
        position: static;
        }
    #attendees tbody tr {
        position: relative;
        margin-top: .75em;
        margin-bottom: .75em; 
        border-bottom: 1px solid #e3e2db;
        background-color: white;
        padding: .2em .2em 1em;
        }
    #attendees td {
        padding: 0;
        }
    #attendees tr, 
    #attendees td { 
        display:block; 
        }
    #attendees tr>td:first-child {
        font-weight: bold;
        }
    #attendees tr>td:last-child {
        position: absolute;
        top: 0;
        right: 0;
        color: #C0B8B4;
        }
    #attendees tr>td.header {
        position: static;
        color: white;
        }
}

/* Ladies and gentlemen, I give the you the first breakpoint */
@media only screen and (min-width: 48em) {
    /* This is so small that I feel no guilt about hiding it. */
    #spotlight { display: none; }

    #page {
        border-right: 1em solid navy;
        }

    /* Navigation */
    nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        }
        nav ul {
            margin-bottom: 0;
            padding-left: 1em;
            }
            nav li {
                display: inline-block;
                text-align: left;
                border-bottom: none;
                }
            nav a.current,
            nav a:hover {
                border-bottom: .5em solid steelblue;
                background-color: transparent;
                }
    /* Header */
    header {
        position: relative;
        height: 17em;
        padding: 0;
        min-height: 17em;
        text-align: left;
        }
        header h1,
        .info {
            position: absolute;
            width: 50%;
            }
        header h1 {
            bottom: -1em;
            height: 7em;
            margin: 0;
            background-size: 7em;
            background-position: 50% .4em;
            border-bottom: 1em solid #222;
            }
        .info {
            right: 0;
            bottom: 0;
            }
        .date {
            margin: 0;
            }
        .purchase {
            margin-bottom: 0;
            }
    #content {
        padding: 2em 10%;
        }
    footer { text-align: left; }
    footer li {
        display: inline-block;
        margin-left: 2em;
        vertical-align: middle;
        }
    /* Form */
    form p { 
        display: table;
        margin: 1em 0;
        }
    label, input { display: table-cell; }
    label {
        width: 10em;
        text-align: right;
        padding-right: 1em;
        }
    input[type="submit"] { 
        display: block;
        margin-left: 11em; 
        }
    .img.right,
    .speaker img {
        float: right;
        margin: 0 0 1em 1em;
        }
    
}

@media only screen and (min-width: 54em) {
    #page {
        border-width: 1.5em;
        }
    /* There's gold in them thar hills. */
    header h1 {
        width: 38.2%;
        }
    .info {
        width: 61.8%;
        }
    .home #content {
        position: relative;
        padding-left: 40%;
        background: transparent url('img/curly.png') 32% 4em no-repeat;
        }
    article {
        margin-left: 36%;
        }
    .home article {
        margin-left: 0;
        }
    .purchase {
        display: inline-block;
        }
    /* Speakers */
    #ana { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/ana-maria-tudor.jpg') -52px -75px no-repeat; }
    #ppk { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/peter-paul-koch.jpg') -69px -66px no-repeat; }
    #tabs { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/tab-atkins.jpg') -76px -61px no-repeat; }
    #heydon { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/heydon-pickering.jpg') -89px -70px no-repeat; }
    #david { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/david-baron.jpg') -62px -67px no-repeat; }
    #ethan { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/ethan-marcotte.jpg') -43px -63px no-repeat; }
    #nicole { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/nicole-sullivan.jpg') -87px -63px no-repeat; } /* :( */
    #mathias { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/mathias-bynens.jpg') -75px -75px no-repeat; }
    #stephen { background: navy url('/National_Library/20160930123623oe_/https://cssday.nl/_img/2014/speakers/stephen-hay.jpg') -65px -78px no-repeat; }
    .speakers span {
        position: absolute;
        top: 0;
        left: 0;
        width: 3em;
        height: 2em;
        background-color: navy;
        border-radius: .4em;
        box-shadow: 0px 0px 0px 0px rgba(9,27,40,0.2);
        -webkit-transition: all .5s;
        transition: all .5s;
        }
    .speakers a:hover span {
        width: 200px;
        height: 200px;
        background-position: 0 0 !important;
        margin-top: -75px;
        margin-left: -75px;
        z-index:10;
        box-shadow: 80px 100px 20px -40px rgba(9,27,40,0.2);
        }
    .speakers li:nth-child(-n+4) span { left: 10%; }
    .speakers li:nth-child(n+5) span { left: 18%; }
    .speakers li:nth-child(4n+1) span { top: 7em; }
    .speakers li:nth-child(4n+2) span { top: 10em; }
    .speakers li:nth-child(4n+3) span { top: 13em; }
    .speakers li:nth-child(4n+4) span { top: 16em; }
    
    /* A flower for Mathias. */
     @-webkit-keyframes flower {
        from { -webkit-transform: rotate(0deg); }
        to   { -webkit-transform: rotate(360deg); }
    }
    @keyframes flower {
        from { transform: rotate(0deg); }
        to   { transform: rotate(360deg); }
    }
    #mathias:hover::after {
        position: absolute;
        top: 40px;
        left: 40px;
        content: '\273f ';
        color: hotpink;
        font-family: Arial, sans-serif;
        font-size: 4em;
        text-shadow: 2px 2px 5px rgba(0,0,0,0.4), -1px -1px 0px white;
        -webkit-animation: flower 3s infinite linear; 
        animation: flower 3s infinite linear;
    }
}

@media screen and (min-width: 72em) {
    body {
        font-size: 112.5%;
        }
    .home #content {
        background-position: 34% 4em;
        background-position: 34% 4em;
        }
    .speakers li:nth-child(-n+4) span { top: 8.5em; }
    .speakers li:nth-child(n+5) span { top: 11.5em; }
    .speakers li:nth-child(4n+1) span { left: 6%; }
    .speakers li:nth-child(4n+2) span { left: 12%; }
    .speakers li:nth-child(4n+3) span { left: 18%; }
    .speakers li:nth-child(4n+4) span { left: 24%; }
}

@media screen and (min-width: 80em) {
    body {
        font-size: 125%;
        background-color: dimgray;
        }
    #page {
        margin: 0 auto;
        max-width: 80em;
        background-color: white;
        }
}

@media screen and (min-width: 90em) {
    nav { text-align: center; }
        nav ul { padding-left: 0; }
            nav a { padding: .5em .3em; }
}
