/* ========================================
   SACRED GEOMETRY PARTICLES & ANIMATIONS
   SpiralGate.ai - Enhanced Visual Layer
   ======================================== */

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.reveal-on-scroll[data-delay="1"] { transition-delay: 0.1s; }
.reveal-on-scroll[data-delay="2"] { transition-delay: 0.2s; }
.reveal-on-scroll[data-delay="3"] { transition-delay: 0.3s; }
.reveal-on-scroll[data-delay="4"] { transition-delay: 0.4s; }

/* ========================================
   PULSE ANIMATIONS
   ======================================== */

@keyframes pulse-out {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes symbol-glow-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.7));
    }
}

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

/* ========================================
   SHIMMER FLOW ANIMATION
   ======================================== */

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

/* ========================================
   LOADING ANIMATION STYLES
   ======================================== */

#spiral-loader .loader-content {
    text-align: center;
}

#spiral-loader .loader-spiral {
    animation: loader-rotate 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(155, 89, 182, 0.5));
}

#spiral-loader .loader-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: loader-draw 3s ease-in-out infinite;
}

#spiral-loader .loader-text {
    margin-top: 1.5rem;
    font-family: "Cinzel", serif;
    color: rgba(212, 175, 55, 0.8);
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: loader-text-pulse 2s ease-in-out infinite;
}

@keyframes loader-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes loader-draw {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0.3;
    }
    50% {
        stroke-dashoffset: 500;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.3;
    }
}

@keyframes loader-text-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ========================================
   GLYPH FLOAT ANIMATION
   ======================================== */

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

/* ========================================
   ENHANCED CARD HOVER EFFECTS
   ======================================== */

.coherence-card {
    position: relative;
    overflow: hidden;
}

.coherence-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(212, 175, 55, 0.1) 45deg,
        transparent 90deg
    );
    opacity: 0;
    animation: card-shine 8s linear infinite;
    pointer-events: none;
}

.coherence-card:hover::after {
    opacity: 1;
}

@keyframes card-shine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   PORTAL TITLE ENHANCED ANIMATION
   ======================================== */

.portal-title {
    position: relative;
    animation: title-breathe 6s ease-in-out infinite;
}

@keyframes title-breathe {
    0%, 100% {
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    }
    50% {
        text-shadow: 0 0 50px rgba(212, 175, 55, 0.5),
                     0 0 80px rgba(155, 89, 182, 0.3);
    }
}

/* ========================================
   SPIRAL SYMBOL ENHANCED ANIMATION
   ======================================== */

.spiral-symbol {
    transition: transform 0.5s ease;
}

.spiral-symbol:hover {
    transform: scale(1.1) rotate(15deg);
    filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.6));
}

/* ========================================
   BUTTON RIPPLE EFFECT
   ======================================== */

.weave-cta,
.promo-cta,
.invitation-cta,
.portal-btn {
    position: relative;
    overflow: hidden;
}

.weave-cta::after,
.promo-cta::after,
.invitation-cta::after,
.portal-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.weave-cta:hover::after,
.promo-cta:hover::after,
.invitation-cta:hover::after,
.portal-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   NAVIGATION LINK ENHANCED HOVER
   ======================================== */

.main-navigation a {
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--spiral-gold), 
        var(--spiral-violet),
        transparent
    );
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.main-navigation a:hover::after {
    transform: scaleX(1);
}

/* ========================================
   QUESTION BLOCK ENTRANCE ANIMATION
   ======================================== */

.question-block {
    position: relative;
}

.question-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(212, 175, 55, 0.05) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.question-block:hover::after {
    opacity: 1;
}

/* ========================================
   FOOTER GRADIENT ANIMATION
   ======================================== */

.site-footer::before {
    animation: footer-gradient 8s linear infinite;
    background-size: 200% 100%;
}

@keyframes footer-gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ========================================
   BREATH ANCHOR STYLES
   ======================================== */

.breath-anchor {
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
}

.breath-content {
    max-width: 500px;
    margin: 0 auto;
}

.breath-symbol {
    font-size: 3rem;
    color: var(--spiral-gold);
    margin-bottom: 1.5rem;
    display: block;
    animation: breath-symbol-pulse 4s ease-in-out infinite;
}

@keyframes breath-symbol-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.breath-instruction {
    font-size: 1.2rem;
    color: var(--spiral-violet);
    font-style: italic;
    margin-bottom: 2rem;
}

.breath-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin: 2rem 0;
}

.breath-circle {
    width: 60px;
    height: 60px;
    border: 2px solid var(--spiral-gold);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    transition: all 4s ease-in-out;
}

.breath-circle.breathing {
    animation: breath-expand 8s ease-in-out infinite;
}

@keyframes breath-expand {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    }
    50% {
        transform: scale(1.8);
        opacity: 1;
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.4),
                    0 0 80px rgba(155, 89, 182, 0.2);
    }
}

.breath-wisdom {
    font-size: 1rem;
    color: var(--spiral-light);
    opacity: 0.7;
}

/* ========================================
   SACRED WELCOME OVERLAY
   ======================================== */

.sacred-welcome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.sacred-welcome.visible {
    opacity: 1;
    visibility: visible;
}

.sacred-welcome.fading {
    opacity: 0;
    visibility: hidden;
}

.welcome-content {
    text-align: center;
    max-width: 500px;
    padding: 3rem;
    animation: welcome-fade-in 1.5s ease forwards;
}

@keyframes welcome-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-glyph {
    font-size: 4rem;
    color: var(--spiral-gold);
    margin-bottom: 2rem;
    animation: glyph-float 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.5));
}

.welcome-phrase {
    font-family: "Cinzel", serif;
    font-size: 2rem;
    color: var(--spiral-gold);
    letter-spacing: 5px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.welcome-message {
    font-size: 1.2rem;
    color: var(--spiral-violet);
    font-style: italic;
    margin-bottom: 1rem;
}

.welcome-truth {
    font-size: 1rem;
    color: var(--spiral-light);
    opacity: 0.8;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.welcome-enter {
    background: transparent;
    border: 1px solid var(--spiral-gold);
    color: var(--spiral-gold);
    padding: 1rem 2.5rem;
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s ease;
}

.welcome-enter:hover {
    background: var(--spiral-gold);
    color: var(--spiral-deep);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

/* ========================================
   SOFT WELCOME FOR RETURNING VISITORS
   ======================================== */

.soft-welcome {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    animation: soft-welcome-fade 4s ease-in-out 1s forwards;
}

@keyframes soft-welcome-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.soft-welcome__message {
    font-style: italic;
    color: var(--spiral-violet);
    font-size: 1rem;
    text-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
}

/* ========================================
   SPIRAL LISTENING INDICATOR
   ======================================== */

.spiral-listening {
    position: fixed;
    bottom: 100px;
    right: 30px;
    font-size: 0.75rem;
    color: rgba(155, 89, 182, 0.4);
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 10;
    animation: listening-pulse 4s ease-in-out infinite;
}

@keyframes listening-pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* ========================================
   COMMUNITY INVITATION STYLES
   ======================================== */

.community-invitation {
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(107, 76, 154, 0.08) 0%, transparent 70%);
}

.community-invitation .invitation-symbol {
    font-size: 2.5rem;
    color: var(--spiral-gold);
    margin-bottom: 1.5rem;
    display: block;
    animation: symbol-glow-pulse 3s ease-in-out infinite;
}

.community-invitation .invitation-heading {
    font-family: "Cinzel", serif;
    font-size: 1.8rem;
    color: var(--spiral-gold);
    letter-spacing: 5px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.community-invitation .invitation-message {
    font-size: 1.1rem;
    color: var(--spiral-light);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.9;
    opacity: 0.9;
}

.community-invitation .invitation-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--spiral-gold);
    color: var(--spiral-gold);
    text-decoration: none;
    font-family: "Cinzel", serif;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.4s ease;
    margin-bottom: 3rem;
}

.community-invitation .invitation-cta:hover {
    background: var(--spiral-gold);
    color: var(--spiral-deep);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
}

/* Starter Glyph */
.starter-glyph {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 15px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(10, 10, 20, 0.5);
}

.starter-glyph-label {
    font-size: 0.85rem;
    color: var(--spiral-violet);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.starter-glyph-symbol {
    font-size: 4rem;
    color: var(--spiral-gold);
    display: block;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.5s ease;
}

.starter-glyph-symbol:hover {
    transform: scale(1.2) rotate(15deg);
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.6));
    color: var(--spiral-violet);
}

.starter-glyph-hint {
    font-size: 0.8rem;
    color: var(--spiral-light);
    opacity: 0.5;
    font-style: italic;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .welcome-phrase {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }
    
    .welcome-glyph {
        font-size: 3rem;
    }
    
    .soft-welcome {
        width: 90%;
        text-align: center;
    }
    
    .spiral-listening {
        display: none;
    }
    
    .breath-circle.breathing {
        animation: breath-expand-mobile 8s ease-in-out infinite;
    }
    
    @keyframes breath-expand-mobile {
        0%, 100% {
            transform: scale(1);
            opacity: 0.5;
        }
        50% {
            transform: scale(1.5);
            opacity: 1;
        }
    }
}
