/* ================================================
   CODEIFY - COMING SOON PAGE
   Fully Responsive + Premium Visual Effects
   ================================================ */

:root {
    --bg-black: #050505;
    --dark-blue: #060b13;
    --cyan: #00e5ff;
    --cyan-dim: rgba(0, 229, 255, 0.15);
    --orange: #ff6d00;
    --orange-light: #ffcf70;
    --white: #ffffff;
    --gray: #aaaaaa;

    --font-ar: 'Cairo', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-digital: 'Orbitron', 'Fira Code', monospace;

    /* Fluid spacing scale using clamp */
    --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --space-sm: clamp(0.5rem, 1vw, 1rem);
    --space-md: clamp(1rem, 2vw, 2rem);
    --space-lg: clamp(1.5rem, 3vw, 3rem);
    --space-xl: clamp(2rem, 4vw, 4rem);
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* ── Body ── */
body {
    background: radial-gradient(circle at top right, var(--dark-blue) 0%, var(--bg-black) 40%),
        radial-gradient(circle at bottom left, var(--dark-blue) 0%, var(--bg-black) 40%);
    background-color: var(--bg-black);
    color: var(--white);
    font-family: var(--font-ar);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* ================================================
   PREMIUM VISUAL EFFECTS
   ================================================ */

/* ── Mouse Spotlight Overlay ── */
.mouse-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%),
            rgba(0, 229, 255, 0.04),
            transparent 60%);
    transition: background 0.15s ease;
}

/* ── CRT Scanlines Overlay ── */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px);
    animation: scanlineShift 8s linear infinite;
}

@keyframes scanlineShift {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

/* ── Code Rain Canvas ── */
#code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.12;
}

/* ── Animated Border Glow on Page ── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    pointer-events: none;
    border: 1px solid transparent;
    border-image: linear-gradient(135deg,
            rgba(0, 229, 255, 0.3),
            transparent 30%,
            transparent 70%,
            rgba(255, 109, 0, 0.3)) 1;
    animation: borderRotate 10s linear infinite;
}

@keyframes borderRotate {

    0%,
    100% {
        border-image: linear-gradient(0deg,
                rgba(0, 229, 255, 0.2),
                transparent 30%,
                transparent 70%,
                rgba(255, 109, 0, 0.15)) 1;
    }

    25% {
        border-image: linear-gradient(90deg,
                rgba(0, 229, 255, 0.2),
                transparent 30%,
                transparent 70%,
                rgba(255, 109, 0, 0.15)) 1;
    }

    50% {
        border-image: linear-gradient(180deg,
                rgba(0, 229, 255, 0.2),
                transparent 30%,
                transparent 70%,
                rgba(255, 109, 0, 0.15)) 1;
    }

    75% {
        border-image: linear-gradient(270deg,
                rgba(0, 229, 255, 0.2),
                transparent 30%,
                transparent 70%,
                rgba(255, 109, 0, 0.15)) 1;
    }
}

/* ================================================
   LAYOUT & STRUCTURE
   ================================================ */

/* ── Page Wrapper — Main flex container ── */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    min-height: 100dvh;
    padding: env(safe-area-inset-top, 0) var(--space-md) env(safe-area-inset-bottom, 0);
    gap: var(--space-md);
    position: relative;
    z-index: 5;
}

/* ── Entrance Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(2.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cube-section {
    animation: fadeInScale 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both;
}

.content-wrapper {
    animation: fadeInUp 1s ease-out 2.5s both;
}

.countdown-footer-section {
    animation: fadeInUp 1s ease-out 3s both;
}

.neon-separator {
    animation: fadeInUp 0.8s ease-out 2.8s both;
}

/* ── Background Particle Canvas ── */
#particle-net {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    animation: fadeInUp 2s ease-out both;
}

/* ── Language Switcher ── */
.lang-toggle {
    position: fixed;
    top: clamp(12px, 2vw, 25px);
    left: clamp(12px, 2vw, 25px);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 229, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--cyan);
    padding: clamp(5px, 1vw, 8px) clamp(10px, 1.5vw, 15px);
    border-radius: 8px;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-digital);
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
}

.lang-toggle:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.2), 0 0 15px rgba(0, 229, 255, 0.2);
    transform: translateY(-2px);
}

.translate-icon {
    width: 18px;
    height: 18px;
}

/* ================================================
   CUBE SECTION
   ================================================ */

.cube-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-top: var(--space-lg);
    position: relative;
}

/* ── Orbit Rings Around Cube ── */
.orbit-ring {
    position: absolute;
    width: clamp(180px, 25vw, 300px);
    height: clamp(180px, 25vw, 300px);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: 50%;
    animation: orbitSpin 12s linear infinite;
    pointer-events: none;
}

.orbit-ring::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
}

.orbit-ring-2 {
    width: clamp(220px, 30vw, 360px);
    height: clamp(220px, 30vw, 360px);
    border-color: rgba(255, 109, 0, 0.08);
    animation: orbitSpinReverse 18s linear infinite;
}

.orbit-ring-2::after {
    background: var(--orange);
    box-shadow: 0 0 10px var(--orange), 0 0 20px var(--orange);
    width: 4px;
    height: 4px;
}

@keyframes orbitSpin {
    from {
        transform: rotateX(65deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(65deg) rotateZ(360deg);
    }
}

@keyframes orbitSpinReverse {
    from {
        transform: rotateX(65deg) rotateZ(360deg);
    }

    to {
        transform: rotateX(65deg) rotateZ(0deg);
    }
}

/* ── 3D Isometric Cube ── */
.cube-scene {
    --cube-size: clamp(120px, 18vw, 200px);
    --face-size: calc(var(--cube-size) * 0.7);
    --face-offset: calc((var(--cube-size) - var(--face-size)) / 2);
    --translate-z: calc(var(--face-size) / 2);

    width: var(--cube-size);
    height: var(--cube-size);
    perspective: 1000px;
    z-index: 10;
    transition: transform 0.1s ease-out;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

@keyframes rotateCube {
    0% {
        transform: rotateX(-30deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(-30deg) rotateY(360deg);
    }
}

.cube-face {
    position: absolute;
    width: var(--face-size);
    height: var(--face-size);
    top: var(--face-offset);
    left: var(--face-offset);
    background: rgba(0, 229, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.1),
        0 0 10px rgba(255, 109, 0, 0.05);
    animation: pulseCubeLight 4s infinite alternate;
}

@keyframes pulseCubeLight {
    0% {
        box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.05),
            0 0 5px rgba(255, 109, 0, 0.02);
        border-color: rgba(0, 229, 255, 0.1);
    }

    100% {
        box-shadow: inset 0 0 50px rgba(0, 229, 255, 0.25),
            0 0 15px rgba(0, 229, 255, 0.2);
        border-color: rgba(0, 229, 255, 0.5);
    }
}

.cube-face.front {
    transform: rotateY(0deg) translateZ(var(--translate-z));
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(var(--translate-z));
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(var(--translate-z));
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(var(--translate-z));
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(var(--translate-z));
    border-color: rgba(255, 109, 0, 0.3);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(var(--translate-z));
    box-shadow: 0 50px 100px rgba(0, 229, 255, 0.2);
}

/* ── Core Logo Inside Cube ── */
.cube-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    transform-style: preserve-3d;
}

.cube-logo {
    width: calc(var(--face-size) * 0.5);
    height: auto;
    filter: drop-shadow(0 0 15px var(--cyan)) drop-shadow(0 0 30px rgba(0, 229, 255, 0.5));
    animation: floatAndRotateLogo 10s infinite linear;
}

@keyframes floatAndRotateLogo {
    0% {
        transform: translateZ(0) translateY(-10px) rotateY(0deg);
    }

    25% {
        transform: translateZ(0) translateY(0px) rotateY(90deg);
    }

    50% {
        transform: translateZ(0) translateY(10px) rotateY(180deg);
    }

    75% {
        transform: translateZ(0) translateY(0px) rotateY(270deg);
    }

    100% {
        transform: translateZ(0) translateY(-10px) rotateY(360deg);
    }
}

/* ================================================
   NEON SEPARATOR
   ================================================ */

.neon-separator {
    display: flex;
    align-items: center;
    gap: 15px;
    width: clamp(120px, 30%, 300px);
    z-index: 10;
}

.neon-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.4;
}

.neon-diamond {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    transform: rotate(45deg);
    box-shadow: 0 0 8px var(--cyan), 0 0 16px var(--cyan);
    animation: diamondPulse 2s ease-in-out infinite alternate;
}

@keyframes diamondPulse {
    0% {
        box-shadow: 0 0 5px var(--cyan), 0 0 10px var(--cyan);
        opacity: 0.6;
    }

    100% {
        box-shadow: 0 0 12px var(--cyan), 0 0 25px var(--cyan), 0 0 40px rgba(0, 229, 255, 0.3);
        opacity: 1;
    }
}

/* ================================================
   TYPOGRAPHY & CONTENT
   ================================================ */

.content-wrapper {
    text-align: center;
    z-index: 10;
    max-width: 800px;
    width: 100%;
    padding: 0 var(--space-md);
    flex-shrink: 0;
}

.main-title {
    font-size: clamp(1.6rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--space-xs);
    letter-spacing: -1px;
    line-height: 1.3;
}

/* ── Animated Gradient Brand Text ── */
.brand-text {
    background: linear-gradient(90deg, #f68a0d, #ffcf70, #f68a0d, #ffcf70);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
    animation: shimmerGradient 4s ease-in-out infinite;
    position: relative;
}

@keyframes shimmerGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── Glitch Hover Effect on Brand Text ── */
.brand-text:hover {
    animation: glitchText 0.3s ease, shimmerGradient 4s ease-in-out infinite;
}

@keyframes glitchText {

    0%,
    100% {
        transform: translate(0);
    }

    10% {
        transform: translate(-2px, -1px);
    }

    20% {
        transform: translate(2px, 1px);
    }

    30% {
        transform: translate(-1px, 2px);
    }

    40% {
        transform: translate(1px, -2px);
    }

    50% {
        transform: translate(-2px, 1px);
    }

    60% {
        transform: translate(2px, -1px);
    }

    70% {
        transform: translate(0, 2px);
    }

    80% {
        transform: translate(-1px, 0);
    }

    90% {
        transform: translate(1px, 1px);
    }
}

.subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-sm);
    opacity: 0.9;
    line-height: 1.5;
}

/* ── Typing Cursor ── */
.typing-cursor {
    display: inline-block;
    color: var(--cyan);
    font-weight: 300;
    animation: blinkCursor 0.8s step-end infinite;
    margin-right: 2px;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.description {
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    font-weight: 400;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 0;
}

/* ================================================
   COUNTDOWN + FOOTER
   ================================================ */

.countdown-footer-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
}

.countdown-bar-container {
    width: clamp(280px, 80%, 800px);
    z-index: 10;
}

.countdown-labels {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    font-weight: 600;
}

.countdown-target {
    color: var(--white);
    text-align: center;
}

.countdown-blocks {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 10px);
}

.time-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 229, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: clamp(6px, 1.2vw, 10px) clamp(8px, 1.5vw, 15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: clamp(45px, 8vw, 65px);
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
    transition: all 0.3s ease;
    animation: pulseBlock 1s infinite alternate;
    position: relative;
    overflow: hidden;
}

/* ── Holographic shimmer on time blocks ── */
.time-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(0, 229, 255, 0.06) 50%,
            transparent 60%);
    animation: holoShimmer 3s ease-in-out infinite;
}

@keyframes holoShimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ── Hover glow on time blocks ── */
.time-block:hover {
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.15),
        0 0 20px rgba(0, 229, 255, 0.2);
    transform: translateY(-2px);
}

@keyframes pulseBlock {
    0% {
        box-shadow: inset 0 0 5px rgba(0, 229, 255, 0.05), 0 0 5px rgba(0, 229, 255, 0.1);
    }

    100% {
        box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.2), 0 0 15px rgba(0, 229, 255, 0.3);
    }
}

.time-val {
    color: var(--cyan);
    font-family: var(--font-digital);
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0, 229, 255, 0.3);
    line-height: 1;
    margin-bottom: 4px;
    transition: opacity 0.15s ease, transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.time-val.flip {
    animation: flipDigit 0.4s ease;
}

@keyframes flipDigit {
    0% {
        transform: rotateX(0deg);
        opacity: 1;
    }

    40% {
        transform: rotateX(-90deg);
        opacity: 0;
    }

    60% {
        transform: rotateX(90deg);
        opacity: 0;
    }

    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.time-label {
    color: var(--white);
    font-family: var(--font-ar);
    font-size: clamp(0.55rem, 1.2vw, 0.75rem);
    font-weight: 400;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.time-colon {
    color: rgba(0, 229, 255, 0.5);
    font-family: var(--font-digital);
    font-size: clamp(1rem, 2vw, 1.5rem);
    animation: blinkColon 1s infinite steps(2, start);
}

@keyframes blinkColon {
    to {
        visibility: hidden;
    }
}

/* ── Progress Bar ── */
.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: visible;
    margin-top: var(--space-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), rgba(0, 229, 255, 0.6), var(--cyan));
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
    border-radius: 2px;
    width: 0%;
    transition: width 1s ease-out;
    position: absolute;
    right: 0;
    top: 0;
    box-shadow: 0 0 10px var(--cyan);
}

@keyframes progressShine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.progress-glow {
    position: absolute;
    top: -3px;
    height: 10px;
    width: 10px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--cyan);
    right: 0%;
    transition: right 1s ease-out;
    transform: translateX(50%);
}

/* ── Footer ── */
.footer {
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 1.2vw, 0.85rem);
    color: rgba(255, 255, 255, 0.3);
    direction: ltr;
    z-index: 10;
    padding: 0 var(--space-sm);
    line-height: 1.6;
    transition: color 0.3s ease;
}

.footer:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* ================================================
   RESPONSIVE BREAKPOINTS
   ================================================ */

/* ── Small Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .page-wrapper {
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-sm) calc(var(--space-sm) + env(safe-area-inset-bottom, 0));
    }

    .cube-section {
        padding-top: var(--space-md);
    }

    .countdown-bar-container {
        width: 95%;
    }

    .time-block {
        min-width: 42px;
    }

    .orbit-ring {
        width: 160px;
        height: 160px;
    }

    .orbit-ring-2 {
        width: 200px;
        height: 200px;
    }

    .neon-separator {
        width: 60%;
    }
}

/* ── Large Mobile / Small Tablet (≤ 768px) ── */
@media (max-width: 768px) {



    .page-wrapper {
        gap: var(--space-sm);
        padding: var(--space-sm) var(--space-sm) calc(var(--space-sm) + env(safe-area-inset-bottom, 0));
        /* height: 110vh; */
    }

    .cube-section {
        padding-top: var(--space-md);
        height: 330px;
    }

    .cube-scene {
        --cube-size: 200px;
    }

    .content-wrapper {
        padding: 0 var(--space-sm);
    }

    .countdown-bar-container {
        width: 92%;
    }

    .countdown-labels {
        gap: var(--space-xs);
    }

    .neon-separator {
        width: 50%;
    }

    /* Simplify scanlines on mobile for performance */
    .scanlines {
        background: repeating-linear-gradient(0deg,
                transparent,
                transparent 3px,
                rgba(0, 0, 0, 0.02) 3px,
                rgba(0, 0, 0, 0.02) 6px);
    }
}

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) and (min-width: 769px) {
    .page-wrapper {
        gap: var(--space-md);
    }
}

/* ── Very short screens (landscape mobile, etc.) ── */
@media (max-height: 600px) {
    .page-wrapper {
        gap: var(--space-xs);
        padding-top: var(--space-xs);
        padding-bottom: var(--space-xs);
    }

    .cube-section {
        padding-top: var(--space-xs);
    }

    .cube-scene {
        --cube-size: 100px;
    }

    .description {
        display: none;
    }

    .neon-separator {
        display: none;
    }

    .orbit-ring,
    .orbit-ring-2 {
        display: none;
    }
}

/* ── Tall screens get more breathing room ── */
@media (min-height: 900px) and (min-width: 769px) {
    .page-wrapper {
        gap: var(--space-lg);
    }
}