:root {
    --page-gutter: clamp(24px, 5vw, 80px);
    --section-gap: clamp(100px, 14vw, 200px);
    --section-gap-small: clamp(72px, 10vw, 120px);
    --text-color: #202A40;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    color: var(--text-color);
    font-family: "Hanken Grotesk", sans-serif;
}

img,
video {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font: inherit;
}

h1,
h2,
p {
    margin: 0;
}

section {
    width: 100%;
    padding-top: var(--section-gap);
}

.bold-text {
    font-weight: 700;
}

.italic-text {
    font-style: italic;
}

/* Back button */

.topbar {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
}

.back-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    margin: 0;
    border: 3px solid #CCC;
    border-radius: 100px;
    background: #FFF;
    text-decoration: none;
    transition: transform 250ms cubic-bezier(.22, 1, .36, 1),
        border-color 250ms ease,
        box-shadow 250ms ease;
    will-change: transform;
}

.back-btn i {
    color: #808080;
    font-size: 20px;
    transition: color 250ms ease;
}

.back-btn:hover,
.back-btn:focus-visible {
    border-color: #FFF;
    box-shadow: 0 4px 8px rgba(48, 48, 48, 0.10);
    transform: translateY(-2px);
    outline: none;
}

.back-btn:hover i,
.back-btn:focus-visible i {
    color: var(--text-color);
}

.back-btn:active {
    transform: translateY(0) scale(0.97);
}

/* Hero */

.pp-hero {
    position: relative;
    width: 100vw;
    min-height: clamp(640px, 62.5vw, 900px);
    overflow: hidden;
    background-color: #EFECFF;
}

.header-contents {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: inherit;
    padding: clamp(280px, 38vw, 450px) var(--page-gutter) 24px;
}

.header-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    gap: 32px;
    text-align: center;
    transform: translateY(clamp(-48px, calc((1400px - 100vw) * 0.08), 0px));
}

.pp-hero-image {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    width: 111%;
    min-width: 1280px;
    max-width: none;
    transform: translateX(-49%);
    object-fit: contain;
    object-position: top center;
    pointer-events: none;
}

.pp-title {
    color: var(--text-color);
    font-size: clamp(40px, calc(40px + 20 * ((100vw - 700px) / 500)), 60px);
    font-weight: 700;
    line-height: clamp(46px, calc(46px + 18 * ((100vw - 700px) / 500)), 64px);
    text-align: center;
}

.pp-description {
    color: var(--text-color);
    font-size: clamp(20px, calc(20px + 4 * ((100vw - 700px) / 500)), 24px);
    font-weight: 400;
    line-height: 150%;
    text-align: center;
}

/* Shared content */

.section-contents,
.section-contents-row {
    width: min(100% - (var(--page-gutter) * 2), 1100px);
    margin: 0 auto;
}

.section-contents-row {
    display: flex;
    align-items: center;
    gap: clamp(40px, 5vw, 100px);
}

.section-contents-row > * {
    min-width: 0;
}

.section-contents-row img {
    max-width: 50%;
}

.section-text {
    display: flex;
    flex-direction: column;
    width: min(100% - (var(--page-gutter) * 2), 600px);
    max-width: 600px;
    margin: 0 auto;
    gap: 24px;
}

.section-contents-row .section-text {
    width: 100%;
    flex: 1 1 0;
    margin: 0;
}

.section-title {
    color: var(--text-color);
    font-size: 40px;
    font-weight: 700;
    line-height: 52px;
    letter-spacing: -1px;
}

.section-description {
    font-size: 20px;
    font-weight: 400;
    line-height: 150%;
}

/* Images and media */

.centered-img {
    display: block;
    width: min(100% - (var(--page-gutter) * 2), 600px);
    margin: clamp(50px, 8vw, 100px) auto 0;
}

.centered-img.girl {
    width: min(100% - (var(--page-gutter) * 2), 420px);
}

.centered-img.avatars {
    width: min(100% - (var(--page-gutter) * 2), 1000px);
}

.big-image {
    display: flex;
    flex-direction: column;
    width: min(100% - (var(--page-gutter) * 2), 1100px);
    margin: 0 auto;
    padding-top: var(--section-gap-small);
    gap: 8px;
}

.big-image img,
.big-image video {
    border-radius: 10px;
}

.img-description {
    color: var(--text-color);
    font-family: "Caveat", cursive;
    font-size: 20px;
    font-weight: 400;
    line-height: 150%;
}

.video-big,
.home-page {
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
}

/* Card deck section */

.moments-of-delight {
    position: relative;
    min-height: 760px;
    overflow: hidden;
}

.moments-of-delight .section-text {
    position: relative;
    z-index: 2;
}

.meme-cards-left,
.meme-cards-right {
    position: absolute;
    z-index: 1;
    width: clamp(180px, 22vw, 280px);
    pointer-events: none;
}

.meme-cards-left {
    left: clamp(24px, 8vw, 140px);
    bottom: 80px;
}

.meme-cards-right {
    right: clamp(24px, 8vw, 140px);
    top: 80px;
}

/* Microinteraction sections */

.section-text.video,
.section-text.video-reveal {
    max-width: 500px;
}

.vote-placed .section-contents-row,
.reveal .section-contents-row {
    align-items: center;
}

.vote-placed video,
.reveal video {
    width: 100%;
    max-width: 280px;
}


.final-section {
    padding-bottom: clamp(96px, 12vw, 150px);
}

/* Responsive */

@media (min-width: 1251px) {
    .pp-hero {
        overflow: visible;
    }
}

@media (max-width: 1400px) {
    .moments-of-delight {
        display: grid;
        grid-template-columns: auto auto;
        align-items: center;
        justify-content: center;
        min-height: auto;
        padding: var(--section-gap-small) var(--page-gutter) 0;
        column-gap: clamp(40px, 8vw, 120px);
        row-gap: 40px;
        overflow: visible;
    }

    .moments-of-delight .section-text {
        grid-column: 1 / -1;
        grid-row: 1;
        width: min(calc(100vw - (var(--page-gutter) * 2)), 600px);
    }

    .meme-cards-left,
    .meme-cards-right {
        position: static;
        width: 280px;
        max-width: calc(100vw - (var(--page-gutter) * 2));
    }

    .meme-cards-left {
        grid-column: 1;
        grid-row: 2;
        justify-self: end;
    }

    .meme-cards-right {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }
}

@media (max-width: 960px) {
    .section-contents-row {
        flex-direction: column;
        align-items: center;
        gap: 48px;
    }

    .section-contents-row .section-text,
    .section-text.video,
    .section-text.video-reveal {
        max-width: 600px;
        margin-right: auto;
        margin-left: auto;
    }

    .section-contents-row img,
    .section-contents-row video {
        max-width: min(80%, 400px);
    }

    .section-contents-row img {
        max-width: min(80%, 300px);
    }

    .reveal .section-contents-row video {
        order: 2;
    }

    .reveal .section-text.video-reveal {
        order: 1;
    }
}

@media (min-width: 596px) and (max-width: 810px) {
    .pp-hero {
        min-height: clamp(560px, 79vw, 640px);
    }
}

@media (max-width: 700px) {
    .topbar {
        top: 16px;
        left: 16px;
    }

    .back-btn {
        width: 44px;
        height: 44px;
    }

    .header-contents {
        padding: 260px 24px 0;
    }

    .pp-hero-image {
        left: 50%;
        width: 190%;
        min-width: 900px;
        transform: translateX(-50%);
    }

    .pp-title {
        font-size: 40px;
        line-height: 46px;
    }

    .pp-description {
        font-size: 20px;
        line-height: 150%;
    }

    .section-title {
        font-size: clamp(30px, calc(30px + 10 * ((100vw - 320px) / 380)), 40px);
        line-height: clamp(38px, calc(38px + 14 * ((100vw - 320px) / 380)), 52px);
    }

    .section-description {
        font-size: clamp(17px, 4.8vw, 20px);
    }
}

@media (max-width: 620px) {
    .moments-of-delight {
        grid-template-columns: 1fr;
    }

    .moments-of-delight .section-text,
    .meme-cards-left,
    .meme-cards-right {
        grid-column: 1;
        justify-self: center;
    }

    .meme-cards-left {
        grid-row: 2;
    }

    .meme-cards-right {
        grid-row: 3;
    }
}

@media (max-width: 478px) {
    .header-contents {
        min-height: 710px;
    }
}

@media (max-width: 389px) {
    .header-contents {
        min-height: 780px;
    }
}

@media (max-width: 345px) {
    .header-contents {
        min-height: 900px;
    }
}
