/* ============================================
   WARRANCY WEBSITE — Scroll & Element Animations
   ============================================ */

/* --- Scroll Reveal --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* --- Document Card Animations --- */
.animate-doc {
    opacity: 0;
    transform: translateX(-10px);
    animation: doc-slide-in 0.6s var(--ease-out) forwards;
}

.animate-doc:nth-child(1) { animation-delay: 1s; }
.animate-doc:nth-child(2) { animation-delay: 1.3s; }
.animate-doc:nth-child(3) { animation-delay: 1.6s; }

@keyframes doc-slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Bento Card Hover Glow --- */
.bento-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 30%, var(--indigo-500) 50%, transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.bento-card:hover::before {
    opacity: 0.5;
}

/* --- FAQ Transition --- */
.faq-item {
    transition: all 0.3s var(--ease-out);
}

.faq-item:hover {
    background: rgba(21, 14, 43, 0.8);
}

/* --- Pricing Card Shimmer --- */
.pricing-card.featured::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0%,
        rgba(99, 102, 241, 0.03) 25%,
        transparent 50%,
        rgba(139, 92, 246, 0.03) 75%,
        transparent 100%
    );
    animation: shimmer-rotate 8s linear infinite;
    pointer-events: none;
}

@keyframes shimmer-rotate {
    to { transform: rotate(360deg); }
}

/* --- Section Tag Float --- */
.section-tag {
    animation: tag-float 6s ease-in-out infinite;
}

@keyframes tag-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* --- Architecture Node Pulse --- */
.arch-node::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    border: 1px solid var(--indigo-500);
    opacity: 0;
    animation: node-pulse 4s infinite;
    pointer-events: none;
}

.arch-node:nth-child(odd)::after { animation-delay: 0s; }
.arch-node:nth-child(even)::after { animation-delay: 2s; }

@keyframes node-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.05); }
}

/* --- Showcase Card Tilt Effect --- */
.showcase-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* --- Gradient Text Shimmer --- */
.gradient-text {
    background-size: 200% auto;
    animation: gradient-shift 4s linear infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* --- Button Ripple --- */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary:hover::after {
    opacity: 1;
}

/* --- Security Card Icon Rotate --- */
.security-card:hover .sec-icon svg {
    animation: icon-bob 0.5s var(--ease-spring);
}

@keyframes icon-bob {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* --- Hero Orb Animations --- */
.orb-1 { animation: orb-drift-1 20s ease-in-out infinite; }
.orb-2 { animation: orb-drift-2 25s ease-in-out infinite; }
.orb-3 { animation: orb-drift-3 18s ease-in-out infinite; }

@keyframes orb-drift-1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-30px, 20px); }
    66% { transform: translate(20px, -15px); }
}

@keyframes orb-drift-2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(25px, -20px); }
    66% { transform: translate(-15px, 30px); }
}

@keyframes orb-drift-3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -40px); }
}

/* --- Loading Animation --- */
@keyframes page-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    animation: page-fade-in 0.5s ease-out;
}

/* --- Interactive Diagram Tooltip --- */
.arch-node[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(10, 14, 26, 0.95);
    border: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

/* --- Carousel Card Shine --- */
.showcase-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: left 0.6s;
    pointer-events: none;
}

.showcase-card:hover::after {
    left: 100%;
}
