/* ==========================================================================
   BEM (Block Element Modifier) design methodology.
   ========================================================================== */
/**
* Make component modular and reusable:
* - Block styles should never dependent on other elements on a page.
* - Block library reduces the amount of CSS code to maintain.
* 
* .Block
* ========================================================================== 
* A block is standalone entity that is meaningful on its own.
* 
*   Examples
*   header, container, menu, checkbox, input
* 
* .Element
* ========================================================================== 
* A part of a block that has no standalone meaning and is semantically tied to its block.
* 
*   Examples
*   menu__item, list__item, checkbox__caption, header__title
* 
* .Modifier
* ========================================================================== 
* A modifer is an entity that defines the appearance, state, or behavior of a 
* block or element. Here we use 3 different types of modifiers:
* 
* 1. Type
*    Modifies the type of HTML elements.
* 
*    Example:
*    button-type--icon
* 
* 2. Size
*    Modifies the size of HTML elements.
* 
*    Example:
*    button-size--small
*    
* 
* 3. Theme
*    Modifies the colors, fonts, backrounds of HTML elements.
* 
*    Example:
*    button--dark-gray
* 
* A modifier can also be applied to an element.
* 
*    Name structure:
*    block__element--modifier
*/

/* ==========================================================================
   Mobile First
   ========================================================================== */

:root {
    
    --border-color: #434343;
    --border-radius: 1.5rem;
    --dark-color: #292929;
    --darkest-color: black;
    --font-family: 'Montserrat', sans-serif;
    --light-color: whitesmoke;
    --lighter-color: #c8c8c8;
    --lightest-color: white;
    --lighttone-color: #919191;
    --midtone-color: #555555;
    --primary-color: #048aba;
    --primary-color-hover: #28c6ff;
    --secondary-color: #ff00a5;
    --variant-color: #ba0404;
    --variant-color-hover: #ff0000;
    --color-error: red;
    --color-info: blue;
    --color-success: green;
    --color-warning: orange;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

::placeholder {
    color: var(--lighttone-color);
}

body {
    background-color: var(--darkest-color);
    color: var(--light-color);
    display: flex;
    flex-direction: column; /* For sticking the footer to the bottom */
    font-family: var(--font-family);
    font-size: 1.2rem;
    height: 100%;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden; /* Prevents horizontal scrolling du to the hamburger menu */
    padding: 0;
}

    
    
a,
button {
    cursor: revert;
}

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

/* ==========================================================================
   Typography
/* ========================================================================== */

.title {
    color: var(--lightest-color);
    font-weight: 100;
    line-height: 1.2rem;
    margin: 0;
    padding: 0;
}
.title-size--small {
    font-size: 1.15rem;  
    line-height: 1.6rem;
}
.title-size--medium {
    font-size: 1.7rem;
    line-height: 2rem;
}
.title-size--large {
    font-size: 1.95rem;
    line-height: 2.2rem;
    text-align: center;
}


.text {
    color: var(--lighter-color);
    font-weight: 400;
    line-height: 1.5rem;
    margin: 1rem 0;
    padding: 0;
}
.text-size--small {
    font-size: 1rem;
    line-height: 1.2rem;
}
.text-size--medium {
    font-size: 1.25rem;
    line-height: 1.9rem;
}
.text-size--large {
    font-size: 1.4rem;
    line-height: 2.2rem;
}

.text__note {
    color: var(--color-success);
    font-style: italic;
}

.message {
    margin: 1.5rem 0;
}
.message--error {
    border: 1px solid var(--color-error);
    padding: 0.5rem 2rem;
}
.message--success {
    border: 1px solid var(--color-success);
    padding: 0.5rem 2rem;
}
.error {
    color: var(--color-error);
    display: block;
    font-weight: 600;
}
.list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.list__item {
    margin: 0;
    padding: 0;
}

.link,
.link:visited {
    text-decoration: none;
}

.link:hover,
.link:visited:hover {
    text-decoration: none;
}

.link--primary {
    color: var(--primary-color);
}
.link--primary:hover {
    color: var(--primary-color-hover);
}

.link__btn {
    background: var(--lighttone-color);
    border: none;
    border-radius: var(--border-radius);
    color: var(--lightest-color);
    font-size: 1.2rem;
    padding: 0.5rem 1.5rem;
    transition: background-color 0.3s ease-in-out;
}
.link__btn:hover {
    background: var(--primary-color-hover);
}
.link__btn--primary {
    background-color: var(--primary-color);
}
.link__btn--primary:hover {
    background: var(--primary-color-hover);
}
.link__btn--secondary {
    background-color: var(--variant-color);
}
.link__btn--secondary:hover {
    background: var(--variant-color-hover);
}

/* ==========================================================================
   Form Elements
/* ========================================================================== */

.form {
    margin: 1.5rem 0;
}
.label {}
.input {
    font-size: 1.2rem;
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem 1rem;
    width: 100%;
}


/* ==========================================================================
   Buttons
/* ========================================================================== */

.button {
    border: 1px solid;
    font-size: 1.2rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
}

.button:hover {
    cursor: pointer;
}

.button--full-width {
    display: block;
    width: 100%;
}   
.button--primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--lighter-color);
}

.button--primary:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
}

/* ==========================================================================
   Header
/* ========================================================================== */
.header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
}

.header__logo {
    font-family: "Lobster Two", serif;
    font-weight: 100;
    font-size: 2rem;
}
.header__link,
.header__link:visited {
    color: var(--lightest-color);
}
.header__link:hover,
.header__link:hover:visited {
    color: var(--lighttone-color);
}
.header__nav {}
.header__list {}
.header__list-item {
    padding: 1.5rem 3rem;
}


/* ==========================================================================
   Navigation
/* ========================================================================== */



/* ==========================================================================
   Main Content
/* ========================================================================== */
.main {
    align-items: center;
    display: flex;
    flex: 1; /* stick footer at the bottom */
    flex-direction: column;
    padding: 2rem 2rem 0 2rem; 
}

.section {
    margin-bottom: 3rem;
}

/* Intro Section */
.intro__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.intro__video {
    margin-bottom: 2rem;
    width: 100%;
}

/* Contact Section,
   Newsletter Section  */
.contact__list,
.newsletter__list {
    color: var(--lighter-color);
    list-style: square;
    margin: 0;
    padding-left: 1.5rem;
}
.contact__list-item,
.legal__list--item,
.newsletter__list-item {
    margin-bottom: 1rem;
}

/* Update Section */
.update__list {
    margin: 1.5rem 0 0 0;
}
.update__list-item {
    margin-bottom: 1.5rem;
}

/* FAQ */
.faq__list-title {
    color: var(--lightest-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1rem 0;
}
.faq__list-data {
    color: var(--lighttone-color);
    font-size: italic;
}

/* Join Section */
.join__plans {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}
.card {
    background-color: var(--dark-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

/* Reset Password Section */
.reset-password__card {
    padding: 2.25rem 0 1.5rem 0;
}

/* User Section */
.user {
    max-width: 340px;
}

/* Call to Action Section */
.cta__signup {
    padding: 2rem 0 0 0;
}

/* Payment Success */
.payment-success {
    align-items: center;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Members Section
/* ========================================================================== */

.photos__poster {
    margin-bottom: 2rem;
}

.photos__list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.photos__list-item {
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    display: flex;
    flex: 1 1 calc(50% - 1rem);
    justify-content: center;
    max-width: calc(50% - 1rem);
    overflow: hidden;
}


.photos__thumb {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Keeps aspect ratio, centers image */
    object-position: top left;
}

.photos__link {
    display: block;
    line-height: 0;
}

/* ==========================================================================
   Footer
/* ========================================================================== */
.footer {
    background-color: var(--dark-color);
}
.footer__nav {}
.footer__list {
    background-color: var(--dark-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.footer__list-item {
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    padding: 0.75rem 2rem;
}
.footer__list-item:last-child {
    border-bottom: none;
}
.footer__link {
    color: var(--lighttone-color);
}
.footer__link:hover {
    color: var(--primary-color);
}
.footer__copyrights {
    color: var(--lighttone-color);
    font-size: 1rem;
    text-align: center;
}


/* ==========================================================================
   Utility Classes
/* ========================================================================== */
.align--center {
    text-align: center;
}
/* ==========================================================================
   Media Queries
/* ========================================================================== */
@media screen and (max-width: 1023px) {
    /* ==========================================================================
      CSS-Only Hamburger Menu 
    /* ========================================================================== */

    .menu__toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 25px;
        user-select: none;
        z-index: 1000;
        -webkit-user-select: none;
        }

    .menu__checkbox {
        cursor: pointer;
        display: block;   
        height: 40px;
        opacity: 0;
        position: absolute;   
        right: -10px;
        top: -10px;
        width: 40px;
        z-index: 1002;
        -webkit-touch-callout: none;
    }

    /* Hamburger slices */
    .hamburger {
        background: var(--lightest-color);
        border-radius: 3px;
        display: block;
        height: 3px;
        position: relative;
        transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                    background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                    opacity 0.55s ease;
        width: 33px;
        z-index: 1001;
    }

    .hamburger__top {
        transform-origin: 100% 0%;
    }

    .hamburger__middle {
        margin-bottom: 7px;
        margin-top: 7px;
    }

    .hamburger__bottom {
        transform-origin: 100% 100%;
    }

    /* Transform hamburger to X when checked */
    .menu__checkbox:checked ~ .hamburger__top {
    opacity: 1;
    transform: rotate(-45deg) translate(1px, -1px);
    }

    .menu__checkbox:checked ~ .hamburger__middle {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
    }

    .menu__checkbox:checked ~ .hamburger__bottom {
    opacity: 1;
    transform: rotate(45deg) translate(1px, 0);
    }

    /* Menu list - positioned to stay within viewport */
    .menu__list {
        background: var(--dark-color);
        border-left: 1px solid var(--border-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        height: 100vh;
        margin: 0;
        overflow-y: auto;
        padding: 125px 20px 50px 20px;
        position: fixed;
        right: 0;
        top: 0;
        transform: translateX(100%);
        transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
        width: 80%;
        z-index: 999;
        -webkit-font-smoothing: antialiased;
    }

    /* Show menu when checkbox is checked */
    .menu__checkbox:checked ~ .menu__list {
        transform: translateX(0);
    }

    .menu__list-item {
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .menu__list-item:last-child {
        border-bottom: none;
    }

    /* Optional: Add backdrop/overlay when menu is open */
    .menu__list::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.5s ease;
        pointer-events: none;
        z-index: -1;
    }

    .menu__checkbox:checked ~ .menu__list::before {
        opacity: 1;
        pointer-events: auto;
    }
    
}

@media screen and (min-width: 768px) {
    .join__plans,
    .update__list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .newsletter,
    .user{
        max-width: 500px;
    }
}

@media screen and (min-width: 1024px) {
    .main, 
    .footer {
        max-width: 90%;
        margin: 0 auto; 
    }

    .content-split {
        display: flex;
        flex-direction: row;
        gap: 5rem;
        justify-content: space-between;
    }

    .about,
    .contact,
    .cta__signup--bottom,
    .error-page,
    .legal,
    .support { 
        max-width: 65%;
    }


    /* ==========================================================================
       Header 
    /* ========================================================================== */
    .header {
        max-width: 90%;
        margin-left: 5%; /* 100% -90% = 10% / 2 = 5% No need for yet another container - clean HTML sementic */
        margin-right: 5%; /* Center header on larger screens */
    }
    .header__link:hover, 
    .header__link:hover:visited {
        color: var(--primary-color);
    }
    /* ==========================================================================
       Menu
    /* ========================================================================== */
    .hamburger,
    .menu__checkbox {
        display: none; /* Hide checkbox on larger screens */
    }

    .menu__list {
        margin: 0;
    }

    .menu__list-item {
        display: inline-block;
        font-size: 0.9rem;
        margin-left: 1.5rem;
        text-transform: uppercase;
    }
    /* ==========================================================================
       Footer
    /* ========================================================================== */
    .footer {
        background-color: transparent;
        padding-bottom: 1rem;
    }
    .footer__nav {}
    .footer__list {
        background-color: transparent;
        border: none;
        text-align: center;
    }
    .footer__list-item {
        border: none;
        display: inline-block;
        font-size: 0.9rem;
        padding: 0 1rem;
    }
    .footer__list-item:last-child {
        border-bottom: none;
    }
    .footer__copyrights {
        font-size: 0.9rem;
    }
}