/* =========================================================
   Eurocomp & Ind S.r.l. – foglio di stile principale
   ========================================================= */

:root {
    --red: #e3001b;
    --red-dark: #b80016;
    --navy: #002c59;
    --navy-dark: #001b38;
    --graphite: #4b5058;
    --graphite-dark: #3e424a;
    --ink: #1d2433;
    --text: #444b59;
    --muted: #7a8291;
    --line: #e6e8ec;
    --bg: #ffffff;
    --bg-soft: #f4f6f9;
    --grey: #eceef1; /* grigio unico: icone contatti, blocco dietro foto/mappa, form */
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 28, 56, .08);
    --shadow-lg: 0 20px 50px rgba(0, 28, 56, .16);
    --header-h: 84px;
    --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

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

a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; }

.skip-link {
    position: absolute; left: -999px; top: 8px; z-index: 1000;
    background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 6px;
}
.skip-link:focus { left: 8px; color: #fff; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(0, 0, 0, .04); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand img { width: 190px; height: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
    position: relative; display: block;
    padding: 8px 11px;
    font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--navy);
}
.main-nav a::after {
    content: ''; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px;
    background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.main-nav a:hover, .main-nav a.active { color: var(--red); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.nav-toggle {
    display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
    position: relative; z-index: 120;
}
.nav-toggle span {
    display: block; width: 26px; height: 2px; background: var(--navy); margin: 6px auto;
    transition: transform .3s, opacity .3s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1140px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: 0; z-index: 110;
        background: var(--navy);
        display: flex; align-items: center; justify-content: center;
        opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
    }
    .main-nav ul { flex-direction: column; align-items: center; gap: 6px; }
    .main-nav a { color: #fff; font-size: 1.25rem; padding: 8px 16px; }
    .main-nav a:hover, .main-nav a.active { color: #fff; }
    .main-nav a::after { left: 16px; right: 16px; }
    .nav-open .main-nav { opacity: 1; visibility: visible; }
    .nav-open .nav-toggle span { background: #fff; }
    .nav-open { overflow: hidden; }
}

/* ---------- Bottoni ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 28px; border-radius: 999px;
    font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
    background: var(--red); color: #fff; border: 2px solid var(--red);
    transition: background .25s, color .25s, transform .25s, box-shadow .25s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(227, 0, 27, .25); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 10px 24px rgba(0, 44, 89, .2); }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Elementi comuni ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    color: var(--red); margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 32px; height: 2px; background: var(--red); }

.lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.6; color: var(--ink); font-weight: 400; }

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::after { content: ''; width: 32px; height: 2px; background: var(--red); }

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

/* ---------- Hero pagine interne ---------- */
.page-hero {
    position: relative; overflow: hidden;
    /* 1) linea rossa in alto a destra, speculare a quella in basso a sinistra
       2) griglia tecnica + capannone (come nel footer), molto tenui e sfumati verso sinistra */
    background:
        linear-gradient(90deg, transparent 70%, var(--red) 70%) top / 100% 6px no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 420' preserveAspectRatio='xMaxYMid slice'%3E%3Cdefs%3E%3Cpattern id='m' width='24' height='24' patternUnits='userSpaceOnUse'%3E%3Cpath d='M24 0H0V24' fill='none' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/pattern%3E%3Cpattern id='M' width='120' height='120' patternUnits='userSpaceOnUse'%3E%3Cpath d='M120 0H0V120' fill='none' stroke='%23ffffff' stroke-opacity='.09'/%3E%3C/pattern%3E%3ClinearGradient id='f'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='0'/%3E%3Cstop offset='.45' stop-color='%23ffffff' stop-opacity='1'/%3E%3C/linearGradient%3E%3Cmask id='k'%3E%3Crect width='720' height='420' fill='url(%23f)'/%3E%3C/mask%3E%3C/defs%3E%3Cg mask='url(%23k)'%3E%3Crect width='720' height='420' fill='url(%23m)'/%3E%3Crect width='720' height='420' fill='url(%23M)'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.4' opacity='.13' transform='translate(170 40) scale(.8)'%3E%3Cpath d='M-220 300H700M-40 233.9L-200 300M-40 327.2L-200 300M660 220L900 300M660 338L900 300M330 110L-200 300' stroke-dasharray='14 4 2 4'/%3E%3Cpath d='M110 189L330 110L660 220V338L330 390L110 353Z M330 110V390' stroke-width='2.2'/%3E%3Cpath d='M330 126.8L660 227.1M330 126.8L110 198.7'/%3E%3Cpath d='M339.9 146.3L650.1 231.4V247.4L339.9 182.1Z M396 161.7V193.9M462 179.8V207.8M528 197.9V221.7M594 216V235.6'/%3E%3Cpath d='M346.5 251.5L399.3 256.1V379.1L346.5 387.4Z M425.7 258.4L471.9 262.5V367.6L425.7 374.9Z M495 264.5L534.6 268V357.7L495 363.9Z M554.4 269.7L587.4 272.6V349.4L554.4 354.6Z'/%3E%3Cpath d='M319 146.8L121 205.3V227.4L319 182.5Z'/%3E%3Cpath d='M264 231.7L176 244.6V363.8L264 378.8Z M264 268.5L176 274.4M264 305.3L176 304.2M264 342L176 334'/%3E%3Cpath d='M110 172V189M110 172L-40 233.9V327.2L110 352.6' stroke-width='2.2'/%3E%3Cpath d='M110 182.8L-40 239.5'/%3E%3Cpath d='M101 196.7L-31 242V251.9L101 214.3Z M57 211.8V227.2M13 226.8V239.6'/%3E%3Cpath d='M92 264.5L47 270V341.9L92 349.5Z M92 291.7L47 293M92 320.6L47 317.4M27.5 272.3L-17.5 277.8V331L27.5 338.6Z M27.5 293.5L-17.5 294.8M27.5 316.1L-17.5 312.9'/%3E%3Cpath d='M-40 347.2L110 372.6M110 373L330 410M330 410L660 358M-40 339v16M110 365v16M330 402v16M660 350v16M680 220V338M674 220h12M674 338h12'/%3E%3Cpath d='M680 220l-4 10h8zM680 338l-4-10h8z' fill='%23ffffff'/%3E%3Cg font-family='monospace' font-size='13' fill='%23ffffff' stroke='none'%3E%3Ctext x='-210' y='293'%3EL.O.%3C/text%3E%3Ctext transform='translate(18 352) rotate(9.6)'%3E30.00%3C/text%3E%3Ctext transform='translate(200 384) rotate(9.55)'%3E25.00%3C/text%3E%3Ctext transform='translate(470 396) rotate(-8.96)'%3E60.00%3C/text%3E%3Ctext transform='translate(698 300) rotate(-90)'%3E9.50%3C/text%3E%3C/g%3E%3Ccircle cx='640' cy='40' r='30'/%3E%3Cpath d='M640 2v76M602 40h76M640 10l7 30h-14z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat,
        var(--navy);
    color: #fff;
    padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px);
}
.page-hero::before {
    content: ''; position: absolute; right: -10%; top: -40%;
    width: 60%; height: 180%;
    background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
    transform: skewX(-20deg);
}
.page-hero::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 6px; width: 100%;
    background: linear-gradient(90deg, var(--red) 0 30%, transparent 30%);
}
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero .eyebrow { color: #fff; opacity: .85; }
.page-hero .eyebrow::before { background: var(--red); }
.page-hero p { max-width: 640px; font-size: 1.15rem; opacity: .85; margin: 0; }

/* ---------- Home: hero con lettere ---------- */
.home-hero { padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); }

.letters { display: grid; grid-template-columns: repeat(8, 1fr); gap: clamp(4px, .8vw, 12px); }
.letter {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 6px;
    opacity: 0; transform: translateY(30px);
    animation: letterIn .8s cubic-bezier(.2, .7, .2, 1) forwards;
}
.letter img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.letter:hover img { transform: scale(1.08); }
@keyframes letterIn { to { opacity: 1; transform: none; } }

.letters-row2 { display: grid; grid-template-columns: repeat(8, 1fr); gap: clamp(4px, .8vw, 12px); margin-top: clamp(4px, .8vw, 12px); }
.letters-row2 .letter { grid-column: span 1; }
.hero-claim {
    grid-column: 5 / span 4; align-self: center;
    padding-left: clamp(8px, 2vw, 32px);
    opacity: 0; animation: letterIn 1s .9s cubic-bezier(.2, .7, .2, 1) forwards;
}
.hero-claim h1 { font-size: clamp(1.4rem, 2.6vw, 2.3rem); margin-bottom: .4em; }
.hero-claim h1 span { color: var(--red); }
.hero-claim p { font-size: clamp(.95rem, 1.2vw, 1.05rem); margin-bottom: 1.4em; }

@media (max-width: 760px) {
    .letters { grid-template-columns: repeat(4, 1fr); }
    .letters-row2 { grid-template-columns: repeat(4, 1fr); }
    .hero-claim { grid-column: 1 / -1; padding: 28px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .letter, .hero-claim { animation: none; opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Split testo / immagine ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media { position: relative; }
.split-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); object-fit: cover; }
.split-media::before {
    content: ''; position: absolute; z-index: -1;
    left: -24px; bottom: -24px; width: 60%; height: 60%;
    border-radius: var(--radius);
    background: repeating-linear-gradient(45deg, #9aa1ad 0 2px, transparent 2px 12px);
    opacity: .45;
}
.split.reverse .split-media::before { left: auto; right: -24px; }
@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
    .split.reverse > :first-child { order: 0; }
    .split-media { max-width: 520px; }
}

/* ---------- Card servizi ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card {
    position: relative; display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px 28px; color: var(--text);
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--text); }
.card-num { font-size: .8rem; font-weight: 700; color: var(--red); letter-spacing: .1em; margin-bottom: 18px; }
.card h3 { font-size: 1.25rem; margin-bottom: .5em; }
.card p { margin: 0 0 1.2em; flex: 1; }
.card-link { font-weight: 600; font-size: .85rem; color: var(--navy); text-transform: uppercase; letter-spacing: .06em; }
.card:hover .card-link { color: var(--red); }

/* ---------- Griglia categorie (Locazioni / Vendite) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 210px; padding: 28px 24px 24px;
    background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
    color: var(--ink);
    transition: background .3s, color .3s, transform .3s, box-shadow .3s;
}
.tile::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%;
    background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.tile:hover { background: var(--navy); color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile:hover::after { transform: scaleX(1); }
.tile-num { font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: var(--red); }
.tile h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0; color: inherit; }
.tile svg { width: 60px; height: 60px; stroke: currentColor; stroke-width: 1.25; opacity: .85; margin-bottom: 16px; transition: transform .35s; }
.tile:hover svg { transform: scale(1.08); }
a.tile:hover { color: #fff; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
    .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tile { min-height: 150px; padding: 18px 14px 16px; }
    .tile svg { width: 40px; height: 40px; margin-bottom: 12px; }
    .tile h3 { font-size: .8rem; letter-spacing: .02em; }
}

/* ---------- Banner CTA ---------- */
.cta-band {
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff; border-radius: calc(var(--radius) * 1.5);
    padding: clamp(40px, 6vw, 72px);
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band::before {
    content: '&'; position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
    font-size: 22rem; font-weight: 800; line-height: 1; color: rgba(255, 255, 255, .04); pointer-events: none;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; opacity: .8; max-width: 560px; }
.cta-band > * { position: relative; }

/* ---------- Gallery ---------- */
.gallery-grid { columns: 4 240px; column-gap: 16px; }
.gallery-item {
    display: block; margin: 0 0 16px; break-inside: avoid;
    border-radius: 10px; overflow: hidden; position: relative; cursor: zoom-in;
    background: var(--bg-soft);
}
.gallery-item img { width: 100%; transition: transform .5s, filter .5s; }
.gallery-item::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 44, 89, .55), transparent 60%);
    opacity: 0; transition: opacity .4s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after { opacity: 1; }

.gallery-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery-strip a { border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-strip a:hover img { transform: scale(1.08); }
@media (max-width: 760px) { .gallery-strip { grid-template-columns: repeat(3, 1fr); } }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0, 15, 30, .92);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
    width: min(90vw, 900px); max-height: 82vh; object-fit: contain;
    border-radius: 8px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox button {
    position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0;
    width: 52px; height: 52px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
    transition: background .2s;
}
.lightbox button:hover { background: var(--red); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-size: .85rem; letter-spacing: .1em; }

/* ---------- Contatti ---------- */
.contact-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
    flex: none; width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--grey); color: var(--red);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-list strong { display: block; color: var(--ink); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.contact-list a { color: var(--text); font-weight: 500; }
.contact-list a:hover { color: var(--red); }

.info-box {
    border-left: 4px solid var(--red); background: var(--bg-soft);
    border-radius: 0 var(--radius) var(--radius) 0; padding: 24px 28px; margin: 32px 0;
}
.info-box h3 { margin-bottom: .4em; }
.info-box p:last-child, .info-box ul:last-child { margin-bottom: 0; }

/* ---------- Beneficenza ---------- */
.quote {
    font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.35; color: var(--navy);
    margin: 24px 0; padding-left: 24px; border-left: 4px solid var(--red);
}

/* ---------- Privacy ---------- */
.legal h2 { font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.legal h2 .n { color: var(--red); margin-right: 8px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal .note { font-size: .9rem; color: var(--muted); }

/* ---------- Animazioni on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Footer ---------- */
.site-footer {
    position: relative; overflow: hidden;
    color: rgba(255, 255, 255, .72); font-size: .92rem; margin-top: 0;
    background-color: var(--navy);
    /* Griglia stile tavola tecnica: maglia principale ogni 120px, secondaria ogni 24px */
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    background-position: -1px -1px;
}
/* Disegno tecnico: prospetto di edificio con quote e assi */
.site-footer::before {
    content: ''; position: absolute; right: -40px; bottom: 30px;
    width: 720px; height: 420px; pointer-events: none; opacity: .16;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 420' fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cg stroke-dasharray='14 4 2 4' opacity='.7'%3E%3Cpath d='M0 300h720M110 189L0 228.3M110 353L0 334M660 220L720 240M660 338L720 328.4M330 110L210 153M330 110L480 160'/%3E%3C/g%3E%3Cpath d='M110 189L330 110L660 220V338L330 390L110 353Z M330 110V390' stroke-width='2'/%3E%3Cpath d='M330 126.8L660 227.1M330 126.8L110 198.7'/%3E%3Cpath d='M339.9 146.3L650.1 231.4V247.4L339.9 182.1Z M396 161.7V193.9M462 179.8V207.8M528 197.9V221.7M594 216V235.6'/%3E%3Cpath d='M346.5 251.5L399.3 256.1V379.1L346.5 387.4Z M425.7 258.4L471.9 262.5V367.6L425.7 374.9Z M495 264.5L534.6 268V357.7L495 363.9Z M554.4 269.7L587.4 272.6V349.4L554.4 354.6Z'/%3E%3Cpath d='M319 146.8L121 205.3V227.4L319 182.5Z'/%3E%3Cpath d='M264 231.7L176 244.6V363.8L264 378.8Z M264 268.5L176 274.4M264 305.3L176 304.2M264 342L176 334'/%3E%3Cpath d='M90 189V353M82 189h16M82 353h16M330 410L660 358M110 373L330 410M330 402v16M660 350v16M110 365v16'/%3E%3Cpath d='M90 189l-4 10h8zM90 353l-4-10h8z' fill='%23ffffff'/%3E%3Cg font-family='monospace' font-size='12' fill='%23ffffff' stroke='none'%3E%3Ctext x='8' y='294'%3EL.O.%3C/text%3E%3Ctext transform='translate(62 276) rotate(-90)'%3E9.50%3C/text%3E%3Ctext transform='translate(470 396) rotate(-8.96)'%3E60.00%3C/text%3E%3Ctext transform='translate(200 384) rotate(9.55)'%3E25.00%3C/text%3E%3C/g%3E%3Ccircle cx='660' cy='60' r='34'/%3E%3Cpath d='M660 16v88M616 60h88M660 26l8 34h-16z'/%3E%3C/svg%3E") no-repeat right bottom / contain;
}
/* Cornice rossa in alto, come il bordo di una tavola */
.site-footer::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: #fff; /* linea bianca che separa la fascia rossa del form dal footer */
}
.footer-grid, .footer-bottom { position: relative; z-index: 1; }
@media (max-width: 760px) { .site-footer::before { width: 480px; height: 280px; right: -80px; opacity: .1; } }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 72px; padding-bottom: 56px; }
.footer-logo { background: #fff; padding: 10px 14px; border-radius: 10px; width: 210px; margin-bottom: 20px; }
.site-footer h3 { color: #fff; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.2em; }
.site-footer address { font-style: normal; margin-bottom: 1em; }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: #fff; }
.footer-link { font-weight: 600; color: #fff !important; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: .3em; }
.site-footer .muted { color: rgba(255, 255, 255, .5); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; background: var(--navy-dark); }
.footer-bottom-inner { display: flex; justify-content: space-between; gap: 16px 32px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; padding-top: 56px; } }

.back-to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 90;
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--red); color: #fff; font-size: 1.2rem; box-shadow: 0 8px 20px rgba(227, 0, 27, .35);
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { color: #fff; background: var(--red-dark); }

@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .brand img { width: 150px; }
    :root { --header-h: 70px; }
}

/* =========================================================
   LANDING PAGE
   ========================================================= */

/* ---------- Hero a tutto schermo con dissolvenza foto ---------- */
.hero {
    position: relative; overflow: hidden;
    min-height: calc(100svh - var(--header-h));
    display: flex; align-items: center;
    color: #fff; background: var(--navy-dark);
}
.hero-slides, .hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slides img { object-fit: cover; opacity: 0; }
.hero-slides img.is-current { opacity: 1; }

/* transizione "a costruzione": la foto successiva si compone a blocchetti */
.hero-build { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-build .brick {
    position: absolute; background-repeat: no-repeat;
    opacity: 0; transform: translateY(-60px) scale(.92);
    transition: opacity .45s ease-out, transform .7s cubic-bezier(.34, 1.4, .64, 1);
    will-change: transform, opacity;
}
.hero-build .brick.in { opacity: 1; transform: none; }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 27, 56, .6) 0%, rgba(0, 27, 56, .3) 45%, rgba(0, 27, 56, 0) 100%),
        linear-gradient(0deg, rgba(0, 27, 56, .35), transparent 30%);
}
.hero::after {
    content: ''; position: absolute; left: 0; bottom: 0; z-index: 2; height: 6px; width: 30%;
    background: var(--red);
}
.hero-content { position: relative; z-index: 2; padding-top: 64px; padding-bottom: 96px; }
.hero .eyebrow { color: #fff; font-size: clamp(.82rem, 1.55vw, 1.25rem); letter-spacing: .12em; gap: 14px; margin-bottom: 18px; }
.hero .eyebrow::before { width: 44px; height: 3px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6.5vw, 5.2rem); font-weight: 800; line-height: 1.02; margin-bottom: .35em; max-width: 12ch; }
.hero h1 span { color: var(--red); }
.hero-lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 560px; opacity: .9; margin-bottom: 2em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; box-shadow: none; }
.hero-content > * { opacity: 0; transform: translateY(24px); animation: riseIn .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero-content > :nth-child(2) { animation-delay: .12s; }
.hero-content > :nth-child(3) { animation-delay: .24s; }
.hero-content > :nth-child(4) { animation-delay: .36s; }
@keyframes riseIn { to { opacity: 1; transform: none; } }
.hero-scroll {
    position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
    width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 16px;
}
.hero-scroll span {
    position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
    border-radius: 2px; background: #fff; animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
    .hero-build { display: none; }
    .hero-slides img.is-current { opacity: 1; }
    .hero-content > * { animation: none; opacity: 1; transform: none; }
    .hero-scroll span { animation: none; }
}
@media (max-width: 560px) { .hero-scroll { display: none; } }

/* ---------- Fasce di colore alternate ---------- */
.band-white { background: #fff; }
.band-soft  { background: var(--bg-soft); }
.band-navy, .band-dark, .band-red { color: rgba(255, 255, 255, .82); position: relative; overflow: hidden; }
.band-navy h2, .band-dark h2, .band-red h2,
.band-navy .lead, .band-dark .lead, .band-red .lead { color: #fff; }
.band-navy .eyebrow, .band-dark .eyebrow, .band-red .eyebrow { color: #fff; }
.band-red .eyebrow::before { background: #fff; }

/* blu con griglia tecnica leggera */
.band-navy, .band-dark {
    background-color: var(--navy);
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
.band-dark { background-color: var(--navy-dark); }
.band-red { background: var(--red); }

/* foto di sfondo velata (Locazioni) */
.band-photo::before {
    content: ''; position: absolute; inset: 0;
    background: url('../img/sections/locazioni-bg.webp') center / cover no-repeat;
    opacity: .14; mix-blend-mode: luminosity;
}
.band-photo > .container { position: relative; }

/* box categorie su fondo blu */
.band-navy .tile {
    background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.band-navy .tile:hover, .band-navy a.tile:hover { background: #fff; color: var(--navy); }
.band-soft .tile { border-color: transparent; box-shadow: 0 2px 10px rgba(0, 28, 56, .05); }

.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; max-width: none; }
.section-head-row h2 { margin: 0; }

/* ---------- Chi siamo ---------- */
.pillars { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.pillars li {
    padding: 14px 20px; border: 1px solid var(--line); border-radius: 999px;
    font-weight: 600; color: var(--ink); font-size: .95rem;
}
.pillars strong { color: var(--red); margin-right: 6px; font-size: .8rem; }

/* ---------- Fotovoltaico ---------- */
.solar-art svg { width: 100%; max-width: 460px; height: auto; margin-left: auto; display: block; }

/* ---------- Proposte ---------- */
.question-list { list-style: none; padding: 0; margin: 0 0 1.4em; }
.question-list li {
    position: relative; padding: 10px 0 10px 32px;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink); font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.question-list li::before { content: '?'; position: absolute; left: 0; top: 10px; color: var(--red); font-weight: 800; }
.info-box-card { background: #fff; margin-top: 0; box-shadow: var(--shadow); }
.proposte-img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }

/* ---------- Carosello gallery ---------- */
.ec-carousel { position: relative; }
.ec-carousel-track {
    display: flex; gap: 16px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 8px max(24px, calc((100vw - 1240px) / 2 + 24px)) 24px;
    scroll-padding: 0 max(24px, calc((100vw - 1240px) / 2 + 24px));
    scrollbar-width: none; cursor: grab;
}
.ec-carousel-track::-webkit-scrollbar { display: none; }
.ec-carousel-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.ec-carousel-track.dragging .ec-carousel-item { pointer-events: none; }
.ec-carousel-item {
    flex: none; height: clamp(240px, 38vw, 460px);
    border-radius: 12px; overflow: hidden; scroll-snap-align: start;
    position: relative; background: rgba(255, 255, 255, .05);
}
.ec-carousel-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); user-select: none; -webkit-user-drag: none; }
.ec-carousel-item::after {
    content: '+'; position: absolute; right: 14px; bottom: 14px;
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--red); color: #fff; font-size: 1.4rem; font-weight: 300;
    opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s;
}
.ec-carousel-item:hover img { transform: scale(1.05); }
.ec-carousel-item:hover::after, .ec-carousel-item:focus-visible::after { opacity: 1; transform: none; }
.ec-carousel-nav { display: flex; gap: 10px; }
.ec-carousel-btn {
    width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
    background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .4);
    font-size: 1.6rem; line-height: 1; transition: background .25s, border-color .25s;
}
.ec-carousel-btn:hover { background: var(--red); border-color: var(--red); }
.ec-carousel-progress { height: 3px; background: rgba(255, 255, 255, .15); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.ec-carousel-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.band-dark .section-head { margin-bottom: 32px; }

/* ---------- Contatti ---------- */
.contact-list em { color: var(--muted); }

/* ---------- Identità visiva della landing ---------- */
/* colori: rosso e blu della prima versione (variabili in :root) */
.home {
    --radius: 6px;
}
.home .site-header { background: rgba(255, 255, 255, .96); }
.home .hero::after,
.home .hero-line-top { background: var(--red); }
.home .band-dark { background-color: var(--navy-dark); }
.home .split-media img,
.home .proposte-img { border-radius: 6px; }
.home .split-media::before {
    background: var(--grey);
    opacity: 1;
    border-radius: 2px;
}

/* sfondo decorativo delle foto visibile anche sulle fasce colorate */
.split-media { isolation: isolate; }

/* linea rossa in alto a destra nell'hero, speculare a quella in basso a sinistra */
.hero-line-top { position: absolute; right: 0; top: 0; z-index: 2; height: 6px; width: 30%; background: var(--red); }

/* ---------- Hero: navigazione con anteprime ---------- */
.hero-content { padding-bottom: 150px; }
.hero-thumbs {
    position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%);
    display: flex; gap: 10px; max-width: calc(100% - 32px);
    overflow-x: auto; scrollbar-width: none; padding: 4px;
}
.hero-thumbs::-webkit-scrollbar { display: none; }
.hero-thumb {
    flex: none; width: 96px; aspect-ratio: 240 / 136; padding: 0; cursor: pointer;
    border: 2px solid rgba(255, 255, 255, .45); border-radius: 4px; overflow: hidden;
    background: rgba(255, 255, 255, .1); opacity: .6;
    transition: opacity .25s, border-color .25s, transform .25s;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb:hover, .hero-thumb:focus-visible { opacity: 1; transform: translateY(-3px); }
.hero-thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hero-thumb.is-active { opacity: 1; border-color: var(--red); }
@media (max-width: 760px) {
    .hero-thumb { width: 64px; }
    .hero-thumbs { gap: 6px; bottom: 18px; }
    .hero-content { padding-bottom: 110px; }
}

/* ---------- Gallery: carosello con 6 foto per volta ---------- */
.ec-carousel { --per-view: 6; --gap: 12px; }
/* a tutta larghezza: la riga di foto va da bordo a bordo dello schermo fin dall'inizio */
.ec-carousel-track { gap: var(--gap); padding-left: 0; padding-right: 0; scroll-padding: 0; }
.ec-carousel-item {
    height: auto; aspect-ratio: 1;
    width: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    border-radius: 0;
}
.ec-carousel-item::after { width: 34px; height: 34px; right: 10px; bottom: 10px; font-size: 1.2rem; }
@media (max-width: 1100px) { .ec-carousel { --per-view: 4; } }
@media (max-width: 640px)  { .ec-carousel { --per-view: 2.4; --gap: 8px; } }

/* linea di avanzamento cliccabile / trascinabile */
.ec-carousel-progress {
    position: relative; cursor: pointer; overflow: visible;
    height: 4px; margin-top: 20px; touch-action: none;
    transition: height .2s;
}
.ec-carousel-progress::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; } /* area di click più ampia */
.ec-carousel-progress span { position: relative; border-radius: 2px; transition: width .2s; }
.ec-carousel-progress span::after {
    content: ''; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
    border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
    transform: scale(0); transition: transform .2s;
}
.ec-carousel-progress:hover, .ec-carousel-progress:focus-visible, .ec-carousel-progress.is-dragging { height: 6px; }
.ec-carousel-progress:hover span::after, .ec-carousel-progress:focus-visible span::after, .ec-carousel-progress.is-dragging span::after { transform: scale(1); }
.ec-carousel-progress:focus-visible { outline: 2px solid #fff; outline-offset: 8px; }
.ec-carousel-progress.is-dragging span { transition: none; }

/* ---------- Pillola-link (Chi siamo) ---------- */
.pillars li:has(a) { padding: 0; }
.pillars li a { display: inline-flex; align-items: center; gap: 6px; padding: 14px 20px; color: inherit; border-radius: inherit; transition: background .25s, color .25s, border-color .25s; }
.pillars li a strong { margin-right: 0; font-size: 1rem; }
.pillars li a .arrow { color: var(--red); transition: transform .25s; }
.pillars li a:hover { background: var(--ink); color: #fff; }
.pillars li a:hover .arrow { transform: translateX(4px); }

/* ---------- Contatti: mappa ---------- */
.contact-map { align-self: stretch; min-height: 420px; }
.contact-map iframe {
    display: block; width: 100%; height: 100%; min-height: 420px; border: 0;
    border-radius: var(--radius); box-shadow: var(--shadow-lg); background: var(--bg-soft);
}
.home .contact-map iframe { border-radius: 6px; }
@media (max-width: 900px) { .contact-map { max-width: none; min-height: 320px; } .contact-map iframe { min-height: 320px; } }

/* ---------- Contatti: form ---------- */
.contact-form-wrap {
    margin-top: clamp(56px, 8vw, 96px);
    display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: start;
    padding: clamp(28px, 4vw, 56px); background: var(--grey); border-radius: var(--radius);
}
.contact-form-intro p { margin: 0; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.contact-form .field-full { grid-column: 1 / -1; }
.contact-form label { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 6px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"],
.contact-form select, .contact-form textarea {
    width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
    padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 44, 89, .12);
}
.contact-form .field-check label { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .88rem; color: var(--text); }
.contact-form .field-check input { margin-top: 5px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.contact-form .field-check a { color: var(--red); text-decoration: underline; }
.contact-form .has-error input, .contact-form .has-error select, .contact-form .has-error textarea { border-color: var(--red); }
.contact-form small { display: block; margin-top: 4px; color: var(--red); font-size: .8rem; }
.contact-form .btn { cursor: pointer; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { grid-column: 2; padding: 14px 18px; border-radius: 4px; font-size: .92rem; margin-bottom: -8px; }
.form-alert-ok { background: #e7f4ea; color: #1f5b2c; border-left: 4px solid #2e8540; }
.form-alert-error { background: #fdecee; color: #8a0f1d; border-left: 4px solid var(--red); }
.form-alert a { color: inherit; text-decoration: underline; }
.contact-form-wrap .form-alert ~ .contact-form { grid-column: 2; }
@media (max-width: 900px) {
    .contact-form-wrap { grid-template-columns: 1fr; }
    .form-alert, .contact-form-wrap .form-alert ~ .contact-form { grid-column: auto; }
}
@media (max-width: 560px) { .contact-form { grid-template-columns: 1fr; } }


/* ---------- Sezione "Richiedi informazioni": fascia rossa, riquadro grigio ---------- */
.section-form .contact-form-wrap { margin-top: 0; color: var(--text); box-shadow: 0 24px 54px rgba(0, 0, 0, .18); }
.section-form .contact-form-wrap h2 { color: var(--ink); }
.section-form .contact-form-wrap .eyebrow { color: var(--red); }
.section-form .contact-form-wrap .eyebrow::before { background: var(--red); }
