/**
  FONTS
*/

@font-face {
    font-family: 'Thug';
    src: url(../fonts/THUG____.TTF);
}

:root {
    --main-bg: rgb(60, 6, 6);
    --main-txt: rgb(244, 228, 228);
    --main-font: "Chakra Petch", serif;
}

* {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: var(--main-font);
    background-color: var(--main-bg);
    color: var(--main-txt);
    height: 100%;
    overflow: hidden;
}

body {
    position: relative;
    background-color: #00000083;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    padding: 1rem;
    cursor: url('../img/arrow.png'), auto;
    user-select: none;
}

h1 {
    display: inline-block;
    font-size: clamp(1.5rem, 12vw, 20vw);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    max-width: 100vw;
    color: rgba(244, 228, 228, 0.944);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.1), 
        0 -1px 2px rgba(255, 255, 255, 0.1);
}

h1::before, 
h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    clip-path: none;
    animation: none;
    z-index: -1;
}

span {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease, background-size 0.3s ease, text-shadow 0.3s ease;
    -webkit-transition: transform 0.3s ease, color 0.3s ease, background-size 0.3s ease, text-shadow 0.3s ease; /* Add -webkit- prefix for Safari */
    transform-origin: center;
}


h1 span:hover, 
p.shadow span:hover {
    background-size: 120%;
    transform: scale(1.1);
    color: rgb(174, 40, 40);
    text-shadow: 3px 3px 20px rgb(26, 24, 24);
    -webkit-transform: scale(1.1);
}

#main-text {
    font-size: clamp(1rem, 3.8vw, 1.5rem);
    letter-spacing: 2px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.shadow {
    display: inline-block;
    color: #fff;
    text-shadow: 0 0 5px rgb(60, 6, 6), 0 0 10px rgb(60, 6, 6), 0 0 15px rgb(60, 6, 6), 0 0 20px rgba(60, 6, 6, 0.7);
    transition: transform 0.3s ease, color 0.3s ease;
    opacity: 0;
    animation: disturbed-appearance 2s ease-out forwards;
}

.inverted {
    text-transform: lowercase;
}

/**
 MOUSE EFFECT
*/
.scratch {
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: black;
    transform: rotate(-15deg);
    pointer-events: none;
    opacity: 1;
    animation: fadeScratch 0.5s ease-out forwards;
    z-index: 30003;
}

/** 
 STATUS POPUPS
*/
#warning {
    background-color: rgb(145, 69, 69);
    font-size: 1rem;
    padding: .35rem;
    margin-top: .5rem;
    margin-right: 1rem;
    border-radius: 5px;
}

#success {
    background-color: rgb(69, 145, 129);
    color: var(--main-txt);
    font-size: 1rem;
    padding: .35rem;
    margin-top: 2rem;
    margin-right: 1rem;
    border-radius: 5px;
}

/** 
 MODAL WINDOW
*/
.modal {
    display: none;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.7);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    z-index: 30001;
}

.modal-content {
    display: none;
    position: relative;
    background-image: url(../img/modal-bg.png);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--main-txt);
    margin: 10% auto;
    padding: 5rem 1rem;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 3rem;
    background-color: transparent;
    color: rgba(60, 6, 6, 0.795);
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 10px var(--main-txt);
    padding: .1rem .1rem;
    border-radius: 50%;
    cursor: url('../img/grabber.png') 32 32, pointer;
}

.close:hover,
.close:focus {
    transform: scale(2);
}

/**
  LABELS INPUTS AND BUTTONS
*/
label {
    padding-right: .35rem;
    font-size: .75rem;
    letter-spacing: 2px;
}

input {
    width: 25vw;
    border-radius: 4px;
    border: none;
    padding: .4rem;
}

input:focus {
    outline: none;
    border: 2px inset var(--main-bg);
}

button#help {
    border-radius: 50%;
    background-color: transparent;
    color: var(--main-font);
    font-size: 1rem;
    padding: .25rem .5rem;
    margin-left: .35rem;
    border: 1px inset var(--main-txt);
    cursor: url('../img/grabber.png') 32 32, pointer;
}

#help:hover {
    transform: scale(1.3);
}

#key,
#email,
.par-email {
    text-align: center;
    letter-spacing: 2px;
}

#key {
    max-width: 30vw;
}

#email {
    background-color: #fff;
    color: #000;
    font-size: .9rem;
    font-weight: 800;
    cursor: url("../img/not-allowed.png"), not-allowed;
}

/** 
 MAIN ELEMENTS
*/
header,
div#form {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 7.5vh;
}

div#form,
footer {
    padding-top: 2vh;
}

div#form {
    display: flex;
    align-items: center;
    justify-content: center;
}

#quote {
    position: absolute;
    font-family: 'Thug', serif;
    font-size: clamp(.5rem ,1.2rem, 1.8rem);
    font-weight: 800;
    color: var(--main-txt);
    letter-spacing: 3px;
    text-shadow: 
        1px 1px 0 rgba(33, 5, 5, 0.762),
        -2px -2px 3px rgba(227, 221, 221, 0.8);
    background-image: url(../img/stain.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 2.5rem;
    margin-top: 2rem;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.9s ease-out, opacity 0.9s ease-out;
    z-index: 30002;
}
    
#quote.show {
    opacity: 1;
    transform: scale(1);
}


main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 90vw;
    height: 80vh;
    background-image: url(../img/bg-alt.webp);
    background-position: center;
    background-size: 300% 300%;
    background-repeat: no-repeat;
    padding: 1rem;
    transition: background-position 0.2s ease-out;
    transform-origin: center;
    overflow: visible;
    z-index: 1;
}

main::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/noise-texture.webp');
    background-position: center;
    background-size: cover;
    background-blend-mode: multiply;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 13vh;
}

p#copy {
    width: 100%;
    font-size: .75rem;
    letter-spacing: 2px;
    margin-top: .75rem;
}

/***
   MEDIA QUERIES FOR TABLETS AND LARGER SCREENS 
*/

/* Media Query for Tablets and small laptops */
@media (min-width: 600px) {
    label {
        padding-right: 1rem;
        font-size: .75rem;
    }
    
    input {
        margin-right: 1rem;
        width: auto;
    }
    #main-text {
        margin-top: 1rem;
        margin-top: -.85rem;
    }
    #quote {
        margin-top: 0;
    }
    p#copy {
        width: 100%;
        font-size: .75rem;
        letter-spacing: 4px;
        margin-top: .75rem;
    }
    footer {
        min-height: 4vh;
        max-height: 12vh;
    }
}

/* Media Query for Desktops */
@media (min-width: 1024px) {
    label {
        padding-right: 1rem;
        font-size: .75rem;
    }
    input {
        margin-right: 1rem;
        width: auto;
    }
    #main-text {
        margin-top: 1rem;
        margin-top: -.85rem;
    }
    #quote {
        margin-top: 0;
    }
    p#copy {
        width: 100%;
        font-size: .75rem;
        letter-spacing: 4px;
        margin-top: .75rem;
    }
    header,
    footer {
        min-height: 7.5vh;
        max-height: 15vh;
    }
}


/**
  KEYFRAMES ANIMATIONS
*/

@keyframes quotePunch {
    0% {
        transform: scale(0) translateY(20px);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1) translateY(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeScratch {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes disturbed-appearance {
    0% {
        opacity: 0.7;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}