/* kalosNetwork — stile base */
:root {
  --red: #B5352D;
  --magenta: #A4348B;
  --green: #2DA86B;
  --teal: #2E8FA3;
  --orange: #F2A33A;

  --bg: #ffffff;
  --ink: #14181d;
  --muted: #5d646d;
  --line: rgba(20, 24, 29, .12);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Satoshi", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; }

.eyebrow {
  margin: 0 0 1.2em;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- particelle di sfondo ---------- */
.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  background: linear-gradient(to bottom, rgba(255, 255, 255, .92), rgba(255, 255, 255, 0));
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-word { font-size: 17px; font-weight: 500; letter-spacing: .02em; }
.brand-word em { font-size: 21px; margin-left: 1px; }

.site-nav { display: flex; gap: 32px; font-size: 13px; letter-spacing: .04em; }
.site-nav a { position: relative; opacity: .75; transition: opacity .3s; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s cubic-bezier(.7, 0, .2, 1);
}
.site-nav a:hover { opacity: 1; }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-end { display: flex; align-items: center; gap: 8px; }
.lang { display: flex; gap: 2px; font-size: 12px; }
.lang button {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 6px 8px;
  opacity: .45;
  cursor: pointer;
}
.lang button.is-active { opacity: 1; }
.lang button:hover { opacity: .9; }

/* ---------- menu mobile ---------- */
.menu-toggle {
  position: relative;
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .6s cubic-bezier(.7, 0, .2, 1), width .6s cubic-bezier(.7, 0, .2, 1);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; width: 14px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { width: 22px; transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 104px var(--gutter) 36px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 100%, rgba(46, 143, 163, .2), transparent 55%),
    #ffffff;
  visibility: hidden;
}
.mobile-mark {
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 300px;
  height: 300px;
  opacity: .12;
  pointer-events: none;
}
.mobile-nav { position: relative; display: flex; flex-direction: column; }
.mobile-nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-num {
  display: inline-block;
  width: 22px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--c);
}
.mobile-mask { display: block; overflow: hidden; padding-bottom: .06em; }
.mobile-label {
  display: block;
  font-size: clamp(34px, 10vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.mobile-nav a:active .mobile-label { color: var(--c); }
.mobile-foot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.mobile-foot a { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; height: 420vh; }
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.stage-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.stage {
  width: min(92vw, 92vh);
  height: min(92vw, 92vh);
  overflow: visible;
}
.stage .k {
  font-family: var(--serif);
  font-size: 184px;
  font-weight: 500;
  fill: var(--teal);
}
.stage .city text {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: .18em;
  fill: var(--ink);
}

.hero-copy {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(28px, 7vh, 72px);
  max-width: 560px;
}
.hero-title {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(48px, 8.5vw, 128px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.035em;
}
.hero-title em { font-size: 1.12em; letter-spacing: -.01em; color: var(--teal); }
.hero-title .char { display: inline-block; will-change: transform; }
.split { display: inline-block; overflow: hidden; padding-bottom: .08em; }
.hero-sub {
  margin: 1.1em 0 0;
  max-width: 34ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.35;
  color: rgba(20, 24, 29, .72);
}

.hero-scroll, .hero-cities {
  position: absolute;
  bottom: clamp(28px, 7vh, 72px);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-scroll {
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-scroll .line {
  position: relative;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: var(--line);
}
.hero-scroll .line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: scroll-line 2.2s cubic-bezier(.7, 0, .2, 1) infinite;
}
@keyframes scroll-line {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
.hero-cities { right: var(--gutter); bottom: auto; top: 50%; writing-mode: vertical-rl; white-space: nowrap; transform: translateY(-50%); }

.statement {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: min(560px, 46vw);
  visibility: hidden;
}
.statement-text {
  margin: 0;
  font-size: clamp(24px, 2.7vw, 40px);
  line-height: 1.22;
  letter-spacing: -.015em;
}
.statement-text .word { opacity: .14; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding: 15px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background .35s, color .35s, border-color .35s;
}
.btn::after { content: "→"; letter-spacing: 0; transition: transform .35s; }
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn:hover::after { transform: translateX(4px); }

/* ---------- sezioni: struttura comune ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(110px, 18vh, 200px) max(var(--gutter), calc((100% - 1320px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
}
.eyebrow-num { color: var(--ink); margin-right: 1.4em; }

.big-title {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 96px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
}
.big-title em { font-size: 1.08em; letter-spacing: -.01em; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.wi { display: inline-block; will-change: transform; }

.section-intro {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: clamp(56px, 10vh, 110px);
}
.section-intro .big-title { max-width: 12ch; }
.section-intro p { margin: 0; max-width: 38ch; color: var(--muted); font-size: 17px; }

.tag {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--c, var(--teal));
}
.muted { color: var(--muted); }

/* ---------- profilo ---------- */
.profilo { background: linear-gradient(to bottom, rgba(255, 255, 255, .4), rgba(255, 255, 255, .85) 25%); }
.profilo .big-title { max-width: 14ch; }
.profilo .big-title em { color: var(--orange); }
.profilo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: clamp(56px, 9vh, 100px);
}
.profilo-grid p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; }
.profilo-grid .lead { color: var(--ink); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: clamp(64px, 11vh, 120px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(48px, 5.4vw, 80px);
  font-weight: 500;
  line-height: 1;
}
.stat span { display: block; margin-top: 12px; font-size: 14px; color: var(--muted); }

.quote { margin-top: clamp(100px, 18vh, 200px); margin-bottom: 0; text-align: center; }
.quote-text {
  margin: 0 auto 32px;
  max-width: 26ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1.18;
}
.quote-text .word { opacity: .14; }

/* ---------- servizi ---------- */
.servizi .big-title em { color: var(--magenta); }
.services { list-style: none; padding: 0; border-bottom: 1px solid var(--line); }
.service {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1.1fr 1fr;
  gap: 32px;
  align-items: baseline;
  padding: clamp(28px, 4.5vh, 46px) 0;
  isolation: isolate;
}
.service::before { /* linea superiore che si disegna */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(var(--draw, 1));
  transform-origin: left;
}
.service::after { /* riempimento colorato all'hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s cubic-bezier(.7, 0, .2, 1);
}
.service:hover::after { transform: scaleX(1); }
.service-num {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--c);
}
.service h3 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 42px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.025em;
  transition: translate .6s cubic-bezier(.2, .8, .2, 1);
}
.service:hover h3 { translate: 14px 0; }
.service p { margin: 0; max-width: 44ch; color: var(--muted); }

/* ---------- iniziative ---------- */
.iniziative .big-title em { color: var(--green); }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(32px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(46, 143, 163, .18), transparent 55%),
    #fafafa;
}
.feature h3 {
  margin: 0 0 24px;
  font-size: clamp(34px, 4vw, 60px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
}
.feature h3 span {
  display: block;
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: .5em;
  letter-spacing: 0;
  color: var(--orange);
}
.feature-copy p { max-width: 50ch; }

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 36px;
  align-self: center;
}
.timeline::before, .timeline-progress {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}
.timeline-progress {
  background: linear-gradient(to bottom, var(--teal), var(--magenta), var(--orange));
  transform-origin: top;
}
.timeline li {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 1.6vw, 22px);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--c);
  transition: background .4s, box-shadow .4s;
}
.timeline li.is-on::before { background: var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent); }
.timeline li small { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.timeline li.is-final span { font-family: var(--serif); font-style: italic; font-size: 1.3em; color: var(--orange); }

.projects {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.project { grid-column: span 2; }
.project {
  --mx: 50%;
  --my: 50%;
  position: relative;
  padding: 36px 32px 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fafafa;
  overflow: hidden;
  transition: border-color .5s, translate .6s cubic-bezier(.2, .8, .2, 1);
}
.project::before { /* luce che segue il cursore */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 20%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.project:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); translate: 0 -6px; }
.project:hover::before { opacity: 1; }
.project h3 {
  position: relative;
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.project p:not(.tag) { position: relative; margin: 0; color: var(--muted); font-size: 15px; }
.project-link {
  position: relative;
  display: inline-block;
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c, var(--teal));
}
.project-link::after { content: " ↓"; }
.project-link:hover { color: var(--ink); }

/* ---------- partner ---------- */
.partner .big-title em { color: var(--teal); }
.partners {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg);
}
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 22px 26px;
  background: var(--bg);
  /* linee di separazione: così l'ultima riga resta pulita anche se incompleta */
  box-shadow: inset -1px -1px 0 var(--line);
  transition: background .5s;
}
.partner-card:hover { background: #f6f7f8; }
.partner-logo {
  display: grid;
  place-items: center;
  height: 110px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 14px;
  background: #f5f5f3;
  overflow: hidden;
}
.partner-logo img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.1);
  transition: filter .5s, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.partner-card:hover .partner-logo img { filter: none; transform: scale(1.06); }
.partner-logo.is-text {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #1d2733;
}
.partner-logo.is-text small { font-size: .45em; margin-left: 4px; color: var(--teal); }
.partner-card h3 { margin: 0; font-size: 17px; font-weight: 500; }
.partner-card p { margin: 0; font-size: 13px; color: var(--muted); }
.partner-card a {
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--teal);
}
.partner-card a::after { content: " ↗"; }
.partner-card a:hover { color: var(--ink); }

/* persone del network: per la foto metti <img> dentro .person-photo al posto delle iniziali */
.people { margin-top: clamp(64px, 10vh, 110px); }
.people-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 28px 20px;
}
.person { text-align: center; }
.person-photo {
  display: grid;
  place-items: center;
  width: min(100%, 150px);
  aspect-ratio: 1;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%);
  overflow: hidden;
  transition: border-color .5s;
}
.person-photo span { font-family: var(--serif); font-size: 34px; color: var(--ink); opacity: .8; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .5s; }
.person:hover .person-photo { border-color: var(--c); }
.person:hover .person-photo img { filter: none; }
.person h3 { margin: 0; font-size: 16px; font-weight: 500; }

/* ---------- metodo ---------- */
.metodo {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(48px, 8vw, 140px);
  align-items: start;
}
.metodo-head { position: sticky; top: 22vh; }
.metodo .big-title em { color: var(--orange); }
.steps { list-style: none; padding: 0; margin: 0; }
.step {
  padding: clamp(40px, 9vh, 90px) 0;
  border-top: 1px solid var(--line);
  opacity: .28;
  transition: opacity .7s;
}
.step.is-active { opacity: 1; }
.step-num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(56px, 6vw, 92px);
  line-height: 1;
  color: var(--c);
}
.step h3 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -.025em;
}
.step p { margin: 0; max-width: 40ch; color: var(--muted); font-size: 17px; }

/* ---------- contatti ---------- */
.contatti { text-align: center; padding-bottom: clamp(120px, 22vh, 240px); overflow: hidden; }
.contatti-mark {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 40px;
}
.contatti .big-title { max-width: 16ch; margin-inline: auto; }
.contatti .big-title em { color: var(--teal); }
.mail {
  position: relative;
  display: inline-block;
  margin-top: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 3.4vw, 50px);
  overflow-wrap: anywhere;
}
.mail::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, var(--red), var(--magenta), var(--green), var(--teal), var(--orange));
  transform-origin: right;
  transition: transform .6s cubic-bezier(.7, 0, .2, 1);
}
.mail:hover::after { transform: scaleX(0); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
}
.site-footer .brand-word { color: var(--ink); }

/* ---------- tablet / mobile ---------- */
@media (max-width: 1100px) {
  .partners { grid-template-columns: repeat(3, 1fr); }
  .people-grid { grid-template-columns: repeat(4, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .project { grid-column: auto; }
}

@media (min-width: 861px) {
  .mobile-menu { display: none; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .hero-cities { display: none; }
  .hero-scroll { display: none; }
  .statement { width: auto; right: var(--gutter); top: auto; bottom: 8vh; transform: none; }
  .statement-text { font-size: clamp(20px, 5.4vw, 28px); }
  .statement .btn { margin-top: 24px; }

  .section-intro, .profilo-grid, .feature, .metodo { grid-template-columns: 1fr; }
  .section-intro { gap: 24px; }
  .stats { grid-template-columns: 1fr; gap: 28px; }
  .service { grid-template-columns: 48px 1fr; gap: 10px 16px; }
  .service p { grid-column: 2; }
  .service:hover h3 { translate: none; }
  .projects { grid-template-columns: 1fr; }
  .project, .project:nth-child(-n + 2) { grid-column: auto; }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-logo { height: 90px; }
  .metodo-head { position: static; }
  .step { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll .line::after { animation: none; }
}
