/* Caratteri ospitati sul sito (nessuna richiesta a Google) */
@font-face { font-family: "Archivo Black"; src: url("assets/fonts/archivo-black-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("assets/fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Colori presi dai biglietti da visita */
:root {
  --teal: #3f6670;
  --teal-dark: #34565f;
  --teal-deep: #243d45;
  --beige: #d5c6b3;
  --beige-light: #eee7dc;
  --paper: #ffffff;
  --cream: #f6f3ee;
  --brown: #93634e;
  --ink: #312121;
  --muted: #5d5552;
  --wa: #25d366;
  --radius: 14px;
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath fill='%23d5c6b3' d='M6 14c40-6 90-9 140-8 60 1 120-4 180-2 25 1 50 2 70 6l-6 4 4 4-8 3 8 5-6 4 6 6-6 4c-30 6-80 7-130 6-70-2-140 2-200 3-20 0-40-2-50-4l5-4-7-3 6-5-6-4 6-5-6-3 6-5z'/%3E%3Cpath fill='%23bfae96' opacity='.5' d='M20 22c80-3 200-2 340 0v2c-140-1-260 0-340 1zM30 38c90-2 210 0 330 1v2c-120-1-240-2-330 0z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 "Montserrat", system-ui, sans-serif;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1, h2 { font-family: "Archivo Black", "Arial Black", sans-serif; font-weight: 400; letter-spacing: .01em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Pulsanti */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px;
  font-weight: 700; text-decoration: none; line-height: 1;
  background: var(--teal); color: #fff; border: 2px solid var(--teal);
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgb(0 0 0 / .14); }
.btn svg { width: 1.3em; height: 1.3em; }
.btn--small { padding: .6em 1.1em; font-size: .9rem; }
.btn--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn--ghost { background: transparent; color: var(--teal-dark); border-color: var(--teal); }
.btn--ghost:hover { background: var(--teal); color: #fff; }
.btn:focus-visible, .contact:focus-visible, .wa-float:focus-visible, .nav a:focus-visible { outline: 3px solid var(--beige); outline-offset: 3px; }

/* Barra in alto: trasparente sopra la foto, bianca quando si scorre */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(rgb(15 28 32 / .55), rgb(15 28 32 / 0));
  color: #fff;
  transition: background .3s, box-shadow .3s, color .3s;
}
.top--solid {
  background: rgb(255 255 255 / .95); color: var(--ink);
  backdrop-filter: saturate(1.4) blur(8px);
  box-shadow: 0 1px 0 #e7e0d5, 0 6px 20px rgb(0 0 0 / .06);
}
.top__in { display: flex; align-items: center; gap: 16px; height: 148px; transition: height .3s; }
.top--solid .top__in { height: 76px; }
.brand { display: block; flex: none; text-decoration: none; }
.brand img {
  height: 128px; width: auto; background: #fff; border-radius: 14px; padding: 5px 8px;
  box-shadow: 0 6px 24px rgb(0 0 0 / .25);
  transition: height .3s, box-shadow .3s, padding .3s;
}
.top--solid .brand img { height: 60px; padding: 3px 6px; box-shadow: none; }
.nav { margin-left: auto; display: flex; gap: 26px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--beige); }
.top .btn--small { background: transparent; border-color: currentColor; color: inherit; }
.top--solid .btn--small { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (max-width: 640px) {
  .nav { display: none; }
  .top .btn--small { margin-left: auto; }
}

/* Hero: foto dei lavori a tutto schermo */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 170px 0 90px; color: #fff; background: var(--teal-deep);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--teal-deep); }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 18s ease-out both; }
.hero__bg img:nth-child(2) { animation-delay: .15s; }
.hero__bg img:nth-child(3) { animation-delay: .3s; }
/* computer: cucina, rampa, camminamento — telefono: solo il camminamento */
@media (min-width: 821px) { .hero__bg img:first-child { display: none; } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(20 36 41 / .92) 0%, rgb(20 36 41 / .62) 45%, rgb(20 36 41 / .12) 100%),
    linear-gradient(0deg, rgb(20 36 41 / .7), transparent 40%);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: var(--beige); }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }

.hero__in { position: relative; }
.hero__in > * { max-width: 900px; animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero__in > :nth-child(2) { animation-delay: .1s; }
.hero__in > :nth-child(3) { animation-delay: .2s; }
.hero__in > :nth-child(4) { animation-delay: .3s; }
.hero__in > :nth-child(5) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.kicker {
  display: inline-block; margin: 0 0 18px; color: var(--beige); font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; font-size: .85rem;
  padding-left: 46px; position: relative;
}
.kicker::before { content: ""; position: absolute; left: 0; top: 50%; width: 34px; height: 2px; background: var(--beige); }
.hero h1 {
  font-size: clamp(2.2rem, 9.4vw, 4.6rem); line-height: .98; text-transform: uppercase;
  letter-spacing: -.01em; color: #fff; text-shadow: 0 4px 30px rgb(0 0 0 / .35);
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--beige); }
.slogan {
  margin-top: 22px; padding: .15em 0 .15em 14px; border-left: 4px solid var(--beige);
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; line-height: 1.45;
  font-size: clamp(.82rem, 1.5vw, 1.05rem); color: #fff;
}
.lead { font-size: 1.12rem; color: #e4ecee; max-width: 30em; margin: 22px 0 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--light { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .7); backdrop-filter: blur(4px); }
.btn--light:hover { background: #fff; color: var(--teal-deep); }
.hero__down {
  position: absolute; left: 50%; bottom: 40px; width: 28px; height: 44px; margin-left: -14px;
  border: 2px solid rgb(255 255 255 / .7); border-radius: 14px;
}
.hero__down::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.8s infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero__bg img, .hero__in > *, .hero__down::after { animation: none; }
}
@media (max-width: 820px) {
  .hero__bg { grid-template-columns: 1fr; }
  .hero__bg img:not(:first-child) { display: none; }
  .hero::before { background: linear-gradient(0deg, rgb(20 36 41 / .95) 10%, rgb(20 36 41 / .55) 60%, rgb(20 36 41 / .45) 100%); }
  .hero { align-items: flex-end; padding: 130px 0 80px; }
  .hero__down { display: none; }
}

/* Titoli con pennellata come sul biglietto */
.title-brush { text-align: center; margin-bottom: 14px; }
.title-brush span {
  display: inline-block; position: relative;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem); text-transform: uppercase;
  color: var(--ink); padding: .25em 1.1em;
  background: var(--brush) center / 100% 100% no-repeat;
  text-shadow: none;
}
.title-brush--dark span { color: var(--ink); text-shadow: none; }
.section-lead { text-align: center; color: inherit; opacity: .85; max-width: 38em; margin: 0 auto 40px; }

/* Servizi (retro del biglietto) */
.services { background: var(--teal); color: #fff; padding: 72px 0 80px; position: relative; }
.services .title-brush { margin-bottom: 44px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--teal-dark); border: 1px solid rgb(255 255 255 / .12);
  border-radius: var(--radius); padding: 24px 22px;
}
.card svg { width: 40px; height: 40px; fill: none; stroke: var(--beige); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.card h3 { font-size: 1.08rem; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 8px; }
.card h3 + div { margin: 0; color: #dde7ea; font-size: .95rem; }
.card--cta { background: transparent; border: 1px dashed rgb(213 198 179 / .55); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card--cta h3 { color: var(--beige); }
.card--cta .btn { background: transparent; border: 1.5px solid rgb(255 255 255 / .55); color: #fff; font-weight: 600; font-size: .92rem; padding: .7em 1.15em; white-space: nowrap; }
.card--cta .btn svg { color: var(--beige); width: 1.15em; height: 1.15em; }
@media (hover: hover) { .card--cta .btn:hover { background: rgb(255 255 255 / .1); border-color: #fff; transform: none; box-shadow: none; } }
.card--cta .btn { margin-top: auto; }

/* Lavori */
.works { background: var(--cream); padding: 72px 0 80px; }
.works .section-lead { color: var(--muted); opacity: 1; }
.pairs { display: grid; gap: 40px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 4.4; background: #ddd; }
.pair img { width: 100%; height: 100%; object-fit: cover; }
.pair figcaption { position: absolute; top: 12px; left: 12px; }
.tag { display: inline-block; background: var(--ink); color: #fff; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; padding: .45em .9em; border-radius: 999px; }
.tag--after { background: var(--teal); }
.pair__label { grid-column: 1 / -1; order: -1; margin: 0 0 2px; font-weight: 600; text-align: center; }
.sub { font-family: "Archivo Black", sans-serif; font-weight: 400; text-transform: uppercase; text-align: center; font-size: 1.3rem; color: var(--teal); margin: 56px 0 24px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: #ddd; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; gap: 8px; } }
.ig-cta { text-align: center; margin: 24px 0 0; }
.videos { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.videos figure { margin: 0; width: min(300px, 100%); }
.videos video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius); background: #000; }
.videos figure { display: flex; flex-direction: column; }
.videos figcaption { order: -1; min-height: 2.9em; display: flex; align-items: flex-end; justify-content: center; text-align: center; line-height: 1.45; font-weight: 600; font-size: .92rem; margin-bottom: 10px; }
@media (max-width: 560px) {
  .pair { gap: 8px; }
  .pair figure { aspect-ratio: 3 / 4; }
  .videos figure { width: calc(50% - 9px); }
  .videos { gap: 12px; }
  .videos figcaption { font-size: .82rem; }
}

/* Contatti */
.contacts { background: var(--teal-deep); color: #fff; padding: 72px 0 80px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.contact {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .14);
  border-radius: var(--radius); text-decoration: none; transition: background .15s, border-color .15s;
  min-width: 0;
}
.contact:hover { background: rgb(255 255 255 / .12); border-color: var(--beige); }
.contact svg { flex: none; width: 34px; height: 34px; fill: none; stroke: var(--beige); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact svg:has(use) { fill: var(--wa); stroke: none; color: var(--wa); }
.contact span { font-weight: 600; overflow-wrap: anywhere; }
.contact small { display: block; font-weight: 400; color: var(--beige); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }

/* Piè di pagina */
.foot { background: #1b2f35; color: #c3d0d3; font-size: .88rem; padding: 26px 0 96px; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }

.foot strong { color: #fff; }
.foot__links { display: flex; gap: 18px; }
.foot__links a { text-decoration: underline; text-underline-offset: 3px; }

/* WhatsApp rotondo fisso: segue lo scorrimento della pagina */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 6px 20px rgb(0 0 0 / .28);
  transition: transform .2s;
}
.wa-float svg { width: 34px; height: 34px; }
.wa-float:hover { transform: scale(1.08); }
.wa-float::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgb(37 211 102 / .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgb(37 211 102 / 0); } 100% { box-shadow: 0 0 0 0 rgb(37 211 102 / 0); } }
@media (prefers-reduced-motion: reduce) { .wa-float::after { animation: none; } }
@media (max-width: 560px) { .wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; } }

/* ---------- Rifinitura responsive ---------- */

/* Effetti al passaggio del mouse solo dove c'è un mouse */
@media (hover: none) {
  .btn:hover, .wa-float:hover { transform: none; box-shadow: none; }
  .wa-float:hover { box-shadow: 0 6px 20px rgb(0 0 0 / .28); }
}

/* Spazio per la "tacca" e la barra dei telefoni */
.wa-float {
  right: max(20px, env(safe-area-inset-right) + 12px);
  bottom: max(20px, env(safe-area-inset-bottom) + 12px);
}
.foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* Schermi grandi */
@media (min-width: 1280px) {
  .services, .works, .contacts { padding: 96px 0 104px; }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 821px) {
}
@media (max-width: 820px) {
  .services, .works, .contacts { padding: 56px 0 64px; }
  .services .title-brush { margin-bottom: 32px; }
  .section-lead { margin-bottom: 28px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Telefoni */
@media (max-width: 560px) {
  body { font-size: .96rem; }
  .top__in { height: 104px; gap: 10px; }
  .top--solid .top__in { height: 60px; }
  .brand img { height: 88px; border-radius: 12px; }
  .top--solid .brand img { height: 50px; }
  html { scroll-padding-top: 60px; }

  .hero__down { display: none; }
  .kicker { font-size: .74rem; margin-bottom: 8px; }
  .lead { font-size: 1rem; margin: 16px auto 22px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; padding-block: 1em; }

  .title-brush span { font-size: clamp(1.2rem, 6.6vw, 1.6rem); padding: .3em .8em; white-space: nowrap; }

  /* Servizi compatti: icona a sinistra, testo a destra */
  .cards { gap: 10px; }
  .card { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; padding: 16px; }
  .card svg { width: 32px; height: 32px; margin: 0; grid-row: span 2; }
  .card h3 { font-size: .95rem; margin-bottom: 4px; align-self: center; }
  .card h3 + div { font-size: .9rem; }
  .card--cta { display: flex; padding: 20px 18px; }
  .card--cta .btn { width: 100%; justify-content: center; }

  .pairs { gap: 28px; }
  .pair figcaption { top: 8px; left: 8px; }
  .tag { font-size: .68rem; }
  .pair__label { font-size: .92rem; }
  .sub { margin: 40px 0 18px; font-size: 1.1rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 10px; }
  .contact { padding: 14px 16px; gap: 14px; }
  .contact svg { width: 28px; height: 28px; }

  .foot__in { flex-direction: column; align-items: flex-start; }
}

/* Telefoni molto stretti */
@media (max-width: 360px) {
  .top .btn--small { padding: .55em .9em; }
}

/* Desktop: foto prima/dopo non troppo grandi, contatti su 3 + 2 */
@media (min-width: 821px) {
  .pairs { grid-template-columns: 1fr 1fr; gap: 44px 32px; }
  .pair figure { aspect-ratio: 4 / 5; }
  .pair:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 16px); justify-self: center; }
  .gallery { max-width: 1040px; margin-inline: auto; }
  .contact-grid { grid-template-columns: repeat(6, 1fr); }
  .contact { grid-column: span 2; }
  .contact:nth-child(n+4) { grid-column: span 3; }
}

/* Foto cliccabili */
.zoomable { cursor: zoom-in; }
.zoomable img { transition: transform .35s ease; }
@media (hover: hover) { .zoomable:hover img { transform: scale(1.04); } }
.zoomable:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.zoomable::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgb(0 0 0 / .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 16px no-repeat;
  pointer-events: none;
}
.gallery figure { position: relative; }

/* Visore a schermo intero */
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(14 20 22 / .95); color: #fff; }
.lb::backdrop { background: rgb(0 0 0 / .6); }
.lb[open] { display: grid; place-items: center; }
.lb__fig { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 64px 28px; }
.lb__img { max-width: 100%; max-height: calc(100dvh - 130px); width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgb(0 0 0 / .5); }
.lb__cap { font-size: .92rem; text-align: center; max-width: 60ch; color: #e6e1da; }
.lb__btn { position: absolute; border: 0; background: rgb(255 255 255 / .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb__btn:hover { background: rgb(255 255 255 / .25); }
.lb__btn:focus-visible { outline: 3px solid var(--beige); }
.lb__close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; top: max(24px, env(safe-area-inset-top) + 12px); left: 20px; font-size: .85rem; color: #c9c3bb; }
@media (max-width: 560px) {
  .lb__fig { padding: 60px 8px 90px; }
  .lb__img { max-height: calc(100dvh - 170px); }
  .lb__prev, .lb__next { top: auto; bottom: max(20px, env(safe-area-inset-bottom) + 8px); transform: none; }
  .lb__prev { left: calc(50% - 60px); }
  .lb__next { right: calc(50% - 60px); }
}
@media (max-width: 560px) { .slogan span { display: block; } .slogan .slogan__dot { display: none; } }
