﻿/* =========================================================
   Proiecte & demo-uri — galerie "haotică": carduri de mărimi
   diferite, ușor rotite ca niște poze puse pe un panou, care
   se îndreaptă și "ies în față" la hover. Foloseşte tokenii
   globali din :root (definiţi deja în app.css).
   ========================================================= */

/* ---------------- Hero band ---------------- */
.pf-hero {
    background: var(--color-dark);
    padding: 72px 0 84px;
    position: relative;
    overflow: hidden;
}

    .pf-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(480px 260px at 12% 20%, rgba(66, 125, 127, .35), transparent 70%), radial-gradient(420px 240px at 88% 80%, rgba(147, 179, 180, .22), transparent 70%);
        pointer-events: none;
    }

.pf-eyebrow {
    position: relative;
    color: var(--color-accent-light);
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.pf-hero h1 {
    position: relative;
    color: #FFFFFF;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 16px;
}

.pf-hero__accent {
    color: var(--color-accent-light);
}

.pf-hero__lead {
    position: relative;
    color: rgba(255, 255, 255, .72);
    max-width: 620px;
    font-size: 1.02rem;
    margin: 0;
}

/* ---------------- Chaotic grid ---------------- */
.pf-gallery {
    background: var(--color-bg-alt);
    padding: 90px 0 110px;
}

.pf-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-flow: dense;
    grid-auto-rows: 190px;
    gap: 28px;
}

.pf-card--lg {
    grid-column: span 3;
    grid-row: span 2;
}

.pf-card--md {
    grid-column: span 3;
    grid-row: span 1;
}

.pf-card--sm {
    grid-column: span 2;
    grid-row: span 1;
}

.pf-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 18px 34px -22px rgba(22, 30, 51, .28);
    transform: rotate(var(--rot));
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
    will-change: transform;
}

    .pf-card:hover,
    .pf-card:focus-within {
        z-index: 4;
        box-shadow: 0 30px 54px -20px rgba(22, 30, 51, .38);
    }

/* JS drives the live tilt via inline style once hovered; this is the
   resting/fallback transform so the layout still looks intentional
   with JS disabled (just static rotation, no tilt). */
@media (prefers-reduced-motion: reduce) {
    .pf-card {
        transition: none;
    }
}

/* ---------------- Media / slideshow ---------------- */
.pf-card__media {
    position: relative;
    flex: 1;
    min-height: 130px;
    background: var(--color-dark-surface);
    overflow: hidden;
}

.pf-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity .6s var(--ease), transform 6s linear;
}

    .pf-slide.is-active {
        opacity: 1;
        transform: scale(1);
    }

.pf-card:hover .pf-slide.is-active,
.pf-card:focus-within .pf-slide.is-active {
    transform: scale(1.08);
}

.pf-card__tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .68rem;
    letter-spacing: .04em;
    color: #FFFFFF;
    background: rgba(22, 30, 51, .55);
    backdrop-filter: blur(6px);
}

.pf-card__status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .68rem;
    letter-spacing: .04em;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(6px);
}

.pf-card__status--success {
    color: #1F7A46;
}

.pf-card__status--warn {
    color: #8A5A0E;
}

.pf-card__status--accent {
    color: var(--color-accent-2);
}

.pf-dots {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.pf-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    transition: background .3s var(--ease), transform .3s var(--ease);
}

    .pf-dot.is-active {
        background: #FFFFFF;
        transform: scale(1.25);
    }

/* ---------------- Body ---------------- */
.pf-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .pf-card__body h3 {
        font-family: var(--font-display);
        font-size: 1.05rem;
        color: var(--color-text);
        margin: 0;
    }

    .pf-card__body p {
        font-size: .86rem;
        color: var(--color-text-muted);
        margin: 0;
        line-height: 1.5;
    }

.pf-card__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.pf-chip {
    font-size: .68rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-accent-2-soft);
    color: var(--color-accent-2);
}

.pf-card__link {
    margin-top: 4px;
    align-self: flex-start;
    font-weight: 600;
    font-size: .86rem;
    color: var(--color-accent);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), color .25s var(--ease);
}

    .pf-card__link:hover {
        border-color: var(--color-accent);
    }

.pf-card__link--muted {
    color: var(--color-text-muted);
    cursor: default;
}

    .pf-card__link--muted:hover {
        border-color: transparent;
    }

/* ---------------- Small "chaos" accents on the larger cards ---------------- */
.pf-card--lg .pf-card__tag {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    backdrop-filter: none;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
    .pf-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 170px;
    }

    .pf-card--lg {
        grid-column: span 4;
        grid-row: span 2;
    }

    .pf-card--md {
        grid-column: span 4;
        grid-row: span 1;
    }

    .pf-card--sm {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 640px) {
    .pf-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 22px;
    }

    .pf-card--lg, .pf-card--md, .pf-card--sm {
        grid-column: span 1;
        grid-row: span 1;
    }

    .pf-card {
        transform: rotate(0deg) !important;
    }

    .pf-card__media {
        min-height: 200px;
    }
}
