/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    overflow: hidden;
    height: 100vh;
}

body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-optical-sizing: auto;
    background: linear-gradient(180deg, #1C1C1E 0%, #0D0C0D 100%);
    background-attachment: fixed;
    color: #ffffff;
    overflow: hidden;
    min-height: 100vh;
    max-height: 100vh;
}

/* Container */
.container {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

/* Logo overlay on title */
.logo-overlay {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(200px, 28vw, 400px);
    height: auto;
    z-index: 2;
}

/* Hero section */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 4rem;
    position: relative;
    min-height: 600px;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -12vh;
}

/* Hero title with overlay effect */
.hero-title {
    position: relative;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0;
    margin-bottom: 2rem;
    padding: 0 2rem;
    width: 100%;
}

.title-bg {
    display: inline-block;
    text-transform: uppercase;
    color: #7D7D7E;
    position: relative;
    z-index: 1;
    padding: 0 0.2em;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 85%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 85%);
    animation: textFadeWave 8s ease-in-out infinite;
}

@keyframes textFadeWave {
    0%, 100% {
        opacity: 1;
    }
    45% {
        opacity: 0.15;
    }
    55% {
        opacity: 0.15;
    }
}

/* Hero subtitle */
.hero-subtitle {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #FFFFFF;
    max-width: 800px;
    margin: 0 auto;
}

/* Telegram link */
.telegram-link {
    display: inline-block;
    animation: bounce 2s infinite ease-in-out;
    cursor: pointer;
    opacity: 0.8;
    position: absolute;
    bottom: 8rem;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.telegram-link::before,
.telegram-link::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    margin-top: -60px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 5, 140, 0.4) 0%,
        rgba(255, 5, 140, 0.2) 30%,
        rgba(255, 5, 140, 0) 60%
    );
    opacity: 0;
    transform: scale(0);
    z-index: 5;
    pointer-events: none;
}

.telegram-link:hover::before {
    animation: waterRipple 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.telegram-link:hover::after {
    animation: waterRipple 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

.telegram-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.telegram-link:hover .telegram-icon path {
    fill: #FF058C;
}

.telegram-icon {
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1;
}

.telegram-icon path {
    fill: #FFFFFF;
    transition: fill 0.6s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes waterRipple {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    10% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(5);
    }
}

/* Анимация всплеска при активации */
.telegram-link.splash-active::before {
    animation: waterRipple 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    opacity: 1 !important;
}

.telegram-link.splash-active::after {
    animation: waterRipple 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards !important;
    opacity: 1 !important;
}

.telegram-link.splash-active {
    transform: scale(1.5) !important;
    opacity: 1 !important;
}

.telegram-link.splash-active .telegram-icon path {
    fill: #FF058C !important;
}

/* Tablet styles */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }

    .hero-title {
        margin-bottom: 1.5rem;
    }

    .hero {
        gap: 3rem;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero {
        gap: 2.5rem;
    }

    .hero-subtitle {
        line-height: 1.5;
        letter-spacing: 0.01em;
    }

    .telegram-icon {
        width: 32px;
        height: 32px;
    }
    
    .telegram-link {
        bottom: 4rem;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .hero {
        gap: 2rem;
    }

    .hero-subtitle br {
        display: none;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .telegram-icon {
        width: 28px;
        height: 28px;
    }
    
    .telegram-link {
        bottom: 3.5rem;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Малая высота окна - общий случай */
@media (max-height: 700px) {
    .hero-content {
        margin-top: -6vh;
    }
    
    .hero {
        gap: 2rem;
        min-height: auto;
    }
    
    .telegram-link {
        bottom: 2rem;
    }
}

/* Очень малая высота окна и landscape на мобильных */
@media (max-height: 550px), (max-height: 600px) and (orientation: landscape) {
    .hero-content {
        margin-top: 0;
    }
    
    .hero {
        gap: 1.5rem;
    }
    
    .hero-title {
        margin-bottom: 1rem;
    }
    
    .telegram-link {
        position: relative;
        bottom: auto;
        margin-top: 1.5rem;
    }
}

/* Дополнительный padding для landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        padding: 1rem;
    }
}
