/**
 * Main CSS file for Dogpatch Studio
 * Consolidates all styles for better maintainability and DRY principles
 */

/* ============================================
   BASE STYLES
   ============================================ */

/* Font features */
* {
    font-feature-settings: "rlig" 1, "calt" 1, "ss01" 1;
}

/* ============================================
   GRADIENT EFFECTS
   ============================================ */

.text-gradient {
    background: linear-gradient(90deg, #f97316 0%, #10b981 50%, #8b5cf6 100%);
    background-size: 120% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 18s ease-in-out infinite;
    -webkit-animation: gradientShift 18s ease-in-out infinite;
}

@keyframes gradientShift {
    0%,
    100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

@-webkit-keyframes gradientShift {
    0%,
    100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.gradient-border {
    position: relative;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(to right, #f97316, #ea580c) border-box;
    border: 1px solid transparent;
}

.card-border {
    background: linear-gradient(white, white) padding-box,
        linear-gradient(145deg, transparent 35%, #e5e5e5, transparent 65%) border-box;
    border: 1px solid transparent;
}

.subtle-gradient {
    background: linear-gradient(to bottom, transparent 0%, rgba(30, 41, 59, 0.05) 100%);
}

.mesh-gradient {
    background-image: radial-gradient(at 50% 30%, rgba(249, 115, 22, 0.15) 0, transparent 50%),
        radial-gradient(at 90% 10%, rgba(16, 185, 129, 0.12) 0, transparent 40%),
        radial-gradient(at 0% 85%, rgba(139, 92, 246, 0.12) 0, transparent 50%);
}

/* ============================================
   SHADOWS
   ============================================ */

.vercel-shadow {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.vercel-shadow-hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

.hover-lift {
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
}

/* ============================================
   TAB NAVIGATION
   ============================================ */

.tab-active {
    color: #000;
    border-bottom: 2px solid #000;
}

/* ============================================
   NUMBER ANIMATIONS
   ============================================ */

@property --num {
    syntax: '<integer>';
    initial-value: 0;
    inherits: false;
}

.number-animation {
    animation: count 2s ease-out forwards;
    counter-reset: num var(--num);
}

.number-animation::after {
    content: counter(num);
}

@keyframes count {
    to {
        --num: 30;
    }
}

/* ============================================
   INTERSECTION OBSERVER
   ============================================ */

.observe {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.observe.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CONTROL CENTER STYLES
   ============================================ */

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: statusPulse 2s ease-in-out infinite;
}

.dashboard-card {
    background: white;
    border: 1px solid #e5e5e5;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #f97316 50%, #8b5cf6 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.terminal-text {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: -0.02em;
}

/* ============================================
   PATTERNS
   ============================================ */

.grid-pattern {
    background-image: linear-gradient(rgba(30, 41, 59, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============================================
   CODE BLOCKS
   ============================================ */

.code-block {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
}

/* ============================================
   BUTTON EFFECTS
   ============================================ */

/* Shimmer effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.shimmer:hover::before {
    left: 100%;
}

/* Enhanced gradient button utilities */
.bg-size-200 {
    background-size: 200% auto;
}

.bg-pos-right {
    background-position: right center;
}

/* Magnetic button effect */
.magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magnetic-text {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   3D TILT EFFECT
   ============================================ */

.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.tilt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(at 40% 40%, rgba(249, 115, 22, 0.08) 0, transparent 50%),
        radial-gradient(at 90% 10%, rgba(16, 185, 129, 0.06) 0, transparent 40%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.04) 0, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.tilt-card:hover::before {
    opacity: 1;
}

/* Pricing card gradient hover */
.pricing-card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(at 40% 40%, rgba(249, 115, 22, 0.08) 0, transparent 50%),
        radial-gradient(at 90% 10%, rgba(16, 185, 129, 0.06) 0, transparent 40%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.04) 0, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.pricing-card-hover:hover::before {
    opacity: 1;
}

/* Testimonial card gradient - always visible */
.testimonial-card-gradient {
    position: relative;
}

.testimonial-card-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(at 40% 40%, rgba(249, 115, 22, 0.08) 0, transparent 50%),
        radial-gradient(at 90% 10%, rgba(16, 185, 129, 0.06) 0, transparent 40%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.04) 0, transparent 50%);
    border-radius: inherit;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

.testimonial-card-gradient > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   LANDING ANIMATIONS
   ============================================ */

@keyframes dropIn {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    70% {
        transform: translateY(5px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.drop-in {
    opacity: 0;
    animation: dropIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.3s;
    will-change: transform, opacity;
}

/* Enhanced pill hover */
.pill-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill-hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(234, 88, 12, 0.1));
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill-hover:hover::after {
    transform: translateX(0);
}

.pill-hover:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}

/* ============================================
   DOGPATCH STUDIO SIGNATURE STYLES
   ============================================ */

/* Geometric Dog Logo */
.dog-logo {
    width: 24px;
    height: 24px;
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.dog-logo svg {
    width: 100%;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tail wag animation */
@keyframes wagTail {
    0%,
    100% {
        transform: scale(1.1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.dog-logo:hover svg {
    animation: wagTail 0.4s ease-in-out;
}

/* Logo build animation */
@keyframes buildDog {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.dog-logo svg {
    animation: buildDog 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ============================================
   MAP & PATTERNS
   ============================================ */

/* Enhanced Map Grid Pattern */
.map-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 35px,
            rgba(30, 41, 59, 1) 35px,
            rgba(30, 41, 59, 1) 36px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 35px,
            rgba(30, 41, 59, 1) 35px,
            rgba(30, 41, 59, 1) 36px);
    background-size: 36px 36px;
    background-position: bottom left;
    pointer-events: none;
}

/* Alternate topographic pattern */
.topo-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image:
        radial-gradient(circle at 20% 50%, transparent 0%, rgba(0, 0, 0, 0.05) 50%, transparent 70%),
        radial-gradient(circle at 60% 30%, transparent 0%, rgba(0, 0, 0, 0.03) 40%, transparent 60%),
        radial-gradient(circle at 80% 80%, transparent 0%, rgba(0, 0, 0, 0.04) 45%, transparent 65%);
    pointer-events: none;
}

/* Small dog watermark */
.dog-watermark {
    opacity: 0.1;
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* ============================================
   NAVIGATION
   ============================================ */

/* Navigation with logo */
.nav-logo-group {
    display: flex;
    align-items: center;
}

/* Hover effect for logo group */
.nav-logo-group:hover .dog-logo svg path {
    fill: #f97316;
}

.nav-logo-group:hover .logo-text {
    color: #f97316;
}

/* ============================================
   FEATURE CARDS ANIMATIONS
   ============================================ */

@keyframes floatUpLarge {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

#features-circular-large .card-float-large {
    transition: all 0.3s ease;
}

#features-circular-large .card-float-large:hover {
    animation: floatUpLarge 2s ease-in-out infinite;
    transform: translateY(-5px);
}