/* Trident Rubber - Compounds Page (Light Luxury Theme) */
/* Inherits core variables from style.css */

:root {
    --glass-white: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

    /* Orb Colors (Light Theme) */
    --orb-blue: rgba(59, 130, 246, 0.4);
    --orb-cyan: rgba(6, 182, 212, 0.3);
    --orb-purple: rgba(124, 58, 237, 0.3);
    --orb-gold: rgba(234, 179, 8, 0.3);
}

body.compounds-page {
    background: var(--bg-surface);
    overflow-x: hidden;
}

/* --- HERO SECTION --- */
.hero-compounds {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

.hero-compounds h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    text-align: center;
    color: var(--primary-blue);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-compounds p {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* --- MATERIAL GRID --- */
.compounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- COMPOUND CARD --- */
.compound-card {
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    will-change: transform;
    backface-visibility: hidden;
}

/* Shine Effect */
.compound-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(115deg,
            transparent 30%,
            rgba(255, 255, 255, 0.3) 45%,
            rgba(255, 255, 255, 0.3) 55%,
            transparent 70%);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 3;
}

.compound-card:hover::after {
    left: 100%;
    transition: left 0.6s ease 0.1s;
}

.compound-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(59, 130, 246, 0.2);
    z-index: 2;
}

/* Dynamic Background within Card */
.card-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    transition: all 1s ease;
    z-index: -1;
}

/* Organic Chemical Structure Overlay */
.structure-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    /* Reduced from full width to keep it centered */
    height: 120px;
    z-index: 0;
    /* Behind content but in front of orb */
    opacity: 0.15;
    /* Subtle by default */
    pointer-events: none;
    transition: all 0.5s ease;
}

.molecule-svg {
    width: 100%;
    height: 100%;
    color: var(--primary-blue);
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.3));
    animation: floatMolecule 8s ease-in-out infinite;
}

@keyframes floatMolecule {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    50% {
        transform: translateY(-5px) rotate(2deg) scale(1.05);
    }
}

.compound-card:hover .structure-bg {
    opacity: 0.25;
    /* More visible on hover */
    transform: translate(-50%, -50%) scale(1.1);
}

.compound-card:hover .molecule-svg {
    color: var(--primary-blue);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

/* Card Content */
.card-header {
    margin-bottom: 2rem;
}

.card-symbol {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    opacity: 0.1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    transition: all 0.5s ease;
}

.compound-card:hover .card-symbol {
    opacity: 0.2;
    transform: scale(1.2) rotate(10deg);
}

.card-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
}

.card-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Specs Reveal on Hover */
.card-specs {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    opacity: 1;
    /* Always visible for better UX, or subtly emphasized on hover */
    transform: translateY(0);
    transition: all 0.4s ease;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.spec-value {
    font-weight: 600;
    color: var(--primary-blue);
}

/* --- STAGGER ANIMATIONS --- */
/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .hero-compounds {
        min-height: 60vh;
        padding-top: 100px;
    }

    .hero-compounds h1 {
        font-size: 2.5rem;
    }

    .compound-card {
        padding: 1.5rem;
        min-height: 350px;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .card-symbol {
        font-size: 2rem;
    }

    .card-specs {
        padding: 0.75rem;
        gap: 0.5rem;
    }
}

.compound-card {
    opacity: 0;
    /* JS will handle entry */
}