/* =========================================================
   JESAP Consulting — Base / Design System
   Shared by every page: variabili, reset, nav, footer,
   bottoni, primitive di sezione, utilità.
   ========================================================= */

:root {
  --viola: #983C8E;
  --viola-scuro: #7A5EA8;
  --viola-soft: #f6edf4;
  --nero: #2B2E33;
  --grigio: #EFEFEF;
  --bianco: #FFFFFF;
  --crema: #EFEFEF;
  --crema-2: #E4E4E4;
  --ink: #1a1820;
  --muted: rgba(43, 46, 51, 0.62);

  --display: "Montserrat", system-ui, sans-serif;
  --serif: "Montserrat", system-ui, sans-serif;
  --body: "Montserrat", system-ui, sans-serif;

  --radius: 22px;
  --radius-lg: 36px;

  --nav-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  font-family: var(--body);
  background: var(--crema);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 22px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ========= NAV ========= */
.nav {
  position: sticky; top: 16px; z-index: 200;
  margin: 16px auto 0; max-width: 1240px; padding: 0 40px;
}
@media (max-width: 720px) { .nav { padding: 0 22px; } }

.nav-inner {
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(43, 46, 51, 0.08);
  border-radius: 999px;
  padding: 0 8px 0 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 20px rgba(43, 46, 51, 0.04);
}
.nav-spacer { flex: 1; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.01em;
  height: 100%;
}
.brand-img { height: 52px; width: auto; object-fit: contain; display: block; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 500;
  color: var(--nero); opacity: .78; transition: all .2s ease;
}
.nav-links a:hover { opacity: 1; background: rgba(43, 46, 51, 0.05); }
.nav-links a.active {
  background: linear-gradient(135deg, #983C8E 0%, #7A5EA8 100%);
  color: white; opacity: 1;
  box-shadow: 0 6px 14px -4px rgba(122, 94, 168, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #983C8E 0%, #7A5EA8 100%);
  color: white; padding: 0 22px; height: 52px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 18px -6px rgba(122, 94, 168, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden; isolation: isolate;
}
.nav-cta::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
  z-index: -1;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(122, 94, 168, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.nav-cta:hover::before { transform: translateX(120%); }
.nav-cta .arr { width: 14px; height: 14px; transition: transform .25s ease; }
.nav-cta:hover .arr { transform: translateX(3px); }

/* outline variant of the pill CTA */
.nav-cta-outline {
  background: transparent !important;
  color: var(--viola) !important;
  border: 1.5px solid var(--viola);
  box-shadow: none !important;
}
.nav-cta-outline .cta-arrow { width: 16px; height: 16px; color: var(--viola); transition: transform .2s ease, color .2s ease; }
.nav-cta-outline:hover { background: var(--viola) !important; color: white !important; }
.nav-cta-outline:hover .cta-arrow { transform: translate(2px, -2px); color: white; }

.nav-social {
  display: flex; align-items: center; gap: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(43, 46, 51, 0.15);
}
.nav-social a { color: var(--viola); transition: transform .2s ease, color .2s ease; display: grid; place-items: center; }
.nav-social a:hover { transform: translateY(-2px); color: var(--viola-scuro); }
.nav-social svg { width: 22px; height: 22px; }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 50%;
  align-items: center; justify-content: center;
  color: var(--nero);
  margin-left: 2px;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
body.menu-open .nav-toggle .icon-open { display: none; }
body.menu-open .nav-toggle .icon-close { display: block; }

/* mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(43, 46, 51, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(360px, 84vw);
  background: var(--bianco);
  padding: 96px 32px 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18);
}
body.menu-open .mobile-menu-panel { transform: none; }
.mobile-menu-panel a.m-link {
  font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--nero); padding: 14px 12px; border-radius: 14px;
  transition: background .2s ease, color .2s ease;
}
.mobile-menu-panel a.m-link:hover,
.mobile-menu-panel a.m-link.active { background: var(--viola-soft); color: var(--viola); }
.mobile-menu-panel .m-cta { margin-top: 18px; }
.mobile-menu-social { display: flex; gap: 14px; margin-top: auto; padding-top: 24px; }
.mobile-menu-social a { color: var(--viola); }
.mobile-menu-social svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-social { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Il CTA "Contattaci" dell'header (non quello dentro il menu mobile,
     che condivide la classe .nav-cta ma vive in .mobile-menu-panel)
     si sposta esclusivamente nel menu a comparsa su mobile. */
  .nav-inner > .nav-cta { display: none; }
}

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: all .25s ease; will-change: transform;
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::after {
  content: "→"; display: inline-block; opacity: 1; transform: translateX(0);
  transition: transform .25s ease; font-weight: 500; margin-left: 2px;
}
.btn:hover::after { transform: translateX(3px); }

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #983C8E 0%, #7A5EA8 100%);
  box-shadow: 0 10px 24px -8px rgba(122, 94, 168, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
  z-index: -1;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(122, 94, 168, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.btn-primary:hover::before { transform: translateX(120%); }

.btn-ghost {
  color: var(--viola); background: transparent;
  border: 1.5px solid var(--viola);
  box-shadow: inset 0 0 0 0 var(--viola-scuro);
  transition: color .3s ease, border-color .3s ease, box-shadow .45s cubic-bezier(.4, 0, .2, 1), transform .25s ease;
}
.btn-ghost:hover {
  color: white; border-color: var(--viola-scuro);
  box-shadow: inset 0 0 0 60px var(--viola-scuro);
  transform: translateY(-2px);
}

/* ========= SECTION PRIMITIVES ========= */
.section-head {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: end;
  margin-bottom: 56px;
}
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }
.section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--viola); display: inline-flex; align-items: center; gap: 8px;
}
.section-label::before { content: ""; width: 24px; height: 1px; background: var(--viola); }
.section-title {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.96; letter-spacing: -0.03em;
  font-weight: 600; color: var(--nero); margin: 14px 0 0;
}
.section-title .italic { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--viola); }
.section-desc { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 480px; }

/* ========= FOOTER ========= */
.site-footer {
  margin: 16px;
  background: var(--nero);
  color: white;
  border-radius: var(--radius-lg);
  padding: 48px clamp(32px, 5vw, 56px) 22px;
  position: relative; overflow: hidden;
}
.site-footer::before {
  content: ""; position: absolute; top: -150px; right: -100px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(152, 60, 142, 0.45), transparent 70%);
  pointer-events: none;
}
.site-footer::after {
  content: ""; position: absolute; bottom: -180px; left: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 94, 168, 0.35), transparent 70%);
  pointer-events: none;
}
.foot-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; align-items: start;
}
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; gap: 36px; } }
.foot-brand-block { display: flex; flex-direction: column; }
.foot-brand-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.foot-logo { width: auto; height: 48px; }
.foot-desc { color: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.55; max-width: 360px; margin: 0 0 22px; }
@media (max-width: 820px) { .foot-desc { display: none; } }
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.foot-social a:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }
.foot-social svg { width: 15px; height: 15px; color: white; }
.foot-col h4 {
  font-family: var(--display); font-size: 16px; font-weight: 600;
  color: white; margin: 0 0 14px; letter-spacing: -0.01em;
}
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.foot-links li a {
  color: rgba(255, 255, 255, 0.78); font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .2s ease, transform .2s ease;
}
.foot-links li a::before {
  content: "›"; font-size: 16px; color: rgba(255, 255, 255, 0.55); transition: transform .2s ease;
}
.foot-links li a:hover { color: white; transform: translateX(3px); }
.foot-contact { display: flex; flex-direction: column; gap: 14px; }
.foot-contact .ci { display: flex; gap: 12px; align-items: flex-start; }
.foot-contact .ci svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: #d6b3e3; }
.foot-contact .ci a,
.foot-contact .ci span { color: rgba(255, 255, 255, 0.78); font-size: 14px; line-height: 1.5; }
.foot-contact .ci a:hover { color: white; }
.foot-bottom {
  position: relative; z-index: 1;
  margin-top: 36px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; justify-content: flex-end; align-items: center; gap: 28px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255, 255, 255, 0.55);
}
.foot-bottom a { color: rgba(255, 255, 255, 0.7); transition: color .2s ease; }
.foot-bottom a:hover { color: white; }
@media (max-width: 600px) {
  .foot-bottom {
    justify-content: flex-start; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    gap: 16px; font-size: 12px;
  }
  .foot-bottom > * { flex-shrink: 0; }
}

/* ========= SHARED UTILITIES ========= */
.fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
}
.fade-up.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fade-up { opacity: 1; transform: none; }
}

/* ========= LARGE SCREEN SCALING =========
   Il layout è tarato su viewport ~1440-1536px (laptop).
   Su monitor desktop più grandi ingrandiamo tutto proporzionalmente,
   così il sito appare identico al laptop invece che rimpicciolito. */
@media (min-width: 1800px) {
  html { zoom: 1.125; }
}
@media (min-width: 2400px) {
  html { zoom: 1.44; }
}
@media (min-width: 3400px) {
  html { zoom: 1.8; }
}

/* ========= AVVISO COOKIE/PRIVACY =========
   Nomi volutamente generici (niente "cookie"/"consent" in classi o ID):
   molti ad-blocker/estensioni privacy bloccano di default qualsiasi file
   o elemento con quei pattern nel nome — succedeva letteralmente con
   "cookie-consent.js" (net::ERR_BLOCKED_BY_CLIENT), impedendo al banner
   di funzionare anche se il codice era corretto.
   L'entrata usa una @keyframes che parte da sola all'inserimento nel DOM,
   non una transition attivata da JS un istante dopo via classe: più
   robusta, non dipende da un tick successivo che potrebbe non scattare. */
.site-notice {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: white; border-top: 1px solid rgba(43,46,51,0.1);
  box-shadow: 0 -12px 32px -12px rgba(43,46,51,0.25);
  padding: 18px 24px;
  animation: siteNoticeIn .4s cubic-bezier(.4,0,.2,1);
}
@keyframes siteNoticeIn {
  from { transform: translateY(110%); }
  to { transform: translateY(0); }
}
.site-notice.is-hiding {
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.site-notice-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.site-notice-text {
  margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--nero); flex: 1 1 420px;
}
.site-notice-text a { color: var(--viola); font-weight: 600; }
.site-notice-actions { display: flex; gap: 10px; flex-shrink: 0; }
.notice-btn {
  border-radius: 999px; padding: 11px 22px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all .2s ease;
  font-family: var(--display);
}
.notice-btn-ghost { background: white; border-color: rgba(43,46,51,0.15); color: var(--nero); }
.notice-btn-ghost:hover { border-color: rgba(43,46,51,0.35); }
.notice-btn-primary { background: linear-gradient(135deg, var(--viola), var(--viola-scuro)); color: white; }
.notice-btn-primary:hover { box-shadow: 0 8px 20px -8px rgba(122,94,168,0.5); transform: translateY(-1px); }
@media (max-width: 640px) {
  .site-notice { padding: 16px; }
  .site-notice-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  /* .site-notice-text ha "flex: 1 1 420px" per il layout orizzontale da
     desktop: in colonna (mobile) quel 420px diventa altezza minima invece
     di larghezza, e "flex-grow:1" la fa crescere a riempire lo spazio
     disponibile — il banner arrivava quasi a coprire tutto lo schermo. */
  .site-notice-text { flex: none; }
  .site-notice-actions { justify-content: stretch; }
  .notice-btn { flex: 1; }
}
