/* Interactive Home - Main Styles */

/* Font-face fallback for browsers that don't load IRANSans from WP */
@font-face {
    font-family: 'IRANSans';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: local('IRANSans'), local('IRANSans(FaNum)'), local('IRANSans');
}

.nogh-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #ffffff;
    z-index: 1;
    margin: 0;
    padding: 0;
}

.elementor-section > .elementor-container > .elementor-widget-ih-interactive-home {
    width: 100%;
}

/* Canvas Grid */
.nogh-canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: block;
}

/* Ripple Layer */
.nogh-ripple-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Center Dot - Exact centering via transform-origin on inner elements */
.nogh-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    cursor: pointer;
    display: block;
    width: 0;
    height: 0;
    /* No transform on container - animate inner elements only */
}

.nogh-center-dot__core {
    position: absolute;
    width: var(--nogh-center-size, 12px);
    height: var(--nogh-center-size, 12px);
    border-radius: 50%;
    background-color: var(--nogh-center-color, #000000);
    z-index: 2;
    left: calc(var(--nogh-center-size, 12px) / -2);
    top: calc(var(--nogh-center-size, 12px) / -2);
}

.nogh-center-dot__pulse {
    position: absolute;
    width: var(--nogh-center-size, 12px);
    height: var(--nogh-center-size, 12px);
    border-radius: 50%;
    border: 1px solid var(--nogh-center-halo, rgba(0, 0, 0, 0.15));
    z-index: 1;
    left: calc(var(--nogh-center-size, 12px) / -2);
    top: calc(var(--nogh-center-size, 12px) / -2);
    transform-origin: center center;
    animation: nogh-pulse var(--nogh-pulse-speed, 2s) ease-out infinite;
}

.nogh-center-dot__pulse--delay {
    animation-delay: calc(var(--nogh-pulse-speed, 2s) / 2);
}

/* Pulse Style: ripple (default) */
@keyframes nogh-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(var(--nogh-pulse-scale, 4));
        opacity: 0;
    }
}

/* Pulse Style: breathing */
.nogh-pulse-style--breathing .nogh-center-dot__pulse {
    animation-name: nogh-pulse-breathing;
}
@keyframes nogh-pulse-breathing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.6);
        opacity: 0.15;
    }
}

/* Pulse Style: glow */
.nogh-pulse-style--glow .nogh-center-dot__pulse {
    animation-name: nogh-pulse-glow;
    border: none;
    box-shadow: 0 0 0 0 var(--nogh-center-halo, rgba(0, 0, 0, 0.15));
}
@keyframes nogh-pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 4px 2px var(--nogh-center-halo, rgba(0, 0, 0, 0.3));
        opacity: 0.6;
    }
    100% {
        transform: scale(var(--nogh-pulse-scale, 4));
        box-shadow: 0 0 12px 6px var(--nogh-center-halo, rgba(0, 0, 0, 0));
        opacity: 0;
    }
}

/* Pulse Style: heartbeat */
.nogh-pulse-style--heartbeat .nogh-center-dot__pulse {
    animation-name: nogh-pulse-heartbeat;
}
@keyframes nogh-pulse-heartbeat {
    0% { transform: scale(1); opacity: 0.6; }
    14% { transform: scale(1.3); opacity: 0.4; }
    28% { transform: scale(1); opacity: 0.6; }
    42% { transform: scale(1.3); opacity: 0.4; }
    70% { transform: scale(var(--nogh-pulse-scale, 4)); opacity: 0; }
    100% { transform: scale(var(--nogh-pulse-scale, 4)); opacity: 0; }
}

/* Pulse Style: ring */
.nogh-pulse-style--ring .nogh-center-dot__pulse {
    animation-name: nogh-pulse-ring;
    border-width: 2px;
}
@keyframes nogh-pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
        border-width: 2px;
    }
    100% {
        transform: scale(var(--nogh-pulse-scale, 4));
        opacity: 0;
        border-width: 1px;
    }
}

/* Logo Wrapper */
.nogh-logo-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    opacity: 0;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nogh-logo-wrapper::before {
    content: '';
    position: absolute;
    width: var(--nogh-logo-gradient-size, 200px);
    height: var(--nogh-logo-gradient-size, 200px);
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        var(--nogh-logo-gradient-color, rgba(255,255,255,1)) 0%,
        var(--nogh-logo-gradient-fade, rgba(255,255,255,0.8)) 50%,
        transparent 100%
    );
    opacity: var(--nogh-logo-gradient-opacity, 1);
    pointer-events: none;
    z-index: -1;
}

.nogh-logo-img,
.nogh-logo-placeholder {
    width: var(--nogh-logo-size, 80px);
    height: var(--nogh-logo-size, 80px);
    display: block;
}

.nogh-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nogh-logo-placeholder {
    background: var(--nogh-logo-color, #000000);
    border-radius: 50%;
    opacity: 0.1;
}

/* Footer / Tagline */
.nogh-footer-text {
    position: absolute;
    bottom: var(--nogh-tagline-bottom, 40px);
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 5;
    pointer-events: none;
    padding: 10px 0;
}

.nogh-footer-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--nogh-tagline-gradient-width, 300px);
    height: var(--nogh-tagline-gradient-height, 100px);
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        var(--nogh-tagline-gradient-color, rgba(255,255,255,1)) 0%,
        var(--nogh-tagline-gradient-fade, rgba(255,255,255,0.8)) 50%,
        transparent 100%
    );
    opacity: var(--nogh-tagline-gradient-opacity, 1);
    pointer-events: none;
    z-index: -1;
}

.nogh-tagline {
    font-family: var(--nogh-tagline-font-family, 'IRANSans', 'Tahoma', sans-serif);
    font-size: var(--nogh-tagline-size, 14px);
    font-weight: var(--nogh-tagline-weight, 300);
    font-style: var(--nogh-tagline-style, normal);
    font-variant: var(--nogh-tagline-variant, normal);
    text-transform: var(--nogh-tagline-transform, none);
    text-decoration: var(--nogh-tagline-decoration, none);
    color: var(--nogh-tagline-color, #999);
    letter-spacing: var(--nogh-tagline-spacing, 0.5px);
    line-height: var(--nogh-tagline-height, 1.6);
    margin: 0;
    padding: 0;
    white-space: pre-line;
}

/* Cursor Follower */
.nogh-cursor-follower {
    position: fixed;
    top: -4px;
    left: -4px;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(0, 0);
    mix-blend-mode: difference;
    will-change: transform;
}
