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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --cribio-blue: #5793F9;
    --cribio-blue-dark: #4A6FEF;
    --cribio-purple: #8B5FBF;
    --cribio-purple-light: #B19CD9;
    --cribio-fuschia: #E91E63;
    --cribio-cream: #F8F6F0;
    --cribio-midnight: #1A1B23;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, var(--cribio-blue) 0%, var(--cribio-purple) 100%);
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for better mobile experience */
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* iOS Safari viewport-fit support */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Container & Layout */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* Pure CSS Grid Overrides */
.pure-g [class*="pure-u"] {
    font-family: inherit;
}

.pure-g {
    letter-spacing: normal;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-img {
    height: 80px;
    width: auto;
    max-width: 300px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    flex-direction: column;
}

.content-wrapper {
    text-align: center;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Typography */
.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.launch-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    font-weight: 500;
    line-height: 1.6;
}

/* Rocket Animation */
.rocket {
    display: inline-block;
    animation: rocketFly 4s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
    margin-left: 0.3rem;
}

/* Countdown Section */
.countdown-section {
    margin-bottom: 3rem;
}

.countdown-grid {
    max-width: 600px;
    margin: 0 auto;
}

.countdown-grid .pure-u-1-4 {
    min-width: 0;
    padding: 0;
}

.time-unit {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem 0.5rem;
    margin: 0 0.5rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.time-unit:hover {
    transform: translateY(-5px);
}

.time-unit .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.time-unit .label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.time-unit .number {
    transition: transform 0.15s ease;
}

.launch-message {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes rocketFly {
    0% {
        transform: translateX(0px) translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateX(3px) translateY(-8px) rotate(5deg);
    }
    50% {
        transform: translateX(-2px) translateY(-12px) rotate(-3deg);
    }
    75% {
        transform: translateX(4px) translateY(-6px) rotate(7deg);
    }
    100% {
        transform: translateX(0px) translateY(0px) rotate(0deg);
    }
}



/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
}



.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    backdrop-filter: blur(2px);
    will-change: transform, opacity;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 25s infinite ease-in-out;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(90, 127, 255, 0.1));
    animation: floatReverse 30s infinite ease-in-out;
    animation-delay: -5s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 80%;
    background: rgba(248, 246, 240, 0.15);
    animation: drift 22s infinite ease-in-out;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    background: linear-gradient(135deg, rgba(139, 95, 191, 0.2), rgba(177, 156, 217, 0.1));
    animation: float 35s infinite ease-in-out;
    animation-delay: -15s;
}

.shape-5 {
    width: 70px;
    height: 70px;
    top: 10%;
    right: 30%;
    background: rgba(90, 127, 255, 0.15);
    animation: floatReverse 28s infinite ease-in-out;
    animation-delay: -20s;
}

.shape-6 {
    width: 45px;
    height: 45px;
    top: 75%;
    right: 20%;
    background: linear-gradient(45deg, rgba(248, 246, 240, 0.1), rgba(233, 30, 99, 0.1));
    animation: drift 18s infinite ease-in-out;
    animation-delay: -8s;
}

.shape-7 {
    width: 90px;
    height: 90px;
    top: 30%;
    left: 5%;
    background: rgba(177, 156, 217, 0.1);
    animation: float 32s infinite ease-in-out;
    animation-delay: -25s;
}

/* Subtle hover effect for interactivity */
.floating-shapes:hover .shape {
    animation-play-state: paused;
}

.floating-shapes:hover .shape:hover {
    transform: scale(1.2);
    opacity: 0.8;
    transition: all 0.3s ease;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-15px) rotate(90deg) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) rotate(180deg) scale(0.9);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-10px) rotate(270deg) scale(1.05);
        opacity: 0.6;
    }
    100% {
        transform: translateY(0px) rotate(360deg) scale(1);
        opacity: 0.7;
    }
}

@keyframes floatReverse {
    0% {
        transform: translateY(0px) rotate(360deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(15px) rotate(270deg) scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: translateY(25px) rotate(180deg) scale(1.1);
        opacity: 0.4;
    }
    75% {
        transform: translateY(10px) rotate(90deg) scale(0.9);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0px) rotate(0deg) scale(1);
        opacity: 0.6;
    }
}

@keyframes drift {
    0% {
        transform: translateX(0px) translateY(0px) rotate(0deg) scale(1);
        opacity: 0.5;
    }
    33% {
        transform: translateX(10px) translateY(-15px) rotate(120deg) scale(1.05);
        opacity: 0.8;
    }
    66% {
        transform: translateX(-5px) translateY(10px) rotate(240deg) scale(0.95);
        opacity: 0.3;
    }
    100% {
        transform: translateX(0px) translateY(0px) rotate(360deg) scale(1);
        opacity: 0.5;
    }
}

/* Mobile touch optimization */
.time-unit,
.logo-img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Ensure minimum touch target size (44px minimum for iOS) */
.time-unit {
    min-height: 44px;
    min-width: 44px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        margin-bottom: 1.5rem;
    }
    
    .logo-img {
        height: 60px;
        max-width: 250px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .launch-text {
        font-size: 0.9rem;
    }
    
    .content-wrapper {
        padding: 2rem;
        margin: 1rem;
    }
    
    .time-unit {
        padding: 1rem 0.25rem;
        margin: 0 0.25rem;
    }
    
    .time-unit .number {
        font-size: 2rem;
    }
    

}

@media (max-width: 480px) {
    .logo {
        margin-bottom: 1rem;
    }
    
    .logo-img {
        height: 50px;
        max-width: 200px;
    }
    
    .main-content {
        padding: 1rem;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
    }
    
    .content-wrapper {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .rocket {
        margin-left: 0.2rem;
    }
    
    .launch-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .countdown-section {
        margin-bottom: 2rem;
    }
    
    .time-unit {
        padding: 1rem 0.3rem;
        margin: 0 0.15rem;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .time-unit .number {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }
    
    .time-unit .label {
        font-size: 0.7rem;
        letter-spacing: 0.03em;
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    .content-wrapper {
        padding: 1rem;
        margin: 0.25rem;
    }
    
    .title {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .time-unit {
        padding: 0.8rem 0.2rem;
        margin: 0 0.1rem;
    }
    
    .time-unit .number {
        font-size: 1.4rem;
    }
    
    .time-unit .label {
        font-size: 0.6rem;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper > * {
    animation: fadeIn 0.8s ease-out forwards;
}

.content-wrapper > *:nth-child(1) { animation-delay: 0.1s; }
.content-wrapper > *:nth-child(2) { animation-delay: 0.2s; }
.content-wrapper > *:nth-child(3) { animation-delay: 0.3s; }
.content-wrapper > *:nth-child(4) { animation-delay: 0.4s; }
.content-wrapper > *:nth-child(5) { animation-delay: 0.5s; }

/* Focus States for Accessibility */

/* Print Styles */
@media print {
    .bg-animation,
    .floating-shapes {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .content-wrapper {
        background: white;
        color: black;
        box-shadow: none;
    }
}
