/* ---------- STAGGERED GLASS CARDS ---------- */
.sc-section {
    position: relative;
    padding: 120px 0 160px;
    background-image: linear-gradient(45deg, background-color, transparent);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fafafa; /* Fallback */
    overflow: hidden;
    width: 100%;
}

.sc-container {
    position: relative;
    z-index: 2;
}

/* Header Styling */
.sc-header {
    max-width: 800px;
    margin: 0 auto 100px; /* Large bottom margin to give cards room */
    text-align: center;
}

.sc-eyebrow {
    display: block;
    font-size: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--steel-soft);
    margin-bottom: 20px;
}

.sc-heading {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
    margin: 0;
}

/* Staggered Grid Layout */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    align-items: flex-start;
}

/* Push every even card down to create the staggered effect */
.sc-card-wrapper:nth-child(even) {
    margin-top: 80px; 
}

/* Glassmorphism Card Styling */
.sc-card {
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
    
    /* Frosted Glass Effect */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.sc-number {
    font-size: 13px;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--steel-soft);
    margin-bottom: 40px;
    display: block;
}

.sc-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 15px;
}

.sc-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--steel);
    margin: 0;
}

/* Optional Inner Image */
.sc-inner-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 25px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* ---------- ENTER & EXIT ANIMATIONS ---------- */
.sc-anim-element {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.sc-anim-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .sc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Reset and re-apply stagger for 2 columns */
    .sc-card-wrapper:nth-child(even) { margin-top: 60px; }
}

@media (max-width: 600px) {
    .sc-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    /* Remove stagger on mobile so they stack normally */
    .sc-card-wrapper:nth-child(even) { margin-top: 0; }
    .sc-header { margin-bottom: 50px; }
}

/* ---------- FULL FIT IMAGE MODIFIER ---------- */
/* Ensure the card clips the edges of a 100% full image */
.sc-card {
    position: relative;
    overflow: hidden;
}

/* When the "Full Fit" toggle is active, stretch the image */
.sc-card.is-full-fit .sc-inner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0; /* Let the parent's overflow:hidden handle the rounded corners */
    object-fit: cover;
    z-index: 0;
}

/* Ensure text sits on top of the image if both are used simultaneously */
.sc-card.is-full-fit .sc-number,
.sc-card.is-full-fit .sc-title,
.sc-card.is-full-fit .sc-desc {
    position: relative;
    z-index: 1; 
}