/* ═══════════════════════════════════════════════════════════════
   espositon.it — Landing personale Nicola Esposito
   Design system: chiaro editoriale panna + rosso Ducati
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg:            #faf8f5;
    --bg-card:       #ffffff;
    --bg-card-hover: #f5f0e8;
    --bg-alt:        #f2ede4;
    --accent:        #CC0000;
    --accent-soft:   rgba(204, 0, 0, 0.10);
    --accent-glow:   rgba(204, 0, 0, 0.28);
    --text:          #1a1a22;
    --text-secondary:#5c5c70;
    --text-muted:    #8888a0;
    --border:        rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --shadow-card:   0 2px 10px rgba(0,0,0,0.04);
    --shadow-lift:   0 20px 50px rgba(0,0,0,0.10);
    --radius:        16px;
    --radius-sm:     10px;
    --radius-lg:     24px;
    --max-width:     1100px;
    --prose-width:   680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.accent { color: var(--accent); }

h2 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   SOCIAL BAR (fissa in alto a sinistra)
   ═══════════════════════════════════════════════════════════════ */

.social-bar {
    position: fixed;
    top: 16px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.social-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 5px;
    color: var(--text);
    opacity: 0.5;
    transition: opacity 0.15s;
    text-decoration: none;
}

.social-bar a:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   LANG SWITCHER (inline, dentro la social-bar)
   ═══════════════════════════════════════════════════════════════ */

.lang-divider {
    width: 1px;
    align-self: stretch;
    background: var(--border);
    margin: 2px 4px;
}

.lang-switcher {
    display: flex;
    gap: 2px;
}

.lang-switcher a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    padding: 3px 4px;
    border-radius: 5px;
    opacity: 0.45;
    transition: opacity 0.15s;
}

.lang-switcher a.active { opacity: 1; }
.lang-switcher a:not(.active):hover { opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn-primary,
.btn-secondary {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding: 11px 26px;
    border-radius: 30px;
    transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 30px -8px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px -8px var(--accent-glow);
}

.btn-secondary {
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 24px 18px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -200px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(204,0,0,0.14) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    max-width: var(--max-width);
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 48px;
    z-index: 1;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    padding-left: 48px;
    position: relative;
}

.hero-eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 36px;
    height: 2px;
    background: var(--accent);
    transform: translateY(-50%);
}

.hero h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 0 0;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-portrait {
    flex: 0 0 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hero-portrait-cta {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 20px;
    border-radius: 22px;
}

.portrait-frame {
    width: 480px;
    height: 320px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(204, 0, 0, 0.08),
        0 24px 50px rgba(0,0,0,0.15);
    position: relative;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-placeholder,
.photo-placeholder,
.project-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    background: repeating-linear-gradient(
        45deg,
        rgba(0,0,0,0.015),
        rgba(0,0,0,0.015) 10px,
        rgba(0,0,0,0.04) 10px,
        rgba(0,0,0,0.04) 20px
    );
}

/* ═══════════════════════════════════════════════════════════════
   SCROLL HINT
   ═══════════════════════════════════════════════════════════════ */

.scroll-hint {
    display: none;
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent);
    text-decoration: none;
    animation: bounce-hint 1.8s ease-in-out infinite;
    z-index: 2;
    transition: opacity 0.2s;
}

.scroll-hint:hover { opacity: 0.7; }

.scroll-hint svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 6px rgba(204,0,0,0.4));
}

@keyframes bounce-hint {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50%      { transform: translateX(-50%) translateY(10px); opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════════════
   BIO SECTIONS (Il motociclista / Lo sviluppatore)
   ═══════════════════════════════════════════════════════════════ */

.bio-section {
    padding: 120px 0;
    position: relative;
}

.bio-alt {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.bio-header {
    max-width: var(--prose-width);
    margin: 0 auto 36px;
    text-align: left;
}

.bio-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.bio-prose {
    max-width: var(--prose-width);
    margin: 0 auto;
}

.bio-prose p {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.bio-prose p:last-child { margin-bottom: 0; }

.bio-prose strong {
    color: var(--text);
    font-weight: 600;
}

.bio-prose em {
    color: var(--text);
    font-style: italic;
}

/* Galleria foto motociclista */
.bio-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
    max-width: var(--max-width);
    margin: 64px auto 0;
    grid-auto-flow: dense;
}

.bio-gallery .bio-photo {
    aspect-ratio: auto;
    grid-column: span 1;
    grid-row: span 1;
}

.bio-gallery .bio-photo.photo-wide {
    grid-column: span 2;
}

.bio-gallery .bio-photo.photo-tall {
    grid-row: span 2;
}

.bio-gallery .bio-photo.photo-big {
    grid-column: span 2;
    grid-row: span 2;
}

.bio-photo {
    aspect-ratio: 1/1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-card);
}

.bio-photo:hover {
    transform: translateY(-4px);
    border-color: rgba(204, 0, 0, 0.35);
    box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}

.bio-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════
   IMAGE STRIPS (foto full-width tra sezioni — stile rivista moto)
   ═══════════════════════════════════════════════════════════════ */

.image-strip {
    position: relative;
    width: 100%;
    height: 55vh;
    min-height: 380px;
    max-height: 620px;
    overflow: hidden;
}

.image-strip-tall {
    height: 85vh;
    min-height: 540px;
    max-height: 860px;
}

.image-strip-short {
    height: 42vh;
    min-height: 320px;
    max-height: 500px;
}

.image-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    transform: scale(1.02);
    transition: transform 8s ease-out;
}

.image-strip-tall img {
    object-position: center 22%;
}

.image-strip:hover img {
    transform: scale(1.06);
}

.image-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(10,10,15,0.85) 0%,
        rgba(10,10,15,0.4) 40%,
        rgba(10,10,15,0) 70%
    );
    pointer-events: none;
    z-index: 1;
}

.image-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10,10,15,0.2) 0%,
        transparent 30%,
        transparent 70%,
        rgba(10,10,15,0.6) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.image-strip-caption {
    position: absolute;
    bottom: 12%;
    left: 6%;
    max-width: 460px;
    z-index: 2;
    color: #ffffff;
}

.caption-right {
    left: auto;
    right: 6%;
    text-align: right;
}

.caption-right ~ ::before,
.image-strip:has(.caption-right)::before {
    background: linear-gradient(
        270deg,
        rgba(10,10,15,0.85) 0%,
        rgba(10,10,15,0.4) 40%,
        rgba(10,10,15,0) 70%
    );
}

.caption-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
    padding-left: 44px;
    position: relative;
}

.caption-kicker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 32px;
    height: 2px;
    background: var(--accent);
    transform: translateY(-50%);
}

.caption-right .caption-kicker {
    padding-left: 0;
    padding-right: 44px;
}

.caption-right .caption-kicker::before {
    left: auto;
    right: 0;
}

.image-strip-caption p {
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

@media (max-width: 720px) {
    .image-strip-caption {
        left: 5%;
        right: 5%;
        max-width: none;
        bottom: 8%;
    }
    .caption-right {
        text-align: left;
    }
    .caption-right .caption-kicker {
        padding-left: 44px;
        padding-right: 0;
    }
    .caption-right .caption-kicker::before {
        left: 0;
        right: auto;
    }
}

/* Sezione .projects legacy rimossa 2026-04-24: 220 righe CSS orfano
   (.projects-grid / .project-card / .project-media / .mini-phone /
    .map-mockup / .project-badge / .project-body / .project-features /
    .project-cta / .project-desc / .project-tagline / .project-card-soon).
   Oggi in index.html la sezione progetti usa .projects-mini (card compatte
   con link outbound a motopath.it), definite in coda al file. */

/* ═══════════════════════════════════════════════════════════════
   CONTATTI
   ═══════════════════════════════════════════════════════════════ */

.contact {
    padding: 120px 0 140px;
    text-align: center;
}

.contact h2 {
    margin-bottom: 20px;
}

.contact-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-brand {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS (scroll reveal)
   ═══════════════════════════════════════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        flex-direction: column;
        min-height: auto;
    }

    .project-media {
        flex: 0 0 auto;
        aspect-ratio: 16/9;
    }

    .bio-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
    }

    .bio-gallery .bio-photo.photo-wide,
    .bio-gallery .bio-photo.photo-big {
        grid-column: span 2;
    }

    .bio-gallery .bio-photo.photo-tall,
    .bio-gallery .bio-photo.photo-big {
        grid-row: span 2;
    }
}

@media (max-width: 720px) {
    .hero {
        padding: 60px 24px 40px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto;
    }

    .hero-eyebrow {
        padding-left: 0;
    }

    .hero-eyebrow::before {
        display: none;
    }

    .hero-eyebrow {
        padding-left: 0;
    }

    .hero-eyebrow::before {
        display: none;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-portrait {
        flex: 0 0 auto;
    }

    .portrait-frame {
        width: 200px;
        height: 260px;
    }

    .bio-section {
        padding: 80px 0;
    }

    .projects {
        padding: 32px 0 72px;
    }

    .contact {
        padding: 80px 0 100px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .bio-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 280px;
    }

    .bio-gallery .bio-photo.photo-wide,
    .bio-gallery .bio-photo.photo-big {
        grid-column: span 1;
    }

    .bio-gallery .bio-photo.photo-tall {
        grid-row: span 1;
    }

    .image-strip,
    .image-strip-tall,
    .image-strip-short {
        height: 45vh;
        min-height: 280px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS MINI — card compatte con link outbound a motopath.it
   ═══════════════════════════════════════════════════════════════ */

.projects-mini { padding: 72px 0 56px; background: var(--bg); }
.projects-mini .bio-header { text-align: center; margin-bottom: 32px; }
.projects-mini .projects-lead {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 10px;
}
.projects-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}
.project-mini {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project-mini:hover {
    transform: translateY(-3px);
    border-color: rgba(204,0,0,0.35);
    box-shadow: var(--shadow-lift);
}
.project-mini-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.project-mini-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.project-mini-body p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}
.project-mini-cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
}
@media (max-width: 720px) {
    .projects-mini-grid { grid-template-columns: 1fr; }
}
