/* Atelier Glivos: identita' visiva da self/identita-visiva-glivos.md.
   Archivo per i titoli, IBM Plex Sans per il testo, IBM Plex Mono per le etichette.
   Bianco, un solo accento: l'arancione del logo. Mai trattini lunghi nei testi. */

@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../assets/fonts/ibm-plex-sans-wght.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #ffffff;
  --ink: #111214;
  --ink-2: #4a4d52;
  --ink-3: #8a8e94;
  --line: #e3e4e6;
  --accent: #ef5803;
  --accent-soft: #fdeee4;
  --green: #16a34a;
  --display: "Archivo", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gap: 28px;
  --radius: 16px;
  --card-w: min(80vw, 420px);
  --card-h: min(50vw, 280px);
  --section: clamp(80px, 12vw, 160px);
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* Etichette piccole sopra i titoli: regola della nota di identita' (maiuscolo, 0.18em). */
.kicker {
  font: 500 0.72rem/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.title {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink);
}
.lead { color: var(--ink-2); font-size: 1.1rem; max-width: 36rem; }

/* Barra di navigazione a pillola, fissa in alto al centro. */
.nav {
  position: fixed; top: calc(18px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px -20px rgba(17, 18, 20, 0.35);
  max-width: calc(100vw - 32px);
}
.nav__logo { display: block; line-height: 0; margin-right: 6px; }
.nav__logo img { height: 22px; width: auto; display: block; }
.nav__links { display: flex; gap: 2px; margin: 0 8px; }
.nav__links a {
  font: 500 0.92rem/1 var(--body); color: var(--ink-2);
  padding: 11px 12px; border-radius: 999px; text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav__links a:hover { color: var(--ink); background: #f2f2f3; }
.nav__cta {
  font: 600 0.92rem/1 var(--body); color: #fff; background: var(--ink);
  padding: 12px 18px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s ease;
}
.nav__cta:hover { background: #000; }

/* Hero: solo tipografia, centrata, alta quanto lo schermo. */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px var(--gutter) 64px;
}
.hero__inner { max-width: 62rem; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero .title { font-size: clamp(2.7rem, 7.6vw, 6.2rem); text-wrap: balance; }
.hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.hero__scroll {
  margin-top: clamp(40px, 8vh, 96px);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--accent); text-decoration: none;
}
.hero__scroll .kicker { color: var(--accent); font-size: 0.6rem; letter-spacing: 0.4em; }
.hero__scroll i {
  display: block; width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse 2s ease-in-out infinite;
}

/* Un solo momento di ingresso, sulla hero, in sequenza. */
.rise { opacity: 0; transform: translateY(18px); animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise:nth-child(1) { animation-delay: 0.05s; }
.rise:nth-child(2) { animation-delay: 0.18s; }
.rise:nth-child(3) { animation-delay: 0.32s; }
.rise:nth-child(4) { animation-delay: 0.6s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes led { 50% { opacity: 0.4; } }

/* Sezioni sotto la hero: entrano una volta, quando arrivano in vista. */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in, .no-js .reveal { opacity: 1; transform: none; }

/* Lavori: intestazione centrata, poi due file di card che scorrono. */
.lavori { padding: var(--section) 0; }
.lavori__head {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center; padding: 0 var(--gutter); margin-bottom: clamp(40px, 6vw, 72px);
}
.lavori__head .title { font-size: clamp(2.2rem, 5.2vw, 4rem); }

.marquee {
  position: relative; overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  padding: 12px 0;
}
.marquee + .marquee { margin-top: calc(var(--gap) - 24px); }
.marquee__track { display: flex; width: max-content; animation: scorri 60s linear infinite; will-change: transform; }
.marquee--inversa .marquee__track { animation-direction: reverse; }
.marquee__group { display: flex; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes scorri { to { transform: translateX(-50%); } }
.marquee--static { overflow-x: auto; -webkit-mask-image: none; mask-image: none; padding-left: var(--gutter); }
.marquee--static .marquee__track { animation: none; }

.card {
  position: relative; display: block; flex: 0 0 auto;
  width: var(--card-w); height: var(--card-h); margin-right: var(--gap);
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #f3f3f4; color: #fff; text-decoration: none;
  transform: translateZ(0);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card__img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: top center;
  transform: scale(1.02); transition: transform 0.7s ease;
}
.card__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(17, 18, 20, 0.78) 0%, rgba(17, 18, 20, 0.3) 42%, rgba(17, 18, 20, 0) 68%);
}
.card:hover, .card:focus-visible { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 22px 44px -22px rgba(17, 18, 20, 0.45); }
.card:hover .card__img { transform: scale(1.06); }
.card__status {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(17, 18, 20, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 500 0.62rem/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
}
.card__led { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: led 2s ease-in-out infinite; }
.card__status--demo .card__led { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.card__meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px; }
.card__name { font: 700 1.15rem/1.2 var(--display); letter-spacing: -0.01em; margin-bottom: 5px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4); }
.card__cat { font: 500 0.62rem/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }

/* Contatti: due bottoni, niente moduli. */
.contatti {
  padding: var(--section) var(--gutter);
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
  border-top: 1px solid var(--line);
}
.contatti .title { font-size: clamp(2.2rem, 5.2vw, 4rem); }
.contatti__azioni { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 0.98rem/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primario { background: var(--ink); color: #fff; }
.btn--primario:hover { background: #000; }
.btn--accento { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.btn--accento:hover { background: var(--accent-soft); }

/* Pie' di pagina a tre colonne. */
.footer { border-top: 1px solid var(--line); padding: 56px var(--gutter) 32px; }
.footer__grid {
  max-width: 72rem; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.footer__logo img { height: 20px; width: auto; display: block; margin-bottom: 14px; }
.footer p, .footer li { font-size: 0.95rem; color: var(--ink-2); }
.footer ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
  max-width: 72rem; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 0.85rem; color: var(--ink-3);
}
.footer__bottom nav { display: flex; gap: 18px; }

/* Avviso che compare solo finche' ci sono segnaposto in js/lavori.js. */
.avviso-segnaposto {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: 360px;
  padding: 12px 14px; border-radius: 12px;
  background: #fff8c5; border: 1px solid #e6cf5a; color: #5c4a00;
  font: 500 0.82rem/1.4 var(--body);
  box-shadow: 0 12px 32px -20px rgba(17, 18, 20, 0.4);
}

@media (max-width: 760px) {
  :root { --gap: 16px; --section: 72px; }
  .nav { top: calc(12px + env(safe-area-inset-top, 0px)); padding: 6px 6px 6px 14px; }
  .nav__links { display: none; }
  .nav__cta { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 0.9rem; }
  .hero { padding: 100px var(--gutter) 48px; }
  .hero__inner { gap: 20px; }
  .hero .lead { font-size: 1rem; line-height: 1.55; }
  .hero__scroll { margin-top: 36px; }
  .lavori__head { gap: 12px; margin-bottom: 32px; }
  .marquee {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    padding: 8px 0;
  }
  .card__meta { padding: 14px 16px; }
  .card__name { font-size: 1.05rem; }
  .card__status { top: 10px; left: 10px; }
  .contatti__azioni { width: 100%; flex-direction: column; align-items: stretch; margin-top: 12px; }
  .btn { justify-content: center; width: 100%; }
  .footer { padding: 44px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__bottom nav a { display: inline-block; padding: 6px 0; }
  .avviso-segnaposto { left: 12px; right: 12px; max-width: none; }
}
@media (max-width: 760px) and (hover: none) {
  .card:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .card:hover .card__img { transform: scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; opacity: 1; transform: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero__scroll i, .card__led { animation: none; }
  .marquee__track { animation: none; }
  .card, .card__img { transition: none; }
}

/* Card senza link (anteprima non pubblicata): niente sollevamento al passaggio. */
.card--fermo { cursor: default; }
.card--fermo:hover { border-color: var(--line); transform: none; box-shadow: none; }
.card--fermo:hover .card__img { transform: scale(1.02); }
