/* ===== Sanguinetti Industria Grafica — stile condiviso ===== */

/* Font ospitati in locale (nessuna connessione a Google Fonts) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url(assets/fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url(assets/fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(assets/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --navy: #0f1b3d;
  --navy-2: #172752;
  --ink: #0b1020;
  --paper: #f7f4ef;
  --white: #ffffff;
  --muted: #5d6478;
  --line: rgba(15, 27, 61, 0.12);
  --cyan: #00aeef;
  --magenta: #ec008c;
  --yellow: #ffe600;
  --coral: #f6a99a;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ---------- Barra di avanzamento scroll ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
  transform-origin: left; transform: scaleX(0);
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0;
  transition: padding .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
.header.scrolled {
  padding: 10px 0;
  background: rgba(247, 244, 239, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 64px; width: auto; transition: height .4s var(--ease), transform .5s var(--ease); }
.header.scrolled .brand-logo { height: 52px; }
.brand:hover .brand-logo { transform: scale(1.04); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) {
  position: relative; padding: 8px 14px; font-weight: 500; font-size: .95rem; color: var(--navy);
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--magenta); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: var(--navy); border-radius: 50%;
  cursor: pointer; position: relative;
}
.menu-toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px; background: #fff; transition: transform .4s var(--ease), top .4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-open .menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Bottoni ---------- */
.btn {
  --bg: var(--navy); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 .95rem var(--font-body); color: var(--fg); background: var(--bg);
  overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { box-shadow: 0 14px 30px -10px rgba(236, 0, 140, .55); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-light { --bg: #fff; --fg: var(--navy); }
.btn-light:hover { --fg: #fff; }
.btn-ghost { --bg: transparent; --fg: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-ghost:hover { --fg: #fff; box-shadow: inset 0 0 0 1.5px transparent, 0 14px 30px -10px rgba(236, 0, 140, .55); }
.btn-quote { padding: 11px 20px; margin-left: 8px; }
.btn-quote .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(255, 230, 0, .8); animation: ping 2s infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 230, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 230, 0, 0); } }

/* ---------- Animazioni di comparsa ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

.split .char { display: inline-block; transform: translateY(110%); opacity: 0; transition: transform 1s var(--ease), opacity 1s var(--ease); }
.split .word { display: inline-block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.split.in .char { transform: none; opacity: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--magenta);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 80px 0 30px; position: relative; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer a:hover { color: #fff; }
.footer .footer-logo { height: 70px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { margin-top: 60px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; flex-wrap: wrap; }
.cmyk-bar { display: flex; gap: 6px; margin-top: 20px; }
.cmyk-bar i { width: 22px; height: 22px; border-radius: 50%; }

.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pagine legali ---------- */
.legal-hero { position: relative; padding: 160px 0 60px; overflow: hidden; }
.legal-hero::before, .legal-hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; pointer-events: none; z-index: -1;
}
.legal-hero::before { width: 420px; height: 420px; background: var(--cyan); top: -160px; right: -80px; }
.legal-hero::after { width: 320px; height: 320px; background: var(--magenta); top: 40px; right: 260px; opacity: .25; }
.legal-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--navy); font-weight: 800; margin: 16px 0 14px; }
.legal-hero p { color: var(--muted); max-width: 640px; }
.legal-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 60px; align-items: start; padding-bottom: 120px; }
.toc { position: sticky; top: 110px; display: grid; gap: 4px; font-size: .9rem; }
.toc strong { font-family: var(--font-display); color: var(--navy); margin-bottom: 8px; }
.toc a { color: var(--muted); padding: 6px 0 6px 14px; border-left: 2px solid var(--line); transition: color .3s, border-color .3s; }
.toc a:hover, .toc a.current { color: var(--navy); border-left-color: var(--magenta); }
.legal-body { background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: clamp(26px, 5vw, 56px); max-width: 820px; }
.legal-body section { scroll-margin-top: 110px; }
.legal-body section + section { margin-top: 42px; padding-top: 42px; border-top: 1px solid var(--line); }
.legal-body h2 { font-size: 1.6rem; color: var(--navy); margin-bottom: 14px; }
.legal-body h3 { font-size: 1.1rem; color: var(--navy); margin: 22px 0 8px; }
.legal-body p, .legal-body li { color: #3c4256; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { padding-left: 20px; margin: 12px 0 0; display: grid; gap: 6px; }
.legal-body a { color: var(--magenta); text-decoration: underline; text-underline-offset: 3px; }
.legal-card { background: var(--paper); border-radius: 18px; padding: 22px 24px; display: grid; gap: 4px; }
.legal-card strong { color: var(--navy); }
.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.legal-body th, .legal-body td { text-align: left; padding: 14px 16px; vertical-align: top; }
.legal-body th { background: var(--navy); color: #fff; font-weight: 600; }
.legal-body tr:nth-child(even) td { background: var(--paper); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge.ok { background: #dff7ec; color: #0b7a4b; }
.badge.ask { background: #fde8f3; color: #a3005f; }
.updated { margin-top: 42px; font-size: .85rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 14px;
    background: var(--navy); clip-path: circle(0 at calc(100% - 42px) 40px);
    transition: clip-path .7s var(--ease);
  }
  .nav a:not(.btn) { color: #fff; font-family: var(--font-display); font-size: 2rem; }
  .menu-open .nav { clip-path: circle(150% at calc(100% - 42px) 40px); }
  .menu-open .menu-toggle { background: var(--magenta); }
  .btn-quote { margin: 16px 0 0; font-size: 1.05rem; padding: 16px 28px; }
  .nav .btn-quote { --bg: #fff; --fg: var(--navy); }
  .footer-grid { grid-template-columns: 1fr; }
  .legal-wrap { grid-template-columns: 1fr; gap: 30px; }
  .toc { position: static; }
  .legal-hero { padding-top: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split .char { opacity: 1; transform: none; }
}
