/* =============================================
   Car2Check Landing — Industrial-Premium Automotive
   ============================================= */

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

/* --- Cloak for Alpine --- */
[x-cloak] {
    display: none !important;
}

/* --- Scroll reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Stagger children --- */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 120ms; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 240ms; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 360ms; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 480ms; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 600ms; }
.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Navbar shadow --- */
.nav-shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* --- Hero gradient mesh background --- */
.hero-mesh {
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(211,70,0,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(211,70,0,0.04) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 50% 80%, rgba(211,70,0,0.03) 0%, transparent 50%),
        linear-gradient(180deg, #FAFAF8 0%, #F5F4F0 100%);
}

/* --- Subtle grid pattern overlay --- */
.grid-pattern {
    background-image:
        linear-gradient(rgba(0,0,0,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* --- Diagonal line accent --- */
.diagonal-accent {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 4px,
        rgba(211,70,0,0.04) 4px,
        rgba(211,70,0,0.04) 5px
    );
}

/* --- Feature card hover glow --- */
.feature-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D34600, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(211,70,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

/* --- Workflow step pulse --- */
.step-circle {
    position: relative;
}
.step-circle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(211,70,0,0.15);
    animation: pulse-ring 3s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%, 100% { opacity: 0; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* --- Workflow connector (desktop) --- */
.step-connector {
    position: absolute;
    top: 24px;
    left: calc(50% + 28px);
    width: calc(100% - 56px);
    height: 2px;
    background: linear-gradient(90deg, #D34600 0%, #e5e0d8 100%);
    opacity: 0.4;
}

/* --- AI mock terminal effect --- */
.ai-terminal {
    position: relative;
}
.ai-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(211,70,0,0.02) 100%);
    pointer-events: none;
    border-radius: inherit;
}
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #D34600;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* --- CTA section gradient --- */
.cta-gradient {
    background:
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(211,70,0,0.05) 0%, transparent 70%),
        linear-gradient(180deg, #FAFAF8 0%, #F5F4F0 50%, #FAFAF8 100%);
}

/* --- Badge shimmer --- */
.badge-shimmer {
    position: relative;
    overflow: hidden;
}
.badge-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* --- FAQ item transitions --- */
.faq-item {
    transition: all 0.3s ease;
}
.faq-item:hover {
    border-color: rgba(211,70,0,0.2);
}

/* --- Focus styles (accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #D34600;
    outline-offset: 2px;
}

/* --- Screenshot placeholder --- */
.screenshot-placeholder {
    background: linear-gradient(135deg, #f0ede8 0%, #e8e5de 100%);
    border: 1px solid #ddd8cf;
}

/* --- Stat counter --- */
.stat-value {
    font-variant-numeric: tabular-nums;
}

/* --- Section divider --- */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd8cf 20%, #ddd8cf 80%, transparent);
}

/* --- Smooth button press --- */
.btn-primary:active {
    transform: scale(0.98);
}

/* --- Pain point card accent --- */
.pain-card {
    position: relative;
}
.pain-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(211,70,0,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.pain-card:hover::after {
    opacity: 1;
}

/* --- Float animation for decorative elements --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.float-slow {
    animation: float 6s ease-in-out infinite;
}
.float-medium {
    animation: float 4s ease-in-out infinite 1s;
}

/* --- Custom scrollbar (webkit) --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F4F0;
}
::-webkit-scrollbar-thumb {
    background: #ccc7bc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b5aea3;
}

/* --- Noise texture overlay --- */
.noise-overlay {
    position: relative;
}
.noise-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
    pointer-events: none;
    border-radius: inherit;
}
