/* =========================================================
   WORK PAGE — css/work.css
   Mobile-first. Breakpoints: 600px (tablet), 900px (desktop).
   Relies on custom properties from style.css.
   ========================================================= */


/* =========================
   1. PAGE HERO
   ========================= */

.wp-hero {
    padding-block: clamp(56px, 9vw, 100px) clamp(32px, 5vw, 56px);
    text-align: center;
}

.wp-hero-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2rem, 7vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 20px;

    /* Outlined stroke effect matching about page titles */
    -webkit-text-stroke: 2px currentColor;
    paint-order: stroke fill;
    color: var(--color-yellow);
}

.wp-hero-title em {
    font-style: normal;
    color: var(--color-teal);
    -webkit-text-stroke: 2px var(--color-teal);
}

.wp-hero-sub {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--color-text-muted);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}


/* =========================
   2. CATEGORY GRID
   ========================= */

.wp-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: clamp(48px, 7vw, 88px);
}

@media (min-width: 600px) {
    .wp-categories {
        flex-direction: row;
        align-items: stretch;
        gap: 24px;
    }
}


/* =========================
   3. CATEGORY CARD
   ========================= */

.wp-cat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;

    background: var(--color-white);
    border: 2px solid var(--color-black);
    border-radius: 24px;
    box-shadow: var(--shadow-card);

    overflow: hidden;
    cursor: pointer;

    transition:
        transform 0.3s var(--transition-smooth),
        box-shadow 0.3s ease;
}

.wp-cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 8px 10px var(--color-black);
}

.wp-cat-card:focus-visible {
    outline: 3px solid var(--color-teal-dark);
    outline-offset: 4px;
}

/* Illustration area */
.wp-cat-illus {
    width: 100%;
    padding: clamp(28px, 5vw, 44px) clamp(24px, 4vw, 40px) clamp(20px, 3vw, 32px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-background);
    border-bottom: 2px solid var(--color-black);
    position: relative;
    overflow: hidden;
}

/* Subtle dot-pattern background inside illustration area */
.wp-cat-illus::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--color-border) 1.2px, transparent 1.2px);
    background-size: 18px 18px;
    opacity: 0.6;
}

.wp-cat-illus img {
    width: clamp(100px, 18vw, 160px);
    height: clamp(100px, 18vw, 160px);
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--transition-smooth);
}

.wp-cat-card:hover .wp-cat-illus img {
    transform: scale(1.08) rotate(-3deg);
}

/* Teal pill label */
.wp-cat-label {
    margin: 20px auto 16px;
    padding: 10px 28px;

    background: var(--color-teal);
    color: var(--color-white);

    border: 2px solid var(--color-black);
    border-radius: 999px;

    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(0.82rem, 1.5vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;

    box-shadow: 3px 3px var(--color-black);
}

/* "See projects ↗" link at the bottom of each card */
.wp-cat-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;

    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);

    transition: color 0.2s ease, gap 0.25s var(--transition-smooth);
}

.wp-cat-card:hover .wp-cat-cta {
    color: var(--color-teal-dark);
    gap: 10px;
}


/* =========================
   6. CTA
   ========================= */

.wp-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    text-align: center;
    padding: clamp(36px, 5vw, 60px) clamp(24px, 4vw, 52px);
    margin-bottom: clamp(36px, 5vw, 60px);

    border: 2px solid var(--color-black);
    border-radius: 20px;
    background: var(--color-black);
    color: #ffffff;
    box-shadow: 6px 6px var(--color-yellow);
}

.wp-cta::before {
    content: "";
    position: absolute;
    inset: -40px;
    z-index: -1;
    background: radial-gradient(
        ellipse 65% 50% at 50% 110%,
        rgba(0, 158, 174, 0.35) 0%,
        rgba(243, 184, 47, 0.12) 50%,
        transparent 70%
    );
    animation: cta-glow 6s ease-in-out infinite alternate;
}

.wp-cta-spark {
    position: absolute;
    top: 24px;
    right: 7%;
    color: var(--color-yellow);
    font-size: 3.8rem;
    line-height: 1;
    animation: spark-spin 12s linear infinite;
    transform-origin: center;
}

.wp-cta .eyebrow {
    justify-content: center;
    color: var(--color-teal);
    letter-spacing: 0.18em;
    margin-bottom: 20px;
}

.wp-cta h2 {
    color: #ffffff;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    margin-bottom: 12px;
}

.wp-cta h2 span {
    color: var(--color-yellow);
}

.wp-cta p {
    color: rgba(255,255,255,0.9);
    font-size: clamp(0.88rem, 1.3vw, 0.95rem);
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

.wp-cta-note {
    display: inline-block;
    margin-top: 28px;
    padding: 7px 16px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.05);
}


/* =========================
   4. REVEAL ANIMATIONS
   ========================= */

.wp-cat-card {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.65s var(--transition-smooth),
        transform 0.65s var(--transition-smooth),
        box-shadow 0.3s ease;
}

.wp-cat-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.wp-cat-card:nth-child(2) { transition-delay: 0.1s; }
.wp-cat-card:nth-child(3) { transition-delay: 0.2s; }


/* =========================
   8. RESPONSIVE
   ========================= */

@media (min-width: 600px) {
    .wp-cat-illus img {
        width: clamp(110px, 14vw, 160px);
        height: clamp(110px, 14vw, 160px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-cat-card,
    .wp-cat-illus img,
    .wp-items-panel,
    .wp-cat-toggle-arrow {
        transition: none;
    }

    .wp-cta::before,
    .wp-cta-spark {
        animation: none;
    }
}
