/* ========================================
   CASTAGENT DESIGN SYSTEM
   Cyberpunk Meme Landing Page
   ======================================== */

/* === CSS VARIABLES (Design Tokens) === */
:root {
    /* Colors */
    --bg: #0A0F25;
    --card: #0F182D;
    --line: #1B2440;
    --fg: #E6EDF3;
    
    /* Accent Colors */
    --cyan: #00D5FF;
    --violet: #7A00FF;
    --pink: #FF0080;
    --gold: #FFD23F;
    
    /* Gradients */
    --gradient-brand: linear-gradient(90deg, #00D5FF 0%, #7A00FF 50%, #FF0080 100%);
    --gradient-brand-vertical: linear-gradient(180deg, #00D5FF 0%, #7A00FF 50%, #FF0080 100%);
    
    /* Typography */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing (8px base) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 64px;
    
    /* Grid */
    --container-width: 1140px;
    --gutter: 24px;
    
    /* Borders */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --glow-cyan: 0 0 20px rgba(0, 213, 255, 0.6), 0 0 40px rgba(0, 213, 255, 0.3);
    --glow-violet: 0 0 20px rgba(122, 0, 255, 0.6), 0 0 40px rgba(122, 0, 255, 0.3);
    --glow-pink: 0 0 20px rgba(255, 0, 128, 0.6), 0 0 40px rgba(255, 0, 128, 0.3);
    --glow-brand: 0 0 30px rgba(0, 213, 255, 0.4), 0 0 60px rgba(122, 0, 255, 0.3), 0 0 90px rgba(255, 0, 128, 0.2);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    position: relative;
}

/* Background noise texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

body > * {
    position: relative;
    z-index: 2;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: clamp(20px, 3vw, 24px); }

p {
    margin-bottom: var(--space-2);
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--violet);
}

code {
    font-family: 'Monaco', 'Courier New', monospace;
    background: var(--card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* === LAYOUT === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--space-6) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-5);
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === HEADER === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 15, 37, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: var(--space-2) 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(var(--glow-brand));
    transition: var(--transition);
}

.logo-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.contract-block {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--card);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius);
    border: 1px solid var(--line);
}

.contract-label {
    font-size: 0.875rem;
    color: var(--fg);
    opacity: 0.7;
}

.contract-address {
    font-size: 0.875rem;
    color: var(--cyan);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: var(--glow-brand);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 213, 255, 0.5), 0 0 70px rgba(122, 0, 255, 0.4), 0 0 100px rgba(255, 0, 128, 0.3);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--cyan);
    border: 2px solid var(--violet);
    box-shadow: 0 0 10px rgba(122, 0, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(122, 0, 255, 0.2);
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 213, 255, 0.5);
    color: white;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--fg);
    padding: var(--space-1);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.icon-large {
    width: 48px;
    height: 48px;
}

/* === HERO SECTION === */
.hero {
    padding: var(--space-6) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.hero-title {
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyan);
    clip: rect(24px, 9999px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--pink);
    clip: rect(85px, 9999px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(61px, 9999px, 90px, 0); }
    20% { clip: rect(33px, 9999px, 65px, 0); }
    40% { clip: rect(20px, 9999px, 45px, 0); }
    60% { clip: rect(95px, 9999px, 115px, 0); }
    80% { clip: rect(10px, 9999px, 85px, 0); }
    100% { clip: rect(70px, 9999px, 100px, 0); }
}

.hero-lead {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.7;
    margin-bottom: var(--space-4);
    opacity: 0.9;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-2);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 213, 255, 0.2);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mascot-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.mascot {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 213, 255, 0.6)) 
            drop-shadow(0 0 60px rgba(122, 0, 255, 0.4)) 
            drop-shadow(0 0 90px rgba(255, 0, 128, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-10px) rotate(-2deg); }
}

/* === CARDS === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-3);
}

.card {
    padding: var(--space-4);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.card-base {
    background: var(--card);
    border: 1px solid var(--line);
}

.card-base:hover {
    border-color: var(--violet);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-neon {
    background: var(--card);
    border: 2px solid var(--violet);
    box-shadow: var(--glow-violet);
}

.card-neon:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.card-icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-3);
    color: var(--cyan);
}

.card-title {
    text-align: center;
    margin-bottom: var(--space-2);
    color: var(--cyan);
}

.card-text {
    text-align: center;
    opacity: 0.9;
    line-height: 1.6;
}

.card-text.large {
    font-size: 1.125rem;
    text-align: left;
}

/* === HOW IT WORKS === */
.how-it-works {
    background: linear-gradient(180deg, transparent 0%, rgba(122, 0, 255, 0.05) 100%);
}

/* === MEME QUEST === */
.meme-quest {
    background: linear-gradient(180deg, rgba(122, 0, 255, 0.05) 0%, transparent 100%);
}

.quest-input-group {
    margin: var(--space-4) 0;
}

.input-copy {
    position: relative;
}

.input-copy input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: var(--border-radius);
    color: var(--fg);
    font-size: 16px;
    font-family: var(--font-stack);
    transition: var(--transition);
}

.input-copy input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.quest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

/* === BUYBACK SECTION === */
.timer-placeholder {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    padding: var(--space-3);
    margin: var(--space-4) 0;
    text-align: center;
}

.timer-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: var(--space-1);
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.buyback-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
    margin-top: var(--space-4);
}

.link-button {
    padding: var(--space-1) var(--space-3);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    color: var(--cyan);
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-block;
}

.link-button:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
    background: rgba(0, 213, 255, 0.1);
}

/* === MEME WALL === */
.meme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-3);
}

.meme-card {
    overflow: hidden;
}

.meme-placeholder {
    aspect-ratio: 1;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(0, 213, 255, 0.1), rgba(255, 0, 128, 0.1));
    margin-bottom: var(--space-2);
    border-radius: var(--border-radius);
}

.meme-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.meme-author {
    color: var(--cyan);
}

.meme-likes {
    color: var(--gold);
}

/* === FAQ SECTION === */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.faq-item {
    margin-bottom: var(--space-4);
}

.faq-question {
    color: var(--cyan);
    margin-bottom: var(--space-1);
    font-size: 1.125rem;
}

.faq-answer {
    opacity: 0.9;
    margin: 0;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.link-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.link-item:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
    transform: translateX(4px);
}

/* === FOOTER === */
.footer {
    padding: var(--space-6) 0 var(--space-4);
    border-top: 1px solid var(--line);
    text-align: center;
}

.disclaimer {
    max-width: 800px;
    margin: 0 auto var(--space-4);
    padding: var(--space-3);
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid var(--pink);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--fg);
    transition: var(--transition);
}

.social-link:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.875rem;
    opacity: 0.6;
    margin: 0;
}

/* === RESPONSIVE === */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .hero-visual {
        order: -1;
    }
    
    .mascot {
        max-width: 300px;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .hero-title,
    .hero-lead {
        text-align: center;
    }
    
    .hero-badges {
        justify-content: center;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .contract-block {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-4) 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .mascot {
        max-width: 200px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .meme-grid {
        grid-template-columns: 1fr;
    }
    
    .quest-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .quest-actions .btn {
        width: 100%;
    }
    
    .section {
        padding: var(--space-4) 0;
    }
}

/* Extra small mobile (≤390px) */
@media (max-width: 390px) {
    :root {
        --space-3: 16px;
        --space-4: 24px;
        --space-5: 32px;
        --space-6: 48px;
    }
    
    .container {
        padding: 0 var(--space-2);
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .card {
        padding: var(--space-3);
    }
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === ANIMATIONS === */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 213, 255, 0.4); }
    50% { box-shadow: 0 0 40px rgba(0, 213, 255, 0.8); }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.skeleton {
    animation: shimmer 1.5s infinite;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}
