* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red-500: hsl(356, 100%, 66%);
    --red-400: hsl(355, 100%, 74%);
    --blue-900: hsl(208, 49%, 24%);

    --white: hsl(0, 100%, 100%);
    --gray-600: hsl(207, 13%, 34%);
    --gray-900: hsl(240, 10%, 16%);

    /* Gradient for intro/mobile cta */
    --orange-300: hsl(13, 100%, 72%);
    --red-550: hsl(353, 100%, 62%);

    /* background gradient - body */
    --purple-950: hsl(237, 17%, 21%);
    --purple-900: hsl(237, 23%, 31%);

    --heading-fnt-fmly: 'Overpass', sans-serif;
    --paragraph-fnt-fmly: 'Ubuntu', sans-serif;
}

html {
    scroll-behavior: smooth;
}

button {
    background-color: unset;
    border: unset;
}

a {
    font-family: var(--paragraph-fnt-fmly);
    text-decoration: none;
    color: unset;
}

li {
    list-style: none;
}

header {
    background-color: var(--orange-300);
    background-image: url('./images/bg-pattern-intro-mobile.svg');
    background-repeat: no-repeat;
    background-size: 150%;
    background-position: center;
    border-bottom-left-radius: 6rem;
    position: relative;
}

/* Navigation bar */

.nav-bar {
    padding: 1.7rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger-menu {
    display: block;
}

.desktop-nav-bar {
    display: none;
    gap: 5rem;
    margin-right: auto;
    margin-left: 5rem;
    position: relative;
}

.desktop-nav-bar li::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: width 0.2s ease-in-out;
}

.desktop-nav-bar li:hover::after {
    width: 100%;
}

.desktop-nav-bar li a {
    font-weight: 500;
    color: var(--white);
}

.desktop-nav-bar li a img {
    transition: transform 0.3s ease; /* Smooth transition for both hover in and out */
}

.desktop-nav-bar li:hover a img {
    transform: rotate(180deg); /* Rotate the arrow to point upwards */
}

.desktop-nav-dropdown-menu {
    position: absolute;
    display: flex;
    visibility: hidden;
    opacity: 0;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
    padding: 1rem 2rem;
    background-color: var(--white);
    transition: visibility 0.3s, opacity 0.3s, transform 0.3s; /* Smooth transition */
    border-radius: 0.7rem;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Example value */
    transform: translateY(-10px); /* Slightly move up for animation effect */

    &:hover {
        visibility: visible;
    }
}

.desktop-nav-bar li:hover .desktop-nav-dropdown-menu {
    visibility: visible; /* Make the dropdown menu visible */
    opacity: 1; /* Ensure it is fully visible */
    transform: translateY(0); /* Reset any transform for smooth animation */
}

.desktop-nav-dropdown-menu li a {
    color: #000;
    font-weight: 400;
}

.product-dropdown {
    left: -11%;
}

.company-dropdown {
    right: 34%;
}

.connect-dropdown {
    left: 71%;
}

/* CTA Buttons Nav */
.cta-btns-nav {
    display: none;
    align-items: center;
    gap: 2rem;
    font-weight: 500;
    color: var(--white);
}

.cta-btns-nav #sign-up {
    background-color: var(--white);
    color: var(--red-500);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    transition: 0.3s;

    &:hover {
        background-color: hsla(0, 0%, 100%, 0.271);
        color: var(--white);
    }
}

/* Mobile Navigation */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: hsl(0, 0%, 91%);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav a {
    color: var(--gray-900);
    font-weight: 500;
}

.mobile-dropdown {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    padding-left: 1rem;
    padding-top: 0.5rem;
}

.mobile-nav li:hover .mobile-dropdown {
    display: flex;
}

/* Close button */
.close-menu {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hamburger Menu */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Hero section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-content h1 {
    /* Ensures consistent font style for all headings on the page */
    font-family: var(--heading-fnt-fmly);
    text-align: center;
    color: var(--white);
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 500;
}

.hero-content p {
    font-family: var(--paragraph-fnt-fmly);
    text-align: center;
    color: var(--white);
}

.cta-btn {
    display: inline-grid;
    margin-top: 3.5rem;
    margin-bottom: 4rem;
    gap: 1rem;
}

.cta-btn button {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    border-radius: 1.5rem;
    padding: 0.8rem 1.5rem;
    text-align: center;
    transition: 0.3s;
    &:hover {
        cursor: pointer;
    }
}

#start-for-free {
    background-color: var(--white);
    color: var(--orange-300);
    font-family: var(--paragraph-fnt-fmly);
    font-weight: 500;

    &:hover {
        background-color: hsla(0, 0%, 100%, 0.271);
        color: var(--white);
    }
}

#learn-more {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    font-family: var(--paragraph-fnt-fmly);
    font-weight: 500;
    transition: 0.3s all;
    &:hover {
        background-color: var(--red-500);
        border: 1px solid var(--red-500); /* Keep the border width consistent */
    }
}

/* main */

.section {
    margin: 10rem 0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.section-description {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    width: 90%;
}

.section-header {
    font-family: var(--heading-fnt-fmly);
    padding-bottom: 2rem;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    text-align: center;
}

.sub-heading {
    text-align: center;
    font-family: var(--heading-fnt-fmly);
    color: var(--blue-900);
    padding-bottom: 1.2rem;
    margin-top: 2rem;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

.section-para {
    line-height: 1.7rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    text-align: center;
    font-family: var(--paragraph-fnt-fmly);
    color: var(--gray-600);
}

section picture img {
    max-width: 100%;
    height: auto;
}

/* Section-One */

.section-one {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Section-Two */
.section-two {
    background-color: var(--purple-900);
    background-image: url('/images/bg-pattern-circles.svg');
    border-top-right-radius: 6rem;
    border-bottom-left-radius: 6rem;
    position: relative;
    margin: 18rem 0 0;
    padding: 10rem 0rem 5rem;
}

.section-two-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.section-two img {
    width: 320px;
    height: auto;
    position: absolute;
    margin: 0;
    top: -10rem;
    left: 50%;
    transform: translateX(-50%);
    /* Adjusts width based on screen size */
}

.mobile-sec-header {
    color: var(--white);
}

.mobile-sec-para {
    color: var(--white);
}

/* Footer */

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--purple-950);
    gap: 2.5rem;
    padding: 5rem 3rem 2rem;
    border-top-right-radius: 6rem;
}

.footer-section-heading {
    text-align: center;
    margin-bottom: 1.2rem;
    font-family: var(--heading-fnt-fmly);
    color: var(--white);
}

.footer-section ul {
    display: flex;
    text-align: center;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-links-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-links a {
    color: var(--white);
    font-family: var(--paragraph-fnt-fmly);
}

.attribution {
    font-size: 15px;
    padding: 2rem 0 0.5rem;
    background-color: var(--purple-950);
    text-align: center;
    color: var(--white);
    font-family: var(--paragraph-fnt-fmly);
}

.attribution a {
    color: var(--red-400);
}

/* For desktop preview */

@media (min-width: 640px) {
    .nav-bar {
        padding: 2rem 4rem;
    }

    .menu-desktop {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-family: var(--paragraph-fnt-fmly);
        color: var(--white);
    }

    .mobile-nav-overlay {
        display: none;
    }

    .cta-btn {
        display: flex;
        gap: 3rem;
    }

    .hero {
        padding: 5rem 0;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }

    footer {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .footer-links-container {
        flex-direction: row;
        gap: 8rem;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .container {
        flex-direction: row;
    }
    #hamburger-menu {
        display: none;
    }

    /* Hamburger menu */

    .hamburger-menu {
        display: none;
    }

    /* Navigation bar */
    .nav-bar {
        padding: 2rem 6rem;
    }

    .desktop-nav-bar {
        display: flex;
    }

    .cta-btns-nav {
        display: flex;
    }

    .section-description {
        align-items: flex-start;
    }

    .section-para {
        text-align: start;
    }

    /* Section-One */
    .editor-img img {
        right: -10.5rem;
        position: relative;
        transform: translateX(5%);
    }

    .sec-one-des {
        order: -1;
        margin-left: 5rem;
    }

    /* Section-Two */
    .section-two {
        padding: 3.6rem;
    }
    .section-two img {
        width: 375px;
        top: -4rem;
        left: 20%;
    }

    .sec-two-des {
        width: 60%;
    }

    /* Section-Three */
    .laptop-img img {
        position: relative;
        left: -12rem;
        transform: translateX(-5%);
    }

    .sec-three-des {
        margin-right: 5rem;
    }

    /* Footer */
    footer {
        align-items: flex-start;
        flex-direction: row;
    }

    .footer-links-container {
        margin: auto;
        flex-direction: row;
        /* justify-content: space-around; */
        gap: 15rem;
    }
}

@media (min-width: 1024px) {
}
