*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ivory: #faf6f0;
    --cream: #f3ece0;
    --teal: #5a8c84;
    --teal2: #7aada4;
    --teal3: #a8cdc8;
    --gold: #b8821a;
    --gold2: #d4a044;
    --gold3: #e8c97a;
    --terr: #8b3a1a;
    --terr2: #b05a3a;
    --terr3: #d4937a;
    --ink: #2a1f14;
    --ink2: #5a4535;
    --muted: #9a8570;
    --soft: #c4b5a0;
}

html,
body {
    width: 100%;
    height: 100%;
    background: var(--ivory);
    overflow: visible;
}

.screen {
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* ── COUPOLE CANVAS ── */
#coupole-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: bgReveal 3s ease 0.3s forwards;
}

@keyframes bgReveal {
    to {
        opacity: 1;
    }
}

/* The key: heavy radial vignette that leaves only faint ghostly pattern visible */
.vignette {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 60% at 50% 50%,
            rgba(250, 246, 240, 0.82) 0%,
            rgba(250, 246, 240, 0.88) 40%,
            rgba(250, 246, 240, 0.94) 68%,
            var(--ivory) 88%);
    z-index: 1;
}

/* ── STAGE ── */
.stage {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ── BISMILLAH ── */
.bismillah {
    font-family: 'Amiri', serif;
    font-size: clamp(14px, 2.8vw, 22px);
    color: var(--teal);
    opacity: 0;
    letter-spacing: 0.04em;
    margin-bottom: 30px;
    animation: riseIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

/* ── STAR MARK ── */
.star-wrap {
    width: clamp(78px, 11vw, 104px);
    height: clamp(78px, 11vw, 104px);
    margin-bottom: 22px;
    opacity: 0;
    animation: riseIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
    position: relative;
}

.s-outer {
    position: absolute;
    inset: 0;
    animation: spinSlow 55s linear infinite;
}

.s-inner {
    position: absolute;
    inset: 20%;
    animation: spinSlow 32s linear infinite reverse;
}

@keyframes spinSlow {
    to {
        transform: rotate(360deg);
    }
}

/* ── NAME ── */
.app-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    opacity: 0;
    animation: riseIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.3s forwards;
    margin-bottom: 10px;
}

.khalil-ar {
    font-family: 'Amiri', serif;
    font-style: italic;
    font-size: clamp(50px, 10vw, 82px);
    color: var(--ink);
    line-height: 1;
    letter-spacing: 0.02em;
}

.khalil-en {
    font-family: 'Cinzel', serif;
    font-size: clamp(9px, 1.6vw, 12px);
    font-weight: 500;
    letter-spacing: 0.65em;
    color: var(--muted);
    text-transform: uppercase;
}

/* ── TAGLINE ── */
.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: clamp(12px, 1.9vw, 15px);
    font-weight: 300;
    color: var(--muted);
    opacity: 0;
    letter-spacing: 0.1em;
    text-align: center;
    line-height: 2;
    margin-bottom: 38px;
    animation: riseIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards;
    padding: 0 20px;
}

.tagline em {
    color: var(--teal);
    font-style: normal;
}

/* ── DIVIDER ── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    margin-bottom: 28px;
    animation: riseIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.7s forwards;
}

.div-line {
    width: 52px;
    height: 0.5px;
    background: linear-gradient(90deg, transparent, var(--teal3), transparent);
}

.gem {
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
}

.gem-teal {
    background: var(--teal2);
    opacity: 0.7;
}

.gem-gold {
    background: var(--gold2);
    opacity: 0.6;
}

.gem-sm {
    width: 3px;
    height: 3px;
    background: var(--soft);
    opacity: 0.5;
}

/* ── PROGRESS ── */
.progress-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    opacity: 0;
    animation: riseIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1.9s forwards;
}

.bar-track {
    width: min(190px, 50vw);
    height: 1px;
    background: #ddd4c4;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal3), var(--gold3));
    border-radius: 2px;
    animation: loadBar 4.5s cubic-bezier(0.4, 0, 0.2, 1) 2.2s forwards;
}

@keyframes loadBar {
    0% {
        width: 0%;
    }

    50% {
        width: 62%;
    }

    78% {
        width: 83%;
    }

    100% {
        width: 100%;
    }
}

.status-txt {
    font-family: 'Cormorant Garamond', serif;
    font-size: 10.5px;
    letter-spacing: 0.28em;
    color: var(--soft);
    text-transform: uppercase;
    transition: opacity 0.45s;
    min-height: 15px;
}

/* ── CORNERS ── */
.corner {
    position: fixed;
    width: clamp(46px, 7vw, 72px);
    height: clamp(46px, 7vw, 72px);
    z-index: 3;
    opacity: 0;
    animation: riseIn 2.4s ease 1s forwards;
}

.corner svg {
    width: 100%;
    height: 100%;
}

.c-tl {
    top: 16px;
    left: 16px;
}

.c-tr {
    top: 16px;
    right: 16px;
    transform: scaleX(-1);
}

.c-bl {
    bottom: 16px;
    left: 16px;
    transform: scaleY(-1);
}

.c-br {
    bottom: 16px;
    right: 16px;
    transform: scale(-1, -1);
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}