/* Import fonts */
@import url("https://use.typekit.net/ves3tlw.css");
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital@0;1&display=swap');

/* Global + Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --clr-dark: #1f1b19;
    --clr-dark-hl: #403c3b;
    --clr-light: #f7f3f0;

    --clr-prim-1: #cb4033;
    --clr-prim-1-hl: #e76342;
    --clr-bg-1: #e1a48d;
    
    --clr-prim-2: #3873eb;
    --clr-prim-2-hl: #439af1;
    --clr-bg-2: #8dc0f4;
    
    --clr-prim-3: #ffc20a;
    --clr-prim-3-hl: #ffdb4b;
    --clr-bg-3: #ffea80;
}

/* Typography */
html {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-style: normal;
    background: var(--clr-light);
}

h1, h2, h3, h4, h5 {
    font-family: "obviously-narrow", sans-serif;
    font-weight: 800;
    letter-spacing: .015em;
    line-height: 1em;
    margin-bottom: 1rem;
    font-style: normal;
}

h1 {font-size: 4.5rem;}
h2 {font-size: 3.25rem;}
h3 {font-size: 2rem;}
h4 {font-size: 1.5rem;}

/* Utils */
img {
    display: block;
    max-width: 100%;
}

.flex {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cta {
    display: inline-block;
    padding: .75rem 1.25rem 1.5rem;
    text-decoration: none;
    background: var(--clr-prim-3);
    color: var(--clr-dark);
    border: 2px solid var(--clr-dark);
    font-family: "obviously-narrow", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: .015em;
    line-height: 1em;
    margin-block: 1.5rem;
    box-shadow: 0px 0px 0 var(--clr-dark);
    transition: 250ms ease-out;

}

.cta:hover {
    box-shadow: 4px 4px 0 var(--clr-dark);
    color: var(--clr-dark-hl);
    border: 2px solid var(--clr-dark-hl);
    background: var(--clr-prim-3-hl);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--clr-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-link {
    display: block;
    margin: 1rem 1.5rem;
}

.logo {
    height: 3rem;
    fill: #fff;
}

.header-cta {
    display: block;
    background: var(--clr-prim-1);
    padding: 1.75rem 1.5rem 2.25rem;
    color: var(--clr-light);
    font-family: "obviously-narrow", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: .015em;
    line-height: 1em;
    text-decoration: none;
    text-shadow: 0 0 0 var(--clr-dark);
    transition: 250ms ease-out;
}

.header-cta:hover {
    text-shadow: 3px 3px 0 var(--clr-dark);
    background: var(--clr-prim-1-hl);
}

/* Layout */

main {
    scroll-behavior: smooth;
}

section {
    min-height: calc(100vh - 88px);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    padding-bottom: 4rem;
}

.absolute {
    position: absolute;
}

/* Intro */

.intro-img-container {
    aspect-ratio: 2 / 1;
    width: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.intro-content {
    max-width: 46ch;
    margin-inline: 1.5rem;
}

.treat-circle {
    position: absolute;
    width: calc(150px + 10vw);
    right: 5vw;
    top: 5vh;
    animation: spin 8s linear infinite forwards;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
    
}

/* Plastic */

#plastic {
    background: url(./assets/bg-pattern-blue.svg);
    background-size: 100px 100px;
}

.plastic-container {
    background: var(--clr-light);
    border: 2px solid var(--clr-dark);
    height: 35vh;
    margin-inline: 1.5rem;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.flex-end {
    justify-content: flex-end;
}

.plastic-container p {
    max-width: 46ch;
}


.plastic-container-content {
    padding: 1.5rem;
}

.square-container {
    height: 100%;
    aspect-ratio: 1.5 / 1;
    border-right: 2px solid var(--clr-dark);
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.plastic-img {
    width: 100%;
}

.order {
    order: 2;
    border-left: 2px solid var(--clr-dark);
    border-right: none;
}

/* Flavors */

.carousel-cell {
    border: 2px solid var(--clr-dark);
    width: 70%;
    height: 60vh;
    margin-right: 1.5rem;
}

.bg-ss {
    background: var(--clr-bg-2);
}

.bg-hc {
    background: var(--clr-bg-1);
}

.bg-zl {
    background: var(--clr-bg-3);
}

.carousel-img {
    display: block;
    max-height: 70%;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.carousel-content {
    border-top: 2px solid var(--clr-dark);
    padding: 1.5rem 3rem;

}

.carousel-content-header {
    display: flex;
    justify-content: space-between;
}

.carousel-content-header > .weight {
    font-size: 1rem;
    font-weight: 800;
    color: var(--clr-light);
    border-radius: 9999px;
    padding: .5rem 1rem;
    display: block;
    align-self: flex-start;
}

.ss {
    background: var(--clr-prim-2);
}

.hc {
    background: var(--clr-prim-1);
}

.zl {
    background: var(--clr-prim-3);
}

.flickity-button {
    background: var(--clr-dark);
}

.flickity-button:hover {
    background: var(--clr-dark-hl);
}

.flickity-prev-next-button {
    width: 40px;
    height: 40px;
    border-radius: 0;
}

.flickity-button-icon {
    fill: var(--clr-light);
}

.flickity-prev-next-button.previous {
    left: 1.5rem;
}

.flickity-prev-next-button.next {
    right: 1.5rem;
}

/* Find shop */

#find-shop {
    justify-content: flex-end;
    background: var(--clr-bg-3);
}

.find-shop-content {
    max-width: 46ch;
    margin-inline: 1.5rem;
}

.find-shop-img {
    aspect-ratio: 1 / 1;
    width: 50%;
}

.left-offset {
    left: 0;
}

/* Footer */
footer {
    scroll-snap-align: end;
    background: var(--clr-dark);
    color: var(--clr-light);
    height: 300px;
}

footer > .container {
    height: 100%;
    padding: 3rem;
    align-items: center;
    justify-content: space-between;
}

.disclaimer {
    max-width: 46ch;
    opacity: .5;
}

.to-top {
    color: var(--clr-light);
}


/* Find Shop Sub-page */

.find-shop-upper {
    background: var(--clr-bg-3);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 1.5rem;
}

.find-shop-title {
    grid-column-start: 2;
}

.shop-title {
    font-weight: 800;
}

.search-zip {
    border: 2px solid var(--clr-dark);
    display: flex;
    flex-direction: column;
}

.search-zip > label {
    width: 100%;
    font-family: "obviously-narrow", sans-serif;
    font-weight: 800;
    letter-spacing: .015em;
    line-height: 1em;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--clr-dark);
    text-align: center;
    padding: 1rem 0 1.25rem;
}

.search-zip > input {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: none;
    border-bottom: 2px solid var(--clr-dark);
}

.results {
    padding: 1rem;
}

@media  screen and (max-width: 850px) {

    .treat-circle {
        top: 3rem;
        right: 1.5rem;
    }

    .plastic-container {
        flex-direction: column;
        height: min-content;
    }

    .square-container {
        border-bottom: 2px solid var(--clr-dark);
        border-right: none;
        border-left: none;
        width: 100%;
    }

    .order {
        order: 1;
    }

    .plastic-container-content {
        order: 2;
    }

    main {
        scroll-snap-type: none;
    }

    .flex {
        flex-direction: column;
    }

    .carousel-cell {
        height: fit-content;
    }

    .carousel-content-header {
        flex-direction: column;
        margin-bottom: 1rem;
    }

    #find-shop, #intro {
        justify-content: center;
    }

    .intro-img-container, .find-shop-img {
        width: 100%;
    }

    .find-shop-order {
        order: 2;
    }

    .find-shop-img {
        order: 1;
    }
}