/* ==========================================================================
   CSS Resets & Variables — Stile Salicutti
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Lato:wght@300;400;500&display=swap');

:root {
    --white:        #fdfcf9;
    --ivory:        #f6f3ec;
    --stone:        #ede9e0;
    --text-dark:    #1c1c1a;
    --text-mid:     #5a5750;
    --text-light:   #f8f6f1;
    --accent:       #8a7a5a;       /* terracotta-sand */
    --accent-hover: #6e6248;
    --dark-overlay: rgba(18, 18, 14, 0.52);

    --font-serif:   'Cormorant Garamond', Georgia, serif;
    --font-sans:    'Lato', system-ui, sans-serif;

    --max-w:        1180px;
    --section-pad:  140px 6%;
    --transition:   0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.15;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: var(--white); }

/* ==========================================================================
   Header / Navigation — transparent on top, white on scroll (Salicutti)
   ========================================================================== */

.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 5%;
    transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
    background: transparent;
}

.header.scrolled {
    background: rgba(248, 246, 241, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 5%;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* Logo */
.logo { display: flex; align-items: center; }

.logo-img {
    height: 100px;
    width: auto;
    transition: height var(--transition), filter var(--transition);
    filter: brightness(0) invert(1);
}

.header.scrolled .logo-img {
    height: 68px;
    filter: none;
}

/* Nav */
.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-cta {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(248,246,241,0.88);
    position: relative;
    padding-bottom: 3px;
    transition: color var(--transition);
}

.nav-cta::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-cta:hover::after { width: 100%; }

.header.scrolled .nav-cta {
    color: var(--text-dark);
}

.nav-cta:hover { color: var(--accent); }

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px; height: 1.5px;
    background: var(--white);
    transition: background var(--transition);
}
.header.scrolled .hamburger span { background: var(--text-dark); }

/* ==========================================================================
   Hero — Full screen, cinematic
   ========================================================================== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.hero-bg {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    transform: scale(1.06);
    transition: transform 12s ease-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(14,12,10,0.72) 0%,
        rgba(14,12,10,0.25) 55%,
        rgba(14,12,10,0.10) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 7% 8vh;
    max-width: 820px;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s 0.3s forwards;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.2rem, 6.5vw, 7rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.06;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1.2s 0.6s forwards;
}

.hero-title em {
    font-style: italic;
    font-weight: 300;
    color: rgba(248,246,241,0.75);
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    color: rgba(248,246,241,0.78);
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s 1s forwards;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    right: 5%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeUp 1s 1.6s forwards;
}

.hero-scroll-hint span {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(248,246,241,0.6);
    writing-mode: vertical-rl;
}

.hero-scroll-hint::after {
    content: '';
    width: 1px;
    height: 60px;
    background: rgba(248,246,241,0.35);
}

/* ==========================================================================
   Slider Section ("Il Luogo")
   ========================================================================== */

.slider-section {
    padding: 100px 0 140px;
    background: var(--white);
    overflow: hidden;
}

.blocks h2 {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    line-height: 1.25;
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--text-dark);
    margin-bottom: 20px;
}

.slider-container {
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.slider-container::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.slider-track {
    display: flex;
    gap: 20px;
    padding: 0 5%;
    width: max-content;
}

.slide {
    width: 75vw;
    max-width: 800px;
    flex-shrink: 0;
}

.slide img {
    width: 100%;
    height: 65vh;
    min-height: 400px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Section: Intro — centered, minimal (like salicutti)
   ========================================================================== */

.intro-section {
    padding: 160px 6% 140px;
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
}

.intro-section.with-bg {
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.section-bg-wrapper.image-band {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 100%;
    z-index: 1;
}

.section-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 12, 10, 0.78);
    z-index: 2;
}

.intro-section.with-bg .content-layer {
    position: relative;
    z-index: 3;
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 400;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-dark);
    line-height: 1.25;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 4.5vw, 4.4rem);
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.12;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

.section-title em {
    font-style: italic;
    color: var(--accent);
}

.section-body {
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    color: var(--text-mid);
    line-height: 2.1;
    max-width: 680px;
    margin: 0 auto;
    font-weight: 300;
}

.section-body p + p { margin-top: 1.6rem; }

/* thin divider */
.divider {
    width: 48px;
    height: 1px;
    background: var(--accent);
    margin: 40px auto 0;
    opacity: 0.6;
}

/* ==========================================================================
   Full-bleed Image Band
   ========================================================================== */

.image-band {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    position: relative;
}

.image-band .band-bg {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transform: scale(1.06);
}

.image-band .band-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14,12,10,0.12);
}

/* ==========================================================================
   Two-column editorial blocks
   ========================================================================== */

.editorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 75vh;
}

.editorial.reverse .editorial-image { order: -1; }
.editorial.reverse .editorial-text { order: 1; }

.editorial-image {
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.editorial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 8s ease-out;
}

.editorial-image:hover img { transform: scale(1.04); }

.editorial-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 9% 100px 8%;
    background: var(--white);
}

.editorial.bg-ivory .editorial-text { background: var(--ivory); }

/* ==========================================================================
   Photo Gallery Grid
   ========================================================================== */

.gallery-section {
    padding: 120px 4% 140px;
    background: var(--ivory);
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.gallery-item {
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
    transform-origin: center;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14,12,10,0);
    transition: background var(--transition);
}

.gallery-item:hover::after { background: rgba(14,12,10,0.08); }

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(14,12,10,0.95);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border: none;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px; right: 40px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    font-size: 2.4rem;
    cursor: pointer;
    transition: color 0.3s;
    padding: 10px 20px;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--white); }

/* ==========================================================================
   GSAP / Quote Section
   ========================================================================== */

.gsap-section {
    width: 100%;
    height: 100vh;
    position: relative;
    background: var(--white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* thin editorial rule between sections */
.rule {
    width: 48px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto;
    opacity: 0.5;
}

.rule-full {
    width: 100%;
    height: 1px;
    background: rgba(28,28,26,0.08);
}

.gsap-text-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 0 8%;
}

.gsap-text {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.8vw, 4.4rem);
    font-weight: 300;
    color: var(--text-dark);
    line-height: 1.22;
    text-align: center;
    will-change: transform, opacity;
    letter-spacing: -0.01em;
}

.gsap-text em {
    font-style: italic;
    color: var(--accent);
}

.gsap-cta-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 6%;
    z-index: 1;
    opacity: 0;
}

.footer-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 300;
    color: var(--text-dark);
    margin-bottom: 24px;
    line-height: 1.2;
}

.footer-text {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: var(--text-mid);
    max-width: 560px;
    line-height: 2;
    margin-bottom: 48px;
    font-weight: 300;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 18px 56px;
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    background: transparent;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}

.btn:hover {
    background: var(--text-dark);
    color: var(--white);
}

.btn-filled {
    background: var(--text-dark);
    color: var(--white);
}

.btn-filled:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* CTA button used in GSAP finale */
.btn-large {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    padding: 18px 60px;
    border: 1px solid var(--text-dark);
    background: transparent;
    color: var(--text-dark);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    cursor: pointer;
}

.btn-large:hover {
    background: var(--text-dark);
    color: var(--white);
}

/* ==========================================================================
   Floating CTA
   ========================================================================== */

.floating-cta {
    position: fixed;
    bottom: 36px;
    right: 36px;
    background: var(--white);
    color: var(--text-dark);
    padding: 14px 26px;
    border: 1px solid rgba(0,0,0,0.12);
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    z-index: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 24px rgba(0,0,0,0.09);
}

.floating-cta:hover {
    background: var(--text-dark);
    color: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.cta-arrow { transition: transform 0.3s ease; }
.floating-cta:hover .cta-arrow { transform: translateX(4px); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-mini {
    background: var(--text-dark);
    color: rgba(248,246,241,0.5);
    text-align: center;
    padding: 60px 6%;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 2.6;
}

.footer-mini p + p { margin-top: 4px; }

.footer-mini .separator {
    margin: 0 12px;
    opacity: 0.35;
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-img {
    opacity: 0;
    transition: opacity 1.4s ease;
}
.reveal-img.visible { opacity: 1; }

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.36s; }

/* keep old class working */
.slide-up { opacity: 0; transform: translateY(32px); transition: opacity 1.1s cubic-bezier(0.22,1,0.36,1), transform 1.1s cubic-bezier(0.22,1,0.36,1); }
.slide-up.visible { opacity: 1; transform: none; }
.reveal-image { opacity: 0; transition: opacity 1.4s ease; }
.reveal-image.visible { opacity: 1; }

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */

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

    .editorial.reverse { direction: ltr; }

    .editorial-image {
        min-height: 55vw;
    }

    .editorial-text {
        padding: 60px 8%;
    }

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

    .gallery-item.wide { grid-column: span 2; }
    .gallery-item.tall { grid-row: span 1; }

    .hero-content { padding: 0 6% 7vh; }

    .image-band { height: 55vh; }
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */

@media (max-width: 600px) {
    :root { --section-pad: 80px 5%; }

    .header { padding: 18px 5%; }
    .header.scrolled { padding: 12px 5%; }
    .logo-img { height: 72px; }
    .header.scrolled .logo-img { height: 54px; }

    .nav-links { gap: 20px; }

    .hero { align-items: flex-end; }
    .hero-title { font-size: clamp(2.4rem, 9vw, 3.5rem); }
    .hero-content { padding: 0 5% 6vh; }
    .hero-scroll-hint { display: none; }

    .intro-section { padding: 80px 6%; }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 200px;
    }

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

    .image-band { height: 50vw; min-height: 260px; }

    .editorial-text { padding: 50px 6%; }

    .gsap-section { height: 80vh; }

    .floating-cta {
        bottom: 16px; right: 16px;
        padding: 12px 18px;
        font-size: 0.62rem;
    }

    .footer-mini { padding: 40px 6%; }

    .lightbox-prev, .lightbox-next { font-size: 1.6rem; padding: 8px 12px; }
}

@media (max-width: 400px) {
    .hero-title { font-size: 2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item.wide { grid-column: span 1; }
}
