/* Chi Siamo — hero editoriale + timeline animata */

.about-hero {
    position: relative;
    overflow: hidden;
    margin: -5rem -4rem 3rem;
    padding: 6rem 4rem 3rem;
    background: linear-gradient(160deg, #081014 0%, #0f1f26 60%, #0D9488 220%);
    border-radius: 60px 60px 0 0;
    color: #fff;
}

.about-hero-watermark {
    position: absolute;
    top: -2.5rem;
    right: -1rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 14rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.06);
    pointer-events: none;
    user-select: none;
}

.about-hero h1 {
    position: relative;
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    letter-spacing: -1px;
    line-height: 1.05;
    color: #fff;
}

.about-hero .category-badge { position: relative; }

.about-hero .lead-text {
    position: relative;
    color: rgba(255, 255, 255, 0.75);
    max-width: 640px;
    margin-bottom: 0;
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0 2.5rem;
}

.skills-chips span {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #0D9488;
    background: #0D948810;
    border: 1px solid #0D948835;
    border-radius: 20px;
    padding: 6px 14px;
}

/* Timeline: linea che si riempie con lo scroll */
.story-timeline {
    --progress: 0%;
    position: relative;
    margin: 2.5rem 0;
    padding-left: 2rem;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--m35-border);
}

.story-timeline::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: var(--progress);
    background: #0D9488;
    box-shadow: 0 0 8px rgba(13, 148, 136, 0.6);
    transition: height 0.1s linear;
}

.story-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1), transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.story-item.in-view { opacity: 1; transform: translateY(0); }

.story-item:last-child { margin-bottom: 0; }

.story-item::before {
    content: '';
    position: absolute;
    left: -2.09rem;
    top: 0.4rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0D9488;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #0D9488;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

.story-item.in-view::before { transform: scale(1); }

/* Foto singola nella timeline */
.story-artifact {
    margin: 1.5rem 0 0;
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.story-artifact:hover { transform: scale(1.02); border-color: rgba(255, 255, 255, 0.25); }

.story-artifact img { width: 100%; display: block; }

.story-artifact-press { max-width: 260px; }

.story-artifact-screenshot { max-width: 380px; }

.story-artifact figcaption {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.68rem;
    color: var(--m35-slate);
    text-align: left;
    padding: 10px 14px 12px;
    letter-spacing: 0.3px;
    background: rgba(255, 255, 255, 0.03);
}

/* Mucchietto: 2+ foto sovrapposte stile Instagram, si sfogliano nel lightbox */
.photo-pile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 0;
    padding: 0.6rem 1.25rem 0.6rem 0.4rem;
    max-width: 320px;
    background: var(--m35-panel);
    border: 1px solid var(--m35-border);
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.photo-pile:hover img { transform: rotate(calc((var(--i) - 0.5) * 14deg)) scale(1.04); }

.photo-pile img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 9px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    margin-left: -18px;
    transform: rotate(calc((var(--i) - 0.5) * 8deg));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.photo-pile img:first-child { margin-left: 0; }

.photo-pile-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--m35-ink);
    line-height: 1.3;
}

/* Sezione inm35.it */
.inm35-block { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; margin: 1.5rem 0 2.5rem; }
.inm35-card { width: 100%; max-width: 260px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); flex-shrink: 0; }
.inm35-block > div { flex: 1; min-width: 260px; }
.inm35-block p:first-child { margin-top: 0; }

/* Lightbox */
.photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 10, 0.92);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.photo-lightbox.open { opacity: 1; visibility: visible; }

.lightbox-body { max-width: min(90vw, 700px); text-align: center; }
.lightbox-body img { max-width: 100%; max-height: 72vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); display: block; margin: 0 auto; }
.lightbox-caption { color: #EAECEF; font-size: 0.95rem; margin: 1rem 0 0.5rem; }
.lightbox-counter { color: #8892B0; font-family: 'Roboto Mono', monospace; font-size: 0.75rem; }

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-nav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 1.5rem;
}

.lightbox-nav:hover { background: rgba(0, 209, 133, 0.2); border-color: #0D9488; }

@media (prefers-reduced-motion: reduce) {
    .story-item, .story-item::before { transition: none; opacity: 1; transform: none; }
}

@media (max-width: 900px) {
    .about-hero {
        margin: -3rem -1.5rem 2rem;
        padding: 4rem 1.5rem 2.5rem;
        border-radius: 30px 30px 0 0;
    }
    .about-hero h1 { font-size: 2.25rem; }
    .about-hero-watermark { font-size: 7rem; top: -1rem; }
    .story-artifact { max-width: 100%; transform: rotate(0); }
    .photo-pile { flex-wrap: wrap; border-radius: 24px; max-width: 100%; }
    .inm35-card { max-width: 200px; }
    .lightbox-nav { width: 40px; height: 40px; margin: 0 0.5rem; }
    .lightbox-close { top: 1rem; right: 1rem; font-size: 2rem; }
}
