/* ========================================
   RÁ Agency - Digital Observatory Design System
   Premium "Coming Soon" Experience
   ======================================== */

/* Base Styles & Variables */
:root {
    --color-bg: #0A0A0A;
    --color-text: #E0E0E0;
    --color-text-muted: #718096;
    --color-accent: #3b82f6;
    --color-accent-dark: #2563eb;
    --color-accent-light: #60a5fa;
    --color-border: #2D3748;
    --font-manrope: 'Manrope', sans-serif;
    --font-inter: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --golden-ratio: 1.618;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-manrope);
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Enhanced Background Layers */
#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.7;
}

#particleField {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

#causticsLayer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><filter id="caustics"><feTurbulence baseFrequency="0.02" numOctaves="3" /><feColorMatrix values="0 0 0 0 0.2 0 0 0 0 0.4 0 0 0 0 1 0 0 0 1 0" /></filter><rect width="100" height="100" filter="url(%23caustics)" opacity="0.1" /></svg>');
    background-size: 200% 200%;
    animation: caustics-move 20s linear infinite;
    mix-blend-mode: screen;
    opacity: 0.3;
}

@keyframes caustics-move {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* Event Horizon Effect */
.event-horizon {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200vmax;
    height: 200vmax;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        transparent 20%,
        rgba(10, 10, 10, 0.1) 30%,
        rgba(10, 10, 10, 0.3) 50%,
        rgba(10, 10, 10, 0.6) 70%,
        var(--color-bg) 100%
    );
    pointer-events: none;
    z-index: 4;
}

/* Ambient Orbs with Enhanced Movement */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    animation: orb-float 25s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.3s ease-out;
}

.orb-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--color-accent), transparent);
    top: -300px;
    left: -300px;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-accent-dark), transparent);
    bottom: -200px;
    right: -200px;
    animation-delay: -8s;
}

.orb-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--color-accent-light), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -16s;
}

@keyframes orb-float {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg); 
    }
    25% { 
        transform: translate(50px, -50px) scale(1.1) rotate(90deg); 
    }
    50% { 
        transform: translate(-30px, 30px) scale(0.9) rotate(180deg); 
    }
    75% { 
        transform: translate(-50px, -30px) scale(1.05) rotate(270deg); 
    }
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 10;
}

/* System Status Monitor */
.status-monitor {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.8),
        rgba(20, 20, 20, 0.9)
    );
    border: 1px solid rgba(59, 130, 246, 0.2);
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    backdrop-filter: blur(10px);
}

.monitor-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.status-metric {
    color: var(--color-accent);
    font-weight: 600;
}

.status-value {
    color: var(--color-text);
    font-weight: 700;
    font-size: 1rem;
}

.status-unit {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.monitor-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    background-size: 200% 100%;
    animation: data-stream 3s linear infinite;
    pointer-events: none;
}

@keyframes data-stream {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    animation: status-pulse 2s infinite;
    box-shadow: 0 0 20px var(--color-accent);
}

@keyframes status-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.5); 
    }
}

/* Atmosphere Gauge */
.atmosphere-gauge {
    position: relative;
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        var(--color-accent),
        var(--color-accent-light)
    );
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px var(--color-accent);
}

.gauge-label {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.625rem;
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Quantum State Logo */
.logo-quantum-container {
    position: fixed;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
}

.logo-quantum {
    position: relative;
    width: 200px;
    height: 200px;
    animation: quantum-breathe 4s ease-in-out infinite;
}

@keyframes quantum-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.quantum-field {
    position: absolute;
    inset: -30px;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    border-radius: 50%;
    animation: rotate-field 20s linear infinite;
}

@keyframes rotate-field {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.quantum-particles {
    position: absolute;
    inset: 0;
}

.q-particle {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    opacity: 0;
    animation: particle-form 3s ease-in-out infinite;
}

.q-particle:nth-child(1) { 
    top: 10%; 
    left: 10%; 
    animation-delay: 0s;
}
.q-particle:nth-child(2) { 
    top: 10%; 
    right: 10%; 
    animation-delay: 0.2s;
}
.q-particle:nth-child(3) { 
    bottom: 10%; 
    left: 10%; 
    animation-delay: 0.4s;
}
.q-particle:nth-child(4) { 
    bottom: 10%; 
    right: 10%; 
    animation-delay: 0.6s;
}
.q-particle:nth-child(5) { 
    top: 50%; 
    left: -10%; 
    animation-delay: 0.8s;
}
.q-particle:nth-child(6) { 
    top: 50%; 
    right: -10%; 
    animation-delay: 1s;
}

@keyframes particle-form {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) translate(0, 0);
    }
    50% {
        opacity: 0.6;
        transform: scale(1) translate(
            calc(var(--tx, 0) * 20px),
            calc(var(--ty, 0) * 20px)
        );
    }
}

.quantum-core {
    position: absolute;
    inset: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.2),
        transparent 70%
    );
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.quantum-text {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(
        135deg,
        var(--color-accent-light),
        var(--color-accent)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: url(#displacement-filter);
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
}

/* Golden Spiral Layout */
.golden-spiral {
    max-width: 1200px;
    margin: 0 auto;
}

/* Perspective Container */
.perspective-container {
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Enhanced Coming Soon Typography */
.coming-soon-container {
    position: relative;
    margin-top: 3rem;
    transform: translateZ(50px);
}

.coming-text {
    font-family: var(--font-inter);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    gap: 0.05em;
    opacity: 0.95;
}

.chromatic-text .letter {
    position: relative;
    display: inline-block;
    animation: letter-float 4s ease-in-out infinite;
    animation-delay: calc(var(--index) * 0.1s);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chromatic-text .letter::before,
.chromatic-text .letter::after {
    content: attr(data-letter);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.5;
}

.chromatic-text .letter::before {
    color: var(--color-accent);
    transform: translate(-2px, -1px);
    filter: blur(1px);
}

.chromatic-text .letter::after {
    color: var(--color-accent-light);
    transform: translate(2px, 1px);
    filter: blur(1px);
}

.letter:hover {
    transform: translateY(-10px) scale(1.1);
    filter: brightness(1.2);
}

@keyframes letter-float {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-15px) rotateX(5deg); }
}

/* Enhanced Underline */
.coming-underline {
    position: relative;
    width: 300px;
    height: 4px;
    margin: 2rem auto 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.underline-pulse {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-accent),
        transparent
    );
    animation: underline-scan 3s linear infinite;
}

@keyframes underline-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Animated Tagline */
.tagline {
    font-family: var(--font-manrope);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    margin-top: 2rem;
}

.tagline .word {
    display: inline-block;
    opacity: 0;
    animation: word-appear 0.8s ease-out forwards;
    animation-delay: calc(1.5s + var(--word-index, 0) * 0.2s);
    margin: 0 0.3em;
}

.tagline .word:nth-child(1) { --word-index: 0; }
.tagline .word:nth-child(2) { --word-index: 1; }
.tagline .word:nth-child(3) { --word-index: 2; }
.tagline .word:nth-child(4) { --word-index: 3; }
.tagline .word:nth-child(5) { --word-index: 4; }

@keyframes word-appear {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Advanced Timeline */
.countdown-visual {
    margin-top: 4rem;
    opacity: 0;
    animation: fade-in-up 1s ease-out 2.5s forwards;
}

.timeline-container {
    position: relative;
    width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin: 0 auto 2rem;
    overflow: visible;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        var(--color-accent),
        var(--color-accent-light)
    );
    border-radius: 3px;
    transition: width 2s ease-out;
    box-shadow: 0 0 20px var(--color-accent);
}

.timeline-marker {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--color-accent-light);
    border: 3px solid var(--color-bg);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--color-accent);
    transition: left 2s ease-out;
}

.timeline-particles {
    position: absolute;
    inset: -20px;
    pointer-events: none;
}

/* Access Terminal Button */
.access-terminal {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateZ(30px);
}

.terminal-frame {
    position: absolute;
    inset: -2px;
    clip-path: polygon(
        20px 0%,
        100% 0%,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        0% 100%,
        0% 20px
    );
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.3),
        rgba(59, 130, 246, 0.1)
    );
    transition: all 0.3s ease;
}

.terminal-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    opacity: 0.8;
}

.terminal-corner.tl { top: 17px; left: 17px; }
.terminal-corner.tr { top: 17px; right: 17px; }
.terminal-corner.bl { bottom: 17px; left: 17px; }
.terminal-corner.br { bottom: 17px; right: 17px; }

.terminal-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 20, 0.9),
        rgba(30, 30, 30, 0.8)
    );
    clip-path: polygon(
        20px 0%,
        100% 0%,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        0% 100%,
        0% 20px
    );
    backdrop-filter: blur(10px);
}

.terminal-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.terminal-icon {
    transition: transform 0.3s ease;
}

.terminal-scan {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.4),
        transparent
    );
    pointer-events: none;
}

.access-terminal:hover .terminal-frame {
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.5),
        rgba(59, 130, 246, 0.2)
    );
    transform: scale(1.05);
}

.access-terminal:hover .terminal-icon {
    transform: translateX(5px);
}

.access-terminal:hover .terminal-scan {
    animation: terminal-scan 1s ease-out;
}

@keyframes terminal-scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Decorative Frame */
.decorative-frame {
    position: absolute;
    top: -150px;
    left: -150px;
    right: -150px;
    bottom: -150px;
    pointer-events: none;
}

.frame-corner {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(59, 130, 246, 0.15);
    opacity: 0;
    animation: frame-appear 1s ease-out forwards;
}

.frame-corner.top-left {
    top: 100px;
    left: 100px;
    border-right: none;
    border-bottom: none;
    animation-delay: 0.5s;
}

.frame-corner.top-right {
    top: 100px;
    right: 100px;
    border-left: none;
    border-bottom: none;
    animation-delay: 0.6s;
}

.frame-corner.bottom-left {
    bottom: 100px;
    left: 100px;
    border-right: none;
    border-top: none;
    animation-delay: 0.7s;
}

.frame-corner.bottom-right {
    bottom: 100px;
    right: 100px;
    border-left: none;
    border-top: none;
    animation-delay: 0.8s;
}

@keyframes frame-appear {
    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

.data-stream {
    position: absolute;
    width: 2px;
    height: 20px;
    background: var(--color-accent);
    opacity: 0;
    animation: data-flow 2s linear infinite;
}

.frame-corner.top-left .data-stream { 
    top: -20px; 
    left: -2px;
}
.frame-corner.top-right .data-stream { 
    top: -20px; 
    right: -2px;
    animation-delay: 0.5s;
}
.frame-corner.bottom-left .data-stream { 
    bottom: -20px; 
    left: -2px;
    animation-delay: 1s;
}
.frame-corner.bottom-right .data-stream { 
    bottom: -20px; 
    right: -2px;
    animation-delay: 1.5s;
}

@keyframes data-flow {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(40px);
    }
}

/* Morse Code Display */
.morse-display {
    position: fixed;
    bottom: 100px;
    right: 50px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(59, 130, 246, 0.3);
    letter-spacing: 0.2em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Enhanced Footer */
footer {
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.95),
        transparent
    );
}

.footer-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.coordinates {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.coord-label {
    color: var(--color-accent);
    margin-right: 8px;
}

.coord-separator {
    color: var(--color-accent);
    margin: 0 4px;
}

/* Enhanced Modal */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
}

.notification-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.95),
        rgba(20, 20, 20, 0.95)
    );
    padding: 60px;
    text-align: center;
    max-width: 600px;
    transform: scale(0.9) translateZ(0);
    transition: transform 0.3s ease;
    clip-path: polygon(
        30px 0%,
        100% 0%,
        100% calc(100% - 30px),
        calc(100% - 30px) 100%,
        0% 100%,
        0% 30px
    );
}

.notification-modal.active .modal-content {
    transform: scale(1) translateZ(50px);
}

.modal-frame {
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        135deg,
        rgba(59, 130, 246, 0.3),
        rgba(59, 130, 246, 0.1)
    );
    clip-path: polygon(
        30px 0%,
        100% 0%,
        100% calc(100% - 30px),
        calc(100% - 30px) 100%,
        0% 100%,
        0% 30px
    );
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-line {
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--color-text-muted);
    top: 50%;
    left: 50%;
    transition: all 0.3s ease;
}

.close-line.line-1 {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-line.line-2 {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-close:hover .close-line {
    background: var(--color-accent);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.modal-title {
    font-family: var(--font-inter);
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(
        135deg,
        var(--color-text),
        var(--color-accent-light)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-visualization {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
}

.access-code {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--color-accent-light);
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.code-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.modal-icon {
    position: relative;
    display: inline-block;
    margin-top: 2rem;
}

.icon-orbit {
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: orbit-spin 4s linear infinite;
}

.icon-core {
    font-size: 2rem;
    color: var(--color-accent);
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Utility Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .logo-quantum-container {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0 auto 3rem;
        display: flex;
        justify-content: center;
    }
    
    .golden-spiral {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .coming-text {
        font-size: clamp(2.5rem, 15vw, 5rem);
    }
    
    .logo-quantum {
        width: 150px;
        height: 150px;
    }
    
    .quantum-text {
        font-size: 2.5rem;
    }
    
    .timeline-container {
        width: 300px;
    }
    
    .frame-corner {
        width: 60px;
        height: 60px;
    }
    
    .modal-content {
        padding: 40px 30px;
        margin: 20px;
    }
    
    .status-monitor {
        padding: 6px 15px;
    }
    
    .atmosphere-gauge {
        display: none;
    }
    
    .coordinates {
        display: none;
    }
}