/* World Class Home Page Styling - AhteVerse */

.home-page {
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* ===== Universal Section Spacing ===== */
.home-content > section + section {
    margin-top: 100px;
}

/* Sections with their own visual height don't need extra top margin reduction */
.home-content > .legacy-quote-section,
.home-content > .webgl-head-section,
.home-content > .about-redirect-section {
    margin-top: 80px;
}

/* Hero Section */
.home-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 160px 0 100px;
    background: var(--bg-primary); /* Reactive background */
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Below text, above smoke */
    pointer-events: all; /* So interactivity works */
}

/* Green Smoke Effect */
.smoke-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 0; /* Base layer */
    pointer-events: none;
}

.green-smoke {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(0, 255, 157, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    animation: smokeFloat 10s infinite alternate ease-in-out;
}

@keyframes smokeFloat {
    0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.5; }
    100% { transform: translateX(-55%) translateY(-50px) scale(1.2); opacity: 0.8; }
}

/* Infinite Horizon Text Style */
.horizon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 5;
    position: relative;
}

.infinite-horizon-title {
    font-size: clamp(4rem, 12vw, 8rem);
    font-family: var(--font-heading); /* Orbitron */
    line-height: 0.9;
    text-align: center;
    cursor: default;
    transition: transform 0.2s ease-out; /* Smooth return */
}

.infinite-horizon-title span {
    background: linear-gradient(90deg, #ff00ff, #00f3ff, #ff8c00, #00ff9d);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s infinite linear;
}

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

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-eyebrow {
    font-size: 0.9rem;
    color: var(--electric-blue);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 900;
    margin-bottom: 20px;
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-title {
    font-size: clamp(4rem, 15vw, 10rem);
    font-family: var(--font-heading);
    line-height: 0.85;
    margin-bottom: 30px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.7s;
}

.hero-title span {
    display: block;
    background: linear-gradient(90deg, var(--magenta), var(--electric-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.9s;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1s forwards 1.2s;
}

.btn-primary-glow {
    padding: 18px 45px;
    background: linear-gradient(45deg, var(--magenta), var(--electric-blue));
    color: white;
    text-decoration: none;
    border-radius: 40px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.5s;
    box-shadow: 0 10px 40px rgba(255, 0, 255, 0.3);
}

.btn-primary-glow:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 243, 255, 0.4);
}

/* Feature Grid - Unboxed */
.features-section {
    padding: 100px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    padding: var(--space-lg);
    background: transparent;
    transition: 0.5s;
}

.feature-card:hover {
    transform: translateY(-15px);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    display: block;
}

.feature-card h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Interactive Anix Section */
.anix-highlight {
    padding: 120px 0;
    background: linear-gradient(to right, transparent, rgba(0, 243, 255, 0.02), transparent);
}

.anix-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.anix-video-wrapper {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.anix-video-wrapper video {
    width: 100%;
    display: block;
}

.anix-text h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-family: var(--font-heading);
    line-height: 0.9;
    margin-bottom: 25px;
}

/* Animations */
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Mouse Follower */
#liquid-cursor {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    filter: blur(40px);
}

/* Responsive */
@media (max-width: 1000px) {
    .feature-grid, .anix-container {
        grid-template-columns: 1fr;
    }
    .anix-text {
        text-align: center;
    }
}

/* Light Theme Overrides */
[data-theme="light"] .green-smoke {
    background: radial-gradient(ellipse at center, rgba(0, 255, 157, 0.3) 0%, transparent 70%);
    opacity: 0.4;
}

[data-theme="light"] #hero-particles {
    filter: brightness(0.6) contrast(1.2); /* Make particles more visible on white */
}

/* Legacy Quote Section */
.legacy-quote-section {
    position: relative;
    height: 60vh; /* Reduced height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.quote-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
}

.quote-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Increased dark overlay */
    z-index: 1;
}

/* Force dark overlay in all themes */
[data-theme="light"] .quote-overlay {
    background: rgba(0, 0, 0, 0.75); 
}

.quote-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff; /* Always white for contrast */
    max-width: 900px;
    padding: 0 20px;
}

[data-theme="light"] .quote-content {
    color: #fff; /* Keep white on dark overlay even in light theme */
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.quote-text {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 30px;
    font-style: italic;
}

.quote-author {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    opacity: 0.8;
}

/* WebGL Head Section */
.webgl-head-section {
    position: relative;
    height: 80vh; /* Reduced from 100vh */
    background: var(--bg-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.particlehead {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent; /* Overlaying on theme bg */
}

.webgl-overlay {
    position: relative;
    z-index: 5;
    pointer-events: none;
    text-align: center;
}

.webgl-title {
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--text-primary);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 300;
    letter-spacing: 5px;
}

.webgl-title strong {
    font-weight: 900;
    color: var(--electric-blue);
}

.webgl-title em {
    font-family: 'Playfair Display', serif;
    text-transform: lowercase;
    font-style: italic;
    color: var(--magenta);
}

/* About Redirect Section */
.about-redirect-section {
    position: relative;
    height: 100vh;
    background: var(--bg-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Push content to bottom */
    padding-bottom: 10vh; /* Button spacing from bottom */
}

#text-particles-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.redirect-overlay {
    position: relative;
    z-index: 10;
    text-align: center;
    margin-top: 0; /* Reset margin */
}

.btn-primary-glow {
    display: inline-block;
    padding: 20px 50px;
    background: linear-gradient(90deg, var(--magenta), var(--electric-blue));
    color: #fff;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 50px;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.4);
    transition: 0.5s;
}

.btn-primary-glow:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.6);
    letter-spacing: 5px;
}
/* Mobile Optimization - Compact Layout */
@media (max-width: 768px) {
    /* Reduce Global Spacing */
    .section-padding {
        padding: 40px 0 !important;
    }

    .home-content > section + section {
        margin-top: 50px;
    }

    .home-content > .legacy-quote-section,
    .home-content > .webgl-head-section,
    .home-content > .about-redirect-section {
        margin-top: 40px;
    }

    .latest-blogs,
    .workflows-highlight-section {
        padding: 60px 0 !important;
    }

    /* Compact Hero */
    .home-hero {
        min-height: 70vh;
        padding: 100px 0 60px;
    }

    .infinite-horizon-title {
        font-size: clamp(2.5rem, 15vw, 4rem);
    }

    /* Compact Quote Sections */
    .legacy-quote-section {
        height: 40vh;
    }

    .quote-text {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .quote-author {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    /* Compact WebGL Head */
    .webgl-head-section {
        height: 60vh;
    }

    .webgl-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    /* Compact Anix Section */
    .anix-highlight {
        padding: 40px 0;
    }

    .anix-video-wrapper {
        border-radius: 20px;
        max-width: 280px;
        margin: 0 auto 20px;
    }

    .anix-text h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .anix-text p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    /* Compact Redirect Section */
    .about-redirect-section {
        height: 60vh;
        overflow: hidden; /* Prevent particle overflow */
        padding-bottom: 5vh; /* Tighter spacing for mobile */
    }

    .redirect-overlay {
        margin-top: 0; /* Reset for flexbox */
    }

    .btn-primary-glow {
        padding: 14px 35px;
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    /* Particles reduction for performance */
    #particles-js canvas {
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    .home-content > section + section {
        margin-top: 35px;
    }

    .home-hero {
        min-height: 60vh;
    }

    .infinite-horizon-title {
        font-size: 2.5rem;
    }

    .quote-text {
        font-size: 1.5rem;
    }

    .latest-blogs,
    .workflows-highlight-section {
        padding: 40px 0 !important;
    }
}

/* Latest Transmissions (Blog) Section */
.latest-blogs {
    background: var(--bg-primary);
    padding: 120px 0;
}

.section-header.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center for better balance with multiline text */
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-family: var(--font-heading);
    line-height: 0.9;
    text-transform: uppercase;
}

.section-header h2 span {
    color: var(--electric-blue);
    font-weight: 900;
}

.view-all {
    color: var(--magenta);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.view-all:hover {
    border-color: var(--magenta);
    letter-spacing: 4px;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.home-blog-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-blog-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.home-blog-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1s;
}

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

.home-blog-card .card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.home-blog-card .card-title {
    font-size: 0.95rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .blog-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-preview-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile as requested */
        gap: 15px;
    }
    .section-header.blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .home-blog-card .card-content {
        padding: 10px;
    }
    .home-blog-card .card-title {
        font-size: 0.85rem;
    }
}

/* n8n Workflows Highlight Section */
.workflows-highlight-section {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    padding: 120px 0;
}

.workflows-highlight-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-xl);
    align-items: center;
}

.workflows-highlight-text h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-family: var(--font-heading);
    line-height: 0.9;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.workflows-highlight-text h2 span {
    color: var(--magenta);
    font-weight: 900;
}

.workflows-highlight-visual {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflows-visual-card-stack {
    position: relative;
    width: 380px;
    height: 380px;
}

.workflows-visual-card {
    position: absolute;
    width: 100%;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-header-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pill-category {
    font-size: 0.72rem;
    font-family: var(--font-heading);
    color: var(--electric-blue);
    font-weight: 700;
    letter-spacing: 1px;
}

.pill-badge-free {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(0, 255, 157, 0.15);
    color: #00ff9d;
    border: 1px solid rgba(0, 255, 157, 0.3);
    font-weight: 700;
}

.pill-badge-premium {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(255, 0, 255, 0.15);
    color: var(--magenta);
    border: 1px solid rgba(255, 0, 255, 0.3);
    font-weight: 700;
}

.workflows-visual-card h4 {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    margin-bottom: 8px;
    color: var(--text-primary);
}

.workflows-visual-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

/* Offsets for stacking effect */
.card-top {
    z-index: 3;
    top: 0;
    left: 0;
    transform: rotate(-3deg);
}

.card-middle {
    z-index: 2;
    top: 80px;
    left: 20px;
    transform: rotate(2deg);
}

.card-bottom {
    z-index: 1;
    top: 160px;
    left: -10px;
    transform: rotate(-1deg);
}

/* Hover effects */
.workflows-visual-card-stack:hover .card-top {
    transform: translateY(-20px) rotate(-5deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 243, 255, 0.2);
}

.workflows-visual-card-stack:hover .card-middle {
    transform: translateY(10px) rotate(4deg) scale(1.02);
}

.workflows-visual-card-stack:hover .card-bottom {
    transform: translateY(40px) rotate(-2deg) scale(1.02);
}

/* Responsive adjustment */
@media (max-width: 1000px) {
    .workflows-highlight-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .workflows-highlight-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .workflows-highlight-visual {
        height: 380px;
    }
    .workflows-visual-card-stack {
        width: 340px;
        height: 340px;
    }
    .workflows-visual-card {
        padding: 20px;
    }
}

/* Home Tools Grid Section */
.home-tools-section {
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    padding: 120px 0;
}

.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.home-tool-card {
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 220px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.home-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--magenta), var(--electric-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-tool-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.home-tool-card:hover::before {
    opacity: 1;
}

.home-tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.home-tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--electric-blue);
    transition: color 0.3s ease, transform 0.3s ease;
}

.home-tool-card:hover .home-tool-icon {
    color: var(--magenta);
    transform: scale(1.1);
}

.home-tool-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-tool-badge {
    font-size: 0.65rem;
    font-family: var(--font-heading);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.home-tool-badge.active {
    background: rgba(255, 0, 255, 0.1);
    color: var(--magenta);
    border: 1px solid rgba(255, 0, 255, 0.2);
}

.home-tool-badge.upcoming {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.home-tool-details h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.home-tool-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.home-tool-action {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--electric-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.home-tool-card:hover .home-tool-action {
    color: var(--magenta);
}

.home-tool-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.home-tool-card.disabled:hover {
    transform: none;
    border-color: var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.home-tool-card.disabled:hover::before {
    opacity: 0;
}

/* Responsive adjustments for tools section */
@media (max-width: 1200px) {
    .home-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .home-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .home-tools-section {
        padding: 60px 0 !important;
    }
    .home-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .home-tool-card {
        padding: 16px;
        min-height: 180px;
    }
    .home-tool-icon {
        width: 32px;
        height: 32px;
    }
    .home-tool-details h3 {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
    .home-tool-details p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    .home-tool-action {
        font-size: 0.7rem;
        margin-top: 12px;
    }
}

