/* 
* GIULIO VALERIO VILLA - PORTFOLIO STYLES
* Warm Minimal | Editorial | High-End
*/

:root {
    /* Colors */
    --bg-color: #F9F9F7;
    --text-color: #1C1C1C;
    --accent-color: #D4AF37;
    --card-bg: #FFFFFF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Manrope', sans-serif;

    /* Spacing */
    --spacing-sm: 1.5rem;
    --spacing-md: 3rem;
    --spacing-lg: 5rem;
    --spacing-xl: 8rem;

    /* Layout */
    --max-width: 1400px;
    --header-height: 90px;
    --border-radius: 4px;
}

/* RESET & BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--border-radius);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

/* REUSABLE CLASSES */
.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* HEADER */
header {
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-sm);
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
        letter-spacing: -0.02em;
        line-height: 1.1;
    }
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--accent-color);
}

/* FOOTER */
footer {
    padding: var(--spacing-lg) var(--spacing-sm);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: var(--spacing-xl);
}

footer p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

/* HOME PAGE HERO */
.hero {
    padding: var(--spacing-xl) var(--spacing-sm) var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    /* Desktop size */
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* MASONRY GRID */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm) var(--spacing-lg);
}

.grid-wrapper {
    column-count: 3;
    column-gap: 24px;
    width: 100%;
}

.card {
    break-inside: avoid;
    margin-bottom: 24px;
    display: inline-block;
    width: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Responsive Rules for Grid */
@media (max-width: 1024px) {
    .grid-wrapper {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .grid-wrapper {
        column-count: 1;
    }
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 28, 28, 0.7);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius);
    padding: 20px;
}

.card:hover .overlay {
    opacity: 1;
}

.overlay h3 {
    color: #fff;
    font-size: 1.25rem;
    text-align: center;
    padding: 0;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.card:hover .overlay h3 {
    transform: translateY(0);
}

/* INSTAGRAM CTA SECTION */
.instagram-cta {
    text-align: center;
    padding: 80px 20px 20px;
    max-width: 600px;
    margin: 40px auto 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.instagram-cta h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.instagram-cta p {
    font-family: var(--font-body);
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.btn-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-transform: uppercase;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* PROCESS PAGE */
.process-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-sm);
}

.process-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.process-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.process-intro {
    font-size: 1.4rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
}

.process-step {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--spacing-xl) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.process-step:nth-child(even) .step-info {
    order: 2;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.1);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
}

.step-desc {
    font-size: 1.15rem;
    color: #444;
    line-height: 1.7;
    max-width: 500px;
}

.step-visual {
    background: transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.step-visual img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.step-visual:hover img {
    transform: scale(1.02);
}

/* INFO PAGE STYLES */
.info-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-sm);
}

.info-separator {
    width: 60%;
    height: 1px;
    background-color: #E5E5E5;
    margin: 80px auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 24px;
    margin-top: 0;
}

.section-intro {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    max-width: 800px;
    margin-bottom: 2rem;
}

.info-hero-split {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 60px;
}

.info-hero-visual {
    flex: 0 0 45%;
}

.info-hero-visual img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.info-hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.info-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #444;
    max-width: 800px;
    margin: 0 auto;
}

.info-main-grid {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.info-visual {
    flex: 0 0 40%;
}

.info-visual img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.info-background-text {
    flex: 1;
    padding-top: 10px;
}

.info-background-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
}

.how-i-work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.work-card {
    background-color: #F8F8F8;
    padding: 32px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.work-card:hover {
    transform: translateY(-5px);
}

.work-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.work-card p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0;
}

.design-specializations {
    margin-top: 30px;
    margin-bottom: 40px;
}

.spec-item {
    margin-bottom: 24px;
    border-left: 2px solid var(--accent-color);
    padding-left: 20px;
}

.spec-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.spec-item p {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 0;
}

.dont-do-block {
    background-color: #F5F5F5;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
}

.dont-do-block h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.dont-do-block ul {
    list-style: disc;
    padding-left: 20px;
    color: #666;
    font-size: 0.95rem;
}

.contact-section {
    background-color: #FAFAFA;
    padding: 60px;
    border-radius: 12px;
    text-align: center;
    max-width: 900px;
    margin: 80px auto 0;
}

.contact-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.contact-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.contact-email {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
}

.contact-email:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.contact-metadata {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-social a {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-social a:hover {
    color: var(--accent-color);
}

.contact-instructions {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.contact-instructions ol {
    margin: 15px 0 20px 20px;
    font-weight: 500;
}

.contact-instructions li {
    margin-bottom: 10px;
    padding-left: 10px;
}

.contact-response-time {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    box-shadow: none;
}

.lightbox-caption,
.lightbox-desc {
    color: #f0f0f0;
    text-align: center;
    max-width: 700px;
    margin-top: 15px;
}

.lightbox-caption {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.lightbox-desc {
    font-size: 0.9rem;
    font-family: 'Manrope', sans-serif;
    color: #aaa;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #ffffff;
    cursor: pointer;
    line-height: 1;
    z-index: 10002;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    font-weight: 300;
    color: #ffffff;
    cursor: pointer;
    padding: 1rem;
    user-select: none;
    transition: all 0.3s ease;
    opacity: 0.7;
    z-index: 10001;
}

.lightbox-nav:hover {
    color: var(--accent-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* 
   --------------------------------------------------
   MOBILE & RESPONSIVE FIXES (OTTIMIZZAZIONE TOTALE)
   --------------------------------------------------
*/
@media (max-width: 768px) {

    /* 1. HERO HOME: Riduzione drastica per pulizia */
    .hero {
        padding: 3rem 1.5rem 2rem;
    }

    .hero h1 {
        font-size: 2.4rem;
        /* Molto più piccolo e gestibile */
        line-height: 1.2;
    }

    .hero .subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

    /* 2. PROCESS PAGE: Gerarchia corretta */
    .process-header h1 {
        font-size: 2.2rem;
        /* Uniforme con la Home */
        line-height: 1.2;
    }

    .process-header h2 {
        font-size: 1.4rem;
        margin-top: 10px;
        color: var(--accent-color);
        /* Piccolo tocco di colore */
    }

    .process-header h3 {
        font-size: 1.1rem;
    }

    /* Riduzione step process */
    .process-step {
        padding: 3rem 0;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-step:nth-child(even) .step-info {
        order: 0;
        /* Reset ordine per mobile */
    }

    .step-number {
        font-size: 2.5rem;
        /* Meno invasivo */
    }

    .step-title {
        font-size: 1.5rem;
    }

    /* 3. INFO PAGE: Adattamento */
    .info-page-wrapper {
        padding: 3rem 1.5rem;
    }

    .info-hero-split {
        flex-direction: column;
        gap: 2rem;
    }

    .info-hero-visual {
        flex: 0 0 100%;
        order: -1;
        /* Foto sempre prima su mobile */
    }

    .info-hero-title {
        font-size: 2.2rem;
        text-align: left;
        /* O center, a gusto */
    }

    .info-main-grid {
        flex-direction: column;
    }

    .info-visual {
        order: -1;
    }

    .how-i-work-grid {
        grid-template-columns: 1fr;
        /* Colonna singola per i box */
    }

    /* 4. LIGHTBOX MOBILE */
    .lightbox-nav {
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }

    .lightbox-caption {
        font-size: 1.2rem;
    }

    .lightbox-desc {
        font-size: 0.85rem;
    }
}