/*
 * Styles for Cleanfeed marketing website pages
 */

body {
    padding: 0;
    margin: 0;
}

/*
 * Content stays within these limits, but backgrounds etc. go to
 * the full width of the page
 */

nav > .inner,
section > .inner,
footer > .inner {
    height: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1170px;
}

.strap {
    font-family: Roboto, sans-serif;
    font-weight: 300;
    font-size: 1.5em;
    line-height: 1.3em;
}

/*
 * Page footer
 */

footer {
    background-image: radial-gradient(circle, #54BAD1 0%, rgb(67, 165, 187) 100%);
    color: white;
}

footer > .inner {
    padding: 25pt;
    display: flex;
    justify-content: space-between;
}

footer > .inner > div {
    display: flex;
    flex-flow: column;
    align-items: flex-start;
    margin: 8px;
}

footer a {
    color: inherit;
}

footer #social {
    flex-flow: row wrap;
    height: min-content;
    align-items: center;
}

footer img {
    width: 50px;
    padding: 3px;
}

footer #social img {
    width: auto;
    max-width: 30px;
    height: 28px;
    margin-top: 4px;
    margin-left: 3px;
    margin-right: 3px;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
}

footer #social a:hover img {
    border-bottom-color: inherit;
}

footer #legal {
    font-size: small;
    text-align: right;
}

@media (max-width: 720px) {
    footer > .inner {
        flex-wrap: wrap;
    }

    footer #legal {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 512px) {
    footer > .inner {
        flex-flow: column;
    }
}

/*
 * The base styles for sections. The actual sections may be heavily
 * customised
 */

section > .inner {
    padding: 52pt 15% 52pt 15%;
}

section.mid {
    background-image: radial-gradient(circle, #fafafa 0%, #f8f8f8 100%);
}

section.diag {
    background: #f4f4f4;
    background: -moz-linear-gradient(-45deg,  #f4f4f4 0%, #ffffff 45%, #fcfcfc 55%, #fcfcfc 100%);
    background: -webkit-linear-gradient(-45deg,  #f4f4f4 0%,#ffffff 45%,#fcfcfc 55%,#fcfcfc 100%);
    background: linear-gradient(135deg,  #f4f4f4 0%,#ffffff 45%,#fcfcfc 55%,#fcfcfc 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#fcfcfc',GradientType=1 );
}

section.dark {
    background-image: radial-gradient(circle, #666 0%, #444 100%);
    color: white;
}

section.dark h1,
section.dark h2 {
    color: white;
}

section.dark a {
    color: inherit;
    text-decoration-color: unset;
}

section h1,
section h2 {
    margin-top: 0;
    text-align: center;
    font-size: 2em;
    line-height: 1.2em;
    margin-bottom: 50pt;
}

section h3 {
    font-size: 1.5em;
}

/*
 * 'Heroic' sections use the specific title style and are more boxy
 */

section.heroic h2 {
    text-align: left;
    margin-left: -3pt; /* overhang, for border */
    margin-bottom: 1em;
}

section.heroic h2 img {
    height: 38pt;
    width: auto;
}

@media (max-width: 600px) {
    section.heroic h2 img {
        width: 100%;
        height: auto;
    }
}

/*
 * Stylised navigation bar
 */

nav {
    position: sticky;
    z-index: 999;
    top: 0;
    box-sizing: border-box;
    width: 100%;
    background-color: inherit;
    box-shadow: 0 0 32px rgba(0,0,0,0.1);
}

nav > .inner {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .menu {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px;
}

nav .menu > *:not(:first-child) {
    margin-left: 0.8em;
}

nav .menu > a {
    text-transform: uppercase;
    color: inherit;
}

nav .logo {
    margin: 8px;
    width: 28%;
    max-width: 240px;
}

nav .logo img {
    width: 100%;
    vertical-align: middle;
}

@media (max-width: 620px) {
    nav .menu > a:not(.button) {
        display: none;
    }
}

@media (max-width: 420px) {
    nav .menu {
        font-size: 85%;
    }
}

/*
 * A full-size image/advert at the top of the page
 */

#ad {
    min-height: 75vh;
    position: relative;
    box-shadow: 0px 20px 20pt 0px #00000025;
}

#ad .photo {
    z-index: -2;
    position: absolute;
    object-fit: cover;
    margin: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* always a sharp edge */
}

#ad > .inner {
    padding-top: 15vh;
    padding-bottom: 15vh;
}

#ad > .inner > img.hero {
    width: 100%;
    height: auto;
    max-width: 420pt;
}

#ad .strap {
    margin-top: 20pt;
    margin-bottom: 30pt;
    color: white;
}

#ad .button {
    font-size: 1.4em;
}

#ad .button.signup {
    background-color: transparent;
    color: white;
}

#ad .button.signup:hover {
    background-color: #00ACCF;
    border-color: #00ACCF;
    color: white;
}

/*
 * Style some buttons
 */

button,
input {
    font-size: inherit;
    border: inherit;
}

button,
input[type=submit],
.button {
    padding: 0.5em 0.8em 0.5em 0.8em;
    text-transform: uppercase;
    border-width: 2px;
    border-style: solid;
    box-sizing: border-box;
    background-color: transparent;
    transition: color 0.3s, background-color 0.3s;
    white-space: nowrap;
}

button:hover,
input[type=submit]:hover,
.button:hover {
    text-decoration: none;
    background-color: #000;
}

.button:focus,
input[type=submit]:focus,
.button:focus {
    outline-offset: -0.4em;
}

/*
 * Standardised colours for specific button types
 */

.button.signup {
    color: #00ACCF;
}

.button.signup:hover {
    background-color: #00ACCF;
    border-color: #00ACCF;
    color: white;
}

.button.studio {
    color: #ffb100;
}

.button.studio:hover {
    background-color: #ffb100;
    border-color:#ffb100;
    color: white;
}

/*
 * Modifications to the showcase for dark theme
 */

body.dark {
    background-color: black;
    color: white;
}

body.dark nav {
    box-shadow: 0 0 32px 16px black;
}

body.dark footer {
    background-image: none;
    background-color: inherit;
    border-top: 2px solid #fff3;
}

body.dark .button {
    color: inherit;
}

body.dark section a {
    color: inherit;
}
