:root {
    --service-accent: #1594d2;
    --service-background: #111213;
    --service-secondary: #1c5673;
    --service-text: #b0b0b0;
    --service-dark: #22292b;
    --spider-line-height: 0;
}

*,
*::after,
*::before {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

.service-preview {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.service-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

a {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-decoration: none;
    color: inherit;
}

body.service-page {
    position: relative;
    margin: 0;
    min-height: 100dvh;
    width: 100%;
    background-color: var(--service-background);
    font-family: "Nunito", sans-serif;
    color: var(--service-text);
}

.service-container {
    display: flex;
    margin: 0 auto;
    max-width: 1320px;
    width: 100%;
    padding: 0 20px;
}

/* Spiders */

.service-spiders {
    position: absolute;
    top: 120px;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.service-spider {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: service-spider-jump 1.5s ease-in-out infinite alternate;
}

.service-spider::before {
    content: "";
    display: block;
    width: 2px;
    background-image: linear-gradient(to bottom, #ccc, rgba(218, 209, 209, 0.15));
    height: var(--spider-line-height, 80px);
}

.service-spider img {
    display: block;
    width: 40px;
    height: auto;
    margin-top: -0.625rem;
}

/* Main */

.service-main {
    position: relative;
    width: 100%;
    padding: 200px 0 60px;
    overflow-x: clip;
}

.service-main::before {
    content: "";
    position: absolute;
    top: -300px;
    right: -250px;
    width: 525px;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--service-accent);
    filter: blur(250px);
    animation: service-gradient 10s ease-in-out infinite;
}

.service-main::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1440 / 512;
    background-image: url("https://bato-web-agency.github.io/bato-shared/img/halloween-timer/spider-web.svg");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: -2;
}

.service-main .service-container {
    justify-content: center;
    gap: 2rem;
}

/* Main: Content */

.service-content {
    max-width: 700px;
    width: 100%;
    padding: 4.5rem 0 0;
}

.service-heading {
    display: flex;
    flex-direction: column;
    row-gap: 2rem;
    margin: 0 0 2.5rem;
}

.service-main h1 {
    margin: 0;
    font-family: "Jolly Lodger", sans-serif;
    font-size: 6.75rem;
    font-weight: 400;
    line-height: 1;
    color: white;
}

.service-main h1 span {
    display: inline-block;
    opacity: 0;
    transform: translateY(-20px) rotate(-10deg);
    animation: service-letter-reveal 0.2s forwards;
}

.service-main h1 .word {
    display: inline-block;
    white-space: nowrap;
}

.service-main h1 .word:last-child {
    color: var(--service-accent);
}

.service-main p {
    margin: 0;
    max-width: 650px;
    font-family: "Nunito", sans-serif;
    font-size: 1.375rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.service-main p.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Main: Countdown */

.service-countdown {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 610px;
    gap: 30px;
    margin: 0 0 5rem;
}

.service-countdown::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    max-width: 110px;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--service-accent);
    filter: blur(150px);
    transform: translateY(-50%);
}

.service-countdown-item {
    display: flex;
    flex-direction: column;
    row-gap: 1.125rem;
}

.service-countdown-value {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1;
    font-family: "Jolly Lodger", sans-serif;
    font-size: 6.75rem;
    line-height: 1;
    color: white;
    text-align: center;
    background-image: url("https://bato-web-agency.github.io/bato-shared/img/halloween-timer/counter.svg");
    background-size: 100% 100%;
}

.service-countdown-label {
    font-size: 22px;
    line-height: 1.5;
    text-align: center;
}

/* Main: Cards */

.service-cards {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px;
    width: 100%;
}

.service-card {
    position: relative;
    width: 100%;
    aspect-ratio: 324 / 250;
    background-image: url("https://bato-web-agency.github.io/bato-shared/img/halloween-timer/card.svg");
    background-size: 100% 100%;
    border-radius: 40px;
    transition: background-color 0.6s ease, box-shadow 0.6s ease;
    backdrop-filter: blur(20px);
    cursor: pointer;
}

.service-card img {
    position: absolute;
    top: -30%;
    left: 50%;
    display: block;
    transform: translateX(-50%);
    width: auto;
    height: 110%;
    transition: top 0.6s ease;
}

.service-card:hover {
    box-shadow: 0 0 20px rgba(21, 148, 210, 0.35);
}

.service-card:hover img {
    top: -35%;
}

/* Main: Illustration */

.service-illustration {
    flex: 1;
    width: 100%;
}

.service-illustration-image.mobile {
    display: none;
}

.service-illustration-image {
    position: relative;
    width: 112%;
    margin: 0 -6%;
}

.service-illustration-image::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 35%;
    aspect-ratio: 1;
    background-color: var(--service-accent);
    filter: blur(250px);
}

.service-illustration-image img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
}

.service-eyes {
    position: absolute;
    top: 43.72%;
    left: 49%;
    width: 75.16%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
}

.service-eye {
    width: 7%;
    aspect-ratio: 18 / 25;
    border-radius: 50%;
    background-color: rgba(21, 148, 210, 0.89);
    filter: blur(2px);
    box-shadow: 0 0 20px rgba(21, 148, 210, 0.89),
        0 0 30px rgba(21, 148, 210, 0.89), 0 0 30px rgba(21, 148, 210, 0.89);
}

/* Main: Tags */

.service-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    max-width: 535px;
    width: 100%;
    margin-top: -20px;
}

.service-tag {
    position: relative;
    padding: 1rem 1.25rem;
    border: solid 1px rgba(176, 176, 176, 0.35);
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1;
    color: #878787;
    transition: color 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}

.service-tag::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background-image: linear-gradient(0deg, #1c5673 0%, #1594d2 80%);
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-tag:hover {
    color: #d3cbcb;
    border-color: #1594d2;
}

.service-tag:hover::after {
    opacity: 0.5;
}

/* Keyframes */

@keyframes service-gradient {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.8;
    }

    50% {
        transform: translate(-54%, -46%) scale(1.25) rotate(-10deg);
        opacity: 0.9;
    }
}

@keyframes service-letter-reveal {
    0% {
        opacity: 0;
        transform: translateY(-20px) rotate(-10deg);
        filter: blur(3px);
    }

    60% {
        opacity: 1;
        transform: translateY(2px) rotate(5deg);
        filter: blur(1px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
        filter: blur(0);
    }
}

@keyframes service-spider-jump {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3vh);
    }

    100% {
        transform: translateY(0);
    }
}

/* Media Queries */

@media screen and (max-width: 1279.9px) {
    /* Main */

    .service-main {
        padding: 115px 0 90px;
    }

    .service-main::after {
        width: 150%;
    }

    .service-main .service-container {
        flex-direction: column;
    }

    /* Main: Content Column */

    .service-content {
        margin: 0 auto;
        padding: 3rem 0 0;
        text-align: center;
    }

    .service-countdown {
        margin: 0 auto;
    }

    /* Main: Illustration Column */

    .service-illustration {
        flex: auto;
        max-width: 700px;
        margin: 0 auto;
    }

    .service-illustration-image.desktop {
        display: none;
    }

    .service-illustration-image.mobile {
        display: block;
        margin: 3.5rem auto 4rem;
        width: 100%;
        max-width: 412px;
    }

    .service-tags {
        margin: 2.5rem auto 0;
    }
}

@media screen and (max-width: 767.9px) {
    /* Main */

    .service-main {
        padding: 90px 0 75px;
    }

    /* Main: Content Column */

    .service-heading {
        row-gap: 20px;
        margin-bottom: 35px;
    }

    .service-main h1 {
        font-size: 4.375rem;
    }

    .service-main p {
        font-size: 1.125rem;
    }

    .service-countdown,
    .service-countdown-item,
    .service-cards {
        gap: 2.5vw;
    }

    .service-countdown-item {
        row-gap: 2.5vw;
    }

    .service-countdown-value {
        font-size: 15.75vw;
    }

    .service-countdown-label {
        font-size: 3.5vw;
    }

    /* Main: Illustration Column */

    .service-illustration-image.mobile {
        max-width: 320px;
        margin: 40px auto 35px;
    }

    .service-tags {
        margin: 25px auto 0;
    }

    .service-tag {
        font-size: 1rem;
        background-color: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(5px);
    }
}

@media screen and (max-width: 412.9px) {
    /* Main: Content Column */

    .service-content {
        padding: 35px 0 0;
    }

    .service-main h1 {
        font-size: 3.125rem;
    }

    .service-main p {
        font-size: 1rem;
    }

    .service-card {
        border-radius: 20px;
    }

    /* Main: Illustration Column */

    .service-illustration-image.mobile {
        max-width: 240px;
        margin: 35px auto 30px;
    }

    .service-tags {
        margin: 10px auto 0;
    }
}