* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #faf7ef;
  color: #14150f;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #3d5cc4; text-decoration: none; }
a:hover { color: #2f49a8; }
::selection { background: #c3cef0; }

@keyframes llrise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes llfloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(0, -26px) scale(1.05); }
}
@keyframes llpulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 238, 227, 0.6);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(35, 36, 29, 0);
  transition: background .3s, border-color .3s;
}
.site-header.is-scrolled {
  background: rgba(243, 238, 227, 0.9);
  border-bottom-color: rgba(35, 36, 29, 0.12);
}

/* Buttons (background swaps on hover — kept out of inline styles so :hover can apply) */
.btn-primary { background: #3d5cc4; transition: background .2s ease; }
.btn-primary:hover { background: #2f49a8; }

.btn-outline { background: transparent; transition: background .2s ease; }
.btn-outline:hover { background: #ece5d6; }

.btn-invert { background: #f3eee3; transition: background .2s ease; }
.btn-invert:hover { background: #fff; }

.btn-dark { background: #23241d; transition: background .2s ease; }
.btn-dark:hover { background: #14150f; }
.btn-dark:disabled { opacity: 0.7; cursor: default; }

/* Scroll-reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 880px) {
  header nav { display: none !important; }
  section[style*="grid-template-columns: 1.15fr 0.85fr"] { grid-template-columns: 1fr !important; }
  section[style*="grid-template-columns: repeat(4, 1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
  section[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }
  section#metodo > div > div { grid-template-columns: 1fr !important; }
  section#contatti > div { grid-template-columns: 1fr !important; padding: 48px 28px !important; }
}
