/* ========== VARIABLES ========== */
:root {
    --crimson: #df2229;
    --crimson-light: #e64a50;
    --pink-light: #fdf2f1;
    --dark-main: #2e2d2c;
    --dark-soft: #4a4a4a;
    --orchid: #e18c94;
    --cream: #faf7f2;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
}

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--pink-light);
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--dark-main);
    line-height: 1.6;
}

/* ========== OPTIMIZED BACKGROUND ========== */
/* Using simpler gradients instead of multiple animated elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(223, 34, 41, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(225, 140, 148, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(223, 34, 41, 0.02) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* Reduced number of worms and optimized animations */
.worm-threads {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.5; /* Reduced overall opacity */
}

.worm {
    position: absolute;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    opacity: 0.08;
    /* Using transform3d for hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

/* Simplified worm animations - fewer elements and simpler keyframes */
.worm-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    left: -100px;
    border-top-color: var(--crimson);
    border-right-color: var(--orchid);
    animation: wormMoveSimple 50s infinite linear;
}

.worm-2 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    border-top-color: var(--orchid);
    border-right-color: var(--crimson);
    animation: wormMoveSimple 40s infinite linear reverse;
}

.worm-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 30%;
    border-top-color: var(--crimson);
    border-right-color: var(--orchid);
    animation: wormMoveSimple 30s infinite linear;
}

/* Simple, optimized keyframe */
@keyframes wormMoveSimple {
    0% {
        transform: rotate(0deg) translateX(5px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(5px) rotate(-360deg);
    }
}

/* Removed inner worms, elliptical animations, and other complex animations */

/* Simplified silk background - using CSS filter instead of animations */
.silk-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 30px,
            rgba(223, 34, 41, 0.01) 30px,
            rgba(223, 34, 41, 0.01) 31px
        );
    opacity: 0.3;
}

/* Reduced thread details - static instead of animated */
.thread-detail {
    position: fixed;
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--crimson), transparent);
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.thread-detail:nth-child(1) { left: 15%; top: 10%; }
.thread-detail:nth-child(2) { right: 20%; top: 30%; height: 150px; }
.thread-detail:nth-child(3) { left: 40%; bottom: 20%; height: 200px; }

/* ========== MAIN CONTAINER ========== */
.coming-soon-container {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* Added for Safari */
    border-radius: 4px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(223, 34, 41, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========== LOGO ========== */
.logo-wrapper {
    margin-bottom: 40px;
}

.logo {
    height: 70px;
    width: auto;
    opacity: 0.9;
    transition: var(--transition);
}

/* ========== ELEGANT DIVIDER ========== */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.divider span {
    height: 1px;
}

.divider span:nth-child(1),
.divider span:nth-child(3) {
    width: 60px;
    background: var(--dark-soft);
    opacity: 0.2;
}

.divider span:nth-child(2) {
    width: 30px;
    background: var(--crimson);
    opacity: 0.4;
}

/* ========== MAIN TITLE ========== */
.main-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--dark-main);
}

.title-line {
    display: block;
}

.title-line.accent {
    font-weight: 700;
    color: var(--crimson);
    position: relative;
    display: inline-block;
    padding: 0 20px;
}

.title-line.accent::before,
.title-line.accent::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--crimson);
    opacity: 0.3;
}

.title-line.accent::before { left: -20px; }
.title-line.accent::after { right: -20px; }

/* ========== DESCRIPTION ========== */
.description {
    font-size: 1rem;
    color: var(--dark-soft);
    max-width: 550px;
    margin: 0 auto 40px;
    font-weight: 300;
    letter-spacing: 0.3px;
    line-height: 1.8;
}

/* ========== REFINED COUNTDOWN ========== */
.countdown {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.countdown-item {
    position: relative;
    min-width: 100px;
}

.countdown-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--crimson);
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--dark-soft);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.countdown-item:not(:last-child)::after {
    content: ':';
    position: absolute;
    right: -25px;
    top: 10px;
    color: var(--dark-soft);
    opacity: 0.3;
    font-size: 2rem;
    font-weight: 300;
}

/* ========== MINIMAL LINE ========== */
.minimal-line {
    width: 100px;
    height: 1px;
    background: var(--dark-soft);
    opacity: 0.2;
    margin: 0 auto 25px;
}

/* ========== LAUNCH DATE ========== */
.launch-date span {
    font-family: 'Playfair Display', serif;
    color: var(--dark-soft);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.7;
}

/* ========== SIMPLIFIED THREAD TIES ========== */
.thread-ties {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.3; /* Reduced opacity */
}

/* Static threads instead of animated */
.horizontal-thread {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crimson), transparent);
    opacity: 0.1;
}

.vertical-thread {
    position: absolute;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--crimson), transparent);
    opacity: 0.1;
}

.thread-knot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--crimson);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

/* Removed all animations from thread elements */

/* ========== MEDIA QUERIES - OPTIMIZED FOR MOBILE ========== */
@media (max-width: 768px) {
    .coming-soon-container {
        padding: 40px 20px;
        width: 95%;
    }
    
    .logo { height: 50px; }
    
    .countdown {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .countdown-item { min-width: 70px; }
    .countdown-number { font-size: 2.2rem; }
    
    .countdown-item:not(:last-child)::after {
        right: -15px;
        font-size: 1.5rem;
    }
    
    .title-line.accent::before,
    .title-line.accent::after {
        width: 15px;
    }
    
    .divider span:nth-child(1),
    .divider span:nth-child(3) {
        width: 40px;
    }
    
    /* Disable heavy effects on mobile */
    .worm-threads { opacity: 0.2; }
    .worm { animation: none; } /* Stop animations on mobile */
}

@media (max-width: 480px) {
    .coming-soon-container {
        padding: 30px 15px;
    }
    
    .countdown { gap: 10px; }
    .countdown-item { min-width: 60px; }
    .countdown-number { font-size: 1.8rem; }
    .countdown-label { font-size: 0.65rem; letter-spacing: 1px; }
    
    .countdown-item:not(:last-child)::after { display: none; }
    .main-title { font-size: 2rem; }
    .title-line.accent { padding: 0 10px; }
    .title-line.accent::before,
    .title-line.accent::after { width: 10px; }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .coming-soon-container {
        padding: 20px 30px;
    }
    
    .logo-wrapper { margin-bottom: 15px; }
    .logo { height: 40px; }
    .divider { margin-bottom: 15px; }
    .main-title { margin-bottom: 10px; }
    .description { margin-bottom: 15px; }
    .countdown { margin-bottom: 15px; }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .worm, .worm-threads, .silk-bg, .thread-detail {
        animation: none !important;
        transition: none !important;
    }
}
