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

html {
    scroll-behavior: smooth;
}

/* Self-hosted fonts (declare early) */
@font-face {
    font-family: 'Outfit';
    src: url('fonts/Outfit-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Panchang';
    src: url('fonts/Panchang-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Panchang';
    src: url('fonts/Panchang-Extrabold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

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

@keyframes glow {
    0%, 100% {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 4px 20px rgba(255, 255, 255, 0.5), 0 0 30px rgba(255, 255, 255, 0.3);
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-top {
    animation: slideInFromTop 1s ease-out forwards;
    opacity: 0;
}

/* Override for main title - only slide in animation */
.main-title.animate-slide-in-top {
    animation: slideInFromTop 1s ease-out forwards;
    opacity: 0;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Staggered animation delays */
.animate-delay-1 { animation-delay: 0.2s; }
.animate-delay-2 { animation-delay: 0.4s; }
.animate-delay-3 { animation-delay: 0.6s; }
.animate-delay-4 { animation-delay: 0.8s; }
.animate-delay-5 { animation-delay: 1s; }
.animate-delay-6 { animation-delay: 1.2s; }

/* Main container with gradient background */
.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to top, #001eff, rgba(70, 79, 153, 0));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background image */
.background-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg-image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    animation: fadeInScale 1.5s ease-out forwards;
    opacity: 0;
}

/* Light overlay */
.light-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.overlay-gradient {
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 201, 101, 0.8) 0%, rgba(198, 157, 130, 0.76) 25%, rgba(141, 113, 159, 0.72) 50%, rgba(113, 91, 174, 0.7) 62.5%, rgba(85, 69, 188, 0.68) 75%, rgba(56, 47, 202, 0.66) 87.5%, rgba(28, 25, 217, 0.64) 100%);
    mix-blend-mode: hard-light;
}

/* Emoji confetti pieces */
.emoji-confetti {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Main title */
.main-title {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Panchang', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
    font-weight: 800;
    font-size: clamp(60px, 15vw, 200px);
    line-height: 1;
    color: white;
    white-space: nowrap;
    z-index: 3;
    pointer-events: none;
    width: 90%;
    text-align: center;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


/* Content card */
.content-card {
    position: relative;
    z-index: 4;
    background: rgba(0, 0, 0, 0.33);
    backdrop-filter: blur(3.5px);
    border-radius: 12px;
    padding: 48px;
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-top: 200px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Subtitle */
.subtitle {
    font-family: 'Panchang', sans-serif;
    font-weight: 700; /* Use available weight to ensure Panchang applies */
    font-size: 32px;
    line-height: 32px;
    background: linear-gradient(to bottom, #ffffff, #fff7ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: normal;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
}

/* Brand title */
.brand-title {
    font-family: 'Panchang', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 40px;
    background: linear-gradient(to bottom, #ffffff, #fff7ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 0;
}

/* Description */
.description {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 28px;
    color: white;
    text-align: center;
    max-width: 100%;
}

.description p {
    margin-bottom: 16px;
}

.description p:last-child {
    margin-bottom: 0;
}

/* Button container */
.button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Buy button */
.buy-button {
    background: #334cff;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-family: 'Panchang', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px -2px 5px 0px inset rgba(0, 0, 0, 0.32);
    flex: 1;
    max-width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.buy-button:hover {
    background: #2a3fd9;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(51, 76, 255, 0.5);
    animation: none;
}

/* Contract address */
.contract-address {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: all;
}

.contract-address:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.contract-address p {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 28px;
    color: white;
    letter-spacing: -0.108px;
    word-break: break-all;
    margin: 0;
}

/* Social buttons */
.social-buttons {
    width: 100%;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-button {
    background: white;
    color: #333;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 100%;
    letter-spacing: -0.084px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.social-button:hover {
    background: #f5f5f5;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-title {
        left: 50%;
        transform: translateX(-50%);
        top: 40px;
    }
    
    .content-card {
        width: 90%;
        max-width: 800px;
        padding: 32px;
        margin-top: 150px;
    }
}

@media (max-width: 768px) {
    .main-title {
        left: 50%;
        transform: translateX(-50%);
        top: 30px;
    }
    
    .content-card {
        width: 90%;
        max-width: 800px;
        padding: 24px;
        margin-top: 150px;
    }
    
    .subtitle {
        font-size: 24px;
        line-height: 24px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .brand-title {
        font-size: 32px;
        line-height: 32px;
    }
    
    .description {
        font-size: 16px;
        line-height: 24px;
    }
    
    .buy-button {
        font-size: 18px;
        padding: 14px 20px;
    }
    
    .contract-address p {
        font-size: 14px;
        line-height: 20px;
    }
    
    .social-button {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .main-title {
        left: 50%;
        transform: translateX(-50%);
        top: 20px;
    
    }
    
    .content-card {
        width: 90%;
        max-width: 800px;
        padding: 16px;
        margin-top: 40px;
        
    }
    
    .subtitle {
        font-size: 20px;
        line-height: 20px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .brand-title {
        font-size: 28px;
        line-height: 28px;
    }
    
    .description {
        font-size: 14px;
        line-height: 20px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .social-button {
        max-width: none;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .content-card {
        margin-top: 80px;
        padding: 12px;
    }
    
    .main-title {
        font-size: clamp(40px, 12vw, 60px);
        top: 5px;
    }
    
    /* Reduce animation intensity on very small screens */
    .animate-float {
        animation: float 4s ease-in-out infinite;
    }
    
    .animate-pulse {
        animation: pulse 3s ease-in-out infinite;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-float,
    .animate-pulse,
    .animate-glow {
        animation: none;
    }
}
