/* =========================================
   GLOBAL
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #080808;
    --dark: #101010;
    --dark-gray: #191919;
    --cream: #e8dfd0;
    --white: #f4f0e9;
    --muted: #8a8882;
    --border: #41413e;
    --red: #8e1d20;
    --bright-red: #a9282b;
    --paper: #d7c7a9;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: "Cairo", sans-serif;
    overflow-x: hidden;
}

button,
a {
    font-family: inherit;
}

button {
    cursor: pointer;
}


/* =========================================
   FILM GRAIN
========================================= */

.film-grain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.07;

    background-image:
        url("https://grainy-gradients.vercel.app/noise.svg");

    mix-blend-mode: screen;
}


/* =========================================
   HEADER
========================================= */

.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;

    height: 75px;

    padding: 0 6vw;

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 100;

    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.8),
        transparent
    );
}

.logo {
    color: var(--bright-red);
    font-family: "Noto Kufi Arabic", sans-serif;
    font-size: 18px;
    font-weight: 800;

    text-shadow: 0 0 20px rgba(169,40,43,.2);
}

.header nav {
    display: flex;
    gap: 35px;
}

.header nav a {
    color: #b5b1aa;
    text-decoration: none;
    font-size: 13px;
    transition: .3s;
}

.header nav a:hover {
    color: var(--white);
}


/* =========================================
   HERO
========================================= */

.hero {
    position: relative;

    min-height: 100vh;

    overflow: hidden;

    display: flex;
    align-items: center;

    background:
        radial-gradient(
            circle at 65% 50%,
            rgba(80,20,20,.15),
            transparent 40%
        ),
        var(--black);
}


/* city */

.city-background {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            to bottom,
            rgba(0,0,0,.25),
            rgba(0,0,0,.85)
        ),
        url("https://images.unsplash.com/photo-1449824913935-59a10b8d2000?auto=format&fit=crop&w=1800&q=80");

    background-size: cover;
    background-position: center;

    opacity: .28;

    filter: grayscale(1) contrast(1.3);
}


/* red circle */

.red-circle {
    position: absolute;

    width: 450px;
    height: 450px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(132,25,28,.85),
            rgba(65,10,12,.35) 65%,
            transparent 70%
        );

    right: 28%;
    top: 15%;

    transform: rotate(-12deg);

    opacity: .75;
}


/* character */

.character {
    position: absolute;

    right: 23%;
    bottom: 0;

    width: 330px;
    height: 650px;

    z-index: 3;

    filter:
        grayscale(1)
        contrast(1.5)
        drop-shadow(0 0 35px rgba(0,0,0,.9));
}

.character-head {
    position: absolute;

    top: 65px;
    right: 75px;

    width: 145px;
    height: 190px;

    background:
        radial-gradient(
            ellipse at 50% 40%,
            #333,
            #090909 70%
        );

    border-radius: 48% 48% 42% 42%;
}

.character-head::before {
    content: "";

    position: absolute;

    width: 155px;
    height: 65px;

    top: -15px;
    right: -5px;

    background: #070707;

    border-radius: 60% 60% 20% 20%;
}


.character-body {
    position: absolute;

    bottom: -50px;
    left: 10px;

    width: 310px;
    height: 500px;

    background:
        linear-gradient(
            110deg,
            #060606,
            #242424,
            #070707
        );

    clip-path: polygon(
        35% 0,
        65% 0,
        90% 25%,
        100% 100%,
        0 100%,
        10% 25%
    );
}


/* vintage car */

.vintage-car {
    position: absolute;

    bottom: 50px;
    right: 8%;

    font-size: 100px;

    filter: grayscale(1) brightness(.25);

    opacity: .7;
}


/* hero content */

.hero-content {
    position: relative;

    z-index: 10;

    width: 48%;

    margin-right: 8vw;

    text-align: right;
}

.small-note {
    color: var(--muted);

    font-size: 13px;

    margin-bottom: 20px;
}

.hero h1 {
    font-family: "Noto Kufi Arabic", sans-serif;

    font-size: clamp(38px, 5vw, 72px);

    line-height: 1.25;

    font-weight: 800;

    letter-spacing: -2px;

    max-width: 700px;
}

.hero h1 span {
    color: var(--bright-red);

    display: block;

    text-shadow:
        0 0 30px rgba(142,29,32,.15);
}

.hero-content p {
    margin-top: 25px;

    color: #aaa59d;

    font-size: 16px;

    line-height: 2;
}


/* button */

.primary-btn {
    margin-top: 30px;

    border: none;

    background: var(--bright-red);

    color: white;

    padding: 15px 30px;

    font-size: 15px;

    transition: .3s;

    box-shadow:
        0 10px 30px rgba(100,10,15,.2);
}

.primary-btn:hover {
    background: #c03538;

    transform: translateY(-3px);
}

.primary-btn span {
    margin-right: 10px;
}


/* paper */

.paper-note {
    position: absolute;

    background: var(--paper);

    color: #27231d;

    padding: 18px 25px;

    font-family: "Noto Kufi Arabic", sans-serif;

    box-shadow: 0 15px 30px rgba(0,0,0,.4);

    transform: rotate(-7deg);

    z-index: 15;
}

.hero-note {
    left: 5%;
    bottom: 15%;

    display: flex;
    flex-direction: column;

    font-size: 15px;
}


/* arrow */

.scroll-indicator {
    position: absolute;

    bottom: 25px;
    left: 50%;

    transform: translateX(-50%);

    color: #888;

    font-size: 30px;

    animation: bounce 1.8s infinite;
}

@keyframes bounce {
    0%,100% {
        transform: translate(-50%,0);
    }

    50% {
        transform: translate(-50%,8px);
    }
}


/* =========================================
   QUIZ
========================================= */

.quiz-section {
    min-height: 100vh;

    padding: 100px 7vw 50px;

    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(90,15,18,.08),
            transparent 30%
        ),
        #090909;
}


/* quiz top */

.quiz-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 50px;
}

.quiz-mini-logo {
    color: var(--bright-red);

    font-size: 17px;

    font-weight: 800;
}

.progress-wrapper {
    width: 55%;
}

.progress-text {
    text-align: left;

    direction: ltr;

    font-size: 12px;

    color: #aaa;
    
    margin-bottom: 10px;
}

.progress-bar {
    height: 3px;

    background: #2e2e2e;

    width: 100%;

    overflow: hidden;
}

.progress-fill {
    width: 14.28%;

    height: 100%;

    background: var(--bright-red);

    transition: width .5s ease;
}


/* container */

.quiz-container {
    min-height: 75vh;

    display: grid;

    grid-template-columns: 45% 55%;

    align-items: center;

    gap: 5vw;
}


/* =========================================
   VISUAL SIDE
========================================= */

.visual-side {
    position: relative;

    min-height: 550px;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* photo */

.photo-wrapper {
    position: relative;

    width: 390px;

    transform: rotate(-5deg);

    filter: drop-shadow(
        0 25px 35px rgba(0,0,0,.65)
    );
}

.photo {
    padding: 17px;

    background: #ded1bb;

    position: relative;
}

.photo img {
    width: 100%;

    height: 430px;

    object-fit: cover;

    display: block;

    filter:
        grayscale(1)
        contrast(1.2)
        brightness(.8);
}


/* tape */

.tape {
    position: absolute;

    z-index: 5;

    width: 120px;

    height: 30px;

    background:
        rgba(210,190,150,.75);

    opacity: .85;
}

.tape-one {
    top: -12px;

    left: 35px;

    transform: rotate(-8deg);
}

.tape-two {
    bottom: -10px;

    right: 30px;

    transform: rotate(6deg);
}


/* scribbles */

.red-scribble {
    position: absolute;

    color: var(--bright-red);

    font-size: 70px;

    font-weight: 900;

    z-index: 10;

    transform: rotate(-15deg);
}

.scribble-one {
    right: 20px;

    top: 90px;
}

.scribble-two {
    left: 40px;

    bottom: 80px;

    font-size: 90px;
}


/* note */

.image-note {
    bottom: 40px;

    left: 5%;

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================
   QUESTION SIDE
========================================= */

.question-side {
    padding: 20px;

    max-width: 650px;
}

.question-label {
    color: var(--bright-red);

    font-size: 13px;

    margin-bottom: 20px;
}

.question-side h2 {
    font-family: "Noto Kufi Arabic", sans-serif;

    font-size: clamp(28px, 3vw, 46px);

    line-height: 1.6;

    margin-bottom: 35px;
}


/* answers */

.answers {
    display: flex;

    flex-direction: column;

    gap: 13px;
}

.answer {
    position: relative;

    width: 100%;

    min-height: 58px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 15px 20px;

    background: transparent;

    border: 1px solid var(--border);

    color: #c7c3bc;

    text-align: right;

    font-size: 14px;

    transition:
        border .25s,
        background .25s,
        transform .25s;
}

.answer:hover {
    border-color: #777;

    background: rgba(255,255,255,.025);

    transform: translateX(-5px);
}

.answer.selected {
    border-color: var(--bright-red);

    color: white;

    background:
        rgba(130,20,23,.12);

    box-shadow:
        inset -3px 0 0 var(--bright-red);
}

.answer-circle {
    width: 15px;

    height: 15px;

    border: 1px solid #777;

    border-radius: 50%;

    flex-shrink: 0;

    margin-right: 15px;

    transition: .3s;
}

.answer.selected .answer-circle {
    border-color: var(--bright-red);

    background: var(--bright-red);

    box-shadow:
        0 0 12px rgba(169,40,43,.6);
}


/* navigation */

.quiz-navigation {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 35px;
}

.back-btn,
.next-btn {
    border: none;

    background: transparent;

    color: #777;

    font-size: 13px;

    padding: 12px;

    transition: .3s;
}

.back-btn:hover {
    color: white;
}

.next-btn {
    background: var(--bright-red);

    color: white;

    min-width: 120px;
}

.next-btn:hover:not(:disabled) {
    background: #bd3437;
}

.next-btn:disabled {
    opacity: .3;

    cursor: not-allowed;
}


/* =========================================
   RESULT
========================================= */

.result-section {
    position: relative;

    min-height: 100vh;

    overflow: hidden;

    display: flex;

    align-items: center;

    padding: 100px 10vw;

    background: #080808;

    display: none;
}

.result-section.active {
    display: flex;

    animation: resultReveal .8s ease;
}

@keyframes resultReveal {
    from {
        opacity: 0;
        transform: scale(.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* result background */

.result-city {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to right,
            rgba(0,0,0,.95),
            rgba(0,0,0,.45),
            rgba(0,0,0,.85)
        ),
        url("https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1800&q=80");

    background-size: cover;

    background-position: center;

    filter: grayscale(1);

    opacity: .3;
}

.result-red-circle {
    position: absolute;

    width: 600px;
    height: 600px;

    border-radius: 50%;

    background:
        rgba(120,20,25,.45);

    right: 15%;

    top: 15%;

    filter: blur(5px);
}


/* result character */

.result-character {
    position: absolute;

    right: 20%;

    bottom: 0;

    width: 350px;

    height: 650px;

    filter: grayscale(1);

    opacity: .9;
}


/* result text */

.result-content {
    position: relative;

    z-index: 5;

    max-width: 650px;
}

.result-label {
    color: var(--paper);

    font-family: "Noto Kufi Arabic";

    font-size: 20px;

    margin-bottom: 20px;
}

.result-content h2 {
    font-family: "Noto Kufi Arabic";

    font-size: clamp(35px,5vw,65px);

    line-height: 1.5;
}

.result-content h2 span {
    display: block;

    color: var(--bright-red);
}

.result-content p {
    margin-top: 25px;

    color: #aaa;

    line-height: 2;

    font-size: 16px;
}

.result-tags {
    display: flex;

    gap: 10px;

    margin-top: 25px;
}

.result-tags span {
    border: 1px solid #444;

    padding: 8px 18px;

    color: #aaa;

    font-size: 12px;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 900px) {

    .header {
        padding: 0 5vw;
    }

    .header nav {
        gap: 15px;
    }

    .hero {
        padding: 120px 7vw 80px;

        align-items: flex-start;
    }

    .hero-content {
        width: 100%;

        margin: 0;

        z-index: 10;
    }

    .hero h1 {
        font-size: 38px;
    }

    .character {
        right: -50px;

        opacity: .35;

        transform: scale(.8);

        transform-origin: bottom;
    }

    .red-circle {
        right: -100px;

        top: 25%;

        width: 350px;

        height: 350px;
    }

    .hero-note {
        left: 5%;

        bottom: 8%;
    }


    /* quiz */

    .quiz-section {
        padding: 100px 5vw 50px;
    }

    .quiz-container {
        display: flex;

        flex-direction: column;

        gap: 40px;
    }

    .visual-side {
        width: 100%;

        min-height: 380px;
    }

    .photo-wrapper {
        width: min(80vw, 330px);
    }

    .photo img {
        height: 350px;
    }

    .question-side {
        width: 100%;

        padding: 0;
    }

    .question-side h2 {
        font-size: 28px;
    }

    .progress-wrapper {
        width: 50%;
    }


    /* result */

    .result-section {
        padding: 100px 7vw;
    }

    .result-character {
        right: -70px;

        opacity: .3;
    }

    .result-content {
        max-width: 100%;
    }

    .result-content h2 {
        font-size: 38px;
    }
}


@media (max-width: 500px) {

    .header {
        height: 60px;
    }

    .logo {
        font-size: 14px;
    }

    .header nav a {
        font-size: 11px;
    }

    .hero h1 {
        font-size: 32px;

        letter-spacing: -1px;
    }

    .hero-content p {
        font-size: 13px;
    }

    .hero-note {
        display: none;
    }

    .quiz-top {
        margin-bottom: 30px;
    }

    .quiz-mini-logo {
        font-size: 13px;
    }

    .photo-wrapper {
        width: 280px;
    }

    .photo img {
        height: 300px;
    }

    .visual-side {
        min-height: 350px;
    }

    .question-side h2 {
        font-size: 24px;
    }

    .answer {
        font-size: 13px;
    }

    .quiz-navigation {
        margin-top: 25px;
    }
}