/* ==========================================================
   Khelcom Graphiques — one-page
   Palette ispirata alla locandina roll-up
   ========================================================== */
:root {
  --maroon: #4a1712;
  --maroon-2: #2e0d0a;
  --copper: #b4612c;
  --copper-2: #d98a4e;
  --green: #18a24a;
  --yellow: #f6c21c;
  --red: #ee3b24;
  --blue: #1f2c6c;
  --ink: #2a1a17;
  --muted: #6d5c58;
  --bg: #ffffff;
  --tint: #faf5f1;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(74, 23, 18, .35);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; margin: 0; color: var(--maroon); }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Fascia bandiere ---------- */
.flagbar {
  height: 34px;
  background: url("assets/img/bandiere.webp") center 45% / cover no-repeat;
}
.flagbar--bottom { height: 22px; }

/* ---------- Tag colorati (come le etichette della locandina) ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  padding: .35em .9em .3em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.35);
}
.tag--green  { background: var(--green); }
.tag--yellow { background: var(--yellow); color: var(--maroon); }
.tag--red    { background: var(--red); }
.tag--blue   { background: var(--blue); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700;
  padding: .9rem 1.5rem; border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  cursor: pointer;
}
.btn svg { width: 1.25em; height: 1.25em; }
.btn:hover { transform: translateY(-2px); }
.btn--wa { background: #25d366; color: #fff; box-shadow: 0 12px 24px -12px rgba(37,211,102,.8); }
.btn--wa:hover { background: #1ebe5b; }
.btn--ghost { border-color: var(--maroon); color: var(--maroon); }
.btn--ghost:hover { background: var(--maroon); color: #fff; }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--lg { padding: 1.1rem 2rem; font-size: 1.1rem; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(74,23,18,.08);
  transition: box-shadow .3s;
}
.nav.is-scrolled { box-shadow: 0 10px 30px -20px rgba(74,23,18,.5); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav__brand { display: flex; align-items: center; gap: .7rem; }
.nav__brand img { width: 52px; height: auto; }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-text strong { font-family: var(--font-head); font-size: 1.2rem; letter-spacing: .18em; color: var(--maroon); }
.nav__brand-text small { font-family: var(--font-head); font-weight: 700; font-size: .66rem; letter-spacing: .38em; color: var(--copper); margin-top: 3px; }
.nav__links { display: flex; align-items: center; gap: 2rem; font-weight: 600; }
.nav__links > a:not(.btn) { position: relative; color: var(--maroon); }
.nav__links > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px;
  background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav__links > a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav__toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--maroon); border-radius: 2px; transition: transform .3s, opacity .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(180,97,44,.12), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(74,23,18,.06), transparent 60%);
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; align-items: center; }
.hero__logo { width: 170px; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 800; letter-spacing: -.01em; }
.hero h1 span, .section__head h2 span, .cta h2 span { color: var(--copper); }
.hero__rule { width: 220px; height: 5px; border-radius: 4px; margin: 1.4rem 0; background: linear-gradient(90deg, var(--maroon), var(--copper)); }
.hero__lead { font-size: 1.1rem; color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* collage di foto inclinate stile locandina */
.hero__collage { position: relative; height: clamp(440px, 48vw, 600px); }
.tile {
  position: absolute; margin: 0;
  background: #fff; padding: 8px;
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .tag { position: absolute; font-size: clamp(.85rem, 1.4vw, 1.15rem); }
.tile:hover { transform: rotate(0deg) scale(1.04) !important; z-index: 10; }
.tile--1 { top: 2%;   right: 0;   width: 44%; aspect-ratio: 360/222; transform: rotate(3deg); }
.tile--1 .tag { left: 10%; bottom: -16px; }
.tile--2 { top: 8%;   left: 2%;   width: 46%; aspect-ratio: 348/211; transform: rotate(-4deg); z-index: 2; }
.tile--2 .tag { right: -6%; bottom: -16px; }
.tile--3 { top: 38%;  left: 0;    width: 34%; aspect-ratio: 3/4;     transform: rotate(-2deg); z-index: 1; }
.tile--3 .tag { left: 8%; bottom: -16px; }
.tile--4 { top: 36%;  right: 0;   width: 26%; aspect-ratio: 467/900; transform: rotate(4deg); z-index: 1; }
.tile--4 .tag { right: 8%; bottom: -16px; }
.tile--5 { top: 47%;  left: 31%;  width: 42%; aspect-ratio: 369/344; transform: rotate(-1deg); z-index: 3; }
.tile--5 .tag { left: 50%; translate: -50% 0; top: -16px; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--maroon);
  padding: 1.1rem 0;
  overflow: hidden;
  transform: rotate(-1.2deg);
  margin: 0 -2vw;
  box-shadow: 0 14px 30px -18px rgba(0,0,0,.6);
  position: relative; z-index: 2;
}
.ticker__track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; gap: 1.25rem; padding-right: 1.25rem; }
.ticker .tag { font-size: 1.15rem; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section--tint { background: var(--tint); }
.section__head { text-align: center; margin-bottom: 3.5rem; }
.section__head .hero__rule { margin-inline: auto; width: 140px; }
.section__head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; }
.eyebrow {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .25em; font-size: .8rem; color: var(--copper); margin: 0 0 .6rem;
}

/* ---------- Servizi ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.service {
  --c: var(--green);
  position: relative; overflow: hidden;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.6rem 1.8rem;
  border: 1px solid rgba(74,23,18,.08);
  box-shadow: 0 10px 30px -22px rgba(74,23,18,.5);
  transition: transform .3s, box-shadow .3s;
}
.service::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c); }
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service--green  { --c: var(--green); }
.service--yellow { --c: #e6a800; }
.service--red    { --c: var(--red); }
.service--blue   { --c: var(--blue); }
.service__num {
  font-family: var(--font-head); font-weight: 900; font-size: 2.4rem; line-height: 1;
  color: var(--c); opacity: .22; margin-bottom: .6rem;
}
.service h3 {
  font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  color: var(--c); margin-bottom: 1rem;
}
.service p { margin: 0; color: var(--muted); font-size: .95rem; }
.service ul { list-style: none; margin: 0; padding: 0; }
.service li { position: relative; padding-left: 1.2rem; margin: .3rem 0; font-weight: 500; }
.service li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--c);
}

/* ---------- Galleria ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 1.2rem;
}
.work {
  position: relative; overflow: hidden; border: 0; padding: 0; cursor: zoom-in;
  border-radius: var(--radius); background: #fff;
  box-shadow: 0 10px 30px -22px rgba(74,23,18,.6);
}
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.work--contain img { object-fit: contain; padding: 1.2rem; }
.work:hover img { transform: scale(1.06); }
.work::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(46,13,10,.55), transparent 45%);
  opacity: .0; transition: opacity .3s;
}
.work:hover::after { opacity: 1; }
.work .tag { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; font-size: .9rem; transform: rotate(-2deg); }
.work--wide { grid-column: span 2; }
.work--tall { grid-row: span 2; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) 0;
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(217,138,78,.35), transparent 60%),
    linear-gradient(135deg, var(--maroon) 0%, var(--maroon-2) 100%);
  color: #fff; text-align: center;
}
.cta h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; margin-bottom: 1rem; }
.cta h2 span { color: var(--copper-2); }
.cta p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin: 0 auto 2.2rem; max-width: 36rem; }

/* ---------- Footer / Contatti ---------- */
.footer { background: var(--maroon-2); color: rgba(255,255,255,.85); position: relative; }
.footer__inner {
  display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 3rem; align-items: center;
  padding: 4.5rem 0 3rem;
}
.footer__logo { background: #fff; border-radius: 22px; padding: 14px; width: 150px; margin-bottom: 1.2rem; }
.footer__brand p { margin: 0; }
.footer h2 { color: #fff; font-size: 1.8rem; margin-bottom: 1.4rem; }
.contact {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1rem; border-radius: 14px; margin-bottom: .7rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  transition: background .2s, transform .2s;
}
.contact:hover { background: rgba(255,255,255,.1); transform: translateX(4px); }
.contact small { display: block; font-size: .78rem; color: rgba(255,255,255,.6); }
.contact strong { font-family: var(--font-head); font-size: 1.2rem; color: #fff; }
.contact__icon {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--copper); color: #fff;
}
.contact__icon svg { width: 24px; height: 24px; }
.contact__icon--wa { background: #25d366; }
.contact__icon--tt { background: #000; box-shadow: -2px -2px 0 #25f4ee, 2px 2px 0 #fe2c55; }
.footer__qr { background: #fff; border-radius: 18px; padding: 14px; text-align: center; color: var(--maroon); font-weight: 700; font-size: .85rem; }
.footer__qr img { width: 150px; margin-bottom: .4rem; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 1.4rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .9rem; color: rgba(255,255,255,.6);
}
.footer__bottom a:hover { color: var(--copper-2); }

/* ---------- WhatsApp flottante ---------- */
.wa-float {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.7);
  transition: transform .2s;
  animation: pulse 2.6s infinite;
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { transform: scale(1.08); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70% { box-shadow: 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,6,4,.92);
  display: grid; place-items: center; padding: 2rem;
  animation: fade .25s ease;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 100%); max-height: 88vh; border-radius: 12px; background: #fff; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.2rem; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: #fff; color: var(--maroon); font-size: 2rem; line-height: 1; cursor: pointer;
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Animazioni reveal ---------- */
.js .reveal { opacity: 0; translate: 0 30px; transition: opacity .8s ease, translate .8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .ticker__track, .wa-float { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__qr { justify-self: start; }
}

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 1.2rem; padding: 1.5rem;
    background: #fff; border-bottom: 1px solid rgba(74,23,18,.1);
    box-shadow: 0 20px 30px -20px rgba(74,23,18,.4);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform .25s, opacity .25s;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__text { text-align: center; }
  .hero__logo { margin-inline: auto; width: 140px; }
  .hero__rule { margin-inline: auto; }
  .hero__lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__collage { height: 120vw; max-height: 560px; }
}

@media (max-width: 600px) {
  .services { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; gap: .8rem; }
  .work--wide { grid-column: span 2; }
  .work .tag { font-size: .75rem; left: .6rem; bottom: .6rem; }
  .footer__inner { grid-template-columns: 1fr; text-align: left; }
  .ticker .tag { font-size: .95rem; }
  .nav__brand-text strong { font-size: 1rem; }
  .flagbar { height: 24px; }
}
