/* ============================================================
   Enrico Maggiolo — Editoriale (brand blu/bianco)
   ============================================================ */

:root {
  --ink: #11182a;
  --accent: #2950d8;
  --accent-dark: #1f3fb5;
  --bg: #ffffff;
  --bg-alt: #f4f7fc;
  --t-39: #39424f;
  --t-26: #26303f;
  --t-5b: #5b6577;
  --t-69: #697384;
  --t-99: #99a2b2;
  --t-b7: #b7becc;
  --line: #dde3ef;
  --line-soft: #e7ecf5;
  --line-blue: #cdd8f0;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

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

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

::selection { background: rgba(41, 80, 216, 0.16); }

a { color: inherit; text-decoration: none; }

.page { position: relative; width: 100%; overflow: hidden; }

.wrap { max-width: var(--wrap); margin: 0 auto; }

/* ---------- Shared type helpers ---------- */
.italic { font-style: italic; }
.accent { color: var(--accent); }
.ink { color: var(--ink); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}
.eyebrow--light { color: #b9c8f7; }

.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h2--lg { font-size: clamp(1.9rem, 5vw, 3.1rem); }
.h2--xl {
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  color: var(--t-39);
  margin: 0;
  max-width: 680px;
  text-wrap: pretty;
}

.rule { height: 1px; background: var(--line); }

.block-head { margin-bottom: clamp(40px, 6vw, 60px); }
.block-head--wide { max-width: 880px; }
.block-head .eyebrow { display: block; margin-bottom: 18px; }
.block-head--wide .eyebrow { margin-bottom: 20px; }

.mini-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--t-99);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mini-label--accent { color: var(--accent); }
.mini-label--muted { letter-spacing: 0.14em; margin-bottom: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 26px;
  border-radius: 12px;
}
.btn--primary {
  gap: 9px;
  color: #fff;
  background: var(--accent);
  transition: background .2s, transform .2s;
}
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn--ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  transition: border-color .2s;
}
.btn--ghost:hover { border-color: var(--ink); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 17px 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav__brand {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav__logo {
  width: 36px;
  height: 36px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-self: start;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}
.nav__link {
  font-size: 14px;
  color: var(--t-5b);
  font-weight: 500;
  transition: color .2s;
}
.nav__link:hover { color: var(--ink); }
.nav__cta { font-size: 14px; font-weight: 600; color: var(--accent); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
}

.nav__menu {
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 18px 40px rgba(17, 24, 42, 0.08);
}
.nav__menu[hidden] { display: none; }
.nav__menu-link {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--ink);
  padding: 13px 12px;
  border-radius: 11px;
}
.nav__menu-link:active { background: var(--bg-alt); }
.nav__menu-cta {
  margin-top: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  padding: 15px;
  border-radius: 13px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(120px, 16vw, 170px) 26px clamp(50px, 7vw, 76px); }
.hero__eyebrow { display: block; margin-bottom: clamp(28px, 4vw, 40px); }
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 9vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 1050px;
  text-wrap: balance;
}
.hero__rule { margin: clamp(36px, 5vw, 56px) 0 clamp(26px, 3vw, 34px); }
.hero__body {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: flex-start;
}
.hero__lead {
  flex: 1 1 380px;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  line-height: 1.5;
  color: var(--t-39);
  margin: 0;
  max-width: 600px;
  text-wrap: pretty;
}
.hero__index {
  flex: none;
  width: 300px;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--t-69);
}
.hero__index-row {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  transition: color .2s;
}
.hero__index-row--last { border-bottom: 1px solid var(--line); }
.hero__index-row:hover { color: var(--accent); }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(34px, 4vw, 48px);
}

/* ============================================================
   SECTION wrappers
   ============================================================ */
.section {
  padding: clamp(60px, 9vw, 108px) 26px;
  border-top: 1px solid var(--line-soft);
}
.section .wrap { max-width: var(--wrap); }
.section--alt { background: var(--bg-alt); }

/* scroll offset for fixed nav */
[id] { scroll-margin-top: 78px; }

/* ---------- Two-column lists ---------- */
.cols-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 5vw, 72px);
}

.col-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  color: var(--ink);
  margin: 0 0 22px;
}
.col-title--muted { color: var(--t-5b); }

.list { list-style: none; margin: 0; padding: 0; }
.list__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
  color: var(--t-69);
}
.list__item--solid { border-top-color: var(--line-blue); color: var(--t-26); }
.list__item--sm { padding: 13px 0; font-size: 14.5px; }
.list__mark {
  font-family: var(--mono);
  flex: none;
  padding-top: 1px;
}
.list__mark--minus { font-size: 12px; color: var(--t-b7); }
.list__mark--plus { font-size: 13px; color: var(--accent); font-weight: 500; padding-top: 1px; }
.list__item--sm .list__mark { padding-top: 0; }

/* ============================================================
   METODO
   ============================================================ */
.method__step {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(14px, 3vw, 38px);
  padding: clamp(22px, 3vw, 30px) 0;
  border-top: 1px solid var(--line);
}
.method__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  color: var(--accent);
  width: 84px;
  flex: none;
  line-height: 1;
}
.method__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 3.2vw, 1.85rem);
  margin: 0;
  width: 340px;
  flex: none;
  line-height: 1.1;
}
.method__desc {
  flex: 1 1 300px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--t-5b);
  margin: 0;
  min-width: 240px;
}
.method__end { border-top: 1px solid var(--line); }

.callout {
  margin-top: clamp(34px, 4vw, 46px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  background: var(--bg-alt);
  border-radius: 18px;
  padding: clamp(26px, 4vw, 38px);
}
.callout__text {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  max-width: 560px;
}
.callout .btn { flex: none; }

/* ============================================================
   CHI SONO
   ============================================================ */
.about__split {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(30px, 4vw, 40px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about__col { flex: 1 1 360px; }
.about__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  margin: 0 0 14px;
  line-height: 1.1;
}
.about__text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--t-5b);
  margin: 0;
  max-width: 520px;
}
.about__depts { flex: 1 1 300px; min-width: 260px; }
.dept {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.dept__n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t-99);
  width: 34px;
  flex: none;
}
.dept__name { font-size: 16px; font-weight: 600; color: var(--ink); }
.dept__desc { font-size: 13px; color: var(--t-69); }

.about__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  margin-top: clamp(30px, 4vw, 40px);
}
.feature__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 8px;
}
.feature__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--t-5b);
  margin: 0;
}

.stack {
  margin-top: clamp(34px, 4vw, 46px);
  padding-top: clamp(26px, 3vw, 32px);
  border-top: 1px solid var(--line);
}

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  background: #fff;
  border: 1px solid var(--line);
}
.chip--mono {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--t-39);
  padding: 8px 14px;
  border-radius: 8px;
}
.chip--pill {
  font-size: 13.5px;
  color: var(--t-26);
  padding: 9px 16px;
  border-radius: 999px;
}

/* ============================================================
   CASO STUDIO
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: clamp(40px, 5vw, 56px);
}
.stat { background: #fff; padding: clamp(24px, 3vw, 32px) 22px; }
.stat__value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat__label { font-size: 13px; color: var(--t-26); margin-top: 10px; line-height: 1.35; }
.stat__before { font-family: var(--mono); font-size: 11px; color: var(--t-99); margin-top: 5px; }

.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 720px;
  margin: clamp(40px, 5vw, 56px) 0 0;
}

/* ============================================================
   TARGET
   ============================================================ */
.target__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: clamp(40px, 5vw, 56px);
}
.target { padding-top: 22px; border-top: 2px solid var(--accent); }
.target__title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--t-99);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.target__value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.target__sub { font-size: 13.5px; color: var(--t-5b); }

.sectors { padding-top: clamp(26px, 3vw, 32px); border-top: 1px solid var(--line); }

/* ============================================================
   CONTATTI
   ============================================================ */
.section--contatti {
  padding: clamp(60px, 9vw, 108px) 26px clamp(90px, 12vw, 120px);
}
.cta {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--accent);
  border-radius: 26px;
  padding: clamp(44px, 8vw, 90px) clamp(26px, 5vw, 72px);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000, transparent 75%);
  pointer-events: none;
}
.cta__inner { position: relative; max-width: 780px; }
.cta__inner .eyebrow { display: block; margin-bottom: 24px; }
.cta__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 6.5vw, 4.4rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.cta__lead {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: #d7defb;
  margin: 0 0 38px;
  max-width: 560px;
  text-wrap: pretty;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  background: #fff;
  padding: 17px 32px;
  border-radius: 13px;
  transition: transform .2s;
}
.cta__btn:hover { transform: translateY(-2px); }
.cta__mail { font-family: var(--mono); font-size: 13.5px; color: #cdd8f9; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line-soft); padding: 38px 26px; }
.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer__brand { display: flex; align-items: center; }
.footer__logo { width: 28px; height: 28px; }
.footer__links { display: flex; gap: 24px; }
.footer__link { font-size: 13px; color: var(--t-69); transition: color .2s; }
.footer__link:hover { color: var(--ink); }
.footer__meta { font-size: 12.5px; color: var(--t-99); }

/* ============================================================
   STICKY MOBILE CTA
   ============================================================ */
.sticky {
  display: none;
  position: fixed;
  left: 14px; right: 14px; bottom: 14px;
  z-index: 75;
  gap: 10px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(17, 24, 42, 0.12);
}
.sticky__primary {
  flex: 1;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 14px;
  border-radius: 13px;
}
.sticky__secondary {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 13px;
}

/* ============================================================
   REVEAL animation
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16, .84, .44, 1),
              transform .8s cubic-bezier(.16, .84, .44, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE — switch at 860px (matches design isMobile < 860)
   ============================================================ */
@media (max-width: 859px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .sticky { display: flex; }
}

@media (min-width: 860px) {
  .nav__menu { display: none !important; }
}
