/* Custom Styling for Foragence Intelligence */

:root {
    --primary-blue: #3B82F6;
    --background-dark: #0a0e14;
    --surface-card: #131820;
    --border-subtle: rgba(255, 255, 255, 0.05);
}

/* Base resets and defaults */
html {
    scroll-behavior: smooth;
    background-color: var(--background-dark);
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, button, .btn, a.px-5, a.px-10, a.px-12 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
}

/* Glassmorphism utility */
.glass-card {
    background: rgba(19, 24, 32, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
}

/* Section Header styling */
.tracking-tighter {
    letter-spacing: -0.04em;
}

/* Gradient Background Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Hover scales */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.hover-scale:hover {
    transform: translateY(-5px) scale(1.01);
}

/* Hero background effects */
@keyframes scan-move {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, rgba(6, 182, 212, 0.2), transparent);
    animation: scan-move 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 2;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.07) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

@keyframes grid-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.grid-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #06B6D4;
    border-radius: 50%;
    box-shadow: 0 0 10px #06B6D4;
    animation: grid-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

/* Starfield / Particles Background */
.starfield {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: star-flicker 8s infinite ease-in-out;
}

/* Random sizes for stars */
.star.small { width: 1px; height: 1px; }
.star.medium { width: 2px; height: 2px; box-shadow: 0 0 4px white; }
.star.large { width: 3px; height: 3px; box-shadow: 0 0 8px white; }

@keyframes star-flicker {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Custom shadow for blue buttons */
.shadow-primary-glow {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.2), 0 0 50px rgba(59, 130, 246, 0.1);
}

/* Signal Pulse Animation */
@keyframes signal-ping {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.3; }
    100% { transform: scale(2); opacity: 0; }
}

.signal-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--primary-blue);
    animation: signal-ping 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Moving gradient line for How it Works */
@keyframes flow-line {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-flow-line {
    background: linear-gradient(90deg, transparent, var(--primary-blue), #06B6D4, var(--primary-blue), transparent);
    background-size: 200% 100%;
    animation: flow-line 3s linear infinite;
}

/* Glow effects for How it Works cards */
.icon-glow-amber {
    filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.4));
}

.card-hover-brighten:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* Smooth fade in for sections */
.section-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.section-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specific styling for Diesel case study labels */
.italic-brand {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
}
