/* Color Palette */
:root {
    --color-morning-sky: #e8f4f8;
    --color-warm-cloud: #fdf6ec;
    --color-frost-white: #ffffff;
    --color-deep-azure: #2563eb;
    --color-warm-amber: #f59e0b;
    --color-slate-deep: #1e293b;
    --color-slate-mid: #64748b;
    --color-sky-petal: #a8d8ea;
    --color-soft-lilac: #c3b1e1;
    --color-crystal-edge: #ffffff;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--color-slate-deep);
    background: linear-gradient(180deg, var(--color-morning-sky) 0%, var(--color-warm-cloud) 100%);
    position: relative;
    min-height: 100vh;
}

/* Noise Texture Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    filter: url(#noiseFilter);
    opacity: 0.03;
    mix-blend-mode: overlay;
    animation: fadeInNoise 500ms ease-out forwards;
    z-index: 1;
}

@keyframes fadeInNoise {
    from { opacity: 0; }
    to { opacity: 0.03; }
}

/* Particle Canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    z-index: 3;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-slate-deep);
    margin-bottom: 1rem;
    animation: fadeInChars 0.8s ease-out 0.3s both;
}

.hero-title .char {
    display: inline-block;
    animation: heroFloat 3.5s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.08s);
    --float-amp: 4px;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(var(--float-amp)); }
}

@keyframes fadeInChars {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--color-deep-azure);
    animation: fadeIn 400ms ease-out 1.6s both;
}

.hero-subtitle .char-subtitle {
    display: inline-block;
    animation: heroFloat 3.5s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.08s + 1.6s);
    --float-amp: 3px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-peek {
    position: absolute;
    bottom: -40px;
    animation: peekSlideIn 600ms cubic-bezier(0.22, 1, 0.36, 1) 2.2s both;
}

.peek-card {
    width: 300px;
    height: 180px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

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

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 3;
    padding: 4rem 2rem;
}

/* Sections */
.section {
    max-width: 1100px;
    margin: 0 auto 8rem;
}

/* Section Titles */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-deep-azure);
    margin-bottom: 3rem;
    text-align: center;
}

.section-title .char-heading {
    display: inline-block;
    animation: sectionFloat 5s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.15s);
    --float-amp: 2px;
}

@keyframes sectionFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(var(--float-amp)); }
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 4vw, 4rem);
    max-width: 1100px;
}

.signal-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    max-columns: 2;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    filter: url(#noiseFilter);
    opacity: 0.02;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.card h3 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    font-weight: 500;
    color: var(--color-deep-azure);
    margin-bottom: 1rem;
}

.card p {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.9rem, 1.3vw, 1.05rem);
    font-weight: 300;
    line-height: 1.78;
    color: var(--color-slate-deep);
}

/* Full-Width Card */
.card.full-width {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.meditation-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-deep-azure);
    margin-bottom: 1.5rem;
}

.meditation-title .char-heading {
    display: inline-block;
    animation: sectionFloat 5s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.15s);
    --float-amp: 2px;
}

.meditation-text {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 300;
    line-height: 1.9;
    color: var(--color-slate-deep);
}

/* Silence Section */
.silence-section {
    text-align: center;
    padding: 4rem 2rem;
    margin: 8rem auto 4rem;
    max-width: 1100px;
}

.silence-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--color-slate-mid);
    animation: fadeIn 400ms ease-out 2s both;
}

/* Slide-in Animation */
.slide-in {
    opacity: 0;
    transform: translateY(30px);
}

.slide-in.visible {
    animation: slideReveal 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* Staggered animation for cards */
.signal-section .card:nth-child(1) { animation-delay: 0ms; }
.signal-section .card:nth-child(2) { animation-delay: 120ms; }

.coordinates-section .card-grid .card:nth-child(1) { animation-delay: 0ms; }
.coordinates-section .card-grid .card:nth-child(2) { animation-delay: 120ms; }
.coordinates-section .card-grid .card:nth-child(3) { animation-delay: 240ms; }
.coordinates-section .card-grid .card:nth-child(4) { animation-delay: 360ms; }

.origin-section .card:nth-child(1) { animation-delay: 0ms; }
.origin-section .card:nth-child(2) { animation-delay: 120ms; }
.origin-section .card:nth-child(3) { animation-delay: 240ms; }

.meditation-section .card { animation-delay: 0ms; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .char, .char-heading, .char-subtitle {
        animation: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .signal-grid {
        grid-template-columns: 1fr;
    }

    .section {
        margin-bottom: 6rem;
    }

    .card {
        padding: 1.5rem;
    }

    .content-wrapper {
        padding: 3rem 1rem;
    }

    .signal-section .card:nth-child(2) { animation-delay: 80ms; }
    .coordinates-section .card-grid .card:nth-child(2) { animation-delay: 80ms; }
    .coordinates-section .card-grid .card:nth-child(3) { animation-delay: 160ms; }
    .coordinates-section .card-grid .card:nth-child(4) { animation-delay: 240ms; }
    .origin-section .card:nth-child(2) { animation-delay: 80ms; }
    .origin-section .card:nth-child(3) { animation-delay: 160ms; }
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
    .card,
    .peek-card {
        background: rgba(255, 255, 255, 0.85);
    }
}
