/*
 * Styles for landing page elements
 */

#showreel {
    background-image: none;
    background-color: #002025;
}

#showreel a:not(:hover) {
    text-decoration-color: transparent;
}

#showreel aside {
    padding: 40px 40px 40px 0;
    width: 30%;
    min-width: 14em;
}

.showreel {
    display: flex;
    flex-direction: row;

    font-size: 10pt;
    line-height: 120%;

    padding-top: 40px;
    padding-bottom: 40px;
}

#showreel > .inner {
    display: flex;
    padding: 0;
    max-width: 1920px;
}

#showreel button {
    border: none;
    outline: none;
    padding: 0;
    display: flex;
    align-items: center;
}

#showreel button > * {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#showreel button:hover > * {
    opacity: 1;
}

#showreel button > img {
    width: 48px;
    height: 48px;
}

#showreel button.disabled {
    pointer-events: none;
}

#showreel button.disabled > * {
    opacity: 0;
}

.showreel > * {
    flex: 0;
    margin-right: 2em;

    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 120px;
    overflow: hidden;
}

.showreel > *:last-child {
    margin-right: 0;
}

.showreel > * > img {
    width: 120px;
    height: 120px;
    margin-bottom: 0.8em;
    object-fit: cover;
    order: -1;
    transition: opacity 0.3s ease, filter 0.6s ease;
}

.showreel > .listenable:hover > img,
.showreel > .active > img {
    opacity: 0.2;
    filter: grayscale(1);
}

.showreel > * > button {
    display: flex;
    position: absolute;
    z-index: 10;
    top: 24px;
    left: -48px;
    padding: 0;
    border: none;
    transition: left 0.3s ease;
}

.showreel > * > button:hover {
    background: inherit;
}

.showreel > * > button img {
    width: 100%;
    height: 100%;
}

.showreel > :hover > button,
.showreel > .active > button {
    left: 0;
}

.showreel > .active > button img.play {
    display: none;
}

.showreel > :not(.active) > button img.pause {
    display: none;
}

.showreel > * > * {
    margin: 0;
}

.showreel h3 {
    font-family: inherit;
    font-size: inherit;
    font-weight: bold;
    line-height: inherit;
}

@media (max-width: 600px) {
    #showreel aside {
        font-size: smaller;
    }
}

/*
 * Scroller
 */

.scroller {
    overflow-x: scroll;
    scroll-behavior: smooth;
    scrollbar-width: none;
    background-image: radial-gradient(circle, #314d5a 0%, #011722 100%);
}

/* https://bugzilla.mozilla.org/show_bug.cgi?id=1585254 */

@-moz-document url-prefix() {
    .scroller > .showreel {
        padding-right: 48px;
    }
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroller > button {
    position: sticky;
    z-index: 100;
    width: 15%;
    max-width: 320px;
}

.scroller > button:first-child {
    left: 0;
    background: linear-gradient(to right, #002025, transparent);
}

.scroller > button:last-child {
    right: 0;
    background: linear-gradient(to left, #002025, transparent);
}

/*
 * Carousel: Horizontal set of items with one visible
 */

.carousel {
    scroll-snap-type: x mandatory;
}

.carousel > * {
    scroll-snap-align: center;
    transition: opacity 1s ease;
    opacity: 0;
}

.carousel > .active {
    opacity: 1;
}

/*
 * Testimonials
 */

#testimonials {
    margin-top: 30pt;
    margin-left: auto;
    margin-right: auto;
    width: 80%;

    overflow-x: scroll;
    scroll-behavior: smooth;
    scrollbar-width: none;

    display: flex;
    align-items: center;
    gap: 50%;
}

#testimonials::-webkit-scrollbar {
    display: none;
}

#testimonials figure {
    padding: 1em;
    padding-left: 140px;
    padding-right: 30px; /* for quote marks */
    position: relative;
    flex-shrink: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#testimonials .role {
    font-size: 10pt;
    line-height: 120%;
}

#testimonials figure img {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
}

#testimonials .name {
    font-size: inherit;
    font-family: inherit;
    font-weight: bold;
    margin-top: 1em;
    line-height: 130%;
}

#testimonials blockquote {
    display: inline;
    margin-inline-start: 0;
    margin-inline-end: 0;

    font-style: italic;
    font-size: 200%;
    font-family: serif;
    line-height: 120%;
    color: #666;
    white-space: normal;

    position: relative;
}

#testimonials blockquote::before,
#testimonials blockquote::after {
    position: absolute;
    z-index: -1;
    font-size: 300%;
    color: #0002;
}

#testimonials blockquote::before {
    content: '\0275d';
    left: -0.5em;
}

#testimonials blockquote::after {
    right: -0.1em;
    bottom: -0.3em;
    content: '\0275e';
}

/*
 * Small-screen testimonials
 */

@media (max-width: 800px) {
    #testimonials blockquote {
        font-size: 150%;
    }

    #testimonials figure {
        padding-left: 100px;
    }

    #testimonials figcaption img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 600px) {
    #testimonials {
        width: 100%;
    }

    #testimonials figure {
        padding-left: 30px;
    }

    #testimonials blockquote {
        white-space: normal;
    }

    #testimonials figcaption {
        position: relative;
        padding-left: 46px;
    }

    #testimonials figcaption img {
        position: absolute;
        width: 40px;
        height: 40px;
        left: 0;
    }
}

/*
 * Flair for testimonials
 */

#testimonials figcaption {
    transition: opacity 2s ease;
    opacity: 1;
}

#testimonials :not(.active) figcaption {
    opacity: 0;
}

#testimonials blockquote::before,
#testimonials blockquote::after {
    transition: left 6s ease, right 6s ease, opacity 8s ease;
    opacity: 1;
}

#testimonials :not(.active) blockquote::before,
#testimonials :not(.active) blockquote::after {
    left: 0.4em;
    right: 0.8em;
    opacity: 0;
}

/*
 * Stories
 */

#stories hr {
    width: 50%;
    opacity: 25%;
    margin-top: 50px;
    margin-bottom: 20px;
}

.story {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
    margin-top: 5vw;
    margin-bottom: 5vw;
}

.story:last-child {
    margin-bottom: 20px;
}

.story > div {
    flex: 1;
    margin-right: 4%;
}

.story p {
    margin-block-start: 2em;
    margin-block-end: 2em;
}

.story .right {
    margin-left: auto;
    order: 2;
    margin-right:0%;
    margin-left: 4%;
}

.story > div:last-child {
    margin-right: 0;
}

.story > div h3 {
    font-weight: normal;
    font-size: 24pt;
    margin-top: 0px;
    margin-bottom: 5px;
}

.story h3 .role {
    display:block;
    font-family: Oswald, sans-serif;
    font-size: 0.7em;
}

.story > div h4 {
    margin: 0;
}

.story > div > img {
    width: 100%;
    height: 250pt;
    object-fit: cover;
    bottom: 0px;
    box-shadow: 5px 10px 15pt 0px #00000035;
}

@media (max-width: 600px) {
    .story {
        display: block;
    }

    .story > div {
        margin-bottom: 20pt;
        margin-right: 0;
        margin-left: 0;
    }

    .story .right {
        margin-bottom: 20pt;
        margin-right: 0;
        margin-left: 0;
    }

    #stories hr {
        margin-top: 20px;
    }
}

/*
 * General use section, typically with centered content
 */

section.spacious h2,
section.feature h2,
section#overview h2,
section#who h2 {
    text-align: center;
    margin-block-end: 2em;
}

/*
 * Feature Showcase
 */

section.feature .inner > p {
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 3em;
    max-width: 600px;
}

section.feature .featured {
    display: flex;
    box-shadow: 5px 10px 15pt 0px #00000015;
}

section.feature .description {
    padding: 0 2em 2em 2em;
    background-color: #00000009;
    width: 60%;
}

section.feature img {
    width: 40%;
    max-height: 320px;
    object-fit: cover;
    order: 2;
}

@media (max-width: 800px){
    section.feature .description {
        width: 100%;
    }

    section.feature img {
        width: 100%;
        height: 150px;
        order: inherit;
    }
    section.feature .featured {
        flex-wrap: wrap;
    }
}


/*
 * Overview
 */

#overview {
    text-align: center;
}

#overview .button {
    font-size: 1.3em;
}

/*
 * Who's using Cleanfeed
 */

#who .brands {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#who .brands > img  {
    flex: 1 50%;
    align-self: center;
    max-width: 120px;
    max-height: 120px;
    margin: 18pt 24pt 18pt 24pt;
}

/*
 * Single-point summary with image background
 */

section.single-point h2 {
    text-align: start;
    flex: 1;
}

section.single-point .inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3em;
}

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

    section.single-point h2 {
        text-align: center;
    }
}

section.single-point .text {
    background: #fffa;
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 1em;
    flex: 2;
}

section.single-point .text > * {
    margin: 0;
}

section.single-point .text .button {
    align-self: end;
    margin-top: 1em;
}

/*
 * Matrix grid of features
 */

.feature-matrix {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.feature-matrix > div {
    max-width: 16em;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    margin: 1em;
}

.feature-matrix > div p {
    flex: 1 0 auto;
}

.feature-matrix > div img {
    padding-bottom: 20pt;
    border-bottom: 1px solid #777777;
    width: 100%;
    aspect-ratio: 1.15;
    object-fit: cover;
}

/*
 * List of use cases with images
 */

.domains {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 4%;
}

.domains > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.domains > div > div {
    flex: 1 0 auto;
}

.domains > div h3 {
    font-weight: normal;
}

.domains > div > img {
    flex-direction: column;
    margin-top: 10pt;
    width: 100%;
    height: 200pt;
    object-fit: cover;
    bottom: 0px;
    box-shadow: 5px 10px 15pt 0px #00000035;
}

@media (max-width: 600px) {
    .domains {
        display: block;
    }

    .domains > div {
        margin-bottom: 20pt;
    }
}

/*
 * List of many links
 */

ul.link-list {
    font-size: smaller;
    color: #0003;
    margin-top: 64px;
    list-style: none;
    padding: 0;
}

ul.link-list li {
    margin: 0;
    display: inline;
}

ul.link-list li:not(:first-child)::before {
    content: '\b7\a0';
}
