:root {
    --background: #090b10;
    --surface: rgba(20, 24, 33, 0.72);
    --surface-hover: rgba(28, 33, 44, 0.88);

    --border: rgba(255, 255, 255, 0.08);

    --text: #f4f6f8;
    --muted: #89919f;
    --subtle: #5d6572;
}


/* -------------------------------------------------
   BASE
------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -20%,
            #182039 0%,
            #0d111a 30%,
            var(--background) 65%
        );

    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;

    overflow-x: hidden;

    position: relative;
}


/* -------------------------------------------------
   ANIMATED BACKGROUND GLOWS
------------------------------------------------- */

.background-glow {
    position: fixed;

    width: 700px;
    height: 700px;

    border-radius: 50%;

    filter: blur(150px);

    pointer-events: none;

    z-index: 0;

    will-change: transform;
}

.glow-one {
    background: #596cff;

    top: -300px;
    left: -200px;

    opacity: 0.17;

    animation:
        drift-one 18s
        ease-in-out
        infinite alternate;
}

.glow-two {
    background: #8a55ff;

    right: -300px;
    bottom: -350px;

    opacity: 0.15;

    animation:
        drift-two 24s
        ease-in-out
        infinite alternate;
}


/* -------------------------------------------------
   PS3-STYLE FLOWING WAVES
------------------------------------------------- */

body::before,
body::after {
    content: "";

    position: fixed;

    left: -20%;

    width: 140%;

    pointer-events: none;

    z-index: 0;

    will-change: transform;
}

body::before {
    top: 53%;

    height: 180px;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(78, 107, 255, 0.00) 10%,
            rgba(78, 107, 255, 0.10) 30%,
            rgba(143, 99, 255, 0.14) 50%,
            rgba(78, 107, 255, 0.09) 70%,
            rgba(78, 107, 255, 0.00) 90%,
            transparent 100%
        );

    border-radius: 50%;

    filter: blur(38px);

    opacity: 0.85;

    transform:
        rotate(-4deg)
        translate3d(0, 0, 0);

    animation:
        wave-one 16s
        ease-in-out
        infinite alternate;
}

body::after {
    top: 62%;

    height: 120px;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(92, 190, 255, 0.00) 15%,
            rgba(92, 190, 255, 0.07) 35%,
            rgba(153, 112, 255, 0.10) 55%,
            rgba(92, 190, 255, 0.06) 75%,
            rgba(92, 190, 255, 0.00) 90%,
            transparent 100%
        );

    border-radius: 50%;

    filter: blur(30px);

    opacity: 0.75;

    transform:
        rotate(3deg)
        translate3d(0, 0, 0);

    animation:
        wave-two 21s
        ease-in-out
        infinite alternate;
}


/* -------------------------------------------------
   FLOATING PARTICLES
------------------------------------------------- */

.particles {
    position: fixed;

    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;
}

.particle {
    position: absolute;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: rgba(205, 215, 255, 0.75);

    box-shadow:
        0 0 6px rgba(150, 175, 255, 0.65),
        0 0 14px rgba(110, 130, 255, 0.30);

    opacity: 0;

    animation-name: particle-float;
    animation-timing-function: linear;
    animation-iteration-count: infinite;

    will-change: transform, opacity;
}


/* Individual particle positions and speeds */

.particle-1 {
    left: 6%;
    top: 88%;

    animation-duration: 19s;
    animation-delay: -4s;
}

.particle-2 {
    left: 14%;
    top: 74%;

    width: 4px;
    height: 4px;

    animation-duration: 24s;
    animation-delay: -15s;
}

.particle-3 {
    left: 23%;
    top: 94%;

    width: 6px;
    height: 6px;

    animation-duration: 22s;
    animation-delay: -9s;
}

.particle-4 {
    left: 32%;
    top: 78%;

    width: 4px;
    height: 4px;

    animation-duration: 27s;
    animation-delay: -20s;
}

.particle-5 {
    left: 41%;
    top: 90%;

    animation-duration: 21s;
    animation-delay: -12s;
}

.particle-6 {
    left: 50%;
    top: 72%;

    width: 4px;
    height: 4px;

    animation-duration: 25s;
    animation-delay: -6s;
}

.particle-7 {
    left: 59%;
    top: 91%;

    width: 6px;
    height: 6px;

    animation-duration: 23s;
    animation-delay: -18s;
}

.particle-8 {
    left: 67%;
    top: 80%;

    width: 4px;
    height: 4px;

    animation-duration: 28s;
    animation-delay: -11s;
}

.particle-9 {
    left: 75%;
    top: 96%;

    animation-duration: 20s;
    animation-delay: -7s;
}

.particle-10 {
    left: 82%;
    top: 76%;

    width: 6px;
    height: 6px;

    animation-duration: 26s;
    animation-delay: -16s;
}

.particle-11 {
    left: 89%;
    top: 89%;

    width: 4px;
    height: 4px;

    animation-duration: 22s;
    animation-delay: -3s;
}

.particle-12 {
    left: 96%;
    top: 82%;

    width: 5px;
    height: 5px;

    animation-duration: 25s;
    animation-delay: -14s;
}


/* -------------------------------------------------
   BACKGROUND ANIMATIONS
------------------------------------------------- */

@keyframes drift-one {

    0% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(180px, 100px, 0)
            scale(1.15);
    }

    100% {
        transform:
            translate3d(350px, 30px, 0)
            scale(0.95);
    }
}


@keyframes drift-two {

    0% {
        transform:
            translate3d(0, 0, 0)
            scale(1);
    }

    50% {
        transform:
            translate3d(-200px, -120px, 0)
            scale(1.20);
    }

    100% {
        transform:
            translate3d(-350px, -40px, 0)
            scale(1);
    }
}


@keyframes wave-one {

    0% {
        transform:
            translate3d(-7%, -35px, 0)
            rotate(-4deg)
            scaleY(0.8);
    }

    50% {
        transform:
            translate3d(2%, 35px, 0)
            rotate(2deg)
            scaleY(1.25);
    }

    100% {
        transform:
            translate3d(7%, -10px, 0)
            rotate(-2deg)
            scaleY(0.9);
    }
}


@keyframes wave-two {

    0% {
        transform:
            translate3d(6%, 25px, 0)
            rotate(3deg)
            scaleY(1);
    }

    50% {
        transform:
            translate3d(-2%, -30px, 0)
            rotate(-3deg)
            scaleY(1.3);
    }

    100% {
        transform:
            translate3d(-7%, 20px, 0)
            rotate(1deg)
            scaleY(0.85);
    }
}


@keyframes particle-float {

    0% {
        transform:
            translate3d(0, 100px, 0)
            scale(0.65);

        opacity: 0;
    }

    12% {
        opacity: 0.55;
    }

    35% {
        transform:
            translate3d(18px, -160px, 0)
            scale(0.9);

        opacity: 0.75;
    }

    60% {
        transform:
            translate3d(-12px, -340px, 0)
            scale(1);

        opacity: 0.85;
    }

    85% {
        transform:
            translate3d(22px, -520px, 0)
            scale(0.8);

        opacity: 0.45;
    }

    100% {
        transform:
            translate3d(-10px, -700px, 0)
            scale(0.55);

        opacity: 0;
    }
}


/* -------------------------------------------------
   MAIN LAYOUT
------------------------------------------------- */

.container {
    width: min(1180px, calc(100% - 48px));

    margin: 0 auto;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 90px 0 35px;

    position: relative;

    z-index: 1;
}


/* -------------------------------------------------
   HEADER
------------------------------------------------- */

.hero {
    margin-bottom: 70px;
}

.brand {
    display: flex;
    align-items: center;

    gap: 18px;
}

.brand-logo {
    width: 64px;
    height: 64px;

    object-fit: cover;

    border-radius: 50%;

    flex-shrink: 0;

    border: 1px solid rgba(255, 255, 255, 0.12);

    animation:
        logo-breathe 9s
        ease-in-out
        infinite;
}


/* Slow glow around the Crescet logo */

@keyframes logo-breathe {

    0%,
    100% {
        box-shadow:
            0 0 18px rgba(104, 92, 255, 0.10),
            0 0 35px rgba(104, 92, 255, 0.03);
    }

    50% {
        box-shadow:
            0 0 26px rgba(104, 92, 255, 0.28),
            0 0 55px rgba(104, 92, 255, 0.12);
    }
}


.hero h1 {
    margin: 0;

    font-size: clamp(2.4rem, 5vw, 4rem);

    font-weight: 300;

    letter-spacing: 0.18em;
}

.hero p {
    margin: 18px 0 0 82px;

    color: var(--muted);

    font-size: 1rem;

    letter-spacing: 0.08em;
}


/* -------------------------------------------------
   SERVICE GRID
------------------------------------------------- */

.services {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 22px;
}


/* -------------------------------------------------
   SERVICE CARDS
------------------------------------------------- */

.service-card {
    position: relative;

    min-height: 390px;

    padding: 30px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: var(--surface);

    backdrop-filter: blur(12px);

    color: inherit;

    text-decoration: none;

    display: flex;
    flex-direction: column;

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.service-card:hover {
    transform: translateY(-7px);

    background: var(--surface-hover);
}


/* -------------------------------------------------
   SERVICE-SPECIFIC HOVER EFFECTS
------------------------------------------------- */

.books:hover {
    border-color: rgba(231, 185, 107, 0.28);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.30),
        0 0 35px rgba(231, 185, 107, 0.06);
}

.video:hover {
    border-color: rgba(170, 140, 255, 0.30);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.30),
        0 0 35px rgba(170, 140, 255, 0.07);
}

.games:hover {
    border-color: rgba(112, 213, 186, 0.28);

    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.30),
        0 0 35px rgba(112, 213, 186, 0.06);
}


/* -------------------------------------------------
   CARD HEADER
------------------------------------------------- */

.card-top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;
}

.service-icon {
    width: 64px;
    height: 64px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.055);

    border: 1px solid rgba(255, 255, 255, 0.08);

    transition:
        transform 220ms ease,
        background 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.service-icon img {
    display: block;

    width: 44px;
    height: 44px;

    object-fit: contain;

    transition:
        transform 220ms ease,
        filter 220ms ease;
}


/* Icon movement on card hover */

.service-card:hover .service-icon {
    transform:
        translateY(-2px)
        scale(1.05);

    border-color: rgba(255, 255, 255, 0.14);
}

.service-card:hover .service-icon img {
    transform: scale(1.06);

    filter: brightness(1.12);
}


.arrow {
    color: var(--subtle);

    font-size: 23px;

    transition:
        color 180ms ease,
        transform 180ms ease;
}

.service-card:hover .arrow {
    color: white;

    transform: translate(2px, -2px);
}


/* -------------------------------------------------
   SERVICE-SPECIFIC ICON BACKGROUNDS
------------------------------------------------- */

.books .service-icon {
    background: rgba(231, 185, 107, 0.08);
}

.video .service-icon {
    background: rgba(170, 140, 255, 0.08);
}

.games .service-icon {
    background: rgba(112, 213, 186, 0.08);
}


/* Additional icon glow while hovering */

.books:hover .service-icon {
    background: rgba(231, 185, 107, 0.12);

    box-shadow:
        0 0 24px rgba(231, 185, 107, 0.08);
}

.video:hover .service-icon {
    background: rgba(170, 140, 255, 0.12);

    box-shadow:
        0 0 24px rgba(170, 140, 255, 0.09);
}

.games:hover .service-icon {
    background: rgba(112, 213, 186, 0.12);

    box-shadow:
        0 0 24px rgba(112, 213, 186, 0.08);
}


/* -------------------------------------------------
   CARD CONTENT
------------------------------------------------- */

.card-content {
    margin-top: 52px;
}

.service-type {
    color: var(--muted);

    font-size: 0.68rem;

    font-weight: 600;

    letter-spacing: 0.18em;
}

.card-content h2 {
    margin: 9px 0 12px;

    font-size: 2rem;

    font-weight: 500;

    letter-spacing: -0.02em;
}

.card-content p {
    margin: 0;

    max-width: 280px;

    color: var(--muted);

    line-height: 1.65;

    font-size: 0.92rem;
}


/* -------------------------------------------------
   CARD FOOTER
------------------------------------------------- */

.card-footer {
    margin-top: auto;

    padding-top: 25px;

    border-top: 1px solid rgba(255, 255, 255, 0.06);

    display: flex;
    justify-content: space-between;

    gap: 20px;

    color: var(--subtle);

    font-size: 0.76rem;

    transition: color 180ms ease;
}

.service-card:hover .card-footer {
    color: #aeb5c0;
}


/* -------------------------------------------------
   SITE FOOTER
------------------------------------------------- */

footer {
    margin-top: auto;

    padding-top: 70px;
}

.footer-line {
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.08),
            transparent
        );
}

footer p {
    margin: 22px 0 0;

    text-align: center;

    color: #484f5b;

    font-size: 0.65rem;

    letter-spacing: 0.25em;
}


/* -------------------------------------------------
   TABLET / SMALL DESKTOP
------------------------------------------------- */

@media (max-width: 850px) {

    .container {
        padding-top: 55px;
    }

    .hero {
        margin-bottom: 45px;
    }

    .services {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: 290px;
    }

    .card-content {
        margin-top: 35px;
    }
}


/* -------------------------------------------------
   MOBILE
------------------------------------------------- */

@media (max-width: 500px) {

    .container {
        width: min(100% - 30px, 1180px);
    }

    .brand {
        gap: 14px;
    }

    .brand-logo {
        width: 52px;
        height: 52px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        margin-left: 66px;

        font-size: 0.85rem;
    }

    .service-card {
        padding: 25px;
    }

    .service-icon {
        width: 58px;
        height: 58px;
    }

    .service-icon img {
        width: 40px;
        height: 40px;
    }
}


/* -------------------------------------------------
   ACCESSIBILITY
------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .background-glow,
    body::before,
    body::after,
    .particle,
    .brand-logo {
        animation: none;
    }
}
