* {
    box-sizing: border-box;
}

/* standard webpage structuring */

:root {
    /* --red: #CC203D; */
    --red: #9E262C;
    --white: #FFFFFF;
    --black: #171717;
    --tile-size: 50vw;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "articulat-cf", sans-serif;
    overflow-x: hidden;
}

h1 {
    margin: 0;
}

.center-text {
    display: flex;
    justify-content: center;
    align-items: center;

}


.display-flex-center-align {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* gsap class */

.fade-in {
    opacity: 0;
}

.blur-in {
    opacity: 0;
}

.flip-text span {
    display: inline-block;
    opacity: 0;
    transform: rotateY(-180deg);
    /* Start off rotated */
}

.reveal-text span {
    display: inline-block;
    opacity: 0;
}

/* global font styling */

.red-italic {
    color: var(--red);
    font-style: italic;
    font-weight: bold;
}

.red-bold {
    color: var(--red);
    font-weight: bold;
}

.bold-italic {
    font-style: italic;
    font-weight: bold;
}

.bold {
    font-weight: bold;
}

/* nav stlying */

.hamburger {
    padding-right: 15px;
    width: 45px;
    height: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hamburger span {
    position: absolute;
    width: 100%;
    height: 4px;
    background: var(--black);
    border-radius: 2px;
    transition: 0.3s ease;
  }
  
  /* Top line */
  .hamburger span:nth-child(1) {
    top: 0;
  }
  
  /* Middle line */
  .hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
  }
  
  /* Bottom line */
  .hamburger span:nth-child(3) {
    bottom: 0;
  }
  
  /* When active — turn into an X */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 50%;
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: auto;
    top: 50%;
  }


nav {
    position: fixed;
    background-color: var(--white);
    width: 100%;
    z-index: 999;
    height: 50px;
    border-bottom: 3px solid var(--black);
}

#mobile-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;

    a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
    }
}

.full-text-logo {
    max-height: 45px;
    min-width: 180px;
}

#menu {
    background-color: rgba(158, 38, 44, 0.6);
    backdrop-filter: blur(10px);
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding-top: 45px;
    list-style: none;
    font-family: "articulat-cf", sans-serif;
    font-size: xx-large;
    color: var(--white);
    position: fixed;
    top: 50px;
    left: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1;

    a {
        text-decoration: none;
        color: white;
    }
}

.mobileNavOpen {
    transform: translateX(0) !important;
}

.menu-list-item-main {
    width: 80%;
    padding: 8% 0 0 0;
    font-weight: bold;
}

.menu-list-item-subtitle {
    border-bottom: 1px solid var(--white);
    padding: 2% 0 2%;
    font-size: 1rem;
    font-weight: 200;
}

#nav-scroll-top {
    color: black;
    text-decoration: none;
    padding-left: 15px;
}

.nav-link:hover {
    text-decoration: underline !important;
}

.nav-link:active {
    font-size: 0.96rem;
    font-weight: bold;
}

/* hero */

#unheard-h1 {
    font-weight: 100;
    text-align: center;
    font-size: clamp(3rem, 20vw, 10rem);
    margin: 0;
    color: var(--white);
    font-family: "articulat-cf", sans-serif;
    z-index: 1;

    span {
        font-weight: bold;
    }
}

h2 {
    font-weight: bold;
    text-align: center;
    color: var(--white);
    font-family: "acumin-variable", sans-serif;
    font-size: clamp(1rem, 5vw, 2rem);
}

#hero-heading {
    position: absolute;
    top: 45%;
    width: 100%;
}

#hero {
    position: relative;
    max-width: 1920px;
    margin: 0 auto;
}


.layer {
    background-position: bottom center;
    background-size: auto;
    background-repeat: no-repeat;
    width: 100%;
    height: 200px;
    position: fixed;
    z-index: -1;
}

.top-gradient {
    background: linear-gradient(0deg, rgba(158, 38, 44, 1) 0%, rgba(204, 32, 61, 0) 90%);
    width: 100%;
    height: 100px;
}

/* information section */

#what-heading {
    margin: 40vh 0 10% 0;
    color: var(--white);
    background-color: var(--black);
    padding: 25px 15px;
    font-size: clamp(1rem, 15vw, 8rem);
    /* max-width: 650px; */
    text-align: left;
    width: 100%;
    border-radius: 5px;
}

.first-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--red);
    padding-bottom: 100px;

    h2 {
        text-align: left;
        font-weight: 200;
        font-family: "acumin-variable", sans-serif;
        font-size: clamp(1rem, 5vw, 2rem);
    }
}

.row {
    width: 70%;
    max-width: 850px;
}

#hero,
.layer {
    min-height: 100vh;
}

.layer-1 {
    background-image: url(img/hero-img.jpg);
    background-position: top;
    background-size: cover;
}

.layer-3 {
    background-color: var(--black);
    background: linear-gradient(180deg, rgba(23, 23, 23, 0) 80%, rgba(23, 23, 23, 1) 100%);
}

#scroll-for-more {
    position: absolute;
    bottom: 0;
    left: calc(50% - 125px);
    /* makes it so the element is centered based on half it's width */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 1s ease-in-out;

    p {
        color: var(--white);
    }
}

#scroll-for-more-icon {
    display: inline-block;
    animation: bob 2s ease-in-out infinite;
    margin-bottom: -20px;
    width: 80px;
}

.paper-rip-red {
    background: linear-gradient(180deg, rgba(158, 38, 44, 1) 0%, rgba(204, 32, 61, 0) 30%), url('img/rip-red.png');
    height: 200px;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--white);
}

.paper-rip-black {
    background: linear-gradient(180deg, rgba(23, 23, 23, 1) 0%, rgba(204, 32, 61, 0) 30%),
        url('img/rip-black.png');
    height: 200px;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: var(--white);
}

/* animation for scroll for more */

@keyframes bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
        /* Adjust height of bob */
    }
}

/* Tile Grid */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(6, var(--tile-size));
    grid-template-rows: repeat(2, var(--tile-size));
    margin-left: calc(-1 * var(--tile-size));
    /* Moves entire grid left by 1 tile */
    width: 150vw;
    height: calc(var(--tile-size) * 2);
    transform-origin: center;
    overflow: hidden;
    background-color: var(--black);
    position: relative;
}

/* Tiles - Maintain Grid Structure & Scale */
.tile {
    width: var(--tile-size);
    height: var(--tile-size);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    font-size: calc(var(--tile-size) * 0.2);
    /* Scale text with tile */
}

.tile-overlay {
    position: absolute;
    top: 0;
    left: var(--tile-size);
    width: calc(var(--tile-size) * 2);
    height: 100%;
    background:
        linear-gradient(to top, var(--black), rgba(0, 0, 0, 0) 10%),
        linear-gradient(to bottom, var(--black), rgba(0, 0, 0, 0) 10%),
        linear-gradient(to left, var(--black), rgba(0, 0, 0, 0) 10%),
        linear-gradient(to right, var(--black), rgba(0, 0, 0, 0) 10%);
    z-index: 4;
}

/* Image Tiles - Scale with Grid */
.tile.img {
    width: 100%;
    height: auto;
    max-width: var(--tile-size);
}

/* Positioning for Specific Tiles */
#tile2-tr {
    position: relative;
    top: calc(-1 * var(--tile-size));
    z-index: 3;
}

/* Off-Screen Tiles - Stay Off by Their Own Width */
.off-screen-right {
    position: relative;
    left: calc(-1 * var(--tile-size));
    z-index: 2;
}

.off-screen-left {
    position: relative;
    right: calc(-1 * var(--tile-size));
}

/* Text Tiles */
.text {
    color: white;
    font-size: calc(var(--tile-size) * 0.2);
}

/* story section */
#chapter-1 {
    background-color: var(--white);
    margin: 0;
    height: 110vh;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;

    h2 {
        color: black;
        margin: 0;
        position: relative;
        padding: 15px;
        font-weight: bold;
        margin: 50px 15px 0 25px;
        font-family: "articulat-cf", sans-serif;
    }
}

#chap1-anxiety {
    transform: translateX(15%);
    font-family: "articulat-cf", sans-serif;
    font-style: italic;
    font-weight: bold;
}

#chap1-stress-job {
    transform: translateX(-10%);
    color: white !important;
    background-color: black;
    border-radius: 5px;
    font-family: "articulat-cf", sans-serif;
}

#chap1-hysteric {
    width: 80%;
    transform: translateX(10%);
    font-family: "articulat-cf", sans-serif;
}

#chap1-doctor {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    margin-top: 60px !important;
    font-weight: 200 !important;
    font-family: "acumin-variable", sans-serif !important;
}

.text-container {
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* chapter 2 */

#chapter-2 {
    height: 100vh;
    width: 100%;
    background:
        linear-gradient(180deg, rgba(158, 38, 44, 1) 0%, rgba(204, 32, 61, 0) 30%),
        linear-gradient(0deg, rgba(158, 38, 44, 1) 0%, rgba(204, 32, 61, 0) 30%),
        url('img/sophie-sager.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: right;
    margin-top: -5px;
    position: relative;
    overflow: hidden;

    h1 {
        padding: 80px 0 0 30px;
        color: var(--white);
        font-size: clamp(1rem, 20vw, 10rem);
        min-width: 370px;
    }

    h2 {
        font-size: clamp(1rem, 4.5vw, 2.5rem);
        text-align: left;
        padding: 15px 25px;
        background-color: var(--black);
        display: inline-block;
        width: 80%;
        margin-left: 25px;
        border-radius: 5px;
    }

    h4 {
        padding-left: 30px;
        color: var(--white);
        font-size: clamp(1rem, 3vw, 2rem);
    }
}

.fade-in-after-quotes {
    opacity: 0;
}

.chap2-text-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80%;
}

/* chapter 2.5 */

#chapter-2-5 {
    background-color: var(--white);
    height: 50vh;
    display: flex;
    justify-content: center;

    h1 {
        color: var(--black);
        font-family: "acumin-variable", sans-serif;
        font-weight: 200;
        font-style: normal;
        font-size: clamp(1.5rem, 3vw, 2rem);
        max-width: 850px;
    }
}

#chapter-2-5 .text-container {
    padding-top: 50px;
}

#chapter-2-5 .button {
    margin: 0 auto;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50%;
}

/* video chapter */
.colour-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.75;
    background-color: var(--black);
}

#chapter-3 {
    position: relative;
    background-image: linear-gradient(180deg, rgba(23, 23, 23, 1) 0%, rgba(204, 32, 61, 0) 5%),
        linear-gradient(0deg, rgba(23, 23, 23, 1) 0%, rgba(204, 32, 61, 0) 5%),
        url('img/paper.jpg');
    background-position: center;
    background-repeat: repeat-y;
    background-size: contain;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;

    h2 {
        color: var(--black);
        margin: 0;
        font-size: clamp(1rem, 20vw, 15rem);
    }

    video {
        width: 100%;
    }
}

.video-story-text {
    color: var(--white);
    padding: 50px 25px;
    font-weight: 100;
    font-size: clamp(1rem, 10vw, 5rem);
    font-family: "acumin-variable", sans-serif;
}

/* video 1 */

#vid1 {
    background-color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;

    h1 {
        font-size: clamp(6rem, 15vw, 15rem);
        position: absolute;
        white-space: nowrap;
        width: max-content;
        left: 150%;
        color: var(--white);
    }
}

#vid1-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
}

/* video 2 */

#vid2 {
    background-color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;

    h1 {
        font-size: clamp(6rem, 15vw, 15rem);
        position: absolute;
        white-space: nowrap;
        width: max-content;
        left: 150%;
        color: var(--white);
    }
}

.video-story-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 50px 0;
}

#vid2-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
}

/* video 3 */

#vid3 {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: 100vh;

    h1 {
        font-size: clamp(10rem, 15vw, 15rem);
        position: absolute;
        white-space: nowrap;
        width: max-content;
        left: 150%;
        color: var(--white);
    }
}

#vid3-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
}

/* chapter 4 */

#chapter-4 {
    background-color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100%;
    padding-top: 100px;

    h3 {
        text-align: right;
        margin: 0;
        color: var(--white);
        font-size: clamp(1rem, 10vw, 5em);
        margin-top: -15%;

    }

    h4 {
        font-size: clamp(1rem, 5vw, 2rem);
        color: var(--white);
        font-family: "acumin-variable", sans-serif;
    }
}

.sophie-diagnosed-container {
    width: 100%;
    display: flex;
    justify-content: right;

    h4 {
        width: 80%;
        text-align: right;
        font-weight: 300;
        font-family: "acumin-variable", sans-serif;
    }
}

#years {
    font-size: clamp(1rem, 80vw, 30rem);
    color: var(--white);
}

/* chapter 4.5 */

#chapter-4-5 {
    background-color: var(--black);
    height: 130vh;

    h1 {
        color: var(--white);
        font-size: clamp(1rem, 20vw, 10rem);
    }
}

#healthcare-text-container {
    display: inline-block;
    align-items: center;
    width: 80%;
    position: relative;
    max-width: 720px;

    h2 {
        background-color: var(--red);
        padding: 15px 25px;
        border-radius: 5px;
        font-size: clamp(1rem, 6vw, 3.25rem);
        font-weight: 200;
        text-align: left;
    }
}

#healthcare-text-container p:nth-child(2) {
    left: -30px;
    top: 10%;
}

#healthcare-text-container p:nth-child(3) {
    left: 90%;
    bottom: 10%;
}

.tile-grid-top {
    width: 100%;
    height: 50vh;
    display: flex;
    justify-content: center;
}

/* chapter 5 */

#chapter-5 {
    height: 80vh;
    background-color: var(--black);
    color: var(--white);
    position: relative;
}

.chap5-content {
    padding: 180px 35px 0 35px;
    display: flex;
    flex-direction: column;
    position: relative;

    h1 {
        line-height: 1.2;
        font-weight: 200;
        font-size: clamp(1rem, 5vw, 2.5rem);
        background-color: var(--red);
        padding: 5px 15px;
        border-radius: 5px;
        display: inline-block;
        font-family: "acumin-variable", sans-serif;
    }
}

.chap5-title-container {
    position: relative;
    width: 50%;
    display: inline-block;
}

.large-quote {
    margin: 0;
    font-size: 6rem;
    display: inline-block;
    height: 50%;
    font-family: "articulat-cf", sans-serif;
    font-weight: bold;
    position: absolute;
    color: var(--white);
}

.chap5-title-container p:nth-child(2) {
    left: -30px;
    top: 0;
}

.chap5-title-container p:nth-child(3) {
    right: -10%;
    top: 70%;
}

#chap5-now-i-have {
    font-size: clamp(1rem, 15vw, 6rem);
    font-weight: 200;
    margin: 100px 0 0 0;
    display: inline-block;
    background-color: var(--black);
    padding: 15px;
    border-radius: 5px;
    font-family: "articulat-cf", sans-serif;
}

#chap5-hope {
    font-size: clamp(1rem, 25vw, 10rem);
    font-weight: bold;
    margin: 0;
    text-align: left;
    font-family: "articulat-cf", sans-serif;
}

#chap5-end {
    height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--black);

    p {
        padding-top: 30vw;
        color: var(--white);
        margin-bottom: 10%;
        width: 80%;
        text-align: center;
        font-size: clamp(1rem, 5vw, 2rem);
        font-family: "acumin-variable", sans-serif;
    }
}

/* chapter 5 img styling */

.chap5-img-container {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

.chap5-img {
    width: 90%;
    height: auto;
    max-width: 500px;
    position: absolute;
    border-radius: 5px;
    opacity: 0;
}

.chap5-img-container img:nth-child(2) {
    top: 30%;
    left: 0;
}

.chap5-img-container img:nth-child(3) {
    top: 40%;
    right: 2%;
}

.button-black {
    text-decoration: none;
    color: var(--white);
    background-color: var(--black);
    font-weight: bold;
    font-size: clamp(1rem, 8vw, 4rem);
    padding: 10px 25px;
    border-radius: 5px;
    transition: ease-in-out 0.2s;
    z-index: 1;
    font-family: "acumin-variable", sans-serif;
    margin: 5%;
}

.button-white {
    text-decoration: none;
    color: var(--black);
    background-color: var(--white);
    font-weight: bold;
    font-size: clamp(1rem, 8vw, 4rem);
    padding: 10px 25px;
    border-radius: 5px;
    transition: ease-in-out 0.2s;
    z-index: 1;
    font-family: "acumin-variable", sans-serif;
}

.button-white:hover,
.button-black:hover {
    box-shadow: inset 0 0 0 4px var(--red);
}


.button-white:active,
.button-black:active {
    transform: scale(0.95);
}

.read-more-stories-container {
    width: 100%;
    /* height: 30vh; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
}

/* footer */

footer {
    background-color: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;

    hr {
        width: 100%;
    }
}

.footer-container {
    width: 90%;
    color: var(--white);
    font-size: small;
}

.footer-links {
    margin-top: 50px;
    height: 100%;
    flex-direction: column;
    color: var(--white);
    list-style: none;
    padding: 0;

    li {
        padding: 5px 0;
    }
}

.footer-logo {
    width: 100%;
    height: auto;
    max-width: 500px;

}

/* media query */

@media only screen and (min-width: 768px) {


    .layer-3 {
        background-position: right bottom;
    }

    .layer-2 {
        right: 0;
    }

    #what-heading {
        width: 100%;
    }

    /* desktop nav */

    #mobile-nav {
        display: none;
    }

    #desktop-nav {
        display: flex !important;
        justify-content: space-between;

        a {
            color: var(--black);
            text-decoration: none;

        }
    }

    .desktop-links {
        height: 50px;

        a {
            padding: 0 calc(10px - 0.1vw);
            white-space: nowrap;
        }
    }

    .full-text-logo {
        height: 100%;
    }

    /* info section */

    #menu {
        display: none;
    }

    /* tiles */

    :root {
        --tile-size: 25vw;
    }

    .tile-grid {
        width: 125vw;
    }

    .tile-overlay {
        width: calc(var(--tile-size) * 4);
    }

    #what-heading {
        text-align: center;
    }

    /* chapter 1 */

    .title-container {

        h1 {
            font-size: clamp(1rem, 10vw, 10rem) !important;
            white-space: nowrap;
        }
    }

    #chap1-anxiety {
        padding-top: 10vh !important;
    }

    #chap1-stress-job {
        transform: translateX(-35%);

    }

    #chap1-hysteric {
        transform: translateX(20%);
    }

    #chapter-2 {
        height: 150vh;
        background-position: 60% center;

        h2 {
            margin-top: 20%;
            max-width: 850px;
        }
    }

    /* video story */

    #chapter-3 video {
        width: 80vw;
    }

    .video-story-text {
        width: 80vw;
    }

    /* chapter-4 */

    #healthcare-text-container {
        width: 50%;
    }

    #healthcare-text-container p:nth-child(3) {
        left: 95%;
        bottom: -5%;
    }

    /* chapter 5 */

    #chapter-5 {
        display: flex;
        justify-content: center;
        height: 100vh;
    }

    .button-black {
        margin: 5%;
    }

    .button-white {
        margin: 5%;
    }

    #chap5-end p {
        padding-top: 10%;
    }

    /* fix the stupid overflow of chap5 on top of tile grid by adding a fucking spacer */

    .tile-overflow-spacer {
        display: block !important;
        height: 20vw;
        background-color: var(--black);
    }

}