/* ==========================================================================
   Davide Mercadante — Social Media Manager
   Design tokens, base, components, sections
   ========================================================================== */

:root {
  /* Brand */
  --navy: #141257;          /* colore del logo */
  --indigo: #3444c4;        /* colore principale */
  --indigo-dark: #2a37a6;
  --indigo-soft: #e9ebfb;
  --brand-grey: #a4a4a4;    /* grigio del logo */

  /* Neutri */
  --ink: #14161f;
  --text: #2b2e3b;
  --muted: #5a5e73;
  --line: #e3e5f0;
  --mist: #f4f5fa;
  --paper: #ffffff;

  /* Tipografia */
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* Spaziatura */
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --container: 1240px;

  /* Forme ed effetti */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 2px 8px rgba(20, 18, 87, .06);
  --shadow: 0 18px 50px -18px rgba(20, 18, 87, .28);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Elementi tipografici ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 10px; height: 10px;
  background: currentColor;
  transform: rotate(45deg);
  flex: none;
}
.eyebrow--light { color: #b9c0ff; }

.display {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: .98;
}

.h2 {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.015em;
}

.h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 800;
  line-height: 1.2;
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
}

.accent { color: var(--indigo); }

/* Parola sottolineata a mano (come nel riferimento) */
.scribble {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.scribble svg {
  position: absolute;
  left: -2%;
  bottom: -.16em;
  width: 104%;
  height: .32em;
  overflow: visible;
  pointer-events: none;
}
.scribble path {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw 1.1s .5s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:active { transform: scale(.97); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--indigo); }

.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-dark); }

.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { background: var(--indigo-soft); }

.btn--ghost-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* Bottone "pillola" con freccia nel cerchio (come nel riferimento) */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 10px 10px 10px 32px;
  min-height: 72px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.85rem, 1.2vw, 1rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s;
}
.btn-pill:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--indigo); }
.btn-pill:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-pill__arrow {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  flex: none;
  transition: background-color .2s, transform .25s var(--ease);
}
.btn-pill:hover .btn-pill__arrow { background: var(--indigo); transform: translateX(3px); }
.btn-pill--light { border-color: #fff; color: var(--navy); box-shadow: 4px 4px 0 rgba(255,255,255,.35); }
.btn-pill--light:hover { box-shadow: 6px 6px 0 #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 12px;
  border-bottom: 2px solid var(--line);
  transition: border-color .2s, color .2s;
}
.link-arrow:hover { color: var(--indigo); border-color: var(--indigo); }
.link-arrow svg { transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Barra superiore + header ---------- */

.topbar {
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.topbar a {
  display: block;
  padding: 12px var(--gutter);
  text-decoration: none;
}
.topbar a:hover span { text-decoration: underline; text-underline-offset: 4px; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
/* Sfondo sfocato su uno pseudo-elemento: un backdrop-filter sull'header
   renderebbe l'header il riferimento del menu mobile (position: fixed) */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}
.header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
  flex: none;
}
.logo__mark { width: 46px; height: 46px; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.logo__role {
  margin-top: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .56rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.logo--light { color: #fff; --logo-gap: var(--ink); }
.logo--light .logo__role { color: #b9bdd6; }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  position: relative;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 8px;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--indigo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--indigo); }

.nav__cta { display: none; }

.burger {
  display: none;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  place-items: center;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform .25s var(--ease), background-color .2s;
}
.burger span::before,
.burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: grid; }
  .header__cta { display: none; }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--ink);
    padding: 180px var(--gutter) 32px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .35s var(--ease), visibility 0s .35s;
    visibility: hidden;
    z-index: -1;
  }
  .nav.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .nav__list { flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav__link { color: #fff; font-size: 1.5rem; padding-block: 10px; }
  .nav__link[aria-current="page"] { color: #b9c0ff; }
  .nav__cta { display: inline-flex; margin-top: 28px; }
  .header.menu-open .burger { background: var(--indigo); }
  .header.menu-open .logo { color: #fff; --logo-gap: var(--ink); }
  .header.menu-open .logo__role { color: #b9bdd6; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 110px);
  overflow: hidden;
}
.hero__shape {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 34%;
  background: var(--navy);
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
  border-top-left-radius: 0;
}
.hero__shape::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--indigo) 0%, transparent 60%);
  opacity: .55;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.hero__title { margin-bottom: 28px; }
.hero__text { container-type: inline-size; }
/* Titolo breve su due righe: la dimensione segue la larghezza della colonna */
.hero__title--short { font-size: clamp(1.6rem, 10.5cqi, 5.4rem); }
.hero__title--short > span { display: block; white-space: nowrap; }

/* Titoli da tenere su righe fisse (ogni span = una riga) */
@media (min-width: 600px) {
  .nowrap-lines > span { display: block; white-space: nowrap; }
}
.hero__lead { margin-bottom: 40px; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}

.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
}
.hero__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 26px;
  background: linear-gradient(0deg, rgba(20,18,87,.92), rgba(20,18,87,.78));
  color: #fff;
}
.hero__caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}
.hero__caption span { font-size: .95rem; color: #d3d6f5; }
.hero__badge {
  position: absolute;
  top: 22px; left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.hero__badge i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1fb46a;
  box-shadow: 0 0 0 4px rgba(31,180,106,.18);
}
.hero__more {
  position: absolute;
  right: 26px;
  bottom: -46px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

/* Hero delle pagine interne */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 110px) clamp(48px, 6vw, 80px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-hero .hero__shape { width: 22%; }
.page-hero__inner { position: relative; max-width: 900px; }
.page-hero .display { font-size: clamp(2.4rem, 6vw, 5rem); margin-bottom: 26px; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__shape { width: 100%; top: auto; height: 46%; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .hero__media { max-width: 520px; width: 100%; margin-inline: auto; }
  .hero__more { display: none; }
  .page-hero .hero__shape { display: none; }
}

/* ---------- Loghi clienti (scorrimento) ---------- */

.clients {
  padding-block: 44px;
  border-block: 1px solid var(--line);
  background: #fff;
}
.clients__label {
  text-align: center;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 88px);
  padding-right: clamp(48px, 6vw, 88px);
  list-style: none;
  margin: 0;
  flex: none;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img {
  height: 44px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .62;
  transition: filter .3s, opacity .3s;
}
.marquee__track img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Sezioni generiche ---------- */

.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--navy); color: #d3d6f5; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 24px 64px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section__head--center {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
.section__head .lead { justify-self: end; }
.section__head--center .lead { justify-self: center; }
@media (max-width: 860px) {
  .section__head { grid-template-columns: 1fr; }
  .section__head .lead { justify-self: start; }
}

/* ---------- Manifesto ---------- */

.manifesto {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.manifesto__title { position: sticky; top: 120px; }
.manifesto__body p { font-size: 1.15rem; }
.manifesto__body .big {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}
.manifesto__body .btn-pill { margin-top: 20px; }
@media (max-width: 860px) {
  .manifesto { grid-template-columns: 1fr; }
  .manifesto__title { position: static; }
}

/* ---------- Numeri ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--navy);
  padding: clamp(28px, 4vw, 48px) 24px;
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat__num em { font-style: normal; color: #8f9bff; }
.stat__label {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #b9bdd6;
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Servizi ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.service__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--indigo-soft);
  color: var(--indigo);
  transition: background-color .3s, color .3s;
}
.service:hover .service__icon { background: var(--indigo); color: #fff; }
.service__icon svg { width: 26px; height: 26px; }
.service__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
  color: var(--brand-grey);
  letter-spacing: .08em;
}
.service h3 { margin-bottom: 12px; }
.service p { font-size: .98rem; color: var(--muted); }
@media (max-width: 1100px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }

/* ---------- Processo ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 36px 32px 40px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.step__label {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.step:nth-child(2) .step__label { background: var(--indigo); }
.step:nth-child(3) .step__label { background: var(--navy); }
.step h3 { margin-bottom: 12px; font-size: 1.4rem; }
.step p { color: var(--muted); }
.step__big {
  position: absolute;
  right: 24px; top: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 5rem;
  line-height: 1;
  color: var(--mist);
  pointer-events: none;
}
.steps-cta { margin-top: 48px; text-align: center; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Differenza (sezione scura) ---------- */

.diff {
  position: relative;
  overflow: hidden;
}
.diff::before {
  content: "";
  position: absolute;
  right: -10%; top: -30%;
  width: 60%; height: 160%;
  background: var(--indigo);
  opacity: .22;
  transform: rotate(18deg);
}
.diff__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.diff__quote {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 28px;
}
.diff__quote span { color: #8f9bff; }
.diff p { color: #c9cdea; font-size: 1.1rem; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pillar {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.pillar__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
}
.pillar h3 { font-size: 1.15rem; margin-bottom: 6px; }
.pillar p { font-size: 1rem; margin: 0; }
@media (max-width: 860px) { .diff__grid { grid-template-columns: 1fr; } }

/* ---------- Testimonianze ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  margin: 0;
  padding: 36px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.quote--featured {
  grid-row: span 2;
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.quote__mark {
  width: 44px; height: 44px;
  color: var(--indigo);
}
.quote--featured .quote__mark { color: #fff; opacity: .5; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text);
}
.quote--featured blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}
.quote figcaption { display: flex; align-items: center; gap: 14px; }
.quote__avatar {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
}
.quote--featured .quote__avatar { background: #fff; color: var(--indigo); }
.quote__name { display: block; font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.quote__role { display: block; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.quote--featured .quote__name { color: #fff; }
.quote--featured .quote__role { color: #d3d6f5; }
@media (max-width: 960px) {
  .quotes { grid-template-columns: 1fr; }
}

/* ---------- Anteprima portfolio ---------- */

.sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
}
.sectors li {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
}
.cases-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
.case-mini {
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.case-mini:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.case-mini__tag {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo);
}
.case-mini h3 { margin-bottom: 12px; }
.case-mini p { color: var(--muted); font-size: .98rem; }
@media (max-width: 960px) { .cases-preview { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq__intro { position: sticky; top: 120px; }
.faq__intro .lead { margin-top: 20px; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 800;
  color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--indigo); }
.faq__toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex: none;
  transition: transform .3s var(--ease), background-color .2s, color .2s;
}
.faq__toggle::before,
.faq__toggle::after {
  content: "";
  position: absolute;
  width: 14px; height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.faq__toggle::after { transform: rotate(90deg); transition: transform .3s var(--ease); }
.faq__item[open] .faq__toggle { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.faq__item[open] .faq__toggle::after { transform: rotate(0); }
.faq__answer { padding: 0 64px 28px 0; color: var(--muted); }
@media (max-width: 860px) {
  .faq { grid-template-columns: 1fr; }
  .faq__intro { position: static; }
  .faq__answer { padding-right: 0; }
}

/* ---------- CTA finale ---------- */

.cta-final {
  position: relative;
  overflow: hidden;
  padding-block: var(--section);
  background: var(--navy);
  color: #d3d6f5;
  text-align: center;
}
.cta-final::before,
.cta-final::after {
  content: "";
  position: absolute;
  width: 46vw; height: 46vw;
  max-width: 640px; max-height: 640px;
  border: 2px solid rgba(255,255,255,.08);
  transform: rotate(45deg);
}
.cta-final::before { left: -18vw; top: -12vw; }
.cta-final::after { right: -16vw; bottom: -20vw; background: rgba(52,68,196,.25); border: 0; }
.cta-final__inner { position: relative; z-index: 1; max-width: 860px; margin-inline: auto; }
.cta-final h2 { color: #fff; margin-bottom: 24px; }
.cta-final .lead { color: #c9cdea; margin: 0 auto 44px; }
.cta-final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: #a9adc4;
  padding-block: 72px 32px;
  font-size: .98rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__about { max-width: 38ch; margin-top: 24px; }
.footer h3 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; padding-block: 6px; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  font-size: .88rem;
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Portfolio: casi studio ---------- */

.cases { display: grid; gap: 24px; }
.case {
  display: grid;
  grid-template-columns: 80px 1.15fr 1fr;
  gap: 24px 48px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
}
.case__num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--indigo);
}
.case__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.case__meta span:first-child { color: var(--indigo); }
.case h2 { font-size: clamp(1.35rem, 2.1vw, 1.75rem); font-weight: 900; text-transform: uppercase; }
.case__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-bottom: 22px;
}
.case__logos img { height: 44px; width: auto; max-width: 190px; object-fit: contain; }
.case__block h3 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.case__block + .case__block { margin-top: 20px; }
.case__block p { color: var(--muted); }
@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; }
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.logo-grid li {
  display: grid;
  place-items: center;
  padding: 28px 24px;
  min-height: 120px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.logo-grid img { max-height: 56px; width: auto; object-fit: contain; }
@media (max-width: 760px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Chi sono ---------- */

.about-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about-hero .hero__media { aspect-ratio: 1 / 1.1; }
@media (max-width: 900px) { .about-hero { grid-template-columns: 1fr; } }

.story {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(32px, 6vw, 96px);
}
.story__body p { font-size: 1.12rem; }
.story__body .big {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
  padding-left: 24px;
  border-left: 4px solid var(--indigo);
  margin-block: 32px;
}
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li {
  position: relative;
  padding: 0 0 28px 32px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -8px; top: 6px;
  width: 14px; height: 14px;
  background: var(--indigo);
  transform: rotate(45deg);
}
.timeline li:first-child::before { background: var(--navy); }
.timeline strong { display: block; font-family: var(--font-display); font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.timeline span { color: var(--muted); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--navy);
  font-weight: 600;
}

.h-sub {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
}

/* ---------- Blog ---------- */

.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__cover {
  display: grid;
  place-items: center;
  height: 150px;
  margin: -32px -32px 28px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.post-card__cover::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  right: -40px; bottom: -90px;
  background: var(--indigo);
  transform: rotate(45deg);
}
.post-card__cover svg { width: 48px; height: 48px; position: relative; z-index: 1; }
.post-card time {
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 12px;
}
.post-card h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.25; margin-bottom: 14px; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card p { color: var(--muted); font-size: .98rem; flex: 1; }
.post-card .link-arrow { align-self: flex-start; margin-top: 16px; }
@media (max-width: 960px) { .posts { grid-template-columns: 1fr; } }

/* Articolo */
.article-head { max-width: 820px; }
.article-head .display { font-size: clamp(2rem, 4.6vw, 3.6rem); margin-bottom: 24px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose {
  max-width: 720px;
  margin-inline: auto;
  font-size: 1.14rem;
  line-height: 1.75;
}
.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 900;
  margin: 2.2em 0 .7em;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 1.8em 0 .5em;
}
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .6em; }
.prose li::marker { color: var(--indigo); font-weight: 800; }
.prose a { color: var(--indigo); font-weight: 600; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose > p:first-child { font-size: 1.3rem; color: var(--ink); }
.back-link { margin-bottom: 32px; display: flex; width: fit-content; }

/* ---------- Contatti ---------- */

.contact-page {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 5vw, 72px) var(--section);
}
.contact-page .hero__shape { width: 30%; }
.contact {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-intro { margin-bottom: 16px; }
.contact-title { font-size: clamp(2.2rem, 4.2vw, 3.6rem); margin-bottom: 20px; }
.contact-intro .lead { font-size: 1.1rem; }
.contact-note { color: var(--muted); margin-top: 8px; font-size: .98rem; }
.contact-cards { display: grid; gap: 16px; }
.contact-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.contact-card--primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.contact-card__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--indigo-soft);
  color: var(--indigo);
}
.contact-card--primary .contact-card__icon { background: #fff; }
.contact-card__label {
  display: block;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-card--primary .contact-card__label { color: #d3d6f5; }
.contact-card__value { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.contact-card--primary .contact-card__value { color: #fff; }

.form {
  position: sticky;
  top: 110px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--indigo);
}
.form .field input,
.form .field textarea { background: var(--mist); }
.form h2 { font-size: 1.6rem; font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }
.form > p { color: var(--muted); margin-bottom: 28px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-weight: 700; color: var(--ink); font-size: .95rem; }
.field label span { color: var(--indigo); }
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(52,68,196,.15); }
.field__error { color: #c0262d; font-size: .9rem; font-weight: 600; }
.field__error:empty { display: none; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c0262d; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.form__note { margin-top: 16px; font-size: .9rem; color: var(--muted); }
.form__note a { color: var(--indigo); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status:empty { display: none; }
.form__status {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: .98rem;
}
.form__status:focus { outline: none; }
.form__status--success { background: #e6f6ee; color: #11603a; }
.form__status--error { background: #fdecec; color: #8f1d22; }
.form__status a { color: inherit; font-weight: 700; }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Banner cookie ---------- */

.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  max-width: 920px;
  margin-inline: auto;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #d3d6f5;
  box-shadow: var(--shadow);
  font-size: .95rem;
}
.cookie-banner p { margin: 0; flex: 1 1 380px; }
.cookie-banner a { color: #fff; }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn { min-height: 44px; padding: 10px 22px; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 16px;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: #fff; }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
  .contact-page .hero__shape { display: none; }
  .form { position: static; box-shadow: 5px 5px 0 var(--indigo); }
}

/* ---------- Animazioni di comparsa ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scribble path { stroke-dashoffset: 0; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { flex-wrap: wrap; justify-content: center; animation: none; padding: 0; }
  .marquee__track[aria-hidden="true"] { display: none; }
}
