/* ==========================================================================
   Template: Pulse - Social Media SaaS Landing Page
   Version: 1.0.0
   Author: Outline Templates
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Theme Variables)
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --color-primary: #22C55E;
    --color-primary-dark: #16A34A;
    --color-primary-light: #BBF7D0;
    --color-secondary: #0F172A;
    --color-text: #1E293B;
    --color-text-muted: #64748B;
    --color-background: #FFFFFF;
    --color-surface: #F8FAFC;
    --color-border: #E2E8F0;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-green: 0 20px 50px rgba(34, 197, 94, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display {
    font-family: var(--font-display);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--color-primary);
    color: white;
    z-index: 9999;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Backdrop blur for nav */
.nav-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   Animation Classes
   -------------------------------------------------------------------------- */

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-bounce), transform var(--transition-bounce);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.float {
    animation: float 6s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0s; }
.float-delay-2 { animation-delay: 1s; }
.float-delay-3 { animation-delay: 2s; }
.float-delay-4 { animation-delay: 3s; }
.float-delay-5 { animation-delay: 4s; }
.float-delay-6 { animation-delay: 5s; }

/* Orbital animation */
@keyframes orbit {
    0% { transform: rotate(0deg) translateX(120px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

.orbit {
    animation: orbit 20s linear infinite;
}

/* Pulse animation */
@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pulse-ring {
    animation: pulse-ring 2s ease-out infinite;
}

/* Connection line animation */
@keyframes dash-flow {
    to { stroke-dashoffset: -24; }
}

.connection-line {
    animation: dash-flow 1s linear infinite;
}

/* --------------------------------------------------------------------------
   NEW: Subtle Motion Animations
   -------------------------------------------------------------------------- */

/* Gradient Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(34, 197, 94, 0.08) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--color-primary) 0%,
        #10B981 25%,
        var(--color-primary) 50%,
        #10B981 75%,
        var(--color-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

/* Gentle Glow Pulse */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
    }
    50% {
        box-shadow: 0 0 40px rgba(34, 197, 94, 0.25);
    }
}

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

/* Icon Bounce on Hover */
@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-4px); }
    75% { transform: translateY(2px); }
}

.hover-bounce:hover {
    animation: icon-bounce 0.5s ease-out;
}

/* Subtle Rotate */
@keyframes subtle-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-slow {
    animation: subtle-rotate 20s linear infinite;
}

.spin-slow-reverse {
    animation: subtle-rotate 25s linear infinite reverse;
}

/* Scale Pop Effect */
@keyframes scale-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hover-pop:hover {
    animation: scale-pop 0.4s ease-out;
}

/* Text Reveal from Below */
@keyframes text-reveal-up {
    from {
        opacity: 0;
        transform: translateY(20px);
        clip-path: inset(100% 0 0 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: text-reveal-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-play-state: paused;
}

.text-reveal.active {
    animation-play-state: running;
}

/* Fade Blur In */
@keyframes fade-blur-in {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.fade-blur {
    opacity: 0;
    animation: fade-blur-in 1s ease-out forwards;
    animation-play-state: paused;
}

.fade-blur.active {
    animation-play-state: running;
}

/* Parallax Float (different speeds for depth) */
.parallax-slow {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.parallax-fast {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Magnetic Hover (for buttons/icons) */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Line Draw Animation */
@keyframes line-draw {
    to { stroke-dashoffset: 0; }
}

.line-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: line-draw 2s ease-out forwards;
}

/* Badge Pulse */
@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.badge-pulse {
    animation: badge-pulse 2.5s ease-in-out infinite;
}

/* Wiggle Effect */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

.hover-wiggle:hover {
    animation: wiggle 0.4s ease-in-out;
}

/* Breathing Effect */
@keyframes breathe {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.breathe {
    animation: breathe 4s ease-in-out infinite;
}

/* Card Tilt on Hover */
.tilt-hover {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.tilt-hover:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-5px);
}

/* Underline Slide */
.underline-slide {
    position: relative;
}

.underline-slide::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease-out;
}

.underline-slide:hover::after {
    width: 100%;
}

/* Smooth Morph */
@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

.morph {
    animation: morph 8s ease-in-out infinite;
}

/* Typewriter cursor */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor-blink::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--color-primary);
}

/* Arrow bounce (for CTAs) */
@keyframes arrow-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.arrow-animate:hover svg,
.arrow-animate:hover .arrow-icon {
    animation: arrow-bounce 0.6s ease-in-out infinite;
}

/* Counter highlight flash */
@keyframes highlight-flash {
    0% { background-color: transparent; }
    50% { background-color: rgba(34, 197, 94, 0.1); }
    100% { background-color: transparent; }
}

.highlight-on-view.active {
    animation: highlight-flash 1s ease-out;
}

/* --------------------------------------------------------------------------
   Reduced Motion Support
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .text-reveal,
    .fade-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .shimmer,
    .shimmer-text {
        animation: none;
        background-position: 0 0;
    }

    .shimmer-text {
        background: var(--color-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .float,
    .float-1,
    .float-2,
    .float-3,
    .float-4,
    .float-5,
    .morph,
    .breathe,
    .pulse-ring,
    .glow-pulse,
    .badge-pulse,
    .spin-slow,
    .spin-slow-reverse {
        animation: none;
    }

    .tilt-hover:hover {
        transform: translateY(-5px);
    }
}

/* --------------------------------------------------------------------------
   Component: Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-green);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 25px 60px rgba(34, 197, 94, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface);
    border-color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Component: Feature Cards
   -------------------------------------------------------------------------- */
.feature-card {
    background: var(--color-background);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    transition: transform var(--transition-bounce), box-shadow var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* --------------------------------------------------------------------------
   Component: Pricing Cards
   -------------------------------------------------------------------------- */
.pricing-card {
    background: var(--color-background);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.pricing-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.pricing-card.featured {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-green);
}

/* --------------------------------------------------------------------------
   Component: Testimonial Cards
   -------------------------------------------------------------------------- */
.testimonial-card {
    background: var(--color-background);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.testimonial-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   Component: Social Icons
   -------------------------------------------------------------------------- */
.social-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base);
}

.social-icon:hover {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Component: Form Inputs
   -------------------------------------------------------------------------- */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-background);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* --------------------------------------------------------------------------
   Custom Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .social-icon {
        width: 48px;
        height: 48px;
    }
}
