/* ═══════════════════════════════════════════════════════
   Explore Automation — Custom $1M Workflow Design
   ═══════════════════════════════════════════════════════ */

/* ── Hero Section ── */
.explore-main {
    position: relative;
    z-index: 2;
    padding-top: 15vh;
    padding-bottom: 15vh;
}

.explore-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* ── Layout ── */
.explore-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    position: relative;
}

/* ── Sticky Sidebar ── */
.tier-sidebar {
    position: relative;
}

.sticky-nav {
    position: sticky;
    top: 120px;
    background: rgba(10, 10, 30, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.sticky-nav h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-2);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tier-nav-list li {
    margin-bottom: 12px;
}

.tier-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-3);
    transition: color 0.3s var(--ease);
    position: relative;
}

.tier-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-3);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.tier-link:hover, .tier-link.active {
    color: var(--text);
}

.tier-link.active::before {
    background: var(--accent-1);
    box-shadow: 0 0 10px var(--accent-1);
    transform: scale(1.5);
}

/* ── Content Area & Grid ── */
.tier-content {
    display: flex;
    flex-direction: column;
    gap: 120px;
    position: relative;
}

.tier-section {
    position: relative;
    scroll-margin-top: 100px; /* offset for anchor links */
}

.tier-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    display: inline-block;
    position: relative;
    opacity: 1;
    color: var(--text);
    text-shadow: 0 0 40px rgba(110, 231, 183, 0.4);
    letter-spacing: -1px;
    border-bottom: 2px solid rgba(110, 231, 183, 0.3);
    padding-bottom: 12px;
}

.automation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
}

/* Continuous Workflow Line Behind Cards */
.workflow-path {
    position: absolute;
    top: 0;
    left: 40px; /* Offset to connect cards */
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(110, 231, 183, 0.1), transparent);
    z-index: -1;
}

.workflow-glow {
    position: absolute;
    top: 0;
    left: -1px;
    width: 4px;
    height: 150px; /* size of the glowing snake */
    background: var(--accent-1);
    box-shadow: 0 0 20px var(--accent-1), 0 0 40px var(--accent-1);
    border-radius: 10px;
    opacity: 0;
    will-change: transform, opacity;
}

/* ── Premium Glassmorphism Cards ── */
.automation-card {
    position: relative;
    background: rgba(10, 10, 25, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: border-color 0.4s var(--ease), transform 0.2s linear, box-shadow 0.4s var(--ease);
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    opacity: 0; /* JS will animate this in */
}

/* Handcrafted UI borders */
.automation-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(110, 231, 183, 0.05), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 1;
    pointer-events: none;
}

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

.automation-card:hover {
    border-color: rgba(110, 231, 183, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 40px rgba(110, 231, 183, 0.1);
}

.card-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 40px rgba(110, 231, 183, 0);
    transition: box-shadow 0.4s var(--ease);
    pointer-events: none;
    z-index: 2;
}

.automation-card:hover .card-glow {
    box-shadow: inset 0 0 60px rgba(110, 231, 183, 0.05);
}

.card-content {
    position: relative;
    z-index: 3;
    pointer-events: none;
}

.auto-id {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-1);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.auto-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.auto-desc {
    font-size: 0.95rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* Custom Coded Border Snake Animation (Top & Left) */
.card-border-light {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 16px;
    z-index: 4;
}

.card-border-light::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-1));
    opacity: 0;
    transition: opacity 0.3s;
}

.card-border-light::before {
    content: '';
    position: absolute;
    top: -100%; left: 0;
    width: 2px; height: 50%;
    background: linear-gradient(180deg, transparent, var(--accent-1));
    opacity: 0;
    transition: opacity 0.3s;
}

.automation-card:hover .card-border-light::after {
    opacity: 1;
    animation: snake-x 2s infinite linear;
}

.automation-card:hover .card-border-light::before {
    opacity: 1;
    animation: snake-y 2s infinite linear;
    animation-delay: 1s;
}

@keyframes snake-x {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes snake-y {
    0% { top: -100%; }
    100% { top: 200%; }
}

@media (max-width: 900px) {
    .explore-layout {
        grid-template-columns: 1fr;
    }
    .sticky-nav {
        position: relative;
        top: 0;
        margin-bottom: 40px;
    }
}
