/* ============================================
   JEEL — Launching Page
   Modern, Classy, Animated 3D
   ============================================ */

/* --- CSS Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #261F53;
    --bg-deep: #1b1640;
    --bg-elevated: #2f2766;
    --purple-light: #4a3f8c;
    --purple-mid: #6b5fb5;
    --purple-pale: #8b82c9;
    --gold: #c9a43b;
    --gold-rich: #d4af4a;
    --gold-light: #e8c87a;
    --gold-pale: #f0dda8;
    --white: #ffffff;
    --cream: #f5f0e8;
    --text-primary: #ede8f0;
    --text-secondary: #a9a4c9;
    --text-muted: #7d78a8;
    --glass-bg: rgba(47, 39, 102, 0.35);
    --glass-border: rgba(139, 130, 201, 0.12);
    --shadow-glow: 0 0 40px rgba(139, 130, 201, 0.1);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-slow: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: default;
    user-select: none;
}

/* --- Canvas --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Gradient Overlays --- */
.gradient-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
}

.gradient-overlay.top-left {
    top: -30%;
    left: -20%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(201, 164, 59, 0.18) 0%, transparent 70%);
    animation: breatheTopLeft 8s ease-in-out infinite;
}

.gradient-overlay.bottom-right {
    bottom: -30%;
    right: -20%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(139, 130, 201, 0.15) 0%, transparent 70%);
    animation: breatheBottomRight 10s ease-in-out infinite;
}

@keyframes breatheTopLeft {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(5%, 5%) scale(1.15);
        opacity: 0.45;
    }
}

@keyframes breatheBottomRight {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }

    50% {
        transform: translate(-5%, -5%) scale(1.2);
        opacity: 0.4;
    }
}

/* --- Main Content --- */
.main-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    gap: 1.5rem;
}

/* --- Logo Mark --- */
.logo-mark-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.logo-glow-ring {
    position: absolute;
    inset: -10px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--purple-mid), var(--purple-pale), var(--gold-rich), var(--gold-pale));
    opacity: 0.25;
    animation: glowPulse 3s ease-in-out infinite;
    filter: blur(8px);
    z-index: -1;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
        filter: blur(8px);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.08);
        filter: blur(12px);
    }
}

.logo-image {
    position: relative;
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 16px;
    z-index: 1;
    filter: drop-shadow(0 4px 24px rgba(139, 130, 201, 0.18)) drop-shadow(0 0 50px rgba(201, 164, 59, 0.2));
    transition: filter 0.6s ease;
}

.logo-image:hover {
    filter: drop-shadow(0 8px 35px rgba(139, 130, 201, 0.3)) drop-shadow(0 0 70px rgba(232, 200, 122, 0.35));
}

.logo-symbol {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    line-height: 1;
}

/* --- Brand Name --- */
.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.brand-name {
    display: flex;
    gap: 0.1em;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    text-shadow: 0 0 40px rgba(139, 130, 201, 0.2);
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    animation: letterReveal 1s var(--transition-smooth) forwards;
    transition: color 0.6s ease;
}

.letter:hover {
    color: var(--gold-light);
}

.letter:nth-child(1) {
    animation-delay: 0.3s;
}

.letter:nth-child(2) {
    animation-delay: 0.45s;
}

.letter:nth-child(3) {
    animation-delay: 0.6s;
}

.letter:nth-child(4) {
    animation-delay: 0.75s;
}

.letter:nth-child(5) {
    animation-delay: 0.85s;
}

.letter:nth-child(6) {
    animation-delay: 0.95s;
}

.letter:nth-child(7) {
    animation-delay: 1.05s;
}

.letter:nth-child(8) {
    animation-delay: 1.15s;
}

.letter-dash {
    font-size: 0.6em;
    opacity: 0.5;
    margin: 0 0.08em;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(8px);
    }

    60% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.brand-arabic {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 0.08em;
    direction: rtl;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 1s 1.05s var(--transition-smooth) forwards;
    margin-top: -0.3rem;
}

.brand-line {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-pale), transparent);
    animation: lineExpand 1.2s 1.35s var(--transition-smooth) forwards;
}

@keyframes lineExpand {
    to {
        width: 180px;
    }
}

.brand-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 1s 1.6s var(--transition-smooth) forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Countdown --- */
.launch-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.5rem;
    opacity: 0;
    animation: fadeUp 1s 1.9s var(--transition-smooth) forwards;
}

.countdown-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.countdown-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    background: linear-gradient(180deg, var(--cream) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-separator {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--gold-light);
    opacity: 0.5;
    padding-bottom: 1.2rem;
}

.countdown-label {
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
}

.launch-message {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* --- CTA Button --- */
.cta-container {
    margin-top: 0.5rem;
    opacity: 0;
    animation: fadeUp 1s 2.1s var(--transition-smooth) forwards;
}

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 2.5rem;
    background: transparent;
    border: 1px solid rgba(232, 200, 122, 0.3);
    border-radius: 100px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s var(--transition-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--purple-mid), var(--gold-rich));
    opacity: 0;
    border-radius: 100px;
    transition: opacity 0.5s var(--transition-smooth);
    z-index: -1;
}

.cta-button:hover {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(201, 164, 59, 0.2),
        0 0 50px rgba(139, 130, 201, 0.12);
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button:hover .cta-icon {
    transform: translateX(4px);
}

.cta-icon {
    display: inline-block;
    transition: transform 0.4s var(--transition-bounce);
}

.cta-button:active {
    transform: translateY(0) scale(0.97);
}

/* --- Footer --- */
.footer-info {
    position: absolute;
    bottom: 2rem;
    opacity: 0;
    animation: fadeUp 1s 2.3s var(--transition-smooth) forwards;
}

.footer-text {
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 22, 64, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: relative;
    width: 90%;
    max-width: 420px;
    padding: 2.5rem 2rem;
    background: var(--glass-bg);
    border: var(--glass-border);
    box-shadow: var(--shadow-glow);
    border-radius: 24px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.5s var(--transition-bounce);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    border-color: var(--gold-light);
    color: var(--cream);
    background: rgba(201, 164, 59, 0.1);
}

.modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-input {
    padding: 0.85rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(139, 130, 201, 0.15);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.modal-input:focus {
    border-color: var(--gold-light);
    box-shadow: 0 0 0 3px rgba(201, 164, 59, 0.12);
}

.modal-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.modal-button {
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--purple-mid), var(--gold-rich));
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover {
    box-shadow: 0 4px 20px rgba(201, 164, 59, 0.25);
    transform: translateY(-1px);
}

.modal-thanks {
    font-size: 0.9rem;
    color: var(--gold-light);
    text-align: center;
    padding: 1rem 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-content {
        gap: 1rem;
        padding: 1.5rem;
    }

    .logo-mark-container {
        width: 110px;
        height: 110px;
    }

    .logo-image {
        width: 95px;
        height: 95px;
    }

    .countdown-item {
        min-width: 45px;
    }
}

@media (max-width: 480px) {
    .countdown-container {
        gap: 0.15rem;
    }

    .countdown-item {
        min-width: 38px;
    }

    .modal {
        padding: 2rem 1.5rem;
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 164, 59, 0.25);
    border-radius: 2px;
}

/* --- Selection --- */
::selection {
    background: rgba(201, 164, 59, 0.3);
    color: var(--white);
}