/* Launch Animation CSS - Chief Minister Inauguration */

/* CSS Variables */
:root {
    --accent: hsl(360, 80%, 50%);
    --accent-dark: hsl(360, 80%, 38%);
    --accent-light: hsl(360, 80%, 70%);
    --accent-darker: hsl(360, 80%, 30%);
}

/* Body state management - Prevents flash on page load */
body.launch-completed .launch-overlay {
    display: none !important;
}

body.launch-active .launch-overlay {
    display: block;
}

/* By default, hide launch overlay until JavaScript determines the state */
body:not(.launch-active):not(.launch-completed) .launch-overlay {
    display: none;
}

/* Launch Overlay - Full screen covering all content */
.launch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Ribbon Curtain Animation */
.rnOuter {
    background: var(--accent-dark);
    overflow: hidden;
    position: relative;
    height: 100vh;
    width: 100%;
    transition: background-color 8s ease;
}

.rnOuter.curtain-opening {
    background: transparent;
}

.rnInner {
    width: 60vw;
    position: absolute;
    top: -10%;
    bottom: 0;
    margin: auto;
    transform-style: preserve-3d;
}

.rnInner-left {
    right: 48%;
    transform-origin: right center;
}

.rnInner-right {
    left: 48%;
    transform-origin: left center;
}

.rnUnit {
    width: 10vw;
    height: 120vh;
    background: repeating-linear-gradient(to left,
            var(--accent) 4vw,
            var(--accent-darker) 8vw,
            var(--accent-light) 10vw);
    background-size: 100% 100%;
    display: inline-block;
    transform-origin: 0 0%;
    transform: rotate(3deg);
    animation: rnUnit 1.5s ease infinite;
}

@keyframes rnUnit {
    50% {
        transform: rotate(-3deg);
    }
}

.rnUnit:nth-child(1) {
    animation-delay: -0.1s;
}

.rnUnit:nth-child(2) {
    animation-delay: -0.2s;
}

.rnUnit:nth-child(3) {
    animation-delay: -0.3s;
}

.rnUnit:nth-child(4) {
    animation-delay: -0.4s;
}

.rnUnit:nth-child(5) {
    animation-delay: -0.5s;
}

.rnUnit:nth-child(6) {
    animation-delay: -0.6s;
}

.rnUnit:nth-child(7) {
    animation-delay: -0.7s;
}

.rnUnit:nth-child(8) {
    animation-delay: -0.8s;
}

.rnUnit:nth-child(9) {
    animation-delay: -0.9s;
}

.rnUnit:nth-child(10) {
    animation-delay: -1s;
}

.rnUnit:nth-child(11) {
    animation-delay: -1.1s;
}

.rnUnit:nth-child(12) {
    animation-delay: -1.2s;
}

/* Content Table */
.aoTable {
    display: table;
    width: 100%;
    height: 100vh;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10002;
}

.aoTableCell {
    color: var(--accent-dark);
    display: table-cell;
    vertical-align: middle;
    transition: color 1.5s ease;
}

/* Curtain opening animation triggered by JavaScript */
.rnOuter.curtain-opening .rnInner-left {
    transform: translateX(-100%);
}

.rnOuter.curtain-opening .rnInner-right {
    transform: translateX(100%);
}

.rnOuter.curtain-opening .aoTableCell {
    color: white;
}

/* Launch Content Styling */
.launch-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: white;
    padding: 50px;
    background: #101010;
    border-radius: 30px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 50px;
}

.tn-logo {
    width: 100px;
    height: auto;
}

.launch-content span {
    color: #9F9F9F;
    font-size: 20px;
    font-weight: 400;
}


.cm-title {
    font-size: 70px;
    font-weight: 800;
    margin-bottom: 0px;
    color: #FFFFFF;
}

.inauguration-subtitle {
    font-size: 60px;
    margin-bottom: 6px;
    color: #4BAF47;
    font-weight: 400;
    line-height: 72px;
}

/* Launch Button */
/*.launch-btn {
    background: linear-gradient(45deg, var(--accent), var(--accent-light));
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.launch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.launch-btn:hover::before {
    left: 100%;
}

.launch-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 255, 255, 0.2);
    background: linear-gradient(45deg, var(--accent-light), var(--accent));
}

.launch-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(255, 255, 255, 0.1);
}

.launch-btn span {
    position: relative;
    z-index: 1;
}*/

/* Skip hint */
.skip-hint {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.7);
}

.skip-hint p {
    margin: 0;
    font-style: italic;
}

.lunching-date {
    padding-top: 35px;
    padding-bottom: 35px;
    font-size: 18px;
    font-weight: 600;
}

img.blue-tick {
    position: relative;
    top: -3px;
}

.lunching-date span {
    font-size: 20px;
    color: #3699FF;
    font-weight: 700;
    margin-right: 5px;
}

.bottom-logo {
    margin-top: 55px;
}

/* Responsive Design */

@media (max-width: 991px) {
    .launch-content {
        max-width: 90%;
    }

    .inauguration-subtitle {
        font-size: 58px;
    }
}

@media (max-width: 768px) {
    .rnUnit {
        width: 12vw;
    }

    .cm-title {
        font-size: 2.2rem;
    }

    .inauguration-subtitle {
        font-size: 1.1rem;
    }

    .launch-btn {
        font-size: 1rem;
        padding: 12px 30px;
    }

    .tn-logo {
        width: 100px;
    }

    .logo-container {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .launch-content {
        padding: 2rem 1.5rem;
    }

    .inauguration-subtitle {
        font-size: 50px;
    }

    .cm-title {
        font-size: 60px;
    }
}

@media (max-width: 480px) {
    .rnUnit {
        width: 15vw;
    }

    .cm-title {
        font-size: 40px;
    }

    .inauguration-subtitle {
        font-size: 25px;
        margin-bottom: 10px;
        line-height: normal;
    }

    .launch-btn {
        font-size: 0.9rem;
        padding: 10px 25px;
    }

    .tn-logo {
        width: 70px;
    }

    .logo-container {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .launch-content {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }

    .launch-content span {
        color: #9F9F9F;
        font-size: 12px;
        font-weight: 400;
    }

    .lunching-date {
        font-size: 14px;
    }

    .lunching-date span {
        font-size: 14px;
        color: #3699FF;
    }

    img.blue-tick {
        top: -2px;
        width: 18px;
    }

    .lunching-date {
        padding-top: 15px;
        padding-bottom: 20px;
    }

    .bottom-logo {
        margin-top: 25px;
        max-width: 190px;
    }
}

/* Animation states for different screen sizes - no changes needed for dual curtain */

/* Hide main content initially */
body.launch-active {
    overflow: hidden;
}

body.launch-active .cs_site_header,
body.launch-active main,
body.launch-active footer {
    visibility: hidden;
}