/* design-revamp.css: Anthropic-style design system */

/* Premium Card Style */
.premium-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.25s ease;
}

.premium-card:hover {
    border-color: #000000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Section border */
.section-border {
    border-bottom: 1px solid #e5e5e5;
}

/* Heading font */
.font-heading {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

/* Unblocking glass effects */
.glass-liquid {
    --tw-backdrop-blur: blur(24px);
    -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
    backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
    background-color: #ffffff1a;
    border-width: 1px;
    border-color: #fff3;
    border-radius: 1rem;
    box-shadow: 0 8px 32px #1f26875e;
}

.glass-sphere-overlay {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 5px rgba(255, 255, 255, 0.5), 0 10px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
}

/* -------------------------------------------
   Global Animation Utilities
   ------------------------------------------- */

/* Initial state: Hidden and shifted down */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* Visible state: triggered by observer */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.stagger-delay-1 {
    transition-delay: 0.1s;
}

.stagger-delay-2 {
    transition-delay: 0.2s;
}

.stagger-delay-3 {
    transition-delay: 0.3s;
}

.stagger-delay-4 {
    transition-delay: 0.4s;
}

.stagger-delay-5 {
    transition-delay: 0.5s;
}

/* -------------------------------------------
   Advanced Visual Effects (Grid, 3D, Shaders)
   ------------------------------------------- */

/* 1. Geometric Grid Background */
.bg-grid-pattern {
    background-size: 50px 50px;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* 2. Orbital Cube Animation */
.orbital-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    perspective: 1000px;
}

.orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(0, 0, 0, 0.3);
    /* Darker ring */
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation: spin-slow 20s linear infinite;
}

.ring-2 {
    width: 70%;
    height: 70%;
    animation: spin-reverse 15s linear infinite;
    border-style: dashed;
}

.ring-3 {
    width: 130%;
    height: 130%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cube-container {
    width: 80px;
    height: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(-30deg) rotateY(45deg);
    animation: rotate-cube 10s linear infinite;
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #000;
    border: 1px solid #333;
    opacity: 0.95;
    border-radius: 8px;
    /* Soft edges */
}

.cube-face:nth-child(1) {
    transform: rotateY(0deg) translateZ(40px);
}

.cube-face:nth-child(2) {
    transform: rotateY(90deg) translateZ(40px);
}

.cube-face:nth-child(3) {
    transform: rotateY(180deg) translateZ(40px);
}

.cube-face:nth-child(4) {
    transform: rotateY(-90deg) translateZ(40px);
}

.cube-face:nth-child(5) {
    transform: rotateX(90deg) translateZ(40px);
}

.cube-face:nth-child(6) {
    transform: rotateX(-90deg) translateZ(40px);
}

/* Center dot in cube */
.cube-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    transform: translate(-50%, -50%) translateZ(42px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

@keyframes spin-slow {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes spin-reverse {
    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

@keyframes rotate-cube {
    0% {
        transform: translate(-50%, -50%) rotateX(-30deg) rotateY(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(-30deg) rotateY(360deg);
    }
}

/* 3. Noisy Sphere (CSS Approximation) */
.noise-sphere-container {
    width: 300px;
    height: 300px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, #f3f4f6, #d1d5db);
    box-shadow: inset -20px -20px 50px rgba(0, 0, 0, 0.1);
}

.noise-overlay {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.4;
    animation: noise-shift 0.5s steps(3) infinite;
    mix-blend-mode: overlay;
}

@keyframes noise-shift {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-5%, -5%);
    }

    50% {
        transform: translate(5%, 5%);
    }

    75% {
        transform: translate(-5%, 5%);
    }

    100% {
        transform: translate(0, 0);
    }
}

/* 4. Particle Field for Digital Rain (Structure) */
#digital-rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    /* Very subtle */
}

/* -------------------------------------------
   Ported Animations from Website 1
   ------------------------------------------- */

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 120s linear infinite;
}

.animate-scan-line {
    animation: scan-line 4s linear infinite;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}

@keyframes scan-line {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Simple 3D rotations for Quantum Core rings */
.preserve-3d {
    transform-style: preserve-3d;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

@keyframes gyro-1 {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(180deg);
    }
}

.animate-gyro-1 {
    animation: gyro-1 15s linear infinite;
}

@keyframes gyro-2 {
    0% {
        transform: rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateY(-360deg) rotateZ(90deg);
    }
}

.animate-gyro-2 {
    animation: gyro-2 12s linear infinite;
}

@keyframes gyro-3 {
    0% {
        transform: rotateZ(0deg) rotateX(0deg);
    }

    100% {
        transform: rotateZ(360deg) rotateX(-180deg);
    }
}

.animate-gyro-3 {
    animation: gyro-3 8s linear infinite;
}

@keyframes gyro-4 {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.animate-gyro-4 {
    animation: gyro-4 20s ease-in-out infinite;
}

/* Additional Utility Classes */
.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Re-adding base animations if missing or for compatibility */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}