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

:root {
    --color-dark: #1a1a1a;
    --color-text: #484848;
    --color-light-text: #707070;
    --color-accent: #a29564;
    --color-bg: #fff;
    --color-light-bg: #f5f5f3;
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* === HEADER === */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: all .4s ease;
    background: transparent;
}

#site-header.scrolled {
    background: rgba(26,26,26,.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,.1);
}

.header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding .4s ease;
}

#site-header.scrolled .header-inner { padding: 12px 30px; }

.logo { display: flex; align-items: center; }
.logo-svg { width: 200px; height: auto; color: #fff; transition: width .4s ease; }
#site-header.scrolled .logo-svg { width: 160px; }

.main-nav { display: flex; gap: 35px; }
.main-nav a {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,.85);
    transition: color .3s;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--color-accent);
    transition: width .3s;
}
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; }

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 28px; height: 20px;
    position: relative;
    z-index: 1001;
}
.menu-toggle span {
    display: block; width: 100%; height: 2px;
    background: #fff;
    position: absolute; left: 0;
    transition: all .3s;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }
.menu-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

.mobile-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,26,26,.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav a {
    font-family: var(--font-heading);
    font-size: 28px;
    color: #fff;
    transition: color .3s;
}
.mobile-nav a:hover { color: var(--color-accent); }

/* === HERO === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 30px;
}

.hero-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(36px, 5vw, 62px);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 17px;
    font-weight: 300;
    color: rgba(255,255,255,.8);
    max-width: 550px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    transition: all .3s;
    border-radius: 0;
}
.btn:hover {
    background: #fff;
    color: var(--color-dark);
    border-color: #fff;
}
.btn-accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.btn-accent:hover {
    background: #8a7e54;
    border-color: #8a7e54;
    color: #fff;
}
.btn-dark {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #fff;
}
.btn-dark:hover {
    background: #333;
    border-color: #333;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.5);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* === SECTIONS === */
.section {
    padding: 100px 0;
}

.section-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 400;
    color: var(--color-dark);
    line-height: 1.3;
    margin-bottom: 25px;
}

.section-text {
    font-size: 15px;
    color: var(--color-light-text);
    line-height: 1.8;
    max-width: 600px;
}

.section-dark {
    background: var(--color-dark);
    color: #fff;
}
.section-dark .section-title { color: #fff; }
.section-dark .section-text { color: rgba(255,255,255,.7); }

.section-light { background: var(--color-light-bg); }

/* === HOME: INTRO === */
.intro-section {
    padding: 120px 0;
    text-align: center;
}

.intro-section .section-title {
    max-width: 700px;
    margin: 0 auto 20px;
}

.intro-section .section-text {
    max-width: 650px;
    margin: 0 auto;
}

/* === HOME: PROJECT CARDS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    border-radius: 0;
}

.project-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}

.project-card:hover img { transform: scale(1.06); }

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 50%, rgba(0,0,0,.05) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 30px;
    color: #fff;
    transition: background .4s;
}

.project-card:hover .project-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.1) 100%);
}

.project-card-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 14px;
    color: rgba(255,255,255,.7);
    line-height: 1.6;
    margin-bottom: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s ease, margin .5s ease;
}

.project-card:hover p {
    max-height: 100px;
    margin-bottom: 20px;
}

.project-card .btn {
    align-self: flex-start;
    padding: 10px 25px;
    font-size: 11px;
    opacity: 0;
    transform: translateY(10px);
    transition: all .4s ease;
}

.project-card:hover .btn {
    opacity: 1;
    transform: translateY(0);
}

/* === ABOUT STRIP === */
.about-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.about-strip-img {
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.about-strip-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
}

/* === DETAIL PAGE: PROJECT HERO === */
.project-hero {
    height: 70vh;
    min-height: 500px;
}

/* === DETAIL: CONTENT SECTIONS === */
.detail-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

.detail-section.reverse .detail-img { order: 2; }
.detail-section.reverse .detail-content { order: 1; }

.detail-img {
    background-size: cover;
    background-position: center;
    min-height: 400px;
}

.detail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
}

.detail-content .section-text { margin-bottom: 15px; }

/* === FEATURES LIST === */
.features-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--color-light-text);
}

.feature-item i {
    color: var(--color-accent);
    margin-top: 3px;
    font-size: 12px;
    flex-shrink: 0;
}

/* === NUMBERS BAR === */
.numbers-bar {
    background: var(--color-dark);
    padding: 60px 0;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.number-item h3 {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 5px;
}

.number-item p {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,.6);
}

/* === GALLERY === */
.gallery-section { padding: 80px 0; }

.gallery-section .section-label,
.gallery-section .section-title {
    text-align: center;
}

.gallery-section .section-title {
    margin-bottom: 50px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.gallery-grid a {
    display: block;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-grid img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.gallery-grid a:hover img { transform: scale(1.08); }

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    overscroll-behavior: none;
}
.lightbox-overlay.active { opacity: 1; }
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    background: none; border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
}
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.45);
    border: none; color: #fff;
    font-size: 36px;
    padding: 14px 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .2s;
    z-index: 10;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(0,0,0,.7); }
.lightbox-prev, .lightbox-next, .lightbox-close { -webkit-tap-highlight-color: transparent; outline: none; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* === FOOTER === */
.footer-cta {
    background: var(--color-accent);
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.footer-cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 400;
    margin-bottom: 10px;
}

.footer-cta p {
    font-size: 15px;
    opacity: .85;
}

.footer-main {
    background: var(--color-dark);
    padding: 60px 0;
    color: rgba(255,255,255,.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
}

.footer-logo { width: 160px; margin-bottom: 20px; }
.footer-company { font-weight: 600; color: #fff; margin-bottom: 5px; }

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { transition: color .3s; }
.footer-col a:hover { color: var(--color-accent); }

.footer-col i {
    width: 20px;
    color: var(--color-accent);
    margin-right: 8px;
}

.footer-bottom {
    background: #111;
    padding: 20px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.4);
}

/* === CONTATTI === */
.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contatti-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contatto-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contatto-icon {
    width: 48px;
    height: 48px;
    background: var(--color-light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contatto-icon i {
    color: var(--color-accent);
    font-size: 18px;
}

.contatto-item h4 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.contatto-item p {
    font-size: 14px;
    color: var(--color-light-text);
    line-height: 1.6;
}

.contatto-item a {
    color: var(--color-text);
    transition: color .3s;
}

.contatto-item a:hover {
    color: var(--color-accent);
}

.contatti-map {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.contatti-map iframe {
    display: block;
}

/* === ANIMATIONS === */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav { display: flex; }

    .projects-grid { grid-template-columns: 1fr; gap: 20px; }
    .project-card { aspect-ratio: 16/9; }
    .project-card-overlay { padding: 20px; }
    .project-card p { max-height: 100px; }
    .project-card .btn { opacity: 1; transform: none; }

    .about-strip,
    .detail-section {
        grid-template-columns: 1fr;
    }
    .detail-section.reverse .detail-img { order: 1; }
    .detail-section.reverse .detail-content { order: 2; }
    .detail-content,
    .about-strip-content { padding: 50px 30px; }

    .numbers-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .features-list { grid-template-columns: 1fr; }
    .contatti-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
    .hero { min-height: 500px; }
    .hero-content h1 { font-size: 32px; }
    .numbers-grid { grid-template-columns: 1fr 1fr; gap: 25px; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .detail-content,
    .about-strip-content { padding: 40px 20px; }
    .lightbox-prev, .lightbox-next {
        font-size: 22px;
        padding: 10px 14px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
