/* Home Section
   Layout, typography, buttons, social icons, image, animations and responsive rules.
*/

/* ---------- Layout ---------- */
.home {
    display: flex;
    align-items: center;
    gap: 15rem;
}

/* ---------- Typography ---------- */
.home-detail h1 {
    font-size: clamp(3.5rem, 10vw, 5.5rem);
}

.home-detail h2 {
    display: inline-block;
    font-size: 3.2rem;
}

.home-detail h2 span {
    position: relative;
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: .07rem var(--accent-color);
    animation: display-text 16s linear infinite;
    animation-delay: calc(-4s * var(--i));
}

.home-detail h2 span::before {
    content: attr(data-text);
    position: absolute;
    width: 0;
    border-right: .2rem solid var(--accent-color);
    color: var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
    animation: fill-text 4s linear infinite;
}

.home-detail p {
    font-size: 1.6rem;
    margin: 1rem 0 2.5rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--accent-color);
    border: .2rem solid var(--accent-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--accent-color);
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: .5s;
}

.btn:hover {
    background: transparent;
    color: var(--accent-color);
    box-shadow: none;
}

/* ---------- Social Icons ---------- */
.home-detail .btn-sci {
    display: flex;
    align-items: center;
}

.home-detail .btn-sci .sci {
    margin-left: 2rem;
}

.home-detail .btn-sci .sci a {
    display: inline-flex;
    padding: .8rem;
    border: .2rem solid var(--accent-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--accent-color);
    margin: 0 .8rem;
    transition: .5s;
}

.home-detail .btn-sci .sci a:hover {
    color: var(--primary-color);
    background: var(--accent-color);
    box-shadow: 0 0 1rem var(--accent-color);
}

/* ---------- Image Container ---------- */
.home-image .img-box {
    position: relative;
    width: 30vw;
    height: 30vw;
    border-radius: 50%;
    padding: .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.home-image .img-box::before,
.home-image .img-box::after {
    content: '';
    position: absolute;
    width: 50rem;
    height: 50rem;
    background: conic-gradient(transparent, transparent, transparent, var(--accent-color));
    transform: rotate(0deg);
    animation: rotate-border 10s linear infinite;
}

.home-image .img-box::after {
    animation-delay: -5s;
}

.home-image .img-box .img-item {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 50%;
    border: .01rem solid var(--primary-color);
    display: flex;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.home-image .img-box .img-item img {
    position: absolute;
    top: 3rem;
    display: block;
    width: 85%;
    height: auto;
    object-fit: cover;
    mix-blend-mode: lighten;
}

/* ---------- Animations ---------- */
@keyframes display-text {
    25%,100% {
        display: none;
    }
}

@keyframes fill-text {
    10%,100% {
        width: 0;
    }
    70%,90% {
        width: 100%;
    }
}

@keyframes rotate-border {
    100% {
        transform: rotate(360deg);
    }
}

/* ============================= */
/* HOME BREAKPOINTS */
/* ============================= */

@media screen and (max-width: 1200px) {
    .home-image .img-box {
        width: 25vw;
        height: 25vw;
    }

    .home-image .img-box::before,
    .home-image .img-box::after {
        width: 40rem;
        height: 40rem;
    }
}

@media screen and (max-width: 992px) {
    .home-image .img-box {
        width: 22vw;
        height: 22vw;
    }

    .home-image .img-box::before,
    .home-image .img-box::after {
        width: 35rem;
        height: 35rem;
    }
}

@media screen and (max-width: 768px) {

    .home {
        flex-direction: column-reverse;
        justify-content: center;
        gap: 2rem;
    }

    .home-image .img-box {
        width: 40rem;
        height: 40rem;
    }

    .home-image .img-box::before,
    .home-image .img-box::after {
        width: 50rem;
        height: 50rem;
    }

    .home-image .img-box .img-item img {
        width: 80%;
        top: 2rem;
    }
}

@media screen and (max-width: 600px) {

    .home-image .img-box {
        width: 30rem;
        height: 30rem;
    }

    .home-image .img-box::before,
    .home-image .img-box::after {
        width: 40rem;
        height: 40rem;
    }

    .home-image .img-box .img-item img {
        width: 75%;
        top: 1.5rem;
    }
}

@media screen and (max-width: 450px) {

    .home-image .img-box {
        width: 25rem;
        height: 25rem;
    }

    .home-image .img-box::before,
    .home-image .img-box::after {
        width: 35rem;
        height: 35rem;
    }

    .home-image .img-box .img-item img {
        width: 80%;
        top: 1rem;
    }
}

@media screen and (max-width: 400px) {

    .home-detail {
        text-align: center;
    }

    .home-detail .btn-sci {
        flex-direction: column-reverse;
    }

    .home-detail .btn-sci .sci {
        margin-left: 0;
        margin-bottom: 2rem;
    }
}
