/* Landing Page Specific Styles with Scroll-Triggered Animations */

/* Scroll-Triggered Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial state before animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

/* Animated state - triggered by JavaScript */
.animate-on-scroll.animated {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Stagger animations for child elements */
.feature-detail-content.animated {
    animation-delay: 0.2s;
}

.built-for-card.animated:nth-child(1),
.blog-card-landing.animated:nth-child(1) {
    animation-delay: 0.1s;
}

.built-for-card.animated:nth-child(2),
.blog-card-landing.animated:nth-child(2) {
    animation-delay: 0.2s;
}

.built-for-card.animated:nth-child(3),
.blog-card-landing.animated:nth-child(3) {
    animation-delay: 0.3s;
}

/* Video Section */
/* Video Section */
.video-section {
    padding: 100px 2rem;
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.video-container {
    max-width: 1300px;
    margin: 0 auto;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.video-container video {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Platform Description */
.platform-description {
    padding: 120px 2rem;
    background: var(--bg-light);
    position: relative;
    z-index: 1;
}

.platform-title {
    max-width: 900px;
    margin: 0 auto;
    font-size: 2.5rem;
    line-height: 1.3;
    text-align: center;
    font-weight: 400;
    color: var(--text-primary);
}

/* Sticky Scroll Features Container */
/* Override BW theme for this specific section */
body>section.sticky-features-wrapper,
.sticky-features-wrapper {
    background: transparent !important;
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    position: relative;
    z-index: 1;
}

.sticky-features-wrapper * {
    box-sizing: border-box;
}

.sticky-features-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Scrolling Descriptions - Left Side (White Background) */
.scrolling-descriptions {
    background-color: #ffffff !important;
    padding: 0;
    position: relative;
    z-index: 1;
    order: 1;
}

.feature-scroll-item {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 60px;
    background-color: #ffffff !important;
}

.feature-scroll-item p {
    font-size: 1.25rem !important;
    line-height: 1.8;
    color: #000000 !important;
    max-width: 600px;
    margin: 0;
}

/* Ensure ALL child elements in descriptions are black (override BW theme) */
.feature-scroll-item *,
.scrolling-descriptions * {
    color: #000000 !important;
}

/* Sticky Heading Panel - Right Side (Black Background, Fixed) */
.sticky-heading-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    background-color: #000000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    order: 2;
}

.sticky-heading-panel h2 {
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--accent-purple) !important;
    margin: 0;
    text-align: center;
    padding: 60px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Ensure heading elements are purple (override BW theme) */
.sticky-heading-panel *,
.sticky-heading-panel h2 {
    color: var(--accent-purple) !important;
}

/* Built for Developers Landing Section */
.built-for-section-landing {
    padding: 120px 2rem;
    background: var(--bg-subtle);
    position: relative;
    z-index: 1;
}

.built-for-grid {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.built-for-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.built-for-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.built-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.placeholder-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a73e8, #34a853);
    transition: transform 0.6s ease;
}

.built-for-card:hover .placeholder-gradient {
    transform: scale(1.1);
}

.built-for-card h3 {
    font-size: 1.5rem;
    margin: 1.5rem 1.5rem 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.built-for-card:hover h3 {
    color: var(--accent-blue);
}

.built-for-card p {
    font-size: 1rem;
    margin: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Dotted Divider */
.dotted-divider {
    padding: 80px 2rem;
    background: var(--bg-light);
    position: relative;
    z-index: 1;
}

.dots-container {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    animation: dotPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

.dot:nth-child(4) {
    animation-delay: 0.6s;
}

.dot:nth-child(5) {
    animation-delay: 0.8s;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* Latest Blogs Section */
.latest-blogs {
    padding: 100px 2rem;
    background: var(--bg-light);
    position: relative;
    z-index: 1;
}

.blogs-grid {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.blog-card-landing {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.blog-card-landing:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.blog-card-image-landing {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image-landing img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card-landing:hover .blog-card-image-landing img {
    transform: scale(1.1);
}

.blog-card-image-landing .placeholder-gradient {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card-landing:hover .blog-card-image-landing .placeholder-gradient {
    transform: scale(1.1);
}

.blog-card-content-landing {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-card-content-landing h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-card-landing:hover h3 {
    color: var(--accent-blue);
}

.blog-card-content-landing p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.blog-link:hover {
    gap: 0.75rem;
    color: var(--accent-hover);
}

/* Content Container */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
}


@keyframes blink {
    50% {
        opacity: 0;
    }
}


/* ===== Landing Intro Animation (landing page only) ===== */
#intro-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#intro-logo {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    will-change: transform, opacity;
}

/* Center logo sizing (matches header SVG, just scaled for intro) */
#intro-logo svg {
    stroke: #000000; /* visible on white intro */
    width: min(78vw, 560px);
    height: auto;
    display: block;

    fill: none; /* avoid filling counters like R/O/L */
}

/* Hide site until intro completes (header still in DOM for measurements) */
html.intro-active #bg-canvas,
html.intro-active main,
html.intro-active .navbar {
    opacity: 0;
    pointer-events: none;
}

#bg-canvas,
main,
.navbar {
    transition: opacity 420ms ease;
}


/* If the landing page doesn't use <main>, hide primary sections during intro */
html.intro-active body > section,
html.intro-active #footer-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 420ms ease;
}

body > section,
#footer-container {
    transition: opacity 420ms ease;
}

/* ===== Landing Intro Truck (landing page only) ===== */
#intro-truck {
    position: fixed;
    left: 100%;
    top: 50%;
    transform: translate(60px, -50%);
    transform-origin: center center;
    will-change: transform, opacity;
    z-index: 10000;
    pointer-events: none;
    opacity: 1;
}

#intro-truck svg {
    width: 170px;
    height: auto;
    display: block;
}

/* ===== Cool Truck Animations (intro only) ===== */
#intro-truck .intro-truck-bob {
    animation: introTruckBob 620ms ease-in-out infinite;
}

#intro-truck .intro-truck-wheel {
    transform-origin: center;
    animation: introWheelSpin 520ms linear infinite;
}

#intro-truck .intro-truck-smoke {
    opacity: 0.0;
    animation: introSmokePuff 900ms ease-in-out infinite;
}

@keyframes introWheelSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes introTruckBob {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(2px); }
}

@keyframes introSmokePuff {
    0%   { opacity: 0.0; transform: translate(0px, 0px) scale(0.8); }
    25%  { opacity: 0.35; }
    60%  { opacity: 0.15; }
    100% { opacity: 0.0; transform: translate(12px, -10px) scale(1.2); }
}

/* ===== Landing Intro Loader (shows first) ===== */
#intro-loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #ffffff;
    z-index: 10001; /* above intro-logo/truck */
    opacity: 1;
    transition: opacity 260ms ease;
}

#intro-loader-truck svg {
    width: min(56vw, 220px);
    height: auto;
    display: block;
}

#intro-loader-text {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #111;
    opacity: 0.75;
}
