@import url('https://fonts.googleapis.com/css2?family=Jost:wght@500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oleo+Script:wght@400;700&display=swap');

/* Assigning colors to variables */

:root{
    --safron: #ff9933;
    --white: #fff;
    --green: #02590f;
    --chakra-color: #000080;
    --bgcol1: #FF991F;
    --bgcol2: #0052CC;
}

/* Universal Selector */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
  font-size: 18px;
}

/* Wrapper */

.wrapper{
    width: 100%;
    height: 100dvh;
    background-image: linear-gradient(135deg, var(--bgcol1), var(--bgcol2));
    display: flex;
    justify-content: center;
    align-items: center;
    
}

/* Layout */

.layout{
  text-align: center;
}

/* heading */

.heading{
    font-family: 'Oleo Script', system-ui;
    font-size: 2.3em;
}

/* Main cointainer box of flag */

.container{
    width: 32rem;
    height: 19rem;
    border-radius: 1.8rem;
    overflow: hidden;
    box-shadow: 5px 5px 8px rgba(0, 0, 0, 0.4);
    margin: 2rem 0;
}

/* Setting up three colors */

.safron{
    width: 100%;
    height: 33.33%;
    background-color: var(--safron);
}
.green{
    width: 100%;
    height: 33.33%;
    background-color: var(--green);
}
.white{
    width: 100%;
    height: 33.33%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Creating style or layout for spoke wheels*/

.chakra{
    width: 5.3rem;
    height: 5.3rem;
    border-radius: 50%;
    border: 0.2rem solid var(--chakra-color);
    position: relative;
    overflow: hidden;
    transition: transform 1s ease-out;
    animation: rotate-chakra 5s infinite linear;
}
.chakra .spokes{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 5rem;
    height: 0.2rem;
    background-color: var(--chakra-color);
}
.spokes:nth-child(1){
    transform: rotate(0deg);
}
.spokes:nth-child(2){
    transform: rotate(15deg);
}
.spokes:nth-child(3){
    transform: rotate(30deg);
}
.spokes:nth-child(4){
    transform: rotate(45deg);
}
.spokes:nth-child(5){
    transform: rotate(60deg);
}
.spokes:nth-child(6){
    transform: rotate(75deg);
}
.spokes:nth-child(7){
    transform: rotate(90deg);
}
.spokes:nth-child(8){
    transform: rotate(105deg);
}
.spokes:nth-child(9){
    transform: rotate(120deg);
}
.spokes:nth-child(10){
    transform: rotate(135deg);
} 
.spokes:nth-child(11){
    transform: rotate(150deg);
}
.spokes:nth-child(12){
    transform: rotate(165deg);
}

/* Animating Rotation for Ashok Chakra */

@keyframes rotate-chakra{
    from{
        transform: rotate(0deg);
    }
    to{
        transform: rotate(360deg);
    }
}
.container:hover .chakra{
    animation-play-state: paused;
}

/* Coloring INDIA */

.btn{
    font-family: 'Jost', sans-serif;
    font-size: 3.5em;
    font-weight: 600;
    outline: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
}
.btn span:nth-child(1){
    color: var(--safron);
}
.btn span:nth-child(2){
    color: var(--white) ;
}
.btn span:nth-child(3){
    color: var(--green) ;
}



/* Creating Responsivness */

@media screen and (max-width: 600px)
{
    html{
      font-size: 10px;
    }
    .container{
        margin: 5rem 0;
        height: 22rem;
    }
    .heading{
        font-size: 2.6em;
    }
    .btn{
        font-size: 5.5em;
    }
}
