/* ==========================================================================
   Team page (team.html) – builds on the .home-* components in index.css
   ========================================================================== */

/* --- Hero facts -------------------------------------------------------- */
.team-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    list-style: none;
    animation: homeReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.team-facts li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.88rem;
    color: var(--home-text-subtle);
}

.team-facts strong {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: var(--home-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Team grid --------------------------------------------------------- */
/* Flex instead of grid so an incomplete last row stays centered. */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.team-grid > .team-card {
    flex: 0 1 calc((100% - 3 * 1.5rem) / 4);
    min-width: 240px;
}

.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.2rem 1.75rem 2rem;
    text-align: center;
    border-radius: calc(var(--home-radius) + 4px);
    background:
        radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.1), transparent 55%),
        var(--home-surface);
    border: 1px solid var(--home-border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: var(--home-border-accent);
    box-shadow: 0 20px 44px rgba(6, 182, 212, 0.1);
}

.team-card__avatar {
    position: relative;
    width: 132px;
    height: 132px;
    margin-bottom: 1.4rem;
    padding: 4px;
    border-radius: 50%;
    background: var(--home-gradient);
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.2);
}

.team-card__initial,
.team-card__avatar img {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    border: 4px solid #0d1328;
}

.team-card__initial {
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    background:
        radial-gradient(circle at 30% 25%, rgba(34, 211, 238, 0.45), transparent 60%),
        radial-gradient(circle at 75% 80%, rgba(168, 85, 247, 0.45), transparent 60%),
        #111a33;
}

.team-card__avatar img {
    display: block;
    object-fit: cover;
    background: #0d1328;
    user-select: none;
}

.team-card h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-card__role {
    margin-bottom: 1rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #bdeefc;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.team-card p {
    font-size: 0.93rem;
    line-height: 1.7;
    color: var(--home-text-muted);
}

/* --- Values ------------------------------------------------------------ */
.team-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

/* --- Two paths --------------------------------------------------------- */
.team-paths {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.team-path {
    display: flex;
    flex-direction: column;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: calc(var(--home-radius) + 4px);
    color: inherit;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-path--primary {
    border-color: var(--home-border-accent);
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.18), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.16), transparent 50%),
        var(--home-surface);
}

.team-path:hover {
    transform: translateY(-4px);
    border-color: var(--home-border-accent);
    box-shadow: 0 20px 44px rgba(6, 182, 212, 0.12);
}

.team-path:focus-visible {
    outline: 2px solid var(--home-accent-strong);
    outline-offset: 3px;
}

.team-path__icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1.3rem;
    border-radius: 12px;
    font-size: 1.3rem;
    color: var(--home-accent-strong);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(168, 85, 247, 0.14));
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.team-path h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.team-path p {
    flex: 1;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--home-text-muted);
    margin-bottom: 1.5rem;
}

.team-path .home-link i {
    transition: transform 0.25s ease;
}

.team-path:hover .home-link i {
    transform: translateX(4px);
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1100px) {
    .team-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .team-grid > .team-card {
        flex-basis: 100%;
        min-width: 0;
    }

    .team-values,
    .team-paths {
        grid-template-columns: 1fr;
    }

    .team-facts strong {
        font-size: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-facts {
        animation: none;
    }

    .team-card,
    .team-path {
        transition: none;
    }
}
