:root{
    --bs-primary: #e5303b;
    --bs-primary-rgb: 229, 48, 59;
    --bs-primary-hover: #b6112d;
    --bs-primary-hover-rgb: 182, 17, 45;
    --bs-body-bg: #edeff1;
    --bs-body-color: #383e4d;
}

html, body {
    height: 100%;
}

body{
    background: rgb(255,255,255);
    background: linear-gradient(0deg, rgba(23, 25, 28, 1) 0%, rgba(23, 25, 28, 1) 60%, rgb(167 217 225) 60%, rgb(249 246 233) 100%);
}

#wrapper{
    padding-bottom: 64px; 
}

.container-xl{
    min-height: 100%;
}

/* Typo */

h1{
    text-transform: uppercase;
    color: #4c576b;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.4;  
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
}

h1:before{
    content:'';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--bs-primary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.lead{
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bs-body-color);
    line-height: 1.3;
}

/* Button */

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--bs-primary-hover);
    --bs-btn-hover-border-color: var(--bs-primary-hover);;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--bs-primary-hover);
    --bs-btn-active-border-color: var(--bs-primary-hover);
    --bs-btn-active-shadow: none;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
}

/* Card */

.card{
    --bs-card-bg: #fff;
    --bs-card-border-width: 0;
    --bs-card-spacer-y: 2.5rem;
    --bs-card-spacer-x: 2rem;
    --bs-card-border-radius: 1.5rem;
    margin-top: calc(var(--bs-gutter-x) * 0.5);
    margin-bottom: calc(var(--bs-gutter-x) * 0.5); 
}

@media (min-width: 576px) {
    .card{
        --bs-card-spacer-y: 3rem;
        --bs-card-spacer-x: 3rem;   
    }
    
}

/* Utilities */

.bottom-fixed{
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
}

/* Content */

#button,
#share-button-wrapper{
    width: calc( 100% - (var(--bs-gutter-x)) );
}

#countdown-wrapper{
    height: 60px;
}

@media (min-width: 576px) {
    #button,
    #share-button-wrapper{
        width: auto;
    } 
    .picture-wrapper{
        max-width: 400px;
    }  
}

/* Countdown Animation */

.countdown-wrapper {
    --size: 84px;
    --sizeBig: 300px;
    --pad: 4px;
    --numSize: 50px;
}

.countdown-wrapper {
    min-height: 200px;
    min-height: var(--size);
}

#countdown {
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--sizeBig);
    height: var(--size);
    margin-top: calc(var(--size) / -2 );
    padding: var(--pad);
    transform: translateX(-50%);
}

.countdown-colored-blocks {
    overflow: hidden;
    position: absolute;
    left: 50%;
    top: 0;
    width: var(--sizeBig);
    height: 100%;
    margin-left: calc(var(--sizeBig) / -2 );
    padding: var(--pad);
    perspective: 1000px;
}

.countdown-start .countdown-colored-blocks{
    animation: countdownAnim 4s ease-in-out infinite, contAnim 4s infinite;
    animation-delay: -1s;
}

.countdown-colored-blocks-rotater {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.countdown-start .countdown-colored-blocks-rotater{
    animation: rotation 1.3s linear infinite;
    animation-delay: -1s;
}

.countdown-colored-blocks-inner {
    overflow: hidden;
    position: relative;
    height: 100%;
    background: #fff;
    border-radius: inherit;
}

.countdown-colored-block {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300%;
    height: 300%;
    transform-origin: 0 0;
}

.countdown-colored-block:nth-child(1) {
    transform: rotate(0deg) skewX(-30deg);
    background-color: var(--bs-primary);
}

.countdown-colored-block:nth-child(2) {
    transform: rotate(120deg) skewX(-30deg);
    background-color: #3e4147;
}

.countdown-colored-block:nth-child(3) {
    transform: rotate(240deg) skewX(-30deg);
    background-color: #66cce1;
}

.countdown-inner {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}

.countdown-numbers {
    overflow: visible;
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--numSize);
    height: var(--numSize);
    margin-left: calc(var(--numSize) / -2 );
    margin-top: calc(var(--numSize) / -2 );
}

.countdown-numbers-path {
    fill: none;
    stroke-width: 8px;
    stroke: #3e4147;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 0, 518.055065155;
    stroke-dashoffset: 0;
    opacity: 0;
}

.countdown-start .countdown-numbers-path{
    animation: numAnim 4s ease-in-out infinite; 
    animation-delay: -1s;
}

.countdown-text {
    position: absolute;
    left: 50%;
    top: 0;
    width: var(--sizeBig);
    height: 100%;
    margin-left: calc(var(--sizeBig) / -2 );
    text-align: center;
    line-height: var(--size);
    font-size: 2rem;
    font-weight: bold;
    color: #3e4147;
    text-transform: uppercase;
    letter-spacing: 15px;
    transform: translateX(10px);
}

.countdown-start .countdown-text{
    animation: hideText 4s infinite;
    animation-delay: -1s;
}

@keyframes contAnim {
    15%, 100% {
        margin-left: calc(var(--sizeBig) / -2 );
        width: var(--sizeBig);
   }
    25%, 90% {
        margin-left: calc(var(--size) / -2 );
        width: var(--size);
   }
}

@keyframes numAnim {
    15% {
        stroke-dasharray: 0, 518.055065155;
        stroke-dashoffset: 0;
        opacity: 0;
   }
    25%, 41% {
        opacity: 1;
        stroke-dasharray: 144.4256591797, 518.055065155;
        stroke-dashoffset: -40;
   }
    53%, 66% {
        stroke-dasharray: 136.0216217041, 518.055065155;
        stroke-dashoffset: -227.238697052;
   }
    76% {
        stroke-dasharray: 113.4751205444, 518.055065155;
        stroke-dashoffset: -445.8995704651;
   }
    88%, 100% {
        stroke-dasharray: 72.1554946899, 518.055065155;
        stroke-dashoffset: -445.8995704651;
   }
    92% {
        opacity: 1;
   }
    100% {
        opacity: 0;
   }
}

@keyframes rotation {
    to {
        transform: rotate(360deg);
   }
}

@keyframes countdownAnim {
    15% {
        border-radius: 0px;
        transform: rotate(0);
   }
    30%, 43% {
        border-radius: 50%;
        transform: rotate(360deg);
   }
    52%, 65% {
        border-radius: 0;
        transform: rotate(720deg);
   }
    78%, 90% {
        border-radius: 50%;
        transform: rotate(1080deg);
   }
    100% {
        border-radius: 0px;
        transform: rotate(1440deg);
   }
}

@keyframes hideText {
    15%, 100% {
        opacity: 1;
   }
    20%, 96% {
        opacity: 0;
   }
}
