/*
 * Styles for Cleanfeed marketing website pages
 */

body {
    padding: 0;
    margin: 0;
    --nav-height: 96px;
    scroll-margin-top: var(--nav-height);
}

body * {
    scroll-margin-top: inherit;
}

/*
 * 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;
    box-sizing: border-box;
}

.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;
}

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

    footer #legal {
        width: 100%;
    }
}

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

/*
 * A base style to place a dark/monochrome theme on any element
 */

.dark {
    color: white;
}

.dark a {
    color: unset;
}

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

section.with-background {
    position: relative;
}

section.with-background > .inner {
    position: relative;
}

section.with-background > .background {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    overflow:  hidden;
}

section > img.background {
    object-fit: cover;
}

section > .inner {
    padding: 52pt;
}

section > .inner.side-by-side {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15%;
}

@media (max-width: 920px) {
    section > .inner.side-by-side {
        flex-flow: column;
    }
}

section.mid {
    color: #333;  /* may need to override a dark context */
    background-image: radial-gradient(circle, #fafafa 0%, #f8f8f8 100%);
}

section.dark {
    background-image: radial-gradient(circle, #555 0%, #333 100%);
}

section.dark .button  {
    text-decoration: none;
}

section h1 {
    font-size: 2.5em;
}

section h2 {
    font-size: 2em;
}

section h3 {
    font-size: 1.5em;
}

/*
 * Stylised navigation bar
 */

nav {
    position: sticky;
    z-index: 999;
    top: 0;
    box-sizing: border-box;
    width: 100%;
    height: var(--nav-height);
    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;
    gap: 0.8em;
}

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

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

nav .logo a {
    display: block;  /* otherwise focus looks like text on Firefox */
}

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%;
    }
}

/*
 * Toggleable search field
 */

nav .search {
    display: flex;
    opacity: 0.5;
    cursor: pointer;
}

nav .search:hover {
    transition: opacity 0.3s;
    opacity: 1.0;
}

nav .search img {
    width: 1.2em;
    height: 1.2em;
}

.menu > #search {
    margin: 0;
    overflow-x: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;

    background-color: white;

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;

    max-width: 0;
    transition: max-width 0.3s;
}

input:checked~#search {
    max-width: 100%;
}

#search input[type=text] {
    flex: 1;
    border: none;
    color: #333;
    padding: 0.7em;
    background-color: #f2f2f2;
    outline: none !important; /* focus */
    box-shadow: none; /* firefox invalid */
}

#search input[type=submit] {
    font-size: smaller;
    margin-left: 0.5em;
}

#search input[type=submit]:hover {
    background-color: #777;
    border-color: #777;
    color: white;
}

body.dark nav .search img {
    filter: invert(1);  /* this is far from ideal */
}

body:not(.dark) input[type=submit] {
    color: #777;
}

body.dark #search {
    background-color: black;
}

body.dark #search input[type=submit]:hover {
    background-color: #999;
    border-color: #999;
}

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

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

#ad h1 {
    font-size: clamp(40px, 5vw, 80px);
    --blocky-background: white;
}

/*
 * Main heading is blocky text overhanging into the next section
 */

section.with-overhang {
    z-index: 1;
}

section.with-overhang > h1 {
    padding-left: 15%;
    padding-right: 15%;

    position: absolute;
    bottom: -1.1em;
    margin: 0;
}

section.with-overhang > h1.short-final-line {
    bottom: -0.9em;
}

section.with-overhang + section {
    padding-top: clamp(50px, 5vw, 80px);  /* matches h1 */
}

/*
 * Style some buttons
 */

button,
input[type=submit],
.button {
    display: inline-block;
    padding: 0.5em 0.8em 0.5em 0.8em;
    font-size: inherit;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    border-color: unset;  /* use text colour */
    border-width: 2px;
    border-style: solid;
    box-sizing: border-box;
    background-color: transparent;
    transition: color 0.3s, background-color 0.3s, border-color 0.3s;
    white-space: nowrap;
    outline-offset: -0.4em;  /* used by focus */
}

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

/*
 * 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 #0006;
}

body.dark nav .logo img {
    content: url('logo/cleanfeed-white.svg');
}

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

body.dark nav .button {
    color: unset;
}

/*
 * Styled list
 */

ul.ticked {
    position: relative;
    list-style-type: none;
    padding-left: 1.2em;
}

ul.ticked li:before {
    content: '\2714';
    color: #bbb;
    position: absolute;
    left: 0;
}

ul.ticked li {
    margin-bottom: 1em;
    font-weight: bold;
}

ul.ticked li .more {
    display: block;
    font-weight: normal;
}
